]> git.sur5r.net Git - openldap/blob - configure
Note that we likely need to make some of this conditional.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.407 2002/02/11 15:43:13 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-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-module     module type [static]"
137 ac_help="$ac_help
138     --enable-tcl          enable tcl backend [no]"
139 ac_help="$ac_help
140     --with-tcl-module     module type [static]"
141 ac_help="$ac_help
142
143 SLURPD (Replication Daemon) Options:"
144 ac_help="$ac_help
145   --enable-slurpd         enable building slurpd [auto]"
146 ac_help="$ac_help
147
148 Library Generation & Linking Options"
149 ac_help="$ac_help
150   --enable-static[=PKGS]  build static libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-shared[=PKGS]  build shared libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
155 ac_help="$ac_help
156   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
157
158 # Find the correct PATH separator.  Usually this is `:', but
159 # DJGPP uses `;' like DOS.
160 if test "X${PATH_SEPARATOR+set}" != Xset; then
161   UNAME=${UNAME-`uname 2>/dev/null`}
162   case X$UNAME in
163     *-DOS) lt_cv_sys_path_separator=';' ;;
164     *)     lt_cv_sys_path_separator=':' ;;
165   esac
166   PATH_SEPARATOR=$lt_cv_sys_path_separator
167 fi
168
169
170 # Check that we are running under the correct shell.
171 SHELL=${CONFIG_SHELL-/bin/sh}
172
173 case X$ECHO in
174 X*--fallback-echo)
175   # Remove one level of quotation (which was required for Make).
176   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
177   ;;
178 esac
179
180 echo=${ECHO-echo}
181 if test "X$1" = X--no-reexec; then
182   # Discard the --no-reexec flag, and continue.
183   shift
184 elif test "X$1" = X--fallback-echo; then
185   # Avoid inline document here, it may be left over
186   :
187 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
188   # Yippee, $echo works!
189   :
190 else
191   # Restart under the correct shell.
192   exec $SHELL "$0" --no-reexec ${1+"$@"}
193 fi
194
195 if test "X$1" = X--fallback-echo; then
196   # used as fallback echo
197   shift
198   cat <<EOF
199
200 EOF
201   exit 0
202 fi
203
204 # The HP-UX ksh and POSIX shell print the target directory to stdout
205 # if CDPATH is set.
206 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
207
208 if test -z "$ECHO"; then
209 if test "X${echo_test_string+set}" != Xset; then
210 # find a string as large as possible, as long as the shell can cope with it
211   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
212     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
213     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
214        echo_test_string="`eval $cmd`" &&
215        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
216     then
217       break
218     fi
219   done
220 fi
221
222 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
223    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
224    test "X$echo_testing_string" = "X$echo_test_string"; then
225   :
226 else
227   # The Solaris, AIX, and Digital Unix default echo programs unquote
228   # backslashes.  This makes it impossible to quote backslashes using
229   #   echo "$something" | sed 's/\\/\\\\/g'
230   #
231   # So, first we look for a working echo in the user's PATH.
232
233   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
234   for dir in $PATH /usr/ucb; do
235     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
236        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
237        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
238        test "X$echo_testing_string" = "X$echo_test_string"; then
239       echo="$dir/echo"
240       break
241     fi
242   done
243   IFS="$save_ifs"
244
245   if test "X$echo" = Xecho; then
246     # We didn't find a better echo, so look for alternatives.
247     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       # This shell has a builtin print -r that does the trick.
251       echo='print -r'
252     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
253          test "X$CONFIG_SHELL" != X/bin/ksh; then
254       # If we have ksh, try running configure again with it.
255       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
256       export ORIGINAL_CONFIG_SHELL
257       CONFIG_SHELL=/bin/ksh
258       export CONFIG_SHELL
259       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
260     else
261       # Try using printf.
262       echo='printf %s\n'
263       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
264          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
265          test "X$echo_testing_string" = "X$echo_test_string"; then
266         # Cool, printf works
267         :
268       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
269            test "X$echo_testing_string" = 'X\t' &&
270            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
271            test "X$echo_testing_string" = "X$echo_test_string"; then
272         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
273         export CONFIG_SHELL
274         SHELL="$CONFIG_SHELL"
275         export SHELL
276         echo="$CONFIG_SHELL $0 --fallback-echo"
277       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       else
283         # maybe with a smaller string...
284         prev=:
285
286         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
287           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
288           then
289             break
290           fi
291           prev="$cmd"
292         done
293
294         if test "$prev" != 'sed 50q "$0"'; then
295           echo_test_string=`eval $prev`
296           export echo_test_string
297           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
298         else
299           # Oops.  We lost completely, so just stick with echo.
300           echo=echo
301         fi
302       fi
303     fi
304   fi
305 fi
306 fi
307
308 # Copy echo and quote the copy suitably for passing to libtool from
309 # the Makefile, instead of quoting the original, which is used later.
310 ECHO=$echo
311 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
312    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
313 fi
314
315
316 ac_help="$ac_help
317   --disable-libtool-lock  avoid locking (might break parallel builds)"
318 ac_help="$ac_help
319   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
320 ac_help="$ac_help
321
322 See INSTALL file for further details."
323
324 # Initialize some variables set by options.
325 # The variables have the same names as the options, with
326 # dashes changed to underlines.
327 build=NONE
328 cache_file=./config.cache
329 exec_prefix=NONE
330 host=NONE
331 no_create=
332 nonopt=NONE
333 no_recursion=
334 prefix=NONE
335 program_prefix=NONE
336 program_suffix=NONE
337 program_transform_name=s,x,x,
338 silent=
339 site=
340 srcdir=
341 target=NONE
342 verbose=
343 x_includes=NONE
344 x_libraries=NONE
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 # Initialize some other variables.
359 subdirs=
360 MFLAGS= MAKEFLAGS=
361 SHELL=${CONFIG_SHELL-/bin/sh}
362 # Maximum number of lines to put in a shell here document.
363 ac_max_here_lines=12
364
365 ac_prev=
366 for ac_option
367 do
368
369   # If the previous option needs an argument, assign it.
370   if test -n "$ac_prev"; then
371     eval "$ac_prev=\$ac_option"
372     ac_prev=
373     continue
374   fi
375
376   case "$ac_option" in
377   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
378   *) ac_optarg= ;;
379   esac
380
381   # Accept the important Cygnus configure options, so we can diagnose typos.
382
383   case "$ac_option" in
384
385   -bindir | --bindir | --bindi | --bind | --bin | --bi)
386     ac_prev=bindir ;;
387   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
388     bindir="$ac_optarg" ;;
389
390   -build | --build | --buil | --bui | --bu)
391     ac_prev=build ;;
392   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
393     build="$ac_optarg" ;;
394
395   -cache-file | --cache-file | --cache-fil | --cache-fi \
396   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
397     ac_prev=cache_file ;;
398   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
399   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
400     cache_file="$ac_optarg" ;;
401
402   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
403     ac_prev=datadir ;;
404   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
405   | --da=*)
406     datadir="$ac_optarg" ;;
407
408   -disable-* | --disable-*)
409     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
413     fi
414     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
415     eval "enable_${ac_feature}=no" ;;
416
417   -enable-* | --enable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     case "$ac_option" in
425       *=*) ;;
426       *) ac_optarg=yes ;;
427     esac
428     eval "enable_${ac_feature}='$ac_optarg'" ;;
429
430   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
431   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
432   | --exec | --exe | --ex)
433     ac_prev=exec_prefix ;;
434   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
435   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
436   | --exec=* | --exe=* | --ex=*)
437     exec_prefix="$ac_optarg" ;;
438
439   -gas | --gas | --ga | --g)
440     # Obsolete; use --with-gas.
441     with_gas=yes ;;
442
443   -help | --help | --hel | --he)
444     # Omit some internal or obsolete options to make the list less imposing.
445     # This message is too long to be a string in the A/UX 3.1 sh.
446     cat << EOF
447 Usage: configure [options] [host]
448 Options: [defaults in brackets after descriptions]
449 Configuration:
450   --cache-file=FILE       cache test results in FILE
451   --help                  print this message
452   --no-create             do not create output files
453   --quiet, --silent       do not print \`checking...' messages
454   --version               print the version of autoconf that created configure
455 Directory and file names:
456   --prefix=PREFIX         install architecture-independent files in PREFIX
457                           [$ac_default_prefix]
458   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
459                           [same as prefix]
460   --bindir=DIR            user executables in DIR [EPREFIX/bin]
461   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
462   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
463   --datadir=DIR           read-only architecture-independent data in DIR
464                           [PREFIX/share]
465   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
466   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
467                           [PREFIX/com]
468   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
469   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
470   --includedir=DIR        C header files in DIR [PREFIX/include]
471   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
472   --infodir=DIR           info documentation in DIR [PREFIX/info]
473   --mandir=DIR            man documentation in DIR [PREFIX/man]
474   --srcdir=DIR            find the sources in DIR [configure dir or ..]
475   --program-prefix=PREFIX prepend PREFIX to installed program names
476   --program-suffix=SUFFIX append SUFFIX to installed program names
477   --program-transform-name=PROGRAM
478                           run sed PROGRAM on installed program names
479 EOF
480     cat << EOF
481 Host type:
482   --build=BUILD           configure for building on BUILD [BUILD=HOST]
483   --host=HOST             configure for HOST [guessed]
484   --target=TARGET         configure for TARGET [TARGET=HOST]
485 Features and packages:
486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
488   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
489   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
490   --x-includes=DIR        X include files are in DIR
491   --x-libraries=DIR       X library files are in DIR
492 EOF
493     if test -n "$ac_help"; then
494       echo "--enable and --with options recognized:$ac_help"
495     fi
496     exit 0 ;;
497
498   -host | --host | --hos | --ho)
499     ac_prev=host ;;
500   -host=* | --host=* | --hos=* | --ho=*)
501     host="$ac_optarg" ;;
502
503   -includedir | --includedir | --includedi | --included | --include \
504   | --includ | --inclu | --incl | --inc)
505     ac_prev=includedir ;;
506   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
507   | --includ=* | --inclu=* | --incl=* | --inc=*)
508     includedir="$ac_optarg" ;;
509
510   -infodir | --infodir | --infodi | --infod | --info | --inf)
511     ac_prev=infodir ;;
512   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
513     infodir="$ac_optarg" ;;
514
515   -libdir | --libdir | --libdi | --libd)
516     ac_prev=libdir ;;
517   -libdir=* | --libdir=* | --libdi=* | --libd=*)
518     libdir="$ac_optarg" ;;
519
520   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
521   | --libexe | --libex | --libe)
522     ac_prev=libexecdir ;;
523   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
524   | --libexe=* | --libex=* | --libe=*)
525     libexecdir="$ac_optarg" ;;
526
527   -localstatedir | --localstatedir | --localstatedi | --localstated \
528   | --localstate | --localstat | --localsta | --localst \
529   | --locals | --local | --loca | --loc | --lo)
530     ac_prev=localstatedir ;;
531   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
532   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
533   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
534     localstatedir="$ac_optarg" ;;
535
536   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
537     ac_prev=mandir ;;
538   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
539     mandir="$ac_optarg" ;;
540
541   -nfp | --nfp | --nf)
542     # Obsolete; use --without-fp.
543     with_fp=no ;;
544
545   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
546   | --no-cr | --no-c)
547     no_create=yes ;;
548
549   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
550   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
551     no_recursion=yes ;;
552
553   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
554   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
555   | --oldin | --oldi | --old | --ol | --o)
556     ac_prev=oldincludedir ;;
557   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
558   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
559   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
560     oldincludedir="$ac_optarg" ;;
561
562   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
563     ac_prev=prefix ;;
564   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
565     prefix="$ac_optarg" ;;
566
567   -program-prefix | --program-prefix | --program-prefi | --program-pref \
568   | --program-pre | --program-pr | --program-p)
569     ac_prev=program_prefix ;;
570   -program-prefix=* | --program-prefix=* | --program-prefi=* \
571   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
572     program_prefix="$ac_optarg" ;;
573
574   -program-suffix | --program-suffix | --program-suffi | --program-suff \
575   | --program-suf | --program-su | --program-s)
576     ac_prev=program_suffix ;;
577   -program-suffix=* | --program-suffix=* | --program-suffi=* \
578   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
579     program_suffix="$ac_optarg" ;;
580
581   -program-transform-name | --program-transform-name \
582   | --program-transform-nam | --program-transform-na \
583   | --program-transform-n | --program-transform- \
584   | --program-transform | --program-transfor \
585   | --program-transfo | --program-transf \
586   | --program-trans | --program-tran \
587   | --progr-tra | --program-tr | --program-t)
588     ac_prev=program_transform_name ;;
589   -program-transform-name=* | --program-transform-name=* \
590   | --program-transform-nam=* | --program-transform-na=* \
591   | --program-transform-n=* | --program-transform-=* \
592   | --program-transform=* | --program-transfor=* \
593   | --program-transfo=* | --program-transf=* \
594   | --program-trans=* | --program-tran=* \
595   | --progr-tra=* | --program-tr=* | --program-t=*)
596     program_transform_name="$ac_optarg" ;;
597
598   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
599   | -silent | --silent | --silen | --sile | --sil)
600     silent=yes ;;
601
602   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
603     ac_prev=sbindir ;;
604   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
605   | --sbi=* | --sb=*)
606     sbindir="$ac_optarg" ;;
607
608   -sharedstatedir | --sharedstatedir | --sharedstatedi \
609   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
610   | --sharedst | --shareds | --shared | --share | --shar \
611   | --sha | --sh)
612     ac_prev=sharedstatedir ;;
613   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
614   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
615   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
616   | --sha=* | --sh=*)
617     sharedstatedir="$ac_optarg" ;;
618
619   -site | --site | --sit)
620     ac_prev=site ;;
621   -site=* | --site=* | --sit=*)
622     site="$ac_optarg" ;;
623
624   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
625     ac_prev=srcdir ;;
626   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
627     srcdir="$ac_optarg" ;;
628
629   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
630   | --syscon | --sysco | --sysc | --sys | --sy)
631     ac_prev=sysconfdir ;;
632   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
633   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
634     sysconfdir="$ac_optarg" ;;
635
636   -target | --target | --targe | --targ | --tar | --ta | --t)
637     ac_prev=target ;;
638   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
639     target="$ac_optarg" ;;
640
641   -v | -verbose | --verbose | --verbos | --verbo | --verb)
642     verbose=yes ;;
643
644   -version | --version | --versio | --versi | --vers)
645     echo "configure generated by autoconf version 2.13.1"
646     exit 0 ;;
647
648   -with-* | --with-*)
649     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
650     # Reject names that are not valid shell variable names.
651     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
652       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
653     fi
654     ac_package=`echo $ac_package| sed 's/-/_/g'`
655     case "$ac_option" in
656       *=*) ;;
657       *) ac_optarg=yes ;;
658     esac
659     eval "with_${ac_package}='$ac_optarg'" ;;
660
661   -without-* | --without-*)
662     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
663     # Reject names that are not valid shell variable names.
664     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
665       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
666     fi
667     ac_package=`echo $ac_package| sed 's/-/_/g'`
668     eval "with_${ac_package}=no" ;;
669
670   --x)
671     # Obsolete; use --with-x.
672     with_x=yes ;;
673
674   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
675   | --x-incl | --x-inc | --x-in | --x-i)
676     ac_prev=x_includes ;;
677   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
678   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
679     x_includes="$ac_optarg" ;;
680
681   -x-libraries | --x-libraries | --x-librarie | --x-librari \
682   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
683     ac_prev=x_libraries ;;
684   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
685   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
686     x_libraries="$ac_optarg" ;;
687
688   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
689     ;;
690
691   *)
692     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
693       echo "configure: warning: $ac_option: invalid host type" 1>&2
694     fi
695     if test "x$nonopt" != xNONE; then
696       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
697     fi
698     nonopt="$ac_option"
699     ;;
700
701   esac
702 done
703
704 if test -n "$ac_prev"; then
705   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
706 fi
707
708 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
709
710 # File descriptor usage:
711 # 0 standard input
712 # 1 file creation
713 # 2 errors and warnings
714 # 3 some systems may open it to /dev/tty
715 # 4 used on the Kubota Titan
716 # 6 checking for... messages and results
717 # 5 compiler messages saved in config.log
718 if test "$silent" = yes; then
719   exec 6>/dev/null
720 else
721   exec 6>&1
722 fi
723 exec 5>./config.log
724
725 echo "\
726 This file contains any messages produced by compilers while
727 running configure, to aid debugging if configure makes a mistake.
728 " 1>&5
729
730 # Strip out --no-create and --no-recursion so they do not pile up.
731 # Also quote any args containing shell metacharacters.
732 ac_configure_args=
733 for ac_arg
734 do
735   case "$ac_arg" in
736   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
737   | --no-cr | --no-c) ;;
738   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
739   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
740   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
741   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
742   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
743   esac
744 done
745
746 # NLS nuisances.
747 # Only set these to C if already set.  These must not be set unconditionally
748 # because not all systems understand e.g. LANG=C (notably SCO).
749 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
750 # Non-C LC_CTYPE values break the ctype check.
751 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
752 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
753 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
754 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
755
756 # confdefs.h avoids OS command line length limits that DEFS can exceed.
757 rm -rf conftest* confdefs.h
758 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
759 echo > confdefs.h
760
761 # A filename unique to this package, relative to the directory that
762 # configure is in, which we can look for to find out if srcdir is correct.
763 ac_unique_file=build/version.sh
764
765 # Find the source files, if location was not specified.
766 if test -z "$srcdir"; then
767   ac_srcdir_defaulted=yes
768   # Try the directory containing this script, then its parent.
769   ac_prog=$0
770   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
771   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
772   srcdir=$ac_confdir
773   if test ! -r $srcdir/$ac_unique_file; then
774     srcdir=..
775   fi
776 else
777   ac_srcdir_defaulted=no
778 fi
779 if test ! -r $srcdir/$ac_unique_file; then
780   if test "$ac_srcdir_defaulted" = yes; then
781     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
782   else
783     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
784   fi
785 fi
786 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
787
788 # Prefer explicitly selected file to automatically selected ones.
789 if test -z "$CONFIG_SITE"; then
790   if test "x$prefix" != xNONE; then
791     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
792   else
793     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
794   fi
795 fi
796 for ac_site_file in $CONFIG_SITE; do
797   if test -r "$ac_site_file"; then
798     echo "loading site script $ac_site_file"
799     . "$ac_site_file"
800   fi
801 done
802
803
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 ac_exeext=
812 ac_objext=o
813 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
814   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
815   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
816     ac_n= ac_c='
817 ' ac_t='        '
818   else
819     ac_n=-n ac_c= ac_t=
820   fi
821 else
822   ac_n= ac_c='\c' ac_t=
823 fi
824
825
826 # set unset (borrowed from autoconf 2.49c)
827 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
828   ol_unset=unset
829 else
830   ol_unset=false
831 fi
832 # unset CDPATH
833 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
834
835 ac_aux_dir=
836 for ac_dir in build $srcdir/build; do
837   if test -f $ac_dir/install-sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install-sh -c"
840     break
841   elif test -f $ac_dir/install.sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install.sh -c"
844     break
845   elif test -f $ac_dir/shtool; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/shtool install -c"
848     break
849   fi
850 done
851 if test -z "$ac_aux_dir"; then
852   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
853 fi
854 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
855 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
856 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
857
858 eval `$ac_aux_dir/version.sh`
859 if test -z "$OL_STRING"; then
860         { echo "configure: error: could not determine version" 1>&2; exit 1; }
861 fi
862
863 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
864         ac_cv_shtool="$ac_aux_dir/shtool"
865 else
866         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
867 fi
868
869 SHTOOL="$ac_cv_shtool"
870
871 TB=`$SHTOOL echo -e %B`
872 TN=`$SHTOOL echo -e %b`
873
874 echo "Configuring $TB$OL_STRING$TN ..."
875
876
877 echo $ac_n "checking host system type""... $ac_c" 1>&6
878 echo "configure:879: checking host system type" >&5
879 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
880
881 # Make sure we can run config.sub.
882   if $ac_config_sub sun4 >/dev/null 2>&1; then :
883     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
884   fi
885
886   ac_cv_host_alias=$host
887   case "$ac_cv_host_alias" in
888   NONE)
889     case $nonopt in
890     NONE)
891       if ac_cv_host_alias=`$ac_config_guess`; then :
892       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
893       fi ;;
894     *) ac_cv_host_alias=$nonopt ;;
895     esac ;;
896   esac
897
898   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
899   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
900   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
901   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
902 else
903   echo $ac_n "(cached) $ac_c" 1>&6
904 fi
905
906 echo "$ac_t""$ac_cv_host" 1>&6
907
908 host=$ac_cv_host
909 host_alias=$ac_cv_host_alias
910 host_cpu=$ac_cv_host_cpu
911 host_vendor=$ac_cv_host_vendor
912 host_os=$ac_cv_host_os
913
914
915
916
917
918 echo $ac_n "checking target system type""... $ac_c" 1>&6
919 echo "configure:920: checking target system type" >&5
920 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
921
922 # Make sure we can run config.sub.
923   if $ac_config_sub sun4 >/dev/null 2>&1; then :
924     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
925   fi
926
927   ac_cv_target_alias=$target
928   case "$ac_cv_target_alias" in
929   NONE)
930     case $nonopt in
931     NONE)
932       ac_cv_target_alias=$host_alias ;;
933
934     *) ac_cv_target_alias=$nonopt ;;
935     esac ;;
936   esac
937
938   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
939   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
940   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
941   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
942 else
943   echo $ac_n "(cached) $ac_c" 1>&6
944 fi
945
946 echo "$ac_t""$ac_cv_target" 1>&6
947
948 target=$ac_cv_target
949 target_alias=$ac_cv_target_alias
950 target_cpu=$ac_cv_target_cpu
951 target_vendor=$ac_cv_target_vendor
952 target_os=$ac_cv_target_os
953
954
955
956
957
958 echo $ac_n "checking build system type""... $ac_c" 1>&6
959 echo "configure:960: checking build system type" >&5
960 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
961
962 # Make sure we can run config.sub.
963   if $ac_config_sub sun4 >/dev/null 2>&1; then :
964     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
965   fi
966
967   ac_cv_build_alias=$build
968   case "$ac_cv_build_alias" in
969   NONE)
970     case $nonopt in
971     NONE)
972       ac_cv_build_alias=$host_alias ;;
973
974     *) ac_cv_build_alias=$nonopt ;;
975     esac ;;
976   esac
977
978   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
979   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
980   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
981   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
982 else
983   echo $ac_n "(cached) $ac_c" 1>&6
984 fi
985
986 echo "$ac_t""$ac_cv_build" 1>&6
987
988 build=$ac_cv_build
989 build_alias=$ac_cv_build_alias
990 build_cpu=$ac_cv_build_cpu
991 build_vendor=$ac_cv_build_vendor
992 build_os=$ac_cv_build_os
993
994
995
996
997
998 # Do some error checking and defaulting for the host and target type.
999 # The inputs are:
1000 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1001 #
1002 # The rules are:
1003 # 1. You are not allowed to specify --host, --target, and nonopt at the
1004 #    same time.
1005 # 2. Host defaults to nonopt.
1006 # 3. If nonopt is not specified, then host defaults to the current host,
1007 #    as determined by config.guess.
1008 # 4. Target and build default to nonopt.
1009 # 5. If nonopt is not specified, then target and build default to host.
1010
1011 # The aliases save the names the user supplied, while $host etc.
1012 # will get canonicalized.
1013 case $host---$target---$nonopt in
1014 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1015 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1016 esac
1017
1018 test "$host_alias" != "$target_alias" &&
1019   test "$program_prefix$program_suffix$program_transform_name" = \
1020     NONENONEs,x,x, &&
1021   program_prefix=${target_alias}-
1022
1023
1024 # Find a good install program.  We prefer a C program (faster),
1025 # so one script is as good as another.  But avoid the broken or
1026 # incompatible versions:
1027 # SysV /etc/install, /usr/sbin/install
1028 # SunOS /usr/etc/install
1029 # IRIX /sbin/install
1030 # AIX /bin/install
1031 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1032 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1033 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1034 # ./install, which can be erroneously created by make from ./install.sh.
1035 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1036 echo "configure:1037: checking for a BSD compatible install" >&5
1037 if test -z "$INSTALL"; then
1038 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1042   for ac_dir in $PATH; do
1043     # Account for people who put trailing slashes in PATH elements.
1044     case "$ac_dir/" in
1045     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1046     *)
1047       # OSF1 and SCO ODT 3.0 have their own names for install.
1048       # Don't use installbsd from OSF since it installs stuff as root
1049       # by default.
1050       for ac_prog in ginstall scoinst install; do
1051         if test -f $ac_dir/$ac_prog; then
1052           if test $ac_prog = install &&
1053             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1054             # AIX install.  It has an incompatible calling convention.
1055             :
1056           elif test $ac_prog = install &&
1057             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1058             # program-specific install script used by HP pwplus--don't use.
1059             :
1060           else
1061             ac_cv_path_install="$ac_dir/$ac_prog -c"
1062             break 2
1063           fi
1064         fi
1065       done
1066       ;;
1067     esac
1068   done
1069   IFS="$ac_save_IFS"
1070
1071 fi
1072   if test "${ac_cv_path_install+set}" = set; then
1073     INSTALL="$ac_cv_path_install"
1074   else
1075     # As a last resort, use the slow shell script.  We don't cache a
1076     # path for INSTALL within a source directory, because that will
1077     # break other packages using the cache if that directory is
1078     # removed, or if the path is relative.
1079     INSTALL="$ac_install_sh"
1080   fi
1081 fi
1082 echo "$ac_t""$INSTALL" 1>&6
1083
1084 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1085 # It thinks the first close brace ends the variable substitution.
1086 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1087
1088 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1089
1090 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1091
1092 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1093 echo "configure:1094: checking whether build environment is sane" >&5
1094 # Just in case
1095 sleep 1
1096 echo timestamp > conftestfile
1097 # Do `set' in a subshell so we don't clobber the current shell's
1098 # arguments.  Must try -L first in case configure is actually a
1099 # symlink; some systems play weird games with the mod time of symlinks
1100 # (eg FreeBSD returns the mod time of the symlink's containing
1101 # directory).
1102 if (
1103    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1104    if test "$*" = "X"; then
1105       # -L didn't work.
1106       set X `ls -t $srcdir/configure conftestfile`
1107    fi
1108    if test "$*" != "X $srcdir/configure conftestfile" \
1109       && test "$*" != "X conftestfile $srcdir/configure"; then
1110
1111       # If neither matched, then we have a broken ls.  This can happen
1112       # if, for instance, CONFIG_SHELL is bash and it inherits a
1113       # broken ls alias from the environment.  This has actually
1114       # happened.  Such a system could not be considered "sane".
1115       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1116 alias in your environment" 1>&2; exit 1; }
1117    fi
1118
1119    test "$2" = conftestfile
1120    )
1121 then
1122    # Ok.
1123    :
1124 else
1125    { echo "configure: error: newly created file is older than distributed files!
1126 Check your system clock" 1>&2; exit 1; }
1127 fi
1128 rm -f conftest*
1129 echo "$ac_t""yes" 1>&6
1130 if test "$program_transform_name" = s,x,x,; then
1131   program_transform_name=
1132 else
1133   # Double any \ or $.  echo might interpret backslashes.
1134   cat <<\EOF_SED > conftestsed
1135 s,\\,\\\\,g; s,\$,$$,g
1136 EOF_SED
1137   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1138   rm -f conftestsed
1139 fi
1140 test "$program_prefix" != NONE &&
1141   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1142 # Use a double $ so make ignores it.
1143 test "$program_suffix" != NONE &&
1144   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1145
1146 # sed with no file args requires a program.
1147 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1148
1149 for ac_prog in mawk gawk nawk awk
1150 do
1151 # Extract the first word of "$ac_prog", so it can be a program name with args.
1152 set dummy $ac_prog; ac_word=$2
1153 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1154 echo "configure:1155: checking for $ac_word" >&5
1155 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1156   echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158   if test -n "$AWK"; then
1159   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1160 else
1161   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1162   ac_dummy="$PATH"
1163   for ac_dir in $ac_dummy; do
1164     test -z "$ac_dir" && ac_dir=.
1165     if test -f $ac_dir/$ac_word; then
1166       ac_cv_prog_AWK="$ac_prog"
1167       break
1168     fi
1169   done
1170   IFS="$ac_save_ifs"
1171 fi
1172 fi
1173 AWK="$ac_cv_prog_AWK"
1174 if test -n "$AWK"; then
1175   echo "$ac_t""$AWK" 1>&6
1176 else
1177   echo "$ac_t""no" 1>&6
1178 fi
1179
1180 test -n "$AWK" && break
1181 done
1182
1183 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1184 echo "configure:1185: checking whether ${MAKE-make} sets \${MAKE}" >&5
1185 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1186 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1187   echo $ac_n "(cached) $ac_c" 1>&6
1188 else
1189   cat > conftestmake <<\EOF
1190 all:
1191         @echo 'ac_maketemp="${MAKE}"'
1192 EOF
1193 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1194 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1195 if test -n "$ac_maketemp"; then
1196   eval ac_cv_prog_make_${ac_make}_set=yes
1197 else
1198   eval ac_cv_prog_make_${ac_make}_set=no
1199 fi
1200 rm -f conftestmake
1201 fi
1202 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1203   echo "$ac_t""yes" 1>&6
1204   SET_MAKE=
1205 else
1206   echo "$ac_t""no" 1>&6
1207   SET_MAKE="MAKE=${MAKE-make}"
1208 fi
1209
1210
1211
1212 PACKAGE=$OL_PACKAGE
1213
1214 VERSION=$OL_VERSION
1215
1216 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1217   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1218 fi
1219
1220
1221
1222 missing_dir=`cd $ac_aux_dir && pwd`
1223 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1224 echo "configure:1225: checking for working aclocal" >&5
1225 # Run test in a subshell; some versions of sh will print an error if
1226 # an executable is not found, even if stderr is redirected.
1227 # Redirect stdin to placate older versions of autoconf.  Sigh.
1228 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1229    ACLOCAL=aclocal
1230    echo "$ac_t""found" 1>&6
1231 else
1232    ACLOCAL="$missing_dir/missing aclocal"
1233    echo "$ac_t""missing" 1>&6
1234 fi
1235
1236 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1237 echo "configure:1238: checking for working autoconf" >&5
1238 # Run test in a subshell; some versions of sh will print an error if
1239 # an executable is not found, even if stderr is redirected.
1240 # Redirect stdin to placate older versions of autoconf.  Sigh.
1241 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1242    AUTOCONF=autoconf
1243    echo "$ac_t""found" 1>&6
1244 else
1245    AUTOCONF="$missing_dir/missing autoconf"
1246    echo "$ac_t""missing" 1>&6
1247 fi
1248
1249 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1250 echo "configure:1251: checking for working automake" >&5
1251 # Run test in a subshell; some versions of sh will print an error if
1252 # an executable is not found, even if stderr is redirected.
1253 # Redirect stdin to placate older versions of autoconf.  Sigh.
1254 if (automake --version) < /dev/null > /dev/null 2>&1; then
1255    AUTOMAKE=automake
1256    echo "$ac_t""found" 1>&6
1257 else
1258    AUTOMAKE="$missing_dir/missing automake"
1259    echo "$ac_t""missing" 1>&6
1260 fi
1261
1262 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1263 echo "configure:1264: checking for working autoheader" >&5
1264 # Run test in a subshell; some versions of sh will print an error if
1265 # an executable is not found, even if stderr is redirected.
1266 # Redirect stdin to placate older versions of autoconf.  Sigh.
1267 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1268    AUTOHEADER=autoheader
1269    echo "$ac_t""found" 1>&6
1270 else
1271    AUTOHEADER="$missing_dir/missing autoheader"
1272    echo "$ac_t""missing" 1>&6
1273 fi
1274
1275 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1276 echo "configure:1277: checking for working makeinfo" >&5
1277 # Run test in a subshell; some versions of sh will print an error if
1278 # an executable is not found, even if stderr is redirected.
1279 # Redirect stdin to placate older versions of autoconf.  Sigh.
1280 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1281    MAKEINFO=makeinfo
1282    echo "$ac_t""found" 1>&6
1283 else
1284    MAKEINFO="$missing_dir/missing makeinfo"
1285    echo "$ac_t""missing" 1>&6
1286 fi
1287
1288 install_sh="$missing_dir/install-sh"
1289 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1290
1291 for ac_prog in gnutar gtar tar
1292 do
1293 # Extract the first word of "$ac_prog", so it can be a program name with args.
1294 set dummy $ac_prog; ac_word=$2
1295 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1296 echo "configure:1297: checking for $ac_word" >&5
1297 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1298   echo $ac_n "(cached) $ac_c" 1>&6
1299 else
1300   if test -n "$AMTAR"; then
1301   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1302 else
1303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1304   ac_dummy="$PATH"
1305   for ac_dir in $ac_dummy; do
1306     test -z "$ac_dir" && ac_dir=.
1307     if test -f $ac_dir/$ac_word; then
1308       ac_cv_prog_AMTAR="$ac_prog"
1309       break
1310     fi
1311   done
1312   IFS="$ac_save_ifs"
1313 fi
1314 fi
1315 AMTAR="$ac_cv_prog_AMTAR"
1316 if test -n "$AMTAR"; then
1317   echo "$ac_t""$AMTAR" 1>&6
1318 else
1319   echo "$ac_t""no" 1>&6
1320 fi
1321
1322 test -n "$AMTAR" && break
1323 done
1324
1325
1326 AMTARFLAGS=
1327 if test -n "$AMTAR"; then
1328   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1329         AMTARFLAGS=o
1330   fi
1331 fi
1332
1333 cat >> confdefs.h <<EOF
1334 #define OPENLDAP_PACKAGE "$PACKAGE"
1335 EOF
1336
1337 cat >> confdefs.h <<EOF
1338 #define OPENLDAP_VERSION "$VERSION"
1339 EOF
1340
1341
1342 cat >> confdefs.h <<EOF
1343 #define LDAP_VENDOR_VERSION $OL_API_INC
1344 EOF
1345
1346 cat >> confdefs.h <<EOF
1347 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1348 EOF
1349
1350 cat >> confdefs.h <<EOF
1351 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1352 EOF
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1356 EOF
1357
1358
1359 OPENLDAP_LIBVERSION=$OL_API_LIB
1360
1361
1362
1363 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1364 echo "configure:1365: checking configure arguments" >&5
1365
1366
1367 top_builddir=`pwd`
1368
1369 ldap_subdir="/openldap"
1370
1371 # Check whether --with-subdir or --without-subdir was given.
1372 if test "${with_subdir+set}" = set; then
1373   withval="$with_subdir"
1374   case "$withval" in
1375         no) ldap_subdir=""
1376                 ;;
1377         yes)
1378                 ;;
1379         /*|\\*)
1380                 ldap_subdir="$withval"
1381                 ;;
1382         *)
1383                 ldap_subdir="/$withval"
1384                 ;;
1385 esac
1386
1387 fi
1388
1389
1390 # OpenLDAP --enable-debug
1391         # Check whether --enable-debug or --disable-debug was given.
1392 if test "${enable_debug+set}" = set; then
1393   enableval="$enable_debug"
1394   
1395         ol_arg=invalid
1396         for ol_val in auto yes no ; do
1397                 if test "$enableval" = "$ol_val" ; then
1398                         ol_arg="$ol_val"
1399                 fi
1400         done
1401         if test "$ol_arg" = "invalid" ; then
1402                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1403         fi
1404         ol_enable_debug="$ol_arg"
1405
1406 else
1407         ol_enable_debug="yes"
1408 fi
1409 # end --enable-debug
1410 # OpenLDAP --enable-syslog
1411         # Check whether --enable-syslog or --disable-syslog was given.
1412 if test "${enable_syslog+set}" = set; then
1413   enableval="$enable_syslog"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto yes no ; do
1417                 if test "$enableval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1423         fi
1424         ol_enable_syslog="$ol_arg"
1425
1426 else
1427         ol_enable_syslog="auto"
1428 fi
1429 # end --enable-syslog
1430 # OpenLDAP --enable-proctitle
1431         # Check whether --enable-proctitle or --disable-proctitle was given.
1432 if test "${enable_proctitle+set}" = set; then
1433   enableval="$enable_proctitle"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1443         fi
1444         ol_enable_proctitle="$ol_arg"
1445
1446 else
1447         ol_enable_proctitle="yes"
1448 fi
1449 # end --enable-proctitle
1450 # OpenLDAP --enable-cache
1451         # Check whether --enable-cache or --disable-cache was given.
1452 if test "${enable_cache+set}" = set; then
1453   enableval="$enable_cache"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto yes no ; do
1457                 if test "$enableval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1463         fi
1464         ol_enable_cache="$ol_arg"
1465
1466 else
1467         ol_enable_cache="no"
1468 fi
1469 # end --enable-cache
1470 # OpenLDAP --enable-referrals
1471         # Check whether --enable-referrals or --disable-referrals was given.
1472 if test "${enable_referrals+set}" = set; then
1473   enableval="$enable_referrals"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no ; do
1477                 if test "$enableval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1483         fi
1484         ol_enable_referrals="$ol_arg"
1485
1486 else
1487         ol_enable_referrals="no"
1488 fi
1489 # end --enable-referrals
1490 # OpenLDAP --enable-kbind
1491         # Check whether --enable-kbind or --disable-kbind was given.
1492 if test "${enable_kbind+set}" = set; then
1493   enableval="$enable_kbind"
1494   
1495         ol_arg=invalid
1496         for ol_val in auto yes no ; do
1497                 if test "$enableval" = "$ol_val" ; then
1498                         ol_arg="$ol_val"
1499                 fi
1500         done
1501         if test "$ol_arg" = "invalid" ; then
1502                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1503         fi
1504         ol_enable_kbind="$ol_arg"
1505
1506 else
1507         ol_enable_kbind="no"
1508 fi
1509 # end --enable-kbind
1510 # OpenLDAP --enable-ipv6
1511         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1512 if test "${enable_ipv6+set}" = set; then
1513   enableval="$enable_ipv6"
1514   
1515         ol_arg=invalid
1516         for ol_val in auto yes no ; do
1517                 if test "$enableval" = "$ol_val" ; then
1518                         ol_arg="$ol_val"
1519                 fi
1520         done
1521         if test "$ol_arg" = "invalid" ; then
1522                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1523         fi
1524         ol_enable_ipv6="$ol_arg"
1525
1526 else
1527         ol_enable_ipv6="auto"
1528 fi
1529 # end --enable-ipv6
1530 # OpenLDAP --enable-local
1531         # Check whether --enable-local or --disable-local was given.
1532 if test "${enable_local+set}" = set; then
1533   enableval="$enable_local"
1534   
1535         ol_arg=invalid
1536         for ol_val in auto yes no ; do
1537                 if test "$enableval" = "$ol_val" ; then
1538                         ol_arg="$ol_val"
1539                 fi
1540         done
1541         if test "$ol_arg" = "invalid" ; then
1542                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1543         fi
1544         ol_enable_local="$ol_arg"
1545
1546 else
1547         ol_enable_local="auto"
1548 fi
1549 # end --enable-local
1550 # OpenLDAP --enable-rewrite
1551         # Check whether --enable-rewrite or --disable-rewrite was given.
1552 if test "${enable_rewrite+set}" = set; then
1553   enableval="$enable_rewrite"
1554   
1555         ol_arg=invalid
1556         for ol_val in auto yes no ; do
1557                 if test "$enableval" = "$ol_val" ; then
1558                         ol_arg="$ol_val"
1559                 fi
1560         done
1561         if test "$ol_arg" = "invalid" ; then
1562                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1563         fi
1564         ol_enable_rewrite="$ol_arg"
1565
1566 else
1567         ol_enable_rewrite="no"
1568 fi
1569 # end --enable-rewrite
1570 # OpenLDAP --enable-x_compile
1571         # Check whether --enable-x_compile or --disable-x_compile was given.
1572 if test "${enable_x_compile+set}" = set; then
1573   enableval="$enable_x_compile"
1574   
1575         ol_arg=invalid
1576         for ol_val in yes no ; do
1577                 if test "$enableval" = "$ol_val" ; then
1578                         ol_arg="$ol_val"
1579                 fi
1580         done
1581         if test "$ol_arg" = "invalid" ; then
1582                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1583         fi
1584         ol_enable_x_compile="$ol_arg"
1585
1586 else
1587         ol_enable_x_compile="no"
1588 fi
1589 # end --enable-x_compile
1590
1591
1592 # OpenLDAP --with-cyrus_sasl
1593         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1594 if test "${with_cyrus_sasl+set}" = set; then
1595   withval="$with_cyrus_sasl"
1596   
1597         ol_arg=invalid
1598         for ol_val in auto yes no  ; do
1599                 if test "$withval" = "$ol_val" ; then
1600                         ol_arg="$ol_val"
1601                 fi
1602         done
1603         if test "$ol_arg" = "invalid" ; then
1604                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1605         fi
1606         ol_with_cyrus_sasl="$ol_arg"
1607
1608 else
1609         ol_with_cyrus_sasl="auto"
1610 fi
1611 # end --with-cyrus_sasl
1612
1613 # OpenLDAP --with-fetch
1614         # Check whether --with-fetch or --without-fetch was given.
1615 if test "${with_fetch+set}" = set; then
1616   withval="$with_fetch"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no  ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1626         fi
1627         ol_with_fetch="$ol_arg"
1628
1629 else
1630         ol_with_fetch="auto"
1631 fi
1632 # end --with-fetch
1633
1634 # OpenLDAP --with-kerberos
1635         # Check whether --with-kerberos or --without-kerberos was given.
1636 if test "${with_kerberos+set}" = set; then
1637   withval="$with_kerberos"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1641                 if test "$withval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1647         fi
1648         ol_with_kerberos="$ol_arg"
1649
1650 else
1651         ol_with_kerberos="auto"
1652 fi
1653 # end --with-kerberos
1654
1655 # OpenLDAP --with-readline
1656         # Check whether --with-readline or --without-readline was given.
1657 if test "${with_readline+set}" = set; then
1658   withval="$with_readline"
1659   
1660         ol_arg=invalid
1661         for ol_val in auto yes no  ; do
1662                 if test "$withval" = "$ol_val" ; then
1663                         ol_arg="$ol_val"
1664                 fi
1665         done
1666         if test "$ol_arg" = "invalid" ; then
1667                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1668         fi
1669         ol_with_readline="$ol_arg"
1670
1671 else
1672         ol_with_readline="auto"
1673 fi
1674 # end --with-readline
1675
1676 # OpenLDAP --with-threads
1677         # Check whether --with-threads or --without-threads was given.
1678 if test "${with_threads+set}" = set; then
1679   withval="$with_threads"
1680   
1681         ol_arg=invalid
1682         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1683                 if test "$withval" = "$ol_val" ; then
1684                         ol_arg="$ol_val"
1685                 fi
1686         done
1687         if test "$ol_arg" = "invalid" ; then
1688                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1689         fi
1690         ol_with_threads="$ol_arg"
1691
1692 else
1693         ol_with_threads="auto"
1694 fi
1695 # end --with-threads
1696
1697 # OpenLDAP --with-tls
1698         # Check whether --with-tls or --without-tls was given.
1699 if test "${with_tls+set}" = set; then
1700   withval="$with_tls"
1701   
1702         ol_arg=invalid
1703         for ol_val in auto ssleay openssl yes no  ; do
1704                 if test "$withval" = "$ol_val" ; then
1705                         ol_arg="$ol_val"
1706                 fi
1707         done
1708         if test "$ol_arg" = "invalid" ; then
1709                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1710         fi
1711         ol_with_tls="$ol_arg"
1712
1713 else
1714         ol_with_tls="auto"
1715 fi
1716 # end --with-tls
1717
1718 # OpenLDAP --with-yielding_select
1719         # Check whether --with-yielding_select or --without-yielding_select was given.
1720 if test "${with_yielding_select+set}" = set; then
1721   withval="$with_yielding_select"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no manual  ; do
1725                 if test "$withval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1731         fi
1732         ol_with_yielding_select="$ol_arg"
1733
1734 else
1735         ol_with_yielding_select="auto"
1736 fi
1737 # end --with-yielding_select
1738
1739
1740
1741 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1742 if test "${with_xxslapdoptions+set}" = set; then
1743   withval="$with_xxslapdoptions"
1744   :
1745 fi
1746
1747 # OpenLDAP --enable-slapd
1748         # Check whether --enable-slapd or --disable-slapd was given.
1749 if test "${enable_slapd+set}" = set; then
1750   enableval="$enable_slapd"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1760         fi
1761         ol_enable_slapd="$ol_arg"
1762
1763 else
1764         ol_enable_slapd="yes"
1765 fi
1766 # end --enable-slapd
1767 # OpenLDAP --enable-aci
1768         # Check whether --enable-aci or --disable-aci was given.
1769 if test "${enable_aci+set}" = set; then
1770   enableval="$enable_aci"
1771   
1772         ol_arg=invalid
1773         for ol_val in auto yes no ; do
1774                 if test "$enableval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1780         fi
1781         ol_enable_aci="$ol_arg"
1782
1783 else
1784         ol_enable_aci="no"
1785 fi
1786 # end --enable-aci
1787 # OpenLDAP --enable-cleartext
1788         # Check whether --enable-cleartext or --disable-cleartext was given.
1789 if test "${enable_cleartext+set}" = set; then
1790   enableval="$enable_cleartext"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1800         fi
1801         ol_enable_cleartext="$ol_arg"
1802
1803 else
1804         ol_enable_cleartext="yes"
1805 fi
1806 # end --enable-cleartext
1807 # OpenLDAP --enable-crypt
1808         # Check whether --enable-crypt or --disable-crypt was given.
1809 if test "${enable_crypt+set}" = set; then
1810   enableval="$enable_crypt"
1811   
1812         ol_arg=invalid
1813         for ol_val in auto yes no ; do
1814                 if test "$enableval" = "$ol_val" ; then
1815                         ol_arg="$ol_val"
1816                 fi
1817         done
1818         if test "$ol_arg" = "invalid" ; then
1819                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1820         fi
1821         ol_enable_crypt="$ol_arg"
1822
1823 else
1824         ol_enable_crypt="no"
1825 fi
1826 # end --enable-crypt
1827 # OpenLDAP --enable-dynamic
1828         # Check whether --enable-dynamic or --disable-dynamic was given.
1829 if test "${enable_dynamic+set}" = set; then
1830   enableval="$enable_dynamic"
1831   
1832         ol_arg=invalid
1833         for ol_val in auto yes no ; do
1834                 if test "$enableval" = "$ol_val" ; then
1835                         ol_arg="$ol_val"
1836                 fi
1837         done
1838         if test "$ol_arg" = "invalid" ; then
1839                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1840         fi
1841         ol_enable_dynamic="$ol_arg"
1842
1843 else
1844         ol_enable_dynamic="no"
1845 fi
1846 # end --enable-dynamic
1847 # OpenLDAP --enable-kpasswd
1848         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1849 if test "${enable_kpasswd+set}" = set; then
1850   enableval="$enable_kpasswd"
1851   
1852         ol_arg=invalid
1853         for ol_val in auto yes no ; do
1854                 if test "$enableval" = "$ol_val" ; then
1855                         ol_arg="$ol_val"
1856                 fi
1857         done
1858         if test "$ol_arg" = "invalid" ; then
1859                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1860         fi
1861         ol_enable_kpasswd="$ol_arg"
1862
1863 else
1864         ol_enable_kpasswd="no"
1865 fi
1866 # end --enable-kpasswd
1867 # OpenLDAP --enable-lmpasswd
1868         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1869 if test "${enable_lmpasswd+set}" = set; then
1870   enableval="$enable_lmpasswd"
1871   
1872         ol_arg=invalid
1873         for ol_val in auto yes no ; do
1874                 if test "$enableval" = "$ol_val" ; then
1875                         ol_arg="$ol_val"
1876                 fi
1877         done
1878         if test "$ol_arg" = "invalid" ; then
1879                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1880         fi
1881         ol_enable_lmpasswd="$ol_arg"
1882
1883 else
1884         ol_enable_lmpasswd="no"
1885 fi
1886 # end --enable-lmpasswd
1887 # OpenLDAP --enable-spasswd
1888         # Check whether --enable-spasswd or --disable-spasswd was given.
1889 if test "${enable_spasswd+set}" = set; then
1890   enableval="$enable_spasswd"
1891   
1892         ol_arg=invalid
1893         for ol_val in auto yes no ; do
1894                 if test "$enableval" = "$ol_val" ; then
1895                         ol_arg="$ol_val"
1896                 fi
1897         done
1898         if test "$ol_arg" = "invalid" ; then
1899                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1900         fi
1901         ol_enable_spasswd="$ol_arg"
1902
1903 else
1904         ol_enable_spasswd="no"
1905 fi
1906 # end --enable-spasswd
1907 # OpenLDAP --enable-modules
1908         # Check whether --enable-modules or --disable-modules was given.
1909 if test "${enable_modules+set}" = set; then
1910   enableval="$enable_modules"
1911   
1912         ol_arg=invalid
1913         for ol_val in auto yes no ; do
1914                 if test "$enableval" = "$ol_val" ; then
1915                         ol_arg="$ol_val"
1916                 fi
1917         done
1918         if test "$ol_arg" = "invalid" ; then
1919                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1920         fi
1921         ol_enable_modules="$ol_arg"
1922
1923 else
1924         ol_enable_modules="no"
1925 fi
1926 # end --enable-modules
1927 # OpenLDAP --enable-phonetic
1928         # Check whether --enable-phonetic or --disable-phonetic was given.
1929 if test "${enable_phonetic+set}" = set; then
1930   enableval="$enable_phonetic"
1931   
1932         ol_arg=invalid
1933         for ol_val in auto yes no ; do
1934                 if test "$enableval" = "$ol_val" ; then
1935                         ol_arg="$ol_val"
1936                 fi
1937         done
1938         if test "$ol_arg" = "invalid" ; then
1939                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1940         fi
1941         ol_enable_phonetic="$ol_arg"
1942
1943 else
1944         ol_enable_phonetic="no"
1945 fi
1946 # end --enable-phonetic
1947 # OpenLDAP --enable-rlookups
1948         # Check whether --enable-rlookups or --disable-rlookups was given.
1949 if test "${enable_rlookups+set}" = set; then
1950   enableval="$enable_rlookups"
1951   
1952         ol_arg=invalid
1953         for ol_val in auto yes no ; do
1954                 if test "$enableval" = "$ol_val" ; then
1955                         ol_arg="$ol_val"
1956                 fi
1957         done
1958         if test "$ol_arg" = "invalid" ; then
1959                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1960         fi
1961         ol_enable_rlookups="$ol_arg"
1962
1963 else
1964         ol_enable_rlookups="no"
1965 fi
1966 # end --enable-rlookups
1967 # OpenLDAP --enable-slp
1968         # Check whether --enable-slp or --disable-slp was given.
1969 if test "${enable_slp+set}" = set; then
1970   enableval="$enable_slp"
1971   
1972         ol_arg=invalid
1973         for ol_val in auto yes no ; do
1974                 if test "$enableval" = "$ol_val" ; then
1975                         ol_arg="$ol_val"
1976                 fi
1977         done
1978         if test "$ol_arg" = "invalid" ; then
1979                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1980         fi
1981         ol_enable_slp="$ol_arg"
1982
1983 else
1984         ol_enable_slp="no"
1985 fi
1986 # end --enable-slp
1987 # OpenLDAP --enable-wrappers
1988         # Check whether --enable-wrappers or --disable-wrappers was given.
1989 if test "${enable_wrappers+set}" = set; then
1990   enableval="$enable_wrappers"
1991   
1992         ol_arg=invalid
1993         for ol_val in auto yes no ; do
1994                 if test "$enableval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
2000         fi
2001         ol_enable_wrappers="$ol_arg"
2002
2003 else
2004         ol_enable_wrappers="no"
2005 fi
2006 # end --enable-wrappers
2007
2008 # OpenLDAP --enable-bdb
2009         # Check whether --enable-bdb or --disable-bdb was given.
2010 if test "${enable_bdb+set}" = set; then
2011   enableval="$enable_bdb"
2012   
2013         ol_arg=invalid
2014         for ol_val in auto yes no ; do
2015                 if test "$enableval" = "$ol_val" ; then
2016                         ol_arg="$ol_val"
2017                 fi
2018         done
2019         if test "$ol_arg" = "invalid" ; then
2020                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2021         fi
2022         ol_enable_bdb="$ol_arg"
2023
2024 else
2025         ol_enable_bdb="yes"
2026 fi
2027 # end --enable-bdb
2028 # OpenLDAP --with-bdb_module
2029         # Check whether --with-bdb_module or --without-bdb_module was given.
2030 if test "${with_bdb_module+set}" = set; then
2031   withval="$with_bdb_module"
2032   
2033         ol_arg=invalid
2034         for ol_val in static dynamic ; do
2035                 if test "$withval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2041         fi
2042         ol_with_bdb_module="$ol_arg"
2043
2044 else
2045         ol_with_bdb_module="static"
2046 fi
2047 # end --with-bdb_module
2048
2049 # OpenLDAP --enable-dnssrv
2050         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2051 if test "${enable_dnssrv+set}" = set; then
2052   enableval="$enable_dnssrv"
2053   
2054         ol_arg=invalid
2055         for ol_val in auto yes no ; do
2056                 if test "$enableval" = "$ol_val" ; then
2057                         ol_arg="$ol_val"
2058                 fi
2059         done
2060         if test "$ol_arg" = "invalid" ; then
2061                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2062         fi
2063         ol_enable_dnssrv="$ol_arg"
2064
2065 else
2066         ol_enable_dnssrv="no"
2067 fi
2068 # end --enable-dnssrv
2069 # OpenLDAP --with-dnssrv_module
2070         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2071 if test "${with_dnssrv_module+set}" = set; then
2072   withval="$with_dnssrv_module"
2073   
2074         ol_arg=invalid
2075         for ol_val in static dynamic ; do
2076                 if test "$withval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2082         fi
2083         ol_with_dnssrv_module="$ol_arg"
2084
2085 else
2086         ol_with_dnssrv_module="static"
2087 fi
2088 # end --with-dnssrv_module
2089
2090 # OpenLDAP --enable-ldap
2091         # Check whether --enable-ldap or --disable-ldap was given.
2092 if test "${enable_ldap+set}" = set; then
2093   enableval="$enable_ldap"
2094   
2095         ol_arg=invalid
2096         for ol_val in auto yes no ; do
2097                 if test "$enableval" = "$ol_val" ; then
2098                         ol_arg="$ol_val"
2099                 fi
2100         done
2101         if test "$ol_arg" = "invalid" ; then
2102                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2103         fi
2104         ol_enable_ldap="$ol_arg"
2105
2106 else
2107         ol_enable_ldap="no"
2108 fi
2109 # end --enable-ldap
2110 # OpenLDAP --with-ldap_module
2111         # Check whether --with-ldap_module or --without-ldap_module was given.
2112 if test "${with_ldap_module+set}" = set; then
2113   withval="$with_ldap_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_ldap_module="$ol_arg"
2125
2126 else
2127         ol_with_ldap_module="static"
2128 fi
2129 # end --with-ldap_module
2130
2131 # OpenLDAP --enable-ldbm
2132         # Check whether --enable-ldbm or --disable-ldbm was given.
2133 if test "${enable_ldbm+set}" = set; then
2134   enableval="$enable_ldbm"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto yes no ; do
2138                 if test "$enableval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2144         fi
2145         ol_enable_ldbm="$ol_arg"
2146
2147 else
2148         ol_enable_ldbm="no"
2149 fi
2150 # end --enable-ldbm
2151 # OpenLDAP --with-ldbm_api
2152         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2153 if test "${with_ldbm_api+set}" = set; then
2154   withval="$with_ldbm_api"
2155   
2156         ol_arg=invalid
2157         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2158                 if test "$withval" = "$ol_val" ; then
2159                         ol_arg="$ol_val"
2160                 fi
2161         done
2162         if test "$ol_arg" = "invalid" ; then
2163                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2164         fi
2165         ol_with_ldbm_api="$ol_arg"
2166
2167 else
2168         ol_with_ldbm_api="auto"
2169 fi
2170 # end --with-ldbm_api
2171
2172 # OpenLDAP --with-ldbm_module
2173         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2174 if test "${with_ldbm_module+set}" = set; then
2175   withval="$with_ldbm_module"
2176   
2177         ol_arg=invalid
2178         for ol_val in static dynamic ; do
2179                 if test "$withval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2185         fi
2186         ol_with_ldbm_module="$ol_arg"
2187
2188 else
2189         ol_with_ldbm_module="static"
2190 fi
2191 # end --with-ldbm_module
2192
2193 # OpenLDAP --with-ldbm_type
2194         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2195 if test "${with_ldbm_type+set}" = set; then
2196   withval="$with_ldbm_type"
2197   
2198         ol_arg=invalid
2199         for ol_val in auto btree hash ; do
2200                 if test "$withval" = "$ol_val" ; then
2201                         ol_arg="$ol_val"
2202                 fi
2203         done
2204         if test "$ol_arg" = "invalid" ; then
2205                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2206         fi
2207         ol_with_ldbm_type="$ol_arg"
2208
2209 else
2210         ol_with_ldbm_type="auto"
2211 fi
2212 # end --with-ldbm_type
2213
2214 # OpenLDAP --enable-meta
2215         # Check whether --enable-meta or --disable-meta was given.
2216 if test "${enable_meta+set}" = set; then
2217   enableval="$enable_meta"
2218   
2219         ol_arg=invalid
2220         for ol_val in auto yes no ; do
2221                 if test "$enableval" = "$ol_val" ; then
2222                         ol_arg="$ol_val"
2223                 fi
2224         done
2225         if test "$ol_arg" = "invalid" ; then
2226                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2227         fi
2228         ol_enable_meta="$ol_arg"
2229
2230 else
2231         ol_enable_meta="no"
2232 fi
2233 # end --enable-meta
2234 # OpenLDAP --with-meta_module
2235         # Check whether --with-meta_module or --without-meta_module was given.
2236 if test "${with_meta_module+set}" = set; then
2237   withval="$with_meta_module"
2238   
2239         ol_arg=invalid
2240         for ol_val in static dynamic ; do
2241                 if test "$withval" = "$ol_val" ; then
2242                         ol_arg="$ol_val"
2243                 fi
2244         done
2245         if test "$ol_arg" = "invalid" ; then
2246                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2247         fi
2248         ol_with_meta_module="$ol_arg"
2249
2250 else
2251         ol_with_meta_module="static"
2252 fi
2253 # end --with-meta_module
2254
2255 # OpenLDAP --enable-monitor
2256         # Check whether --enable-monitor or --disable-monitor was given.
2257 if test "${enable_monitor+set}" = set; then
2258   enableval="$enable_monitor"
2259   
2260         ol_arg=invalid
2261         for ol_val in auto yes no ; do
2262                 if test "$enableval" = "$ol_val" ; then
2263                         ol_arg="$ol_val"
2264                 fi
2265         done
2266         if test "$ol_arg" = "invalid" ; then
2267                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2268         fi
2269         ol_enable_monitor="$ol_arg"
2270
2271 else
2272         ol_enable_monitor="no"
2273 fi
2274 # end --enable-monitor
2275 # OpenLDAP --with-monitor_module
2276         # Check whether --with-monitor_module or --without-monitor_module was given.
2277 if test "${with_monitor_module+set}" = set; then
2278   withval="$with_monitor_module"
2279   
2280         ol_arg=invalid
2281         for ol_val in static dynamic ; do
2282                 if test "$withval" = "$ol_val" ; then
2283                         ol_arg="$ol_val"
2284                 fi
2285         done
2286         if test "$ol_arg" = "invalid" ; then
2287                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2288         fi
2289         ol_with_monitor_module="$ol_arg"
2290
2291 else
2292         ol_with_monitor_module="static"
2293 fi
2294 # end --with-monitor_module
2295
2296 # OpenLDAP --enable-passwd
2297         # Check whether --enable-passwd or --disable-passwd was given.
2298 if test "${enable_passwd+set}" = set; then
2299   enableval="$enable_passwd"
2300   
2301         ol_arg=invalid
2302         for ol_val in auto yes no ; do
2303                 if test "$enableval" = "$ol_val" ; then
2304                         ol_arg="$ol_val"
2305                 fi
2306         done
2307         if test "$ol_arg" = "invalid" ; then
2308                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2309         fi
2310         ol_enable_passwd="$ol_arg"
2311
2312 else
2313         ol_enable_passwd="no"
2314 fi
2315 # end --enable-passwd
2316 # OpenLDAP --with-passwd_module
2317         # Check whether --with-passwd_module or --without-passwd_module was given.
2318 if test "${with_passwd_module+set}" = set; then
2319   withval="$with_passwd_module"
2320   
2321         ol_arg=invalid
2322         for ol_val in static dynamic ; do
2323                 if test "$withval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2329         fi
2330         ol_with_passwd_module="$ol_arg"
2331
2332 else
2333         ol_with_passwd_module="static"
2334 fi
2335 # end --with-passwd_module
2336
2337 # OpenLDAP --enable-perl
2338         # Check whether --enable-perl or --disable-perl was given.
2339 if test "${enable_perl+set}" = set; then
2340   enableval="$enable_perl"
2341   
2342         ol_arg=invalid
2343         for ol_val in auto yes no ; do
2344                 if test "$enableval" = "$ol_val" ; then
2345                         ol_arg="$ol_val"
2346                 fi
2347         done
2348         if test "$ol_arg" = "invalid" ; then
2349                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2350         fi
2351         ol_enable_perl="$ol_arg"
2352
2353 else
2354         ol_enable_perl="no"
2355 fi
2356 # end --enable-perl
2357 # OpenLDAP --with-perl_module
2358         # Check whether --with-perl_module or --without-perl_module was given.
2359 if test "${with_perl_module+set}" = set; then
2360   withval="$with_perl_module"
2361   
2362         ol_arg=invalid
2363         for ol_val in static dynamic ; do
2364                 if test "$withval" = "$ol_val" ; then
2365                         ol_arg="$ol_val"
2366                 fi
2367         done
2368         if test "$ol_arg" = "invalid" ; then
2369                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2370         fi
2371         ol_with_perl_module="$ol_arg"
2372
2373 else
2374         ol_with_perl_module="static"
2375 fi
2376 # end --with-perl_module
2377
2378 # OpenLDAP --enable-shell
2379         # Check whether --enable-shell or --disable-shell was given.
2380 if test "${enable_shell+set}" = set; then
2381   enableval="$enable_shell"
2382   
2383         ol_arg=invalid
2384         for ol_val in auto yes no ; do
2385                 if test "$enableval" = "$ol_val" ; then
2386                         ol_arg="$ol_val"
2387                 fi
2388         done
2389         if test "$ol_arg" = "invalid" ; then
2390                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2391         fi
2392         ol_enable_shell="$ol_arg"
2393
2394 else
2395         ol_enable_shell="no"
2396 fi
2397 # end --enable-shell
2398 # OpenLDAP --with-shell_module
2399         # Check whether --with-shell_module or --without-shell_module was given.
2400 if test "${with_shell_module+set}" = set; then
2401   withval="$with_shell_module"
2402   
2403         ol_arg=invalid
2404         for ol_val in static dynamic ; do
2405                 if test "$withval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2411         fi
2412         ol_with_shell_module="$ol_arg"
2413
2414 else
2415         ol_with_shell_module="static"
2416 fi
2417 # end --with-shell_module
2418
2419 # OpenLDAP --enable-sql
2420         # Check whether --enable-sql or --disable-sql was given.
2421 if test "${enable_sql+set}" = set; then
2422   enableval="$enable_sql"
2423   
2424         ol_arg=invalid
2425         for ol_val in auto yes no ; do
2426                 if test "$enableval" = "$ol_val" ; then
2427                         ol_arg="$ol_val"
2428                 fi
2429         done
2430         if test "$ol_arg" = "invalid" ; then
2431                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2432         fi
2433         ol_enable_sql="$ol_arg"
2434
2435 else
2436         ol_enable_sql="no"
2437 fi
2438 # end --enable-sql
2439 # OpenLDAP --with-sql_module
2440         # Check whether --with-sql_module or --without-sql_module was given.
2441 if test "${with_sql_module+set}" = set; then
2442   withval="$with_sql_module"
2443   
2444         ol_arg=invalid
2445         for ol_val in static dynamic ; do
2446                 if test "$withval" = "$ol_val" ; then
2447                         ol_arg="$ol_val"
2448                 fi
2449         done
2450         if test "$ol_arg" = "invalid" ; then
2451                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2452         fi
2453         ol_with_sql_module="$ol_arg"
2454
2455 else
2456         ol_with_sql_module="static"
2457 fi
2458 # end --with-sql_module
2459
2460 # OpenLDAP --enable-tcl
2461         # Check whether --enable-tcl or --disable-tcl was given.
2462 if test "${enable_tcl+set}" = set; then
2463   enableval="$enable_tcl"
2464   
2465         ol_arg=invalid
2466         for ol_val in auto yes no ; do
2467                 if test "$enableval" = "$ol_val" ; then
2468                         ol_arg="$ol_val"
2469                 fi
2470         done
2471         if test "$ol_arg" = "invalid" ; then
2472                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2473         fi
2474         ol_enable_tcl="$ol_arg"
2475
2476 else
2477         ol_enable_tcl="no"
2478 fi
2479 # end --enable-tcl
2480 # OpenLDAP --with-tcl_module
2481         # Check whether --with-tcl_module or --without-tcl_module was given.
2482 if test "${with_tcl_module+set}" = set; then
2483   withval="$with_tcl_module"
2484   
2485         ol_arg=invalid
2486         for ol_val in static dynamic ; do
2487                 if test "$withval" = "$ol_val" ; then
2488                         ol_arg="$ol_val"
2489                 fi
2490         done
2491         if test "$ol_arg" = "invalid" ; then
2492                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2493         fi
2494         ol_with_tcl_module="$ol_arg"
2495
2496 else
2497         ol_with_tcl_module="static"
2498 fi
2499 # end --with-tcl_module
2500
2501
2502 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2503 if test "${with_xxslurpdoptions+set}" = set; then
2504   withval="$with_xxslurpdoptions"
2505   :
2506 fi
2507
2508 # OpenLDAP --enable-slurpd
2509         # Check whether --enable-slurpd or --disable-slurpd was given.
2510 if test "${enable_slurpd+set}" = set; then
2511   enableval="$enable_slurpd"
2512   
2513         ol_arg=invalid
2514         for ol_val in auto yes no ; do
2515                 if test "$enableval" = "$ol_val" ; then
2516                         ol_arg="$ol_val"
2517                 fi
2518         done
2519         if test "$ol_arg" = "invalid" ; then
2520                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2521         fi
2522         ol_enable_slurpd="$ol_arg"
2523
2524 else
2525         ol_enable_slurpd="auto"
2526 fi
2527 # end --enable-slurpd
2528
2529 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2530 if test "${with_xxliboptions+set}" = set; then
2531   withval="$with_xxliboptions"
2532   :
2533 fi
2534
2535 # Check whether --enable-static or --disable-static was given.
2536 if test "${enable_static+set}" = set; then
2537   enableval="$enable_static"
2538   p=${PACKAGE-default}
2539 case $enableval in
2540 yes) enable_static=yes ;;
2541 no) enable_static=no ;;
2542 *)
2543   enable_static=no
2544   # Look at the argument we got.  We use all the common list separators.
2545   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2546   for pkg in $enableval; do
2547     if test "X$pkg" = "X$p"; then
2548       enable_static=yes
2549     fi
2550   done
2551   IFS="$ac_save_ifs"
2552   ;;
2553 esac
2554 else
2555   enable_static=yes
2556 fi
2557
2558 # Check whether --enable-shared or --disable-shared was given.
2559 if test "${enable_shared+set}" = set; then
2560   enableval="$enable_shared"
2561   p=${PACKAGE-default}
2562 case $enableval in
2563 yes) enable_shared=yes ;;
2564 no) enable_shared=no ;;
2565 *)
2566   enable_shared=no
2567   # Look at the argument we got.  We use all the common list separators.
2568   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2569   for pkg in $enableval; do
2570     if test "X$pkg" = "X$p"; then
2571       enable_shared=yes
2572     fi
2573   done
2574   IFS="$ac_save_ifs"
2575   ;;
2576 esac
2577 else
2578   enable_shared=yes
2579 fi
2580
2581
2582
2583 # validate options
2584 if test $ol_enable_slapd = no ; then
2585                 if test $ol_enable_bdb = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2587         fi
2588         if test $ol_enable_dnssrv = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2590         fi
2591         if test $ol_enable_ldap = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2593         fi
2594         if test $ol_enable_ldbm = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2596         fi
2597         if test $ol_enable_meta = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2599         fi
2600         if test $ol_enable_monitor = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2602         fi
2603         if test $ol_enable_passwd = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2605         fi
2606         if test $ol_enable_perl = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2608         fi
2609         if test $ol_enable_shell = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2611         fi
2612         if test $ol_enable_tcl = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2614         fi
2615         if test $ol_enable_sql = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2617         fi
2618         if test $ol_enable_modules = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2620         fi
2621         if test $ol_enable_wrappers = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2623         fi
2624         if test $ol_enable_phonetic = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2626         fi
2627         if test $ol_enable_rlookups = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2629         fi
2630         if test $ol_enable_aci = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2632         fi
2633         if test $ol_with_ldbm_api != auto ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2635         fi
2636         if test $ol_with_ldbm_type != auto ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2638         fi
2639         if test $ol_with_bdb_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2641         fi
2642         if test $ol_with_dnssrv_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2644         fi
2645         if test $ol_with_ldap_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2647         fi
2648         if test $ol_with_ldbm_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2650         fi
2651         if test $ol_with_meta_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2653         fi
2654         if test $ol_with_monitor_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2656         fi
2657         if test $ol_with_passwd_module != static ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2659         fi
2660         if test $ol_with_perl_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2662         fi
2663         if test $ol_with_shell_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2665         fi
2666         if test $ol_with_tcl_module != static ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2668         fi
2669         if test $ol_with_sql_module != static ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2671         fi
2672         if test $ol_enable_slurpd = yes ; then
2673                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2674         fi
2675         if test $ol_enable_rewrite = yes ; then
2676                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2677         fi
2678
2679         # force settings to no
2680         ol_enable_bdb=no
2681         ol_enable_dnssrv=no
2682         ol_enable_ldap=no
2683         ol_enable_ldbm=no
2684         ol_enable_meta=no
2685         ol_enable_monitor=no
2686         ol_enable_passwd=no
2687         ol_enable_perl=no
2688         ol_enable_shell=no
2689         ol_enable_tcl=no
2690         ol_enable_sql=no
2691
2692         ol_enable_modules=no
2693         ol_enable_phonetic=no
2694         ol_enable_rlookups=no
2695         ol_enable_aci=no
2696         ol_enable_wrappers=no
2697         ol_enable_dynamic=no
2698
2699         ol_with_ldbm_api=no
2700         ol_with_ldbm_type=no
2701
2702         ol_with_bdb_module=static
2703         ol_with_dnssrv_module=static
2704         ol_with_ldap_module=static
2705         ol_with_ldbm_module=static
2706         ol_with_meta_module=static
2707         ol_with_monitor_module=static
2708         ol_with_passwd_module=static
2709         ol_with_perl_module=static
2710         ol_with_shell_module=static
2711         ol_with_tcl_module=static
2712         ol_with_sql_module=static
2713
2714         ol_enable_slurpd=no
2715
2716         ol_enable_rewrite=no
2717
2718 elif test $ol_enable_ldbm = no ; then
2719         
2720         if test $ol_with_ldbm_api != auto ; then
2721                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2722         fi
2723
2724         if test $ol_with_ldbm_type != auto ; then
2725                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2726         fi
2727
2728         if test $ol_with_ldbm_module != static ; then
2729                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2730         fi
2731
2732         if test $ol_enable_modules != yes -a \
2733                 $ol_enable_bdb = no -a \
2734                 $ol_enable_dnssrv = no -a \
2735                 $ol_enable_ldap = no -a \
2736                 $ol_enable_meta = no -a \
2737                 $ol_enable_monitor = no -a \
2738                 $ol_enable_passwd = no -a \
2739                 $ol_enable_perl = no -a \
2740                 $ol_enable_shell = no -a \
2741                 $ol_enable_sql = no -a \
2742                 $ol_enable_tcl = no ; then
2743
2744                 if test $ol_enable_slapd = yes ; then
2745                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2746                 else
2747                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2748                         ol_enable_slapd=no
2749                 fi
2750         fi
2751
2752         ol_with_ldbm_api=no
2753         ol_with_ldbm_type=no
2754         ol_with_ldbm_module=static
2755
2756         if test $ol_enable_bdb != no ; then
2757                 ol_with_ldbm_api=berkeley
2758         fi
2759
2760 else
2761                 if test $ol_with_ldbm_api = gdbm -a \
2762                 $ol_with_ldbm_type = btree ; then
2763                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2764         fi
2765         if test $ol_with_ldbm_api = mdbm -a \
2766                 $ol_with_ldbm_type = btree ; then
2767                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2768         fi
2769         if test $ol_with_ldbm_api = ndbm -a \
2770                 $ol_with_ldbm_type = btree ; then
2771                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2772         fi
2773
2774         if test $ol_enable_bdb = yes ; then
2775                 if test $ol_with_ldbm_api = auto ; then
2776                         ol_with_ldbm_api=berkeley
2777                 elif test $ol_with_ldbm_api != berkeley ; then
2778                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2779                 fi
2780
2781         elif test $ol_enable_bdb = auto ; then
2782                 if test $ol_with_ldbm_api != berkeley \
2783                         -o $ol_with_ldbm_api != auto ; then
2784                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2785                         ol_enable_bdb=no
2786                 fi
2787         fi
2788 fi
2789
2790 if test $ol_enable_slurpd = yes ; then
2791                 if test $ol_with_threads = no ; then
2792                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2793         fi
2794 fi
2795
2796 if test $ol_enable_lmpasswd = yes ; then
2797         if test $ol_with_tls = no ; then
2798                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2799         fi
2800 fi
2801
2802 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2803         if test $ol_with_kerberos = no ; then
2804                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2805         elif test $ol_with_kerberos = auto ; then
2806                 ol_with_kerberos=yes
2807         fi
2808
2809 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2810         if test $ol_with_kerberos = auto ; then
2811                 ol_with_kerberos=no
2812         elif test $ol_with_kerberos != no ; then
2813                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2814                 ol_with_kerberos=no
2815         fi
2816 fi
2817
2818 if test $ol_enable_spasswd = yes ; then
2819         if test $ol_with_cyrus_sasl = no ; then
2820                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2821         fi
2822         ol_with_cyrus_sasl=yes
2823 fi
2824
2825 echo "$ac_t""done" 1>&6
2826
2827 LDAP_LIBS=
2828 LDIF_LIBS=
2829 LDBM_LIB=
2830 LDBM_LIBS=
2831 LTHREAD_LIBS=
2832 LUTIL_LIBS=
2833
2834 SLAPD_LIBS=
2835 SLURPD_LIBS=
2836
2837 BUILD_SLAPD=no
2838 BUILD_SLURPD=no
2839
2840 BUILD_THREAD=no
2841
2842 BUILD_BDB=no
2843 BUILD_DNSSRV=no
2844 BUILD_LDAP=no
2845 BUILD_LDBM=no
2846 BUILD_META=no
2847 BUILD_MONITOR=no
2848 BUILD_PASSWD=no
2849 BUILD_PERL=no
2850 BUILD_SHELL=no
2851 BUILD_SQL=no
2852 BUILD_TCL=no
2853
2854 BUILD_BDB_DYNAMIC=static
2855 BUILD_DNSSRV_DYNAMIC=static
2856 BUILD_LDAP_DYNAMIC=static
2857 BUILD_LDBM_DYNAMIC=static
2858 BUILD_META_DYNAMIC=static
2859 BUILD_MONITOR_DYNAMIC=static
2860 BUILD_PASSWD_DYNAMIC=static
2861 BUILD_PERL_DYNAMIC=static
2862 BUILD_SHELL_DYNAMIC=static
2863 BUILD_TCL_DYNAMIC=static
2864 BUILD_SQL_DYNAMIC=static
2865
2866 SLAPD_MODULES_LDFLAGS=
2867 SLAPD_MODULES_CPPFLAGS=
2868 SLAPD_MODULES_LIST=
2869
2870 SLAPD_STATIC_BACKENDS=
2871 SLAPD_DYNAMIC_BACKENDS=
2872
2873 SLAPD_PERL_LDFLAGS=
2874 MOD_PERL_LDFLAGS=
2875 PERL_CPPFLAGS=
2876
2877 SLAPD_SQL_LDFLAGS=
2878 SLAPD_SQL_LIBS=
2879 SLAPD_SQL_INCLUDES=
2880
2881 MOD_TCL_LIB=
2882 KRB4_LIBS=
2883 KRB5_LIBS=
2884 READLINE_LIBS=
2885 SASL_LIBS=
2886 TERMCAP_LIBS=
2887 TLS_LIBS=
2888 MODULES_LIBS=
2889 AUTH_LIBS=
2890
2891 SLAPD_SLP_LIBS=
2892
2893
2894 # Find a good install program.  We prefer a C program (faster),
2895 # so one script is as good as another.  But avoid the broken or
2896 # incompatible versions:
2897 # SysV /etc/install, /usr/sbin/install
2898 # SunOS /usr/etc/install
2899 # IRIX /sbin/install
2900 # AIX /bin/install
2901 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2902 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2903 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2904 # ./install, which can be erroneously created by make from ./install.sh.
2905 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2906 echo "configure:2907: checking for a BSD compatible install" >&5
2907 if test -z "$INSTALL"; then
2908 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2912   for ac_dir in $PATH; do
2913     # Account for people who put trailing slashes in PATH elements.
2914     case "$ac_dir/" in
2915     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2916     *)
2917       # OSF1 and SCO ODT 3.0 have their own names for install.
2918       # Don't use installbsd from OSF since it installs stuff as root
2919       # by default.
2920       for ac_prog in ginstall scoinst install; do
2921         if test -f $ac_dir/$ac_prog; then
2922           if test $ac_prog = install &&
2923             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2924             # AIX install.  It has an incompatible calling convention.
2925             :
2926           elif test $ac_prog = install &&
2927             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2928             # program-specific install script used by HP pwplus--don't use.
2929             :
2930           else
2931             ac_cv_path_install="$ac_dir/$ac_prog -c"
2932             break 2
2933           fi
2934         fi
2935       done
2936       ;;
2937     esac
2938   done
2939   IFS="$ac_save_IFS"
2940
2941 fi
2942   if test "${ac_cv_path_install+set}" = set; then
2943     INSTALL="$ac_cv_path_install"
2944   else
2945     # As a last resort, use the slow shell script.  We don't cache a
2946     # path for INSTALL within a source directory, because that will
2947     # break other packages using the cache if that directory is
2948     # removed, or if the path is relative.
2949     INSTALL="$ac_install_sh"
2950   fi
2951 fi
2952 echo "$ac_t""$INSTALL" 1>&6
2953
2954 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2955 # It thinks the first close brace ends the variable substitution.
2956 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2957
2958 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2959
2960 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2961
2962
2963 cat >> confdefs.h <<\EOF
2964 #define HAVE_MKVERSION 1
2965 EOF
2966
2967
2968
2969
2970 ol_aix_threads=no
2971 case "$target" in
2972 *-*-aix*)       if test -z "$CC" ; then
2973                 case "$ol_with_threads" in
2974                 auto | yes |  posix) ol_aix_threads=yes ;;
2975                 esac
2976         fi
2977 ;;
2978 esac
2979
2980 if test $ol_aix_threads = yes ; then
2981         if test -z "${CC}" ; then
2982                 for ac_prog in cc_r xlc_r cc
2983 do
2984 # Extract the first word of "$ac_prog", so it can be a program name with args.
2985 set dummy $ac_prog; ac_word=$2
2986 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2987 echo "configure:2988: checking for $ac_word" >&5
2988 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2989   echo $ac_n "(cached) $ac_c" 1>&6
2990 else
2991   if test -n "$CC"; then
2992   ac_cv_prog_CC="$CC" # Let the user override the test.
2993 else
2994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2995   ac_dummy="$PATH"
2996   for ac_dir in $ac_dummy; do
2997     test -z "$ac_dir" && ac_dir=.
2998     if test -f $ac_dir/$ac_word; then
2999       ac_cv_prog_CC="$ac_prog"
3000       break
3001     fi
3002   done
3003   IFS="$ac_save_ifs"
3004 fi
3005 fi
3006 CC="$ac_cv_prog_CC"
3007 if test -n "$CC"; then
3008   echo "$ac_t""$CC" 1>&6
3009 else
3010   echo "$ac_t""no" 1>&6
3011 fi
3012
3013 test -n "$CC" && break
3014 done
3015
3016
3017                 if test "$CC" = cc ; then
3018                                                 if test $ol_with_threads != auto ; then
3019                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3020                         else
3021                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3022                         fi
3023                         ol_with_threads=no
3024                 fi
3025         fi
3026
3027         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3028                 ol_with_threads=posix
3029                 ol_cv_pthread_create=yes
3030         fi
3031 fi
3032
3033 if test -z "${CC}"; then
3034         for ac_prog in cc
3035 do
3036 # Extract the first word of "$ac_prog", so it can be a program name with args.
3037 set dummy $ac_prog; ac_word=$2
3038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3039 echo "configure:3040: checking for $ac_word" >&5
3040 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3041   echo $ac_n "(cached) $ac_c" 1>&6
3042 else
3043   if test -n "$CC"; then
3044   ac_cv_prog_CC="$CC" # Let the user override the test.
3045 else
3046   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3047   ac_dummy="$PATH"
3048   for ac_dir in $ac_dummy; do
3049     test -z "$ac_dir" && ac_dir=.
3050     if test -f $ac_dir/$ac_word; then
3051       ac_cv_prog_CC="$ac_prog"
3052       break
3053     fi
3054   done
3055   IFS="$ac_save_ifs"
3056 fi
3057 fi
3058 CC="$ac_cv_prog_CC"
3059 if test -n "$CC"; then
3060   echo "$ac_t""$CC" 1>&6
3061 else
3062   echo "$ac_t""no" 1>&6
3063 fi
3064
3065 test -n "$CC" && break
3066 done
3067
3068 fi
3069
3070
3071 for ac_prog in ar gar
3072 do
3073 # Extract the first word of "$ac_prog", so it can be a program name with args.
3074 set dummy $ac_prog; ac_word=$2
3075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3076 echo "configure:3077: checking for $ac_word" >&5
3077 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   if test -n "$AR"; then
3081   ac_cv_prog_AR="$AR" # Let the user override the test.
3082 else
3083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3084   ac_dummy="$PATH"
3085   for ac_dir in $ac_dummy; do
3086     test -z "$ac_dir" && ac_dir=.
3087     if test -f $ac_dir/$ac_word; then
3088       ac_cv_prog_AR="$ac_prog"
3089       break
3090     fi
3091   done
3092   IFS="$ac_save_ifs"
3093 fi
3094 fi
3095 AR="$ac_cv_prog_AR"
3096 if test -n "$AR"; then
3097   echo "$ac_t""$AR" 1>&6
3098 else
3099   echo "$ac_t""no" 1>&6
3100 fi
3101
3102 test -n "$AR" && break
3103 done
3104 test -n "$AR" || AR="ar"
3105
3106
3107
3108
3109 # Find the correct PATH separator.  Usually this is `:', but
3110 # DJGPP uses `;' like DOS.
3111 if test "X${PATH_SEPARATOR+set}" != Xset; then
3112   UNAME=${UNAME-`uname 2>/dev/null`}
3113   case X$UNAME in
3114     *-DOS) lt_cv_sys_path_separator=';' ;;
3115     *)     lt_cv_sys_path_separator=':' ;;
3116   esac
3117   PATH_SEPARATOR=$lt_cv_sys_path_separator
3118 fi
3119
3120 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3121 echo "configure:3122: checking for Cygwin environment" >&5
3122 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128
3129 int main() {
3130
3131 #ifndef __CYGWIN__
3132 #define __CYGWIN__ __CYGWIN32__
3133 #endif
3134 return __CYGWIN__;
3135 ; return 0; }
3136 EOF
3137 if { (eval echo configure:3138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3138   rm -rf conftest*
3139   ac_cv_cygwin=yes
3140 else
3141   echo "configure: failed program was:" >&5
3142   cat conftest.$ac_ext >&5
3143   rm -rf conftest*
3144   ac_cv_cygwin=no
3145 fi
3146 rm -f conftest*
3147 fi
3148
3149 echo "$ac_t""$ac_cv_cygwin" 1>&6
3150 CYGWIN=
3151 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3152 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3153 echo "configure:3154: checking for mingw32 environment" >&5
3154 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160
3161 int main() {
3162 return __MINGW32__;
3163 ; return 0; }
3164 EOF
3165 if { (eval echo configure:3166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3166   rm -rf conftest*
3167   ac_cv_mingw32=yes
3168 else
3169   echo "configure: failed program was:" >&5
3170   cat conftest.$ac_ext >&5
3171   rm -rf conftest*
3172   ac_cv_mingw32=no
3173 fi
3174 rm -f conftest*
3175 fi
3176
3177 echo "$ac_t""$ac_cv_mingw32" 1>&6
3178 MINGW32=
3179 test "$ac_cv_mingw32" = yes && MINGW32=yes
3180 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3181 echo "configure:3182: checking for EMX OS/2 environment" >&5
3182 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3183   echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185   cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188
3189 int main() {
3190 return __EMX__;
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_emxos2=yes
3196 else
3197   echo "configure: failed program was:" >&5
3198   cat conftest.$ac_ext >&5
3199   rm -rf conftest*
3200   ac_cv_emxos2=no
3201 fi
3202 rm -f conftest*
3203 fi
3204
3205 echo "$ac_t""$ac_cv_emxos2" 1>&6
3206 EMXOS2=
3207 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3208 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3209 echo "configure:3210: checking how to run the C preprocessor" >&5
3210 # On Suns, sometimes $CPP names a directory.
3211 if test -n "$CPP" && test -d "$CPP"; then
3212   CPP=
3213 fi
3214 if test -z "$CPP"; then
3215 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218     # This must be in double quotes, not single quotes, because CPP may get
3219   # substituted into the Makefile and "${CC-cc}" will confuse make.
3220   CPP="${CC-cc} -E"
3221   # On the NeXT, cc -E runs the code through the compiler's parser,
3222   # not just through cpp.
3223   cat > conftest.$ac_ext <<EOF
3224 #line 3225 "configure"
3225 #include "confdefs.h"
3226 #include <assert.h>
3227 Syntax Error
3228 EOF
3229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3230 { (eval echo configure:3231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3232 if test -z "$ac_err"; then
3233   :
3234 else
3235   echo "$ac_err" >&5
3236   echo "configure: failed program was:" >&5
3237   cat conftest.$ac_ext >&5
3238   rm -rf conftest*
3239   CPP="${CC-cc} -E -traditional-cpp"
3240   cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 #include <assert.h>
3244 Syntax Error
3245 EOF
3246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3247 { (eval echo configure:3248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3249 if test -z "$ac_err"; then
3250   :
3251 else
3252   echo "$ac_err" >&5
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   CPP="${CC-cc} -nologo -E"
3257   cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260 #include <assert.h>
3261 Syntax Error
3262 EOF
3263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3264 { (eval echo configure:3265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3266 if test -z "$ac_err"; then
3267   :
3268 else
3269   echo "$ac_err" >&5
3270   echo "configure: failed program was:" >&5
3271   cat conftest.$ac_ext >&5
3272   rm -rf conftest*
3273   CPP=/lib/cpp
3274 fi
3275 rm -f conftest*
3276 fi
3277 rm -f conftest*
3278 fi
3279 rm -f conftest*
3280   ac_cv_prog_CPP="$CPP"
3281 fi
3282   CPP="$ac_cv_prog_CPP"
3283 else
3284   ac_cv_prog_CPP="$CPP"
3285 fi
3286 echo "$ac_t""$CPP" 1>&6
3287
3288 # Check whether --enable-fast-install or --disable-fast-install was given.
3289 if test "${enable_fast_install+set}" = set; then
3290   enableval="$enable_fast_install"
3291   p=${PACKAGE-default}
3292 case $enableval in
3293 yes) enable_fast_install=yes ;;
3294 no) enable_fast_install=no ;;
3295 *)
3296   enable_fast_install=no
3297   # Look at the argument we got.  We use all the common list separators.
3298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3299   for pkg in $enableval; do
3300     if test "X$pkg" = "X$p"; then
3301       enable_fast_install=yes
3302     fi
3303   done
3304   IFS="$ac_save_ifs"
3305   ;;
3306 esac
3307 else
3308   enable_fast_install=yes
3309 fi
3310
3311 # Extract the first word of "gcc", so it can be a program name with args.
3312 set dummy gcc; ac_word=$2
3313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3314 echo "configure:3315: checking for $ac_word" >&5
3315 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   if test -n "$CC"; then
3319   ac_cv_prog_CC="$CC" # Let the user override the test.
3320 else
3321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3322   ac_dummy="$PATH"
3323   for ac_dir in $ac_dummy; do
3324     test -z "$ac_dir" && ac_dir=.
3325     if test -f $ac_dir/$ac_word; then
3326       ac_cv_prog_CC="gcc"
3327       break
3328     fi
3329   done
3330   IFS="$ac_save_ifs"
3331 fi
3332 fi
3333 CC="$ac_cv_prog_CC"
3334 if test -n "$CC"; then
3335   echo "$ac_t""$CC" 1>&6
3336 else
3337   echo "$ac_t""no" 1>&6
3338 fi
3339
3340 if test -z "$CC"; then
3341   # Extract the first word of "cc", so it can be a program name with args.
3342 set dummy cc; ac_word=$2
3343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $ac_word" >&5
3345 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3346   echo $ac_n "(cached) $ac_c" 1>&6
3347 else
3348   if test -n "$CC"; then
3349   ac_cv_prog_CC="$CC" # Let the user override the test.
3350 else
3351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3352   ac_prog_rejected=no
3353   ac_dummy="$PATH"
3354   for ac_dir in $ac_dummy; do
3355     test -z "$ac_dir" && ac_dir=.
3356     if test -f $ac_dir/$ac_word; then
3357       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3358         ac_prog_rejected=yes
3359         continue
3360       fi
3361       ac_cv_prog_CC="cc"
3362       break
3363     fi
3364   done
3365   IFS="$ac_save_ifs"
3366 if test $ac_prog_rejected = yes; then
3367   # We found a bogon in the path, so make sure we never use it.
3368   set dummy $ac_cv_prog_CC
3369   shift
3370   if test $# -gt 0; then
3371     # We chose a different compiler from the bogus one.
3372     # However, it has the same basename, so the bogon will be chosen
3373     # first if we set CC to just the basename; use the full file name.
3374     shift
3375     set dummy "$ac_dir/$ac_word" "$@"
3376     shift
3377     ac_cv_prog_CC="$@"
3378   fi
3379 fi
3380 fi
3381 fi
3382 CC="$ac_cv_prog_CC"
3383 if test -n "$CC"; then
3384   echo "$ac_t""$CC" 1>&6
3385 else
3386   echo "$ac_t""no" 1>&6
3387 fi
3388
3389   if test -z "$CC"; then
3390     case "`uname -s`" in
3391     *win32* | *WIN32* | *CYGWIN*)
3392       # Extract the first word of "cl", so it can be a program name with args.
3393 set dummy cl; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_dummy="$PATH"
3404   for ac_dir in $ac_dummy; do
3405     test -z "$ac_dir" && ac_dir=.
3406     if test -f $ac_dir/$ac_word; then
3407       ac_cv_prog_CC="cl"
3408       break
3409     fi
3410   done
3411   IFS="$ac_save_ifs"
3412 fi
3413 fi
3414 CC="$ac_cv_prog_CC"
3415 if test -n "$CC"; then
3416   echo "$ac_t""$CC" 1>&6
3417 else
3418   echo "$ac_t""no" 1>&6
3419 fi
3420  ;;
3421     esac
3422   fi
3423   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3424 fi
3425
3426 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3427 echo "configure:3428: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3428
3429 ac_ext=c
3430 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3431 ac_cpp='$CPP $CPPFLAGS'
3432 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3433 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3434 cross_compiling=$ac_cv_prog_cc_cross
3435
3436 cat > conftest.$ac_ext << EOF
3437
3438 #line 3439 "configure"
3439 #include "confdefs.h"
3440
3441 main(){return(0);}
3442 EOF
3443 if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3444   ac_cv_prog_cc_works=yes
3445   # If we can't run a trivial program, we are probably using a cross compiler.
3446   if (./conftest; exit) 2>/dev/null; then
3447     ac_cv_prog_cc_cross=no
3448   else
3449     ac_cv_prog_cc_cross=yes
3450   fi
3451 else
3452   echo "configure: failed program was:" >&5
3453   cat conftest.$ac_ext >&5
3454   ac_cv_prog_cc_works=no
3455 fi
3456 rm -fr conftest*
3457 ac_ext=c
3458 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3459 ac_cpp='$CPP $CPPFLAGS'
3460 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3461 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3462 cross_compiling=$ac_cv_prog_cc_cross
3463
3464 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3465 if test $ac_cv_prog_cc_works = no; then
3466   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3467 fi
3468 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3469 echo "configure:3470: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3470 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3471 cross_compiling=$ac_cv_prog_cc_cross
3472
3473 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3474 echo "configure:3475: checking whether we are using GNU C" >&5
3475 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3476   echo $ac_n "(cached) $ac_c" 1>&6
3477 else
3478   cat > conftest.c <<EOF
3479 #ifdef __GNUC__
3480   yes;
3481 #endif
3482 EOF
3483 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3484   ac_cv_prog_gcc=yes
3485 else
3486   ac_cv_prog_gcc=no
3487 fi
3488 fi
3489
3490 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3491
3492 if test $ac_cv_prog_gcc = yes; then
3493   GCC=yes
3494 else
3495   GCC=
3496 fi
3497
3498 ac_test_CFLAGS="${CFLAGS+set}"
3499 ac_save_CFLAGS="$CFLAGS"
3500 CFLAGS=
3501 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3502 echo "configure:3503: checking whether ${CC-cc} accepts -g" >&5
3503 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3504   echo $ac_n "(cached) $ac_c" 1>&6
3505 else
3506   echo 'void f(){}' > conftest.c
3507 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3508   ac_cv_prog_cc_g=yes
3509 else
3510   ac_cv_prog_cc_g=no
3511 fi
3512 rm -f conftest*
3513
3514 fi
3515
3516 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3517 if test "$ac_test_CFLAGS" = set; then
3518   CFLAGS="$ac_save_CFLAGS"
3519 elif test $ac_cv_prog_cc_g = yes; then
3520   if test "$GCC" = yes; then
3521     CFLAGS="-g -O2"
3522   else
3523     CFLAGS="-g"
3524   fi
3525 else
3526   if test "$GCC" = yes; then
3527     CFLAGS="-O2"
3528   else
3529     CFLAGS=
3530   fi
3531 fi
3532
3533 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3534 if test "${with_gnu_ld+set}" = set; then
3535   withval="$with_gnu_ld"
3536   test "$withval" = no || with_gnu_ld=yes
3537 else
3538   with_gnu_ld=no
3539 fi
3540
3541 ac_prog=ld
3542 if test "$GCC" = yes; then
3543   # Check if gcc -print-prog-name=ld gives a path.
3544   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3545 echo "configure:3546: checking for ld used by GCC" >&5
3546   case $host in
3547   *-*-mingw*)
3548     # gcc leaves a trailing carriage return which upsets mingw
3549     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3550   *)
3551     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3552   esac
3553   case $ac_prog in
3554     # Accept absolute paths.
3555     [\\/]* | [A-Za-z]:[\\/]*)
3556       re_direlt='/[^/][^/]*/\.\./'
3557       # Canonicalize the path of ld
3558       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3559       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3560         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3561       done
3562       test -z "$LD" && LD="$ac_prog"
3563       ;;
3564   "")
3565     # If it fails, then pretend we aren't using GCC.
3566     ac_prog=ld
3567     ;;
3568   *)
3569     # If it is relative, then search for the first ld in PATH.
3570     with_gnu_ld=unknown
3571     ;;
3572   esac
3573 elif test "$with_gnu_ld" = yes; then
3574   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3575 echo "configure:3576: checking for GNU ld" >&5
3576 else
3577   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3578 echo "configure:3579: checking for non-GNU ld" >&5
3579 fi
3580 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3581   echo $ac_n "(cached) $ac_c" 1>&6
3582 else
3583   if test -z "$LD"; then
3584   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3585   for ac_dir in $PATH; do
3586     test -z "$ac_dir" && ac_dir=.
3587     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3588       lt_cv_path_LD="$ac_dir/$ac_prog"
3589       # Check to see if the program is GNU ld.  I'd rather use --version,
3590       # but apparently some GNU ld's only accept -v.
3591       # Break only if it was the GNU/non-GNU ld that we prefer.
3592       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3593         test "$with_gnu_ld" != no && break
3594       else
3595         test "$with_gnu_ld" != yes && break
3596       fi
3597     fi
3598   done
3599   IFS="$ac_save_ifs"
3600 else
3601   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3602 fi
3603 fi
3604
3605 LD="$lt_cv_path_LD"
3606 if test -n "$LD"; then
3607   echo "$ac_t""$LD" 1>&6
3608 else
3609   echo "$ac_t""no" 1>&6
3610 fi
3611 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3612 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3613 echo "configure:3614: checking if the linker ($LD) is GNU ld" >&5
3614 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3615   echo $ac_n "(cached) $ac_c" 1>&6
3616 else
3617   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3618 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3619   lt_cv_prog_gnu_ld=yes
3620 else
3621   lt_cv_prog_gnu_ld=no
3622 fi
3623 fi
3624
3625 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3626 with_gnu_ld=$lt_cv_prog_gnu_ld
3627
3628
3629 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3630 echo "configure:3631: checking for $LD option to reload object files" >&5
3631 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   lt_cv_ld_reload_flag='-r'
3635 fi
3636
3637 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3638 reload_flag=$lt_cv_ld_reload_flag
3639 test -n "$reload_flag" && reload_flag=" $reload_flag"
3640
3641 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3642 echo "configure:3643: checking for BSD-compatible nm" >&5
3643 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   if test -n "$NM"; then
3647   # Let the user override the test.
3648   lt_cv_path_NM="$NM"
3649 else
3650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3651   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3652     test -z "$ac_dir" && ac_dir=.
3653     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3654     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3655       # Check to see if the nm accepts a BSD-compat flag.
3656       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3657       #   nm: unknown option "B" ignored
3658       # Tru64's nm complains that /dev/null is an invalid object file
3659       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3660         lt_cv_path_NM="$tmp_nm -B"
3661         break
3662       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3663         lt_cv_path_NM="$tmp_nm -p"
3664         break
3665       else
3666         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3667         continue # so that we can try to find one that supports BSD flags
3668       fi
3669     fi
3670   done
3671   IFS="$ac_save_ifs"
3672   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3673 fi
3674 fi
3675
3676 NM="$lt_cv_path_NM"
3677 echo "$ac_t""$NM" 1>&6
3678
3679 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3680 echo "configure:3681: checking whether ln -s works" >&5
3681 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   rm -f conftestdata
3685 if ln -s X conftestdata 2>/dev/null
3686 then
3687   rm -f conftestdata
3688   ac_cv_prog_LN_S="ln -s"
3689 else
3690   ac_cv_prog_LN_S=ln
3691 fi
3692 fi
3693 LN_S="$ac_cv_prog_LN_S"
3694 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3695   echo "$ac_t""yes" 1>&6
3696 else
3697   echo "$ac_t""no" 1>&6
3698 fi
3699
3700 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3701 echo "configure:3702: checking how to recognise dependant libraries" >&5
3702 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   lt_cv_file_magic_cmd='$MAGIC_CMD'
3706 lt_cv_file_magic_test_file=
3707 lt_cv_deplibs_check_method='unknown'
3708 # Need to set the preceding variable on all platforms that support
3709 # interlibrary dependencies.
3710 # 'none' -- dependencies not supported.
3711 # `unknown' -- same as none, but documents that we really don't know.
3712 # 'pass_all' -- all dependencies passed with no checks.
3713 # 'test_compile' -- check by making test program.
3714 # 'file_magic [[regex]]' -- check by looking for files in library path
3715 # which responds to the $file_magic_cmd with a given egrep regex.
3716 # If you have `file' or equivalent on your system and you're not sure
3717 # whether `pass_all' will *always* work, you probably want this one.
3718
3719 case $host_os in
3720 aix4* | aix5*)
3721   lt_cv_deplibs_check_method=pass_all
3722   ;;
3723
3724 beos*)
3725   lt_cv_deplibs_check_method=pass_all
3726   ;;
3727
3728 bsdi4*)
3729   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3730   lt_cv_file_magic_cmd='/usr/bin/file -L'
3731   lt_cv_file_magic_test_file=/shlib/libc.so
3732   ;;
3733
3734 cygwin* | mingw* | pw32*)
3735   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3736   lt_cv_file_magic_cmd='$OBJDUMP -f'
3737   ;;
3738
3739 darwin* | rhapsody*)
3740   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3741   lt_cv_file_magic_cmd='/usr/bin/file -L'
3742   case "$host_os" in
3743   rhapsody* | darwin1.[012])
3744     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3745     ;;
3746   *) # Darwin 1.3 on
3747     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3748     ;;
3749   esac
3750   ;;
3751
3752 freebsd*)
3753   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3754     case $host_cpu in
3755     i*86 )
3756       # Not sure whether the presence of OpenBSD here was a mistake.
3757       # Let's accept both of them until this is cleared up.
3758       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3759       lt_cv_file_magic_cmd=/usr/bin/file
3760       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3761       ;;
3762     esac
3763   else
3764     lt_cv_deplibs_check_method=pass_all
3765   fi
3766   ;;
3767
3768 gnu*)
3769   lt_cv_deplibs_check_method=pass_all
3770   ;;
3771
3772 hpux10.20*|hpux11*)
3773   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3774   lt_cv_file_magic_cmd=/usr/bin/file
3775   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3776   ;;
3777
3778 irix5* | irix6*)
3779   case $host_os in
3780   irix5*)
3781     # this will be overridden with pass_all, but let us keep it just in case
3782     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3783     ;;
3784   *)
3785     case $LD in
3786     *-32|*"-32 ") libmagic=32-bit;;
3787     *-n32|*"-n32 ") libmagic=N32;;
3788     *-64|*"-64 ") libmagic=64-bit;;
3789     *) libmagic=never-match;;
3790     esac
3791     # this will be overridden with pass_all, but let us keep it just in case
3792     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3793     ;;
3794   esac
3795   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3796   lt_cv_deplibs_check_method=pass_all
3797   ;;
3798
3799 # This must be Linux ELF.
3800 linux-gnu*)
3801   case $host_cpu in
3802   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3803     lt_cv_deplibs_check_method=pass_all ;;
3804   *)
3805     # glibc up to 2.1.1 does not perform some relocations on ARM
3806     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3807   esac
3808   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3809   ;;
3810
3811 netbsd*)
3812   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3813     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3814   else
3815     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3816   fi
3817   ;;
3818
3819 newos6*)
3820   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3821   lt_cv_file_magic_cmd=/usr/bin/file
3822   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3823   ;;
3824
3825 openbsd*)
3826   lt_cv_file_magic_cmd=/usr/bin/file
3827   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3828   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3829     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3830   else
3831     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3832   fi
3833   ;;
3834
3835 osf3* | osf4* | osf5*)
3836   # this will be overridden with pass_all, but let us keep it just in case
3837   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3838   lt_cv_file_magic_test_file=/shlib/libc.so
3839   lt_cv_deplibs_check_method=pass_all
3840   ;;
3841
3842 sco3.2v5*)
3843   lt_cv_deplibs_check_method=pass_all
3844   ;;
3845
3846 solaris*)
3847   lt_cv_deplibs_check_method=pass_all
3848   lt_cv_file_magic_test_file=/lib/libc.so
3849   ;;
3850
3851 sysv5uw[78]* | sysv4*uw2*)
3852   lt_cv_deplibs_check_method=pass_all
3853   ;;
3854
3855 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3856   case $host_vendor in
3857   motorola)
3858     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]'
3859     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3860     ;;
3861   ncr)
3862     lt_cv_deplibs_check_method=pass_all
3863     ;;
3864   sequent)
3865     lt_cv_file_magic_cmd='/bin/file'
3866     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3867     ;;
3868   sni)
3869     lt_cv_file_magic_cmd='/bin/file'
3870     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3871     lt_cv_file_magic_test_file=/lib/libc.so
3872     ;;
3873   esac
3874   ;;
3875 esac
3876
3877 fi
3878
3879 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3880 file_magic_cmd=$lt_cv_file_magic_cmd
3881 deplibs_check_method=$lt_cv_deplibs_check_method
3882
3883 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3884 echo "configure:3885: checking for object suffix" >&5
3885 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3886   echo $ac_n "(cached) $ac_c" 1>&6
3887 else
3888   rm -f conftest*
3889 echo 'int i = 1;' > conftest.$ac_ext
3890 if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3891   for ac_file in conftest.*; do
3892     case $ac_file in
3893     *.c) ;;
3894     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3895     esac
3896   done
3897 else
3898   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3899 fi
3900 rm -f conftest*
3901 fi
3902
3903 echo "$ac_t""$ac_cv_objext" 1>&6
3904 OBJEXT=$ac_cv_objext
3905 ac_objext=$ac_cv_objext
3906
3907
3908
3909
3910 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3911 echo "configure:3912: checking for executable suffix" >&5
3912 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3916   ac_cv_exeext=.exe
3917 else
3918   rm -f conftest*
3919   echo 'int main () { return 0; }' > conftest.$ac_ext
3920   ac_cv_exeext=
3921   if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3922     for file in conftest.*; do
3923       case $file in
3924       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3925       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3926       esac
3927     done
3928   else
3929     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3930   fi
3931   rm -f conftest*
3932   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3933 fi
3934 fi
3935
3936 EXEEXT=""
3937 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3938 echo "$ac_t""${ac_cv_exeext}" 1>&6
3939 ac_exeext=$EXEEXT
3940
3941 if test $host != $build; then
3942   ac_tool_prefix=${host_alias}-
3943 else
3944   ac_tool_prefix=
3945 fi
3946
3947
3948
3949
3950 # Check for command to grab the raw symbol name followed by C symbol from nm.
3951 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3952 echo "configure:3953: checking command to parse $NM output" >&5
3953 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   
3957 # These are sane defaults that work on at least a few old systems.
3958 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3959
3960 # Character class describing NM global symbol codes.
3961 symcode='[BCDEGRST]'
3962
3963 # Regexp to match symbols that can be accessed directly from C.
3964 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3965
3966 # Transform the above into a raw symbol and a C symbol.
3967 symxfrm='\1 \2\3 \3'
3968
3969 # Transform an extracted symbol line into a proper C declaration
3970 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3971
3972 # Transform an extracted symbol line into symbol name and symbol address
3973 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'"
3974
3975 # Define system-specific variables.
3976 case $host_os in
3977 aix*)
3978   symcode='[BCDT]'
3979   ;;
3980 cygwin* | mingw* | pw32*)
3981   symcode='[ABCDGISTW]'
3982   ;;
3983 hpux*) # Its linker distinguishes data from code symbols
3984   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3985   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'"
3986   ;;
3987 irix*)
3988   symcode='[BCDEGRST]'
3989   ;;
3990 solaris* | sysv5*)
3991   symcode='[BDT]'
3992   ;;
3993 sysv4)
3994   symcode='[DFNSTU]'
3995   ;;
3996 esac
3997
3998 # Handle CRLF in mingw tool chain
3999 opt_cr=
4000 case $host_os in
4001 mingw*)
4002   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4003   ;;
4004 esac
4005
4006 # If we're using GNU nm, then use its standard symbol codes.
4007 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4008   symcode='[ABCDGISTW]'
4009 fi
4010
4011 # Try without a prefix undercore, then with it.
4012 for ac_symprfx in "" "_"; do
4013
4014   # Write the raw and C identifiers.
4015 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4016
4017   # Check to see that the pipe works correctly.
4018   pipe_works=no
4019   rm -f conftest*
4020   cat > conftest.$ac_ext <<EOF
4021 #ifdef __cplusplus
4022 extern "C" {
4023 #endif
4024 char nm_test_var;
4025 void nm_test_func(){}
4026 #ifdef __cplusplus
4027 }
4028 #endif
4029 int main(){nm_test_var='a';nm_test_func();return(0);}
4030 EOF
4031
4032   if { (eval echo configure:4033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033     # Now try to grab the symbols.
4034     nlist=conftest.nm
4035     if { (eval echo configure:4036: \"$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
4036       # Try sorting and uniquifying the output.
4037       if sort "$nlist" | uniq > "$nlist"T; then
4038         mv -f "$nlist"T "$nlist"
4039       else
4040         rm -f "$nlist"T
4041       fi
4042
4043       # Make sure that we snagged all the symbols we need.
4044       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4045         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4046           cat <<EOF > conftest.$ac_ext
4047 #ifdef __cplusplus
4048 extern "C" {
4049 #endif
4050
4051 EOF
4052           # Now generate the symbol file.
4053           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4054
4055           cat <<EOF >> conftest.$ac_ext
4056 #if defined (__STDC__) && __STDC__
4057 # define lt_ptr void *
4058 #else
4059 # define lt_ptr char *
4060 # define const
4061 #endif
4062
4063 /* The mapping between symbol names and symbols. */
4064 const struct {
4065   const char *name;
4066   lt_ptr address;
4067 }
4068 lt_preloaded_symbols[] =
4069 {
4070 EOF
4071           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4072           cat <<\EOF >> conftest.$ac_ext
4073   {0, (lt_ptr) 0}
4074 };
4075
4076 #ifdef __cplusplus
4077 }
4078 #endif
4079 EOF
4080           # Now try linking the two files.
4081           mv conftest.$ac_objext conftstm.$ac_objext
4082           save_LIBS="$LIBS"
4083           save_CFLAGS="$CFLAGS"
4084           LIBS="conftstm.$ac_objext"
4085           CFLAGS="$CFLAGS$no_builtin_flag"
4086           if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4087             pipe_works=yes
4088           fi
4089           LIBS="$save_LIBS"
4090           CFLAGS="$save_CFLAGS"
4091         else
4092           echo "cannot find nm_test_func in $nlist" >&5
4093         fi
4094       else
4095         echo "cannot find nm_test_var in $nlist" >&5
4096       fi
4097     else
4098       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4099     fi
4100   else
4101     echo "$progname: failed program was:" >&5
4102     cat conftest.$ac_ext >&5
4103   fi
4104   rm -f conftest* conftst*
4105
4106   # Do not use the global_symbol_pipe unless it works.
4107   if test "$pipe_works" = yes; then
4108     break
4109   else
4110     lt_cv_sys_global_symbol_pipe=
4111   fi
4112 done
4113
4114 fi
4115
4116 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4117 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4118   global_symbol_to_cdecl=
4119   global_symbol_to_c_name_address=
4120 else
4121   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4122   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4123 fi
4124 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4125 then
4126   echo "$ac_t""failed" 1>&6
4127 else
4128   echo "$ac_t""ok" 1>&6
4129 fi
4130
4131 for ac_hdr in dlfcn.h
4132 do
4133 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4134 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4135 echo "configure:4136: checking for $ac_hdr" >&5
4136 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4137   echo $ac_n "(cached) $ac_c" 1>&6
4138 else
4139   cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 #include <$ac_hdr>
4143 EOF
4144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4145 { (eval echo configure:4146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4147 if test -z "$ac_err"; then
4148   rm -rf conftest*
4149   eval "ac_cv_header_$ac_safe=yes"
4150 else
4151   echo "$ac_err" >&5
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -rf conftest*
4155   eval "ac_cv_header_$ac_safe=no"
4156 fi
4157 rm -f conftest*
4158 fi
4159 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4160   echo "$ac_t""yes" 1>&6
4161     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4162   cat >> confdefs.h <<EOF
4163 #define $ac_tr_hdr 1
4164 EOF
4165  
4166 else
4167   echo "$ac_t""no" 1>&6
4168 fi
4169 done
4170
4171
4172
4173
4174
4175 # Only perform the check for file, if the check method requires it
4176 case $deplibs_check_method in
4177 file_magic*)
4178   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4179     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4180 echo "configure:4181: checking for ${ac_tool_prefix}file" >&5
4181 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   case $MAGIC_CMD in
4185   /*)
4186   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4187   ;;
4188   ?:/*)
4189   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4190   ;;
4191   *)
4192   ac_save_MAGIC_CMD="$MAGIC_CMD"
4193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4194   ac_dummy="/usr/bin:$PATH"
4195   for ac_dir in $ac_dummy; do
4196     test -z "$ac_dir" && ac_dir=.
4197     if test -f $ac_dir/${ac_tool_prefix}file; then
4198       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4199       if test -n "$file_magic_test_file"; then
4200         case $deplibs_check_method in
4201         "file_magic "*)
4202           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4203           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4204           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4205             egrep "$file_magic_regex" > /dev/null; then
4206             :
4207           else
4208             cat <<EOF 1>&2
4209
4210 *** Warning: the command libtool uses to detect shared libraries,
4211 *** $file_magic_cmd, produces output that libtool cannot recognize.
4212 *** The result is that libtool may fail to recognize shared libraries
4213 *** as such.  This will affect the creation of libtool libraries that
4214 *** depend on shared libraries, but programs linked with such libtool
4215 *** libraries will work regardless of this problem.  Nevertheless, you
4216 *** may want to report the problem to your system manager and/or to
4217 *** bug-libtool@gnu.org
4218
4219 EOF
4220           fi ;;
4221         esac
4222       fi
4223       break
4224     fi
4225   done
4226   IFS="$ac_save_ifs"
4227   MAGIC_CMD="$ac_save_MAGIC_CMD"
4228   ;;
4229 esac
4230 fi
4231
4232 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4233 if test -n "$MAGIC_CMD"; then
4234   echo "$ac_t""$MAGIC_CMD" 1>&6
4235 else
4236   echo "$ac_t""no" 1>&6
4237 fi
4238
4239 if test -z "$lt_cv_path_MAGIC_CMD"; then
4240   if test -n "$ac_tool_prefix"; then
4241     echo $ac_n "checking for file""... $ac_c" 1>&6
4242 echo "configure:4243: checking for file" >&5
4243 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   case $MAGIC_CMD in
4247   /*)
4248   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4249   ;;
4250   ?:/*)
4251   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4252   ;;
4253   *)
4254   ac_save_MAGIC_CMD="$MAGIC_CMD"
4255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4256   ac_dummy="/usr/bin:$PATH"
4257   for ac_dir in $ac_dummy; do
4258     test -z "$ac_dir" && ac_dir=.
4259     if test -f $ac_dir/file; then
4260       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4261       if test -n "$file_magic_test_file"; then
4262         case $deplibs_check_method in
4263         "file_magic "*)
4264           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4265           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4266           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4267             egrep "$file_magic_regex" > /dev/null; then
4268             :
4269           else
4270             cat <<EOF 1>&2
4271
4272 *** Warning: the command libtool uses to detect shared libraries,
4273 *** $file_magic_cmd, produces output that libtool cannot recognize.
4274 *** The result is that libtool may fail to recognize shared libraries
4275 *** as such.  This will affect the creation of libtool libraries that
4276 *** depend on shared libraries, but programs linked with such libtool
4277 *** libraries will work regardless of this problem.  Nevertheless, you
4278 *** may want to report the problem to your system manager and/or to
4279 *** bug-libtool@gnu.org
4280
4281 EOF
4282           fi ;;
4283         esac
4284       fi
4285       break
4286     fi
4287   done
4288   IFS="$ac_save_ifs"
4289   MAGIC_CMD="$ac_save_MAGIC_CMD"
4290   ;;
4291 esac
4292 fi
4293
4294 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4295 if test -n "$MAGIC_CMD"; then
4296   echo "$ac_t""$MAGIC_CMD" 1>&6
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301   else
4302     MAGIC_CMD=:
4303   fi
4304 fi
4305
4306   fi
4307   ;;
4308 esac
4309
4310 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4311 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4313 echo "configure:4314: checking for $ac_word" >&5
4314 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4315   echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317   if test -n "$RANLIB"; then
4318   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4319 else
4320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4321   ac_dummy="$PATH"
4322   for ac_dir in $ac_dummy; do
4323     test -z "$ac_dir" && ac_dir=.
4324     if test -f $ac_dir/$ac_word; then
4325       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4326       break
4327     fi
4328   done
4329   IFS="$ac_save_ifs"
4330 fi
4331 fi
4332 RANLIB="$ac_cv_prog_RANLIB"
4333 if test -n "$RANLIB"; then
4334   echo "$ac_t""$RANLIB" 1>&6
4335 else
4336   echo "$ac_t""no" 1>&6
4337 fi
4338
4339
4340 if test -z "$ac_cv_prog_RANLIB"; then
4341 if test -n "$ac_tool_prefix"; then
4342   # Extract the first word of "ranlib", so it can be a program name with args.
4343 set dummy ranlib; ac_word=$2
4344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4345 echo "configure:4346: checking for $ac_word" >&5
4346 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4347   echo $ac_n "(cached) $ac_c" 1>&6
4348 else
4349   if test -n "$RANLIB"; then
4350   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4351 else
4352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4353   ac_dummy="$PATH"
4354   for ac_dir in $ac_dummy; do
4355     test -z "$ac_dir" && ac_dir=.
4356     if test -f $ac_dir/$ac_word; then
4357       ac_cv_prog_RANLIB="ranlib"
4358       break
4359     fi
4360   done
4361   IFS="$ac_save_ifs"
4362   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4363 fi
4364 fi
4365 RANLIB="$ac_cv_prog_RANLIB"
4366 if test -n "$RANLIB"; then
4367   echo "$ac_t""$RANLIB" 1>&6
4368 else
4369   echo "$ac_t""no" 1>&6
4370 fi
4371
4372 else
4373   RANLIB=":"
4374 fi
4375 fi
4376
4377 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4378 set dummy ${ac_tool_prefix}strip; ac_word=$2
4379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4380 echo "configure:4381: checking for $ac_word" >&5
4381 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   if test -n "$STRIP"; then
4385   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4386 else
4387   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4388   ac_dummy="$PATH"
4389   for ac_dir in $ac_dummy; do
4390     test -z "$ac_dir" && ac_dir=.
4391     if test -f $ac_dir/$ac_word; then
4392       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4393       break
4394     fi
4395   done
4396   IFS="$ac_save_ifs"
4397 fi
4398 fi
4399 STRIP="$ac_cv_prog_STRIP"
4400 if test -n "$STRIP"; then
4401   echo "$ac_t""$STRIP" 1>&6
4402 else
4403   echo "$ac_t""no" 1>&6
4404 fi
4405
4406
4407 if test -z "$ac_cv_prog_STRIP"; then
4408 if test -n "$ac_tool_prefix"; then
4409   # Extract the first word of "strip", so it can be a program name with args.
4410 set dummy strip; ac_word=$2
4411 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4412 echo "configure:4413: checking for $ac_word" >&5
4413 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4414   echo $ac_n "(cached) $ac_c" 1>&6
4415 else
4416   if test -n "$STRIP"; then
4417   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4418 else
4419   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4420   ac_dummy="$PATH"
4421   for ac_dir in $ac_dummy; do
4422     test -z "$ac_dir" && ac_dir=.
4423     if test -f $ac_dir/$ac_word; then
4424       ac_cv_prog_STRIP="strip"
4425       break
4426     fi
4427   done
4428   IFS="$ac_save_ifs"
4429   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4430 fi
4431 fi
4432 STRIP="$ac_cv_prog_STRIP"
4433 if test -n "$STRIP"; then
4434   echo "$ac_t""$STRIP" 1>&6
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439 else
4440   STRIP=":"
4441 fi
4442 fi
4443
4444
4445 enable_dlopen=yes
4446 enable_win32_dll=yes
4447
4448 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4449 if test "${enable_libtool_lock+set}" = set; then
4450   enableval="$enable_libtool_lock"
4451   :
4452 fi
4453
4454 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4455
4456 # Some flags need to be propagated to the compiler or linker for good
4457 # libtool support.
4458 case $host in
4459 *-*-irix6*)
4460   # Find out which ABI we are using.
4461   echo '#line 4462 "configure"' > conftest.$ac_ext
4462   if { (eval echo configure:4463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4463     case `/usr/bin/file conftest.$ac_objext` in
4464     *32-bit*)
4465       LD="${LD-ld} -32"
4466       ;;
4467     *N32*)
4468       LD="${LD-ld} -n32"
4469       ;;
4470     *64-bit*)
4471       LD="${LD-ld} -64"
4472       ;;
4473     esac
4474   fi
4475   rm -rf conftest*
4476   ;;
4477
4478 *-*-sco3.2v5*)
4479   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4480   SAVE_CFLAGS="$CFLAGS"
4481   CFLAGS="$CFLAGS -belf"
4482   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4483 echo "configure:4484: checking whether the C compiler needs -belf" >&5
4484 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   
4488      ac_ext=c
4489 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4490 ac_cpp='$CPP $CPPFLAGS'
4491 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4492 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4493 cross_compiling=$ac_cv_prog_cc_cross
4494
4495      cat > conftest.$ac_ext <<EOF
4496 #line 4497 "configure"
4497 #include "confdefs.h"
4498
4499 int main() {
4500
4501 ; return 0; }
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4504   rm -rf conftest*
4505   lt_cv_cc_needs_belf=yes
4506 else
4507   echo "configure: failed program was:" >&5
4508   cat conftest.$ac_ext >&5
4509   rm -rf conftest*
4510   lt_cv_cc_needs_belf=no
4511 fi
4512 rm -f conftest*
4513      ac_ext=c
4514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4515 ac_cpp='$CPP $CPPFLAGS'
4516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4517 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4518 cross_compiling=$ac_cv_prog_cc_cross
4519
4520 fi
4521
4522 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4523   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4524     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4525     CFLAGS="$SAVE_CFLAGS"
4526   fi
4527   ;;
4528
4529 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4530   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4531 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4533 echo "configure:4534: checking for $ac_word" >&5
4534 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4535   echo $ac_n "(cached) $ac_c" 1>&6
4536 else
4537   if test -n "$DLLTOOL"; then
4538   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4539 else
4540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4541   ac_dummy="$PATH"
4542   for ac_dir in $ac_dummy; do
4543     test -z "$ac_dir" && ac_dir=.
4544     if test -f $ac_dir/$ac_word; then
4545       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4546       break
4547     fi
4548   done
4549   IFS="$ac_save_ifs"
4550 fi
4551 fi
4552 DLLTOOL="$ac_cv_prog_DLLTOOL"
4553 if test -n "$DLLTOOL"; then
4554   echo "$ac_t""$DLLTOOL" 1>&6
4555 else
4556   echo "$ac_t""no" 1>&6
4557 fi
4558
4559
4560 if test -z "$ac_cv_prog_DLLTOOL"; then
4561 if test -n "$ac_tool_prefix"; then
4562   # Extract the first word of "dlltool", so it can be a program name with args.
4563 set dummy dlltool; ac_word=$2
4564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4565 echo "configure:4566: checking for $ac_word" >&5
4566 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4567   echo $ac_n "(cached) $ac_c" 1>&6
4568 else
4569   if test -n "$DLLTOOL"; then
4570   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4571 else
4572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4573   ac_dummy="$PATH"
4574   for ac_dir in $ac_dummy; do
4575     test -z "$ac_dir" && ac_dir=.
4576     if test -f $ac_dir/$ac_word; then
4577       ac_cv_prog_DLLTOOL="dlltool"
4578       break
4579     fi
4580   done
4581   IFS="$ac_save_ifs"
4582   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4583 fi
4584 fi
4585 DLLTOOL="$ac_cv_prog_DLLTOOL"
4586 if test -n "$DLLTOOL"; then
4587   echo "$ac_t""$DLLTOOL" 1>&6
4588 else
4589   echo "$ac_t""no" 1>&6
4590 fi
4591
4592 else
4593   DLLTOOL="false"
4594 fi
4595 fi
4596
4597   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4598 set dummy ${ac_tool_prefix}as; ac_word=$2
4599 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4600 echo "configure:4601: checking for $ac_word" >&5
4601 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4602   echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604   if test -n "$AS"; then
4605   ac_cv_prog_AS="$AS" # Let the user override the test.
4606 else
4607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4608   ac_dummy="$PATH"
4609   for ac_dir in $ac_dummy; do
4610     test -z "$ac_dir" && ac_dir=.
4611     if test -f $ac_dir/$ac_word; then
4612       ac_cv_prog_AS="${ac_tool_prefix}as"
4613       break
4614     fi
4615   done
4616   IFS="$ac_save_ifs"
4617 fi
4618 fi
4619 AS="$ac_cv_prog_AS"
4620 if test -n "$AS"; then
4621   echo "$ac_t""$AS" 1>&6
4622 else
4623   echo "$ac_t""no" 1>&6
4624 fi
4625
4626
4627 if test -z "$ac_cv_prog_AS"; then
4628 if test -n "$ac_tool_prefix"; then
4629   # Extract the first word of "as", so it can be a program name with args.
4630 set dummy as; ac_word=$2
4631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4632 echo "configure:4633: checking for $ac_word" >&5
4633 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4634   echo $ac_n "(cached) $ac_c" 1>&6
4635 else
4636   if test -n "$AS"; then
4637   ac_cv_prog_AS="$AS" # Let the user override the test.
4638 else
4639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4640   ac_dummy="$PATH"
4641   for ac_dir in $ac_dummy; do
4642     test -z "$ac_dir" && ac_dir=.
4643     if test -f $ac_dir/$ac_word; then
4644       ac_cv_prog_AS="as"
4645       break
4646     fi
4647   done
4648   IFS="$ac_save_ifs"
4649   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4650 fi
4651 fi
4652 AS="$ac_cv_prog_AS"
4653 if test -n "$AS"; then
4654   echo "$ac_t""$AS" 1>&6
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659 else
4660   AS="false"
4661 fi
4662 fi
4663
4664   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4665 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4667 echo "configure:4668: checking for $ac_word" >&5
4668 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   if test -n "$OBJDUMP"; then
4672   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4673 else
4674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4675   ac_dummy="$PATH"
4676   for ac_dir in $ac_dummy; do
4677     test -z "$ac_dir" && ac_dir=.
4678     if test -f $ac_dir/$ac_word; then
4679       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4680       break
4681     fi
4682   done
4683   IFS="$ac_save_ifs"
4684 fi
4685 fi
4686 OBJDUMP="$ac_cv_prog_OBJDUMP"
4687 if test -n "$OBJDUMP"; then
4688   echo "$ac_t""$OBJDUMP" 1>&6
4689 else
4690   echo "$ac_t""no" 1>&6
4691 fi
4692
4693
4694 if test -z "$ac_cv_prog_OBJDUMP"; then
4695 if test -n "$ac_tool_prefix"; then
4696   # Extract the first word of "objdump", so it can be a program name with args.
4697 set dummy objdump; ac_word=$2
4698 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4699 echo "configure:4700: checking for $ac_word" >&5
4700 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4701   echo $ac_n "(cached) $ac_c" 1>&6
4702 else
4703   if test -n "$OBJDUMP"; then
4704   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4705 else
4706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4707   ac_dummy="$PATH"
4708   for ac_dir in $ac_dummy; do
4709     test -z "$ac_dir" && ac_dir=.
4710     if test -f $ac_dir/$ac_word; then
4711       ac_cv_prog_OBJDUMP="objdump"
4712       break
4713     fi
4714   done
4715   IFS="$ac_save_ifs"
4716   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4717 fi
4718 fi
4719 OBJDUMP="$ac_cv_prog_OBJDUMP"
4720 if test -n "$OBJDUMP"; then
4721   echo "$ac_t""$OBJDUMP" 1>&6
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725
4726 else
4727   OBJDUMP="false"
4728 fi
4729 fi
4730
4731
4732   # recent cygwin and mingw systems supply a stub DllMain which the user
4733   # can override, but on older systems we have to supply one
4734   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4735 echo "configure:4736: checking if libtool should supply DllMain function" >&5
4736 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4737   echo $ac_n "(cached) $ac_c" 1>&6
4738 else
4739   cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742
4743 int main() {
4744 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4745       DllMain (0, 0, 0);
4746 ; return 0; }
4747 EOF
4748 if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4749   rm -rf conftest*
4750   lt_cv_need_dllmain=no
4751 else
4752   echo "configure: failed program was:" >&5
4753   cat conftest.$ac_ext >&5
4754   rm -rf conftest*
4755   lt_cv_need_dllmain=yes
4756 fi
4757 rm -f conftest*
4758 fi
4759
4760 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4761
4762   case $host/$CC in
4763   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4764     # old mingw systems require "-dll" to link a DLL, while more recent ones
4765     # require "-mdll"
4766     SAVE_CFLAGS="$CFLAGS"
4767     CFLAGS="$CFLAGS -mdll"
4768     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4769 echo "configure:4770: checking how to link DLLs" >&5
4770 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4771   echo $ac_n "(cached) $ac_c" 1>&6
4772 else
4773   cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776
4777 int main() {
4778
4779 ; return 0; }
4780 EOF
4781 if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4782   rm -rf conftest*
4783   lt_cv_cc_dll_switch=-mdll
4784 else
4785   echo "configure: failed program was:" >&5
4786   cat conftest.$ac_ext >&5
4787   rm -rf conftest*
4788   lt_cv_cc_dll_switch=-dll
4789 fi
4790 rm -f conftest*
4791 fi
4792
4793 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4794     CFLAGS="$SAVE_CFLAGS" ;;
4795   *-*-cygwin* | *-*-pw32*)
4796     # cygwin systems need to pass --dll to the linker, and not link
4797     # crt.o which will require a WinMain@16 definition.
4798     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4799   esac
4800   ;;
4801   
4802 esac
4803
4804 # Sed substitution that helps us do robust quoting.  It backslashifies
4805 # metacharacters that are still active within double-quoted strings.
4806 Xsed='sed -e s/^X//'
4807 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4808
4809 # Same as above, but do not quote variable references.
4810 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4811
4812 # Sed substitution to delay expansion of an escaped shell variable in a
4813 # double_quote_subst'ed string.
4814 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4815
4816 # Constants:
4817 rm="rm -f"
4818
4819 # Global variables:
4820 default_ofile=libtool
4821 can_build_shared=yes
4822
4823 # All known linkers require a `.a' archive for static linking (except M$VC,
4824 # which needs '.lib').
4825 libext=a
4826 ltmain="$ac_aux_dir/ltmain.sh"
4827 ofile="$default_ofile"
4828 with_gnu_ld="$lt_cv_prog_gnu_ld"
4829 need_locks="$enable_libtool_lock"
4830
4831 old_CC="$CC"
4832 old_CFLAGS="$CFLAGS"
4833
4834 # Set sane defaults for various variables
4835 test -z "$AR" && AR=ar
4836 test -z "$AR_FLAGS" && AR_FLAGS=cru
4837 test -z "$AS" && AS=as
4838 test -z "$CC" && CC=cc
4839 test -z "$DLLTOOL" && DLLTOOL=dlltool
4840 test -z "$LD" && LD=ld
4841 test -z "$LN_S" && LN_S="ln -s"
4842 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4843 test -z "$NM" && NM=nm
4844 test -z "$OBJDUMP" && OBJDUMP=objdump
4845 test -z "$RANLIB" && RANLIB=:
4846 test -z "$STRIP" && STRIP=:
4847 test -z "$ac_objext" && ac_objext=o
4848
4849 if test x"$host" != x"$build"; then
4850   ac_tool_prefix=${host_alias}-
4851 else
4852   ac_tool_prefix=
4853 fi
4854
4855 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4856 case $host_os in
4857 linux-gnu*) ;;
4858 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4859 esac
4860
4861 case $host_os in
4862 aix3*)
4863   # AIX sometimes has problems with the GCC collect2 program.  For some
4864   # reason, if we set the COLLECT_NAMES environment variable, the problems
4865   # vanish in a puff of smoke.
4866   if test "X${COLLECT_NAMES+set}" != Xset; then
4867     COLLECT_NAMES=
4868     export COLLECT_NAMES
4869   fi
4870   ;;
4871 esac
4872
4873 # Determine commands to create old-style static archives.
4874 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4875 old_postinstall_cmds='chmod 644 $oldlib'
4876 old_postuninstall_cmds=
4877
4878 if test -n "$RANLIB"; then
4879   case $host_os in
4880   openbsd*)
4881     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4882     ;;
4883   *)
4884     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4885     ;;
4886   esac
4887   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4888 fi
4889
4890 # Allow CC to be a program name with arguments.
4891 set dummy $CC
4892 compiler="$2"
4893
4894 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4895 echo "configure:4896: checking for objdir" >&5
4896 rm -f .libs 2>/dev/null
4897 mkdir .libs 2>/dev/null
4898 if test -d .libs; then
4899   objdir=.libs
4900 else
4901   # MS-DOS does not allow filenames that begin with a dot.
4902   objdir=_libs
4903 fi
4904 rmdir .libs 2>/dev/null
4905 echo "$ac_t""$objdir" 1>&6
4906
4907
4908 # Check whether --with-pic or --without-pic was given.
4909 if test "${with_pic+set}" = set; then
4910   withval="$with_pic"
4911   pic_mode="$withval"
4912 else
4913   pic_mode=default
4914 fi
4915
4916 test -z "$pic_mode" && pic_mode=default
4917
4918 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4919 # in isolation, and that seeing it set (from the cache) indicates that
4920 # the associated values are set (in the cache) correctly too.
4921 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4922 echo "configure:4923: checking for $compiler option to produce PIC" >&5
4923 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4924   echo $ac_n "(cached) $ac_c" 1>&6
4925 else
4926    lt_cv_prog_cc_pic=
4927   lt_cv_prog_cc_shlib=
4928   lt_cv_prog_cc_wl=
4929   lt_cv_prog_cc_static=
4930   lt_cv_prog_cc_no_builtin=
4931   lt_cv_prog_cc_can_build_shared=$can_build_shared
4932
4933   if test "$GCC" = yes; then
4934     lt_cv_prog_cc_wl='-Wl,'
4935     lt_cv_prog_cc_static='-static'
4936
4937     case $host_os in
4938     aix*)
4939       # Below there is a dirty hack to force normal static linking with -ldl
4940       # The problem is because libdl dynamically linked with both libc and
4941       # libC (AIX C++ library), which obviously doesn't included in libraries
4942       # list by gcc. This cause undefined symbols with -static flags.
4943       # This hack allows C programs to be linked with "-static -ldl", but
4944       # not sure about C++ programs.
4945       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4946       ;;
4947     amigaos*)
4948       # FIXME: we need at least 68020 code to build shared libraries, but
4949       # adding the `-m68020' flag to GCC prevents building anything better,
4950       # like `-m68040'.
4951       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4952       ;;
4953     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4954       # PIC is the default for these OSes.
4955       ;;
4956     darwin* | rhapsody*)
4957       # PIC is the default on this platform
4958       # Common symbols not allowed in MH_DYLIB files
4959       lt_cv_prog_cc_pic='-fno-common'
4960       ;;
4961     cygwin* | mingw* | pw32* | os2*)
4962       # This hack is so that the source file can tell whether it is being
4963       # built for inclusion in a dll (and should export symbols for example).
4964       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4965       ;;
4966     sysv4*MP*)
4967       if test -d /usr/nec; then
4968          lt_cv_prog_cc_pic=-Kconform_pic
4969       fi
4970       ;;
4971     *)
4972       lt_cv_prog_cc_pic='-fPIC'
4973       ;;
4974     esac
4975   else
4976     # PORTME Check for PIC flags for the system compiler.
4977     case $host_os in
4978     aix3* | aix4* | aix5*)
4979       lt_cv_prog_cc_wl='-Wl,'
4980       # All AIX code is PIC.
4981       if test "$host_cpu" = ia64; then
4982         # AIX 5 now supports IA64 processor
4983         lt_cv_prog_cc_static='-Bstatic'
4984       else
4985         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4986       fi
4987       ;;
4988
4989     hpux9* | hpux10* | hpux11*)
4990       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4991       lt_cv_prog_cc_wl='-Wl,'
4992       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4993       lt_cv_prog_cc_pic='+Z'
4994       ;;
4995
4996     irix5* | irix6*)
4997       lt_cv_prog_cc_wl='-Wl,'
4998       lt_cv_prog_cc_static='-non_shared'
4999       # PIC (with -KPIC) is the default.
5000       ;;
5001
5002     cygwin* | mingw* | pw32* | os2*)
5003       # This hack is so that the source file can tell whether it is being
5004       # built for inclusion in a dll (and should export symbols for example).
5005       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5006       ;;
5007
5008     newsos6)
5009       lt_cv_prog_cc_pic='-KPIC'
5010       lt_cv_prog_cc_static='-Bstatic'
5011       ;;
5012
5013     osf3* | osf4* | osf5*)
5014       # All OSF/1 code is PIC.
5015       lt_cv_prog_cc_wl='-Wl,'
5016       lt_cv_prog_cc_static='-non_shared'
5017       ;;
5018
5019     sco3.2v5*)
5020       lt_cv_prog_cc_pic='-Kpic'
5021       lt_cv_prog_cc_static='-dn'
5022       lt_cv_prog_cc_shlib='-belf'
5023       ;;
5024
5025     solaris*)
5026       lt_cv_prog_cc_pic='-KPIC'
5027       lt_cv_prog_cc_static='-Bstatic'
5028       lt_cv_prog_cc_wl='-Wl,'
5029       ;;
5030
5031     sunos4*)
5032       lt_cv_prog_cc_pic='-PIC'
5033       lt_cv_prog_cc_static='-Bstatic'
5034       lt_cv_prog_cc_wl='-Qoption ld '
5035       ;;
5036
5037     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5038       lt_cv_prog_cc_pic='-KPIC'
5039       lt_cv_prog_cc_static='-Bstatic'
5040       if test "x$host_vendor" = xsni; then
5041         lt_cv_prog_cc_wl='-LD'
5042       else
5043         lt_cv_prog_cc_wl='-Wl,'
5044       fi
5045       ;;
5046
5047     uts4*)
5048       lt_cv_prog_cc_pic='-pic'
5049       lt_cv_prog_cc_static='-Bstatic'
5050       ;;
5051
5052     sysv4*MP*)
5053       if test -d /usr/nec ;then
5054         lt_cv_prog_cc_pic='-Kconform_pic'
5055         lt_cv_prog_cc_static='-Bstatic'
5056       fi
5057       ;;
5058
5059     *)
5060       lt_cv_prog_cc_can_build_shared=no
5061       ;;
5062     esac
5063   fi
5064
5065 fi
5066
5067 if test -z "$lt_cv_prog_cc_pic"; then
5068   echo "$ac_t""none" 1>&6
5069 else
5070   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5071
5072   # Check to make sure the pic_flag actually works.
5073   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5074 echo "configure:5075: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5075   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5076   echo $ac_n "(cached) $ac_c" 1>&6
5077 else
5078       save_CFLAGS="$CFLAGS"
5079     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5080     cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083
5084 int main() {
5085
5086 ; return 0; }
5087 EOF
5088 if { (eval echo configure:5089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5089   rm -rf conftest*
5090         case $host_os in
5091       hpux9* | hpux10* | hpux11*)
5092         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5093         # they create non-PIC objects.  So, if there were any warnings, we
5094         # assume that PIC is not supported.
5095         if test -s conftest.err; then
5096           lt_cv_prog_cc_pic_works=no
5097         else
5098           lt_cv_prog_cc_pic_works=yes
5099         fi
5100         ;;
5101       *)
5102         lt_cv_prog_cc_pic_works=yes
5103         ;;
5104       esac
5105     
5106 else
5107   echo "configure: failed program was:" >&5
5108   cat conftest.$ac_ext >&5
5109   rm -rf conftest*
5110         lt_cv_prog_cc_pic_works=no
5111     
5112 fi
5113 rm -f conftest*
5114     CFLAGS="$save_CFLAGS"
5115   
5116 fi
5117
5118
5119   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5120     lt_cv_prog_cc_pic=
5121     lt_cv_prog_cc_can_build_shared=no
5122   else
5123     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5124   fi
5125
5126   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5127 fi
5128
5129 # Check for any special shared library compilation flags.
5130 if test -n "$lt_cv_prog_cc_shlib"; then
5131   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5132   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5133   else
5134    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5135     lt_cv_prog_cc_can_build_shared=no
5136   fi
5137 fi
5138
5139 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5140 echo "configure:5141: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5141 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5142   echo $ac_n "(cached) $ac_c" 1>&6
5143 else
5144     lt_cv_prog_cc_static_works=no
5145   save_LDFLAGS="$LDFLAGS"
5146   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5147   cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150
5151 int main() {
5152
5153 ; return 0; }
5154 EOF
5155 if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5156   rm -rf conftest*
5157   lt_cv_prog_cc_static_works=yes
5158 else
5159   echo "configure: failed program was:" >&5
5160   cat conftest.$ac_ext >&5
5161 fi
5162 rm -f conftest*
5163   LDFLAGS="$save_LDFLAGS"
5164
5165 fi
5166
5167
5168 # Belt *and* braces to stop my trousers falling down:
5169 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5170 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5171
5172 pic_flag="$lt_cv_prog_cc_pic"
5173 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5174 wl="$lt_cv_prog_cc_wl"
5175 link_static_flag="$lt_cv_prog_cc_static"
5176 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5177 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5178
5179
5180 # Check to see if options -o and -c are simultaneously supported by compiler
5181 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5182 echo "configure:5183: checking if $compiler supports -c -o file.$ac_objext" >&5
5183 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5184   echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186   
5187 $rm -r conftest 2>/dev/null
5188 mkdir conftest
5189 cd conftest
5190 echo "int some_variable = 0;" > conftest.$ac_ext
5191 mkdir out
5192 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5193 # that will create temporary files in the current directory regardless of
5194 # the output directory.  Thus, making CWD read-only will cause this test
5195 # to fail, enabling locking or at least warning the user not to do parallel
5196 # builds.
5197 chmod -w .
5198 save_CFLAGS="$CFLAGS"
5199 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5200 compiler_c_o=no
5201 if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5202   # The compiler can only warn and ignore the option if not recognized
5203   # So say no if there are warnings
5204   if test -s out/conftest.err; then
5205     lt_cv_compiler_c_o=no
5206   else
5207     lt_cv_compiler_c_o=yes
5208   fi
5209 else
5210   # Append any errors to the config.log.
5211   cat out/conftest.err 1>&5
5212   lt_cv_compiler_c_o=no
5213 fi
5214 CFLAGS="$save_CFLAGS"
5215 chmod u+w .
5216 $rm conftest* out/*
5217 rmdir out
5218 cd ..
5219 rmdir conftest
5220 $rm -r conftest 2>/dev/null
5221
5222 fi
5223
5224 compiler_c_o=$lt_cv_compiler_c_o
5225 echo "$ac_t""$compiler_c_o" 1>&6
5226
5227 if test x"$compiler_c_o" = x"yes"; then
5228   # Check to see if we can write to a .lo
5229   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5230 echo "configure:5231: checking if $compiler supports -c -o file.lo" >&5
5231   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5232   echo $ac_n "(cached) $ac_c" 1>&6
5233 else
5234   
5235   lt_cv_compiler_o_lo=no
5236   save_CFLAGS="$CFLAGS"
5237   CFLAGS="$CFLAGS -c -o conftest.lo"
5238   save_objext="$ac_objext"
5239   ac_objext=lo
5240   cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243
5244 int main() {
5245 int some_variable = 0;
5246 ; return 0; }
5247 EOF
5248 if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5249   rm -rf conftest*
5250       # The compiler can only warn and ignore the option if not recognized
5251     # So say no if there are warnings
5252     if test -s conftest.err; then
5253       lt_cv_compiler_o_lo=no
5254     else
5255       lt_cv_compiler_o_lo=yes
5256     fi
5257   
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261 fi
5262 rm -f conftest*
5263   ac_objext="$save_objext"
5264   CFLAGS="$save_CFLAGS"
5265   
5266 fi
5267
5268   compiler_o_lo=$lt_cv_compiler_o_lo
5269   echo "$ac_t""$compiler_o_lo" 1>&6
5270 else
5271   compiler_o_lo=no
5272 fi
5273
5274 # Check to see if we can do hard links to lock some files if needed
5275 hard_links="nottested"
5276 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5277   # do not overwrite the value of need_locks provided by the user
5278   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5279 echo "configure:5280: checking if we can lock with hard links" >&5
5280   hard_links=yes
5281   $rm conftest*
5282   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5283   touch conftest.a
5284   ln conftest.a conftest.b 2>&5 || hard_links=no
5285   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5286   echo "$ac_t""$hard_links" 1>&6
5287   if test "$hard_links" = no; then
5288     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5289     need_locks=warn
5290   fi
5291 else
5292   need_locks=no
5293 fi
5294
5295 if test "$GCC" = yes; then
5296   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5297   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5298 echo "configure:5299: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5299   echo "int some_variable = 0;" > conftest.$ac_ext
5300   save_CFLAGS="$CFLAGS"
5301   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5302   compiler_rtti_exceptions=no
5303   cat > conftest.$ac_ext <<EOF
5304 #line 5305 "configure"
5305 #include "confdefs.h"
5306
5307 int main() {
5308 int some_variable = 0;
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312   rm -rf conftest*
5313       # The compiler can only warn and ignore the option if not recognized
5314     # So say no if there are warnings
5315     if test -s conftest.err; then
5316       compiler_rtti_exceptions=no
5317     else
5318       compiler_rtti_exceptions=yes
5319     fi
5320   
5321 else
5322   echo "configure: failed program was:" >&5
5323   cat conftest.$ac_ext >&5
5324 fi
5325 rm -f conftest*
5326   CFLAGS="$save_CFLAGS"
5327   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5328
5329   if test "$compiler_rtti_exceptions" = "yes"; then
5330     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5331   else
5332     no_builtin_flag=' -fno-builtin'
5333   fi
5334 fi
5335
5336 # See if the linker supports building shared libraries.
5337 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5338 echo "configure:5339: checking whether the linker ($LD) supports shared libraries" >&5
5339
5340 allow_undefined_flag=
5341 no_undefined_flag=
5342 need_lib_prefix=unknown
5343 need_version=unknown
5344 # when you set need_version to no, make sure it does not cause -set_version
5345 # flags to be left without arguments
5346 archive_cmds=
5347 archive_expsym_cmds=
5348 old_archive_from_new_cmds=
5349 old_archive_from_expsyms_cmds=
5350 export_dynamic_flag_spec=
5351 whole_archive_flag_spec=
5352 thread_safe_flag_spec=
5353 hardcode_into_libs=no
5354 hardcode_libdir_flag_spec=
5355 hardcode_libdir_separator=
5356 hardcode_direct=no
5357 hardcode_minus_L=no
5358 hardcode_shlibpath_var=unsupported
5359 runpath_var=
5360 link_all_deplibs=unknown
5361 always_export_symbols=no
5362 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5363 # include_expsyms should be a list of space-separated symbols to be *always*
5364 # included in the symbol list
5365 include_expsyms=
5366 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5367 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5368 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5369 # as well as any symbol that contains `d'.
5370 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5371 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5372 # platforms (ab)use it in PIC code, but their linkers get confused if
5373 # the symbol is explicitly referenced.  Since portable code cannot
5374 # rely on this symbol name, it's probably fine to never include it in
5375 # preloaded symbol tables.
5376 extract_expsyms_cmds=
5377
5378 case $host_os in
5379 cygwin* | mingw* | pw32*)
5380   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5381   # When not using gcc, we currently assume that we are using
5382   # Microsoft Visual C++.
5383   if test "$GCC" != yes; then
5384     with_gnu_ld=no
5385   fi
5386   ;;
5387 openbsd*)
5388   with_gnu_ld=no
5389   ;;
5390 esac
5391
5392 ld_shlibs=yes
5393 if test "$with_gnu_ld" = yes; then
5394   # If archive_cmds runs LD, not CC, wlarc should be empty
5395   wlarc='${wl}'
5396
5397   # See if GNU ld supports shared libraries.
5398   case $host_os in
5399   aix3* | aix4* | aix5*)
5400     # On AIX, the GNU linker is very broken
5401     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5402     ld_shlibs=no
5403     cat <<EOF 1>&2
5404
5405 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5406 *** to be unable to reliably create shared libraries on AIX.
5407 *** Therefore, libtool is disabling shared libraries support.  If you
5408 *** really care for shared libraries, you may want to modify your PATH
5409 *** so that a non-GNU linker is found, and then restart.
5410
5411 EOF
5412     ;;
5413
5414   amigaos*)
5415     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)'
5416     hardcode_libdir_flag_spec='-L$libdir'
5417     hardcode_minus_L=yes
5418
5419     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5420     # that the semantics of dynamic libraries on AmigaOS, at least up
5421     # to version 4, is to share data among multiple programs linked
5422     # with the same dynamic library.  Since this doesn't match the
5423     # behavior of shared libraries on other platforms, we can use
5424     # them.
5425     ld_shlibs=no
5426     ;;
5427
5428   beos*)
5429     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5430       allow_undefined_flag=unsupported
5431       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5432       # support --undefined.  This deserves some investigation.  FIXME
5433       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5434     else
5435       ld_shlibs=no
5436     fi
5437     ;;
5438
5439   cygwin* | mingw* | pw32*)
5440     # hardcode_libdir_flag_spec is actually meaningless, as there is
5441     # no search path for DLLs.
5442     hardcode_libdir_flag_spec='-L$libdir'
5443     allow_undefined_flag=unsupported
5444     always_export_symbols=yes
5445
5446     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5447       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5448       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5449       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5450       else $CC -o impgen impgen.c ; fi)~
5451       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5452
5453     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5454
5455     # cygwin and mingw dlls have different entry points and sets of symbols
5456     # to exclude.
5457     # FIXME: what about values for MSVC?
5458     dll_entry=__cygwin_dll_entry@12
5459     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5460     case $host_os in
5461     mingw*)
5462       # mingw values
5463       dll_entry=_DllMainCRTStartup@12
5464       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5465       ;;
5466     esac
5467
5468     # mingw and cygwin differ, and it's simplest to just exclude the union
5469     # of the two symbol sets.
5470     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5471
5472     # recent cygwin and mingw systems supply a stub DllMain which the user
5473     # can override, but on older systems we have to supply one (in ltdll.c)
5474     if test "x$lt_cv_need_dllmain" = "xyes"; then
5475       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5476       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~
5477         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5478     else
5479       ltdll_obj=
5480       ltdll_cmds=
5481     fi
5482
5483     # Extract the symbol export list from an `--export-all' def file,
5484     # then regenerate the def file from the symbol export list, so that
5485     # the compiled dll only exports the symbol export list.
5486     # Be careful not to strip the DATA tag left be newer dlltools.
5487     export_symbols_cmds="$ltdll_cmds"'
5488       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5489       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5490
5491     # If the export-symbols file already is a .def file (1st line
5492     # is EXPORTS), use it as is.
5493     # If DATA tags from a recent dlltool are present, honour them!
5494     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5495         cp $export_symbols $output_objdir/$soname-def;
5496       else
5497         echo EXPORTS > $output_objdir/$soname-def;
5498         _lt_hint=1;
5499         cat $export_symbols | while read symbol; do
5500          set dummy \$symbol;
5501          case \$# in
5502            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5503            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5504          esac;
5505          _lt_hint=`expr 1 + \$_lt_hint`;
5506         done;
5507       fi~
5508       '"$ltdll_cmds"'
5509       $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~
5510       $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~
5511       $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~
5512       $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~
5513       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5514     ;;
5515
5516   netbsd*)
5517     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5518       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5519       wlarc=
5520     else
5521       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5522       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5523     fi
5524     ;;
5525
5526   solaris* | sysv5*)
5527     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5528       ld_shlibs=no
5529       cat <<EOF 1>&2
5530
5531 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5532 *** create shared libraries on Solaris systems.  Therefore, libtool
5533 *** is disabling shared libraries support.  We urge you to upgrade GNU
5534 *** binutils to release 2.9.1 or newer.  Another option is to modify
5535 *** your PATH or compiler configuration so that the native linker is
5536 *** used, and then restart.
5537
5538 EOF
5539     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5540       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5541       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5542     else
5543       ld_shlibs=no
5544     fi
5545     ;;
5546
5547   sunos4*)
5548     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5549     wlarc=
5550     hardcode_direct=yes
5551     hardcode_shlibpath_var=no
5552     ;;
5553
5554   *)
5555     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5556       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5557       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5558     else
5559       ld_shlibs=no
5560     fi
5561     ;;
5562   esac
5563
5564   if test "$ld_shlibs" = yes; then
5565     runpath_var=LD_RUN_PATH
5566     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5567     export_dynamic_flag_spec='${wl}--export-dynamic'
5568     case $host_os in
5569     cygwin* | mingw* | pw32*)
5570       # dlltool doesn't understand --whole-archive et. al.
5571       whole_archive_flag_spec=
5572       ;;
5573     *)
5574       # ancient GNU ld didn't support --whole-archive et. al.
5575       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5576         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5577       else
5578         whole_archive_flag_spec=
5579       fi
5580       ;;
5581     esac
5582   fi
5583 else
5584   # PORTME fill in a description of your system's linker (not GNU ld)
5585   case $host_os in
5586   aix3*)
5587     allow_undefined_flag=unsupported
5588     always_export_symbols=yes
5589     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'
5590     # Note: this linker hardcodes the directories in LIBPATH if there
5591     # are no directories specified by -L.
5592     hardcode_minus_L=yes
5593     if test "$GCC" = yes && test -z "$link_static_flag"; then
5594       # Neither direct hardcoding nor static linking is supported with a
5595       # broken collect2.
5596       hardcode_direct=unsupported
5597     fi
5598     ;;
5599
5600   aix4* | aix5*)
5601     if test "$host_cpu" = ia64; then
5602       # On IA64, the linker does run time linking by default, so we don't
5603       # have to do anything special.
5604       aix_use_runtimelinking=no
5605       exp_sym_flag='-Bexport'
5606       no_entry_flag=""
5607     else
5608       aix_use_runtimelinking=no
5609
5610       # Test if we are trying to use run time linking or normal
5611       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5612       # need to do runtime linking.
5613       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5614         for ld_flag in $LDFLAGS; do
5615           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5616             aix_use_runtimelinking=yes
5617             break
5618           fi
5619         done
5620       esac
5621
5622       exp_sym_flag='-bexport'
5623       no_entry_flag='-bnoentry'
5624     fi
5625
5626     # When large executables or shared objects are built, AIX ld can
5627     # have problems creating the table of contents.  If linking a library
5628     # or program results in "error TOC overflow" add -mminimal-toc to
5629     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5630     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5631
5632     hardcode_direct=yes
5633     archive_cmds=''
5634     hardcode_libdir_separator=':'
5635     if test "$GCC" = yes; then
5636       case $host_os in aix4.[012]|aix4.[012].*)
5637         collect2name=`${CC} -print-prog-name=collect2`
5638         if test -f "$collect2name" && \
5639           strings "$collect2name" | grep resolve_lib_name >/dev/null
5640         then
5641           # We have reworked collect2
5642           hardcode_direct=yes
5643         else
5644           # We have old collect2
5645           hardcode_direct=unsupported
5646           # It fails to find uninstalled libraries when the uninstalled
5647           # path is not listed in the libpath.  Setting hardcode_minus_L
5648           # to unsupported forces relinking
5649           hardcode_minus_L=yes
5650           hardcode_libdir_flag_spec='-L$libdir'
5651           hardcode_libdir_separator=
5652         fi
5653       esac
5654
5655       shared_flag='-shared'
5656     else
5657       # not using gcc
5658       if test "$host_cpu" = ia64; then
5659         shared_flag='${wl}-G'
5660       else
5661         if test "$aix_use_runtimelinking" = yes; then
5662           shared_flag='${wl}-G'
5663         else
5664           shared_flag='${wl}-bM:SRE'
5665         fi
5666       fi
5667     fi
5668
5669     # It seems that -bexpall can do strange things, so it is better to
5670     # generate a list of symbols to export.
5671     always_export_symbols=yes
5672     if test "$aix_use_runtimelinking" = yes; then
5673       # Warning - without using the other runtime loading flags (-brtl),
5674       # -berok will link without error, but may produce a broken library.
5675       allow_undefined_flag='-berok'
5676       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5677       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"
5678     else
5679       if test "$host_cpu" = ia64; then
5680         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5681         allow_undefined_flag="-z nodefs"
5682         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"
5683       else
5684         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5685         # Warning - without using the other run time loading flags,
5686         # -berok will link without error, but may produce a broken library.
5687         allow_undefined_flag='${wl}-berok'
5688         # This is a bit strange, but is similar to how AIX traditionally builds
5689         # it's shared libraries.
5690         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'
5691       fi
5692     fi
5693     ;;
5694
5695   amigaos*)
5696     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)'
5697     hardcode_libdir_flag_spec='-L$libdir'
5698     hardcode_minus_L=yes
5699     # see comment about different semantics on the GNU ld section
5700     ld_shlibs=no
5701     ;;
5702
5703   cygwin* | mingw* | pw32*)
5704     # When not using gcc, we currently assume that we are using
5705     # Microsoft Visual C++.
5706     # hardcode_libdir_flag_spec is actually meaningless, as there is
5707     # no search path for DLLs.
5708     hardcode_libdir_flag_spec=' '
5709     allow_undefined_flag=unsupported
5710     # Tell ltmain to make .lib files, not .a files.
5711     libext=lib
5712     # FIXME: Setting linknames here is a bad hack.
5713     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5714     # The linker will automatically build a .lib file if we build a DLL.
5715     old_archive_from_new_cmds='true'
5716     # FIXME: Should let the user specify the lib program.
5717     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5718     fix_srcfile_path='`cygpath -w "$srcfile"`'
5719     ;;
5720
5721   darwin* | rhapsody*)
5722     case "$host_os" in
5723     rhapsody* | darwin1.[012])
5724       allow_undefined_flag='-undefined suppress'
5725       ;;
5726     *) # Darwin 1.3 on
5727       allow_undefined_flag='-flat_namespace -undefined suppress'
5728       ;;
5729     esac
5730     # FIXME: Relying on posixy $() will cause problems for
5731     #        cross-compilation, but unfortunately the echo tests do not
5732     #        yet detect zsh echo's removal of \ escapes.
5733     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'
5734     # We need to add '_' to the symbols in $export_symbols first
5735     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5736     hardcode_direct=yes
5737     hardcode_shlibpath_var=no
5738     whole_archive_flag_spec='-all_load $convenience'
5739     ;;
5740
5741   freebsd1*)
5742     ld_shlibs=no
5743     ;;
5744
5745   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5746   # support.  Future versions do this automatically, but an explicit c++rt0.o
5747   # does not break anything, and helps significantly (at the cost of a little
5748   # extra space).
5749   freebsd2.2*)
5750     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5751     hardcode_libdir_flag_spec='-R$libdir'
5752     hardcode_direct=yes
5753     hardcode_shlibpath_var=no
5754     ;;
5755
5756   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5757   freebsd2*)
5758     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5759     hardcode_direct=yes
5760     hardcode_minus_L=yes
5761     hardcode_shlibpath_var=no
5762     ;;
5763
5764   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5765   freebsd*)
5766     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5767     hardcode_libdir_flag_spec='-R$libdir'
5768     hardcode_direct=yes
5769     hardcode_shlibpath_var=no
5770     ;;
5771
5772   hpux9* | hpux10* | hpux11*)
5773     case $host_os in
5774     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' ;;
5775     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5776     esac
5777     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5778     hardcode_libdir_separator=:
5779     hardcode_direct=yes
5780     hardcode_minus_L=yes # Not in the search PATH, but as the default
5781                          # location of the library.
5782     export_dynamic_flag_spec='${wl}-E'
5783     ;;
5784
5785   irix5* | irix6*)
5786     if test "$GCC" = yes; then
5787       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'
5788     else
5789       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'
5790     fi
5791     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5792     hardcode_libdir_separator=:
5793     link_all_deplibs=yes
5794     ;;
5795
5796   netbsd*)
5797     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5798       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5799     else
5800       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5801     fi
5802     hardcode_libdir_flag_spec='-R$libdir'
5803     hardcode_direct=yes
5804     hardcode_shlibpath_var=no
5805     ;;
5806
5807   newsos6)
5808     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5809     hardcode_direct=yes
5810     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5811     hardcode_libdir_separator=:
5812     hardcode_shlibpath_var=no
5813     ;;
5814
5815   openbsd*)
5816     hardcode_direct=yes
5817     hardcode_shlibpath_var=no
5818     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5819       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5820       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5821       export_dynamic_flag_spec='${wl}-E'
5822     else
5823       case "$host_os" in
5824       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5825         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5826         hardcode_libdir_flag_spec='-R$libdir'
5827         ;;
5828       *)
5829         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5830         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5831         ;;
5832       esac
5833     fi
5834     ;;
5835
5836   os2*)
5837     hardcode_libdir_flag_spec='-L$libdir'
5838     hardcode_minus_L=yes
5839     allow_undefined_flag=unsupported
5840     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'
5841     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5842     ;;
5843
5844   osf3*)
5845     if test "$GCC" = yes; then
5846       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5847       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'
5848     else
5849       allow_undefined_flag=' -expect_unresolved \*'
5850       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'
5851     fi
5852     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5853     hardcode_libdir_separator=:
5854     ;;
5855
5856   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5857     if test "$GCC" = yes; then
5858       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5859       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'
5860       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     else
5862       allow_undefined_flag=' -expect_unresolved \*'
5863       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'
5864       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5865       $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'
5866
5867       #Both c and cxx compiler support -rpath directly
5868       hardcode_libdir_flag_spec='-rpath $libdir'
5869     fi
5870     hardcode_libdir_separator=:
5871     ;;
5872
5873   sco3.2v5*)
5874     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5875     hardcode_shlibpath_var=no
5876     runpath_var=LD_RUN_PATH
5877     hardcode_runpath_var=yes
5878     export_dynamic_flag_spec='${wl}-Bexport'
5879     ;;
5880
5881   solaris*)
5882     # gcc --version < 3.0 without binutils cannot create self contained
5883     # shared libraries reliably, requiring libgcc.a to resolve some of
5884     # the object symbols generated in some cases.  Libraries that use
5885     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5886     # a copy of libgcc.a into every shared library to guarantee resolving
5887     # such symbols causes other problems:  According to Tim Van Holder
5888     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5889     # (to the application) exception stack for one thing.
5890     no_undefined_flag=' -z defs'
5891     if test "$GCC" = yes; then
5892       case `$CC --version 2>/dev/null` in
5893       [12].*)
5894         cat <<EOF 1>&2
5895
5896 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5897 *** create self contained shared libraries on Solaris systems, without
5898 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5899 *** -no-undefined support, which will at least allow you to build shared
5900 *** libraries.  However, you may find that when you link such libraries
5901 *** into an application without using GCC, you have to manually add
5902 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5903 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5904 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5905
5906 EOF
5907         no_undefined_flag=
5908         ;;
5909       esac
5910     fi
5911     # $CC -shared without GNU ld will not create a library from C++
5912     # object files and a static libstdc++, better avoid it by now
5913     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5914     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5915                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5916     hardcode_libdir_flag_spec='-R$libdir'
5917     hardcode_shlibpath_var=no
5918     case $host_os in
5919     solaris2.[0-5] | solaris2.[0-5].*) ;;
5920     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5921       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5922     esac
5923     link_all_deplibs=yes
5924     ;;
5925
5926   sunos4*)
5927     if test "x$host_vendor" = xsequent; then
5928       # Use $CC to link under sequent, because it throws in some extra .o
5929       # files that make .init and .fini sections work.
5930       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5931     else
5932       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5933     fi
5934     hardcode_libdir_flag_spec='-L$libdir'
5935     hardcode_direct=yes
5936     hardcode_minus_L=yes
5937     hardcode_shlibpath_var=no
5938     ;;
5939
5940   sysv4)
5941     if test "x$host_vendor" = xsno; then
5942       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5943       hardcode_direct=yes # is this really true???
5944     else
5945       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5946       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5947     fi
5948     runpath_var='LD_RUN_PATH'
5949     hardcode_shlibpath_var=no
5950     ;;
5951
5952   sysv4.3*)
5953     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5954     hardcode_shlibpath_var=no
5955     export_dynamic_flag_spec='-Bexport'
5956     ;;
5957
5958   sysv5*)
5959     no_undefined_flag=' -z text'
5960     # $CC -shared without GNU ld will not create a library from C++
5961     # object files and a static libstdc++, better avoid it by now
5962     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5963     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5964                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5965     hardcode_libdir_flag_spec=
5966     hardcode_shlibpath_var=no
5967     runpath_var='LD_RUN_PATH'
5968     ;;
5969
5970   uts4*)
5971     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5972     hardcode_libdir_flag_spec='-L$libdir'
5973     hardcode_shlibpath_var=no
5974     ;;
5975
5976   dgux*)
5977     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978     hardcode_libdir_flag_spec='-L$libdir'
5979     hardcode_shlibpath_var=no
5980     ;;
5981
5982   sysv4*MP*)
5983     if test -d /usr/nec; then
5984       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5985       hardcode_shlibpath_var=no
5986       runpath_var=LD_RUN_PATH
5987       hardcode_runpath_var=yes
5988       ld_shlibs=yes
5989     fi
5990     ;;
5991
5992   sysv4.2uw2*)
5993     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5994     hardcode_direct=yes
5995     hardcode_minus_L=no
5996     hardcode_shlibpath_var=no
5997     hardcode_runpath_var=yes
5998     runpath_var=LD_RUN_PATH
5999     ;;
6000
6001   sysv5uw7* | unixware7*)
6002     no_undefined_flag='${wl}-z ${wl}text'
6003     if test "$GCC" = yes; then
6004       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6005     else
6006       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6007     fi
6008     runpath_var='LD_RUN_PATH'
6009     hardcode_shlibpath_var=no
6010     ;;
6011
6012   *)
6013     ld_shlibs=no
6014     ;;
6015   esac
6016 fi
6017 echo "$ac_t""$ld_shlibs" 1>&6
6018 test "$ld_shlibs" = no && can_build_shared=no
6019
6020 # Check hardcoding attributes.
6021 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6022 echo "configure:6023: checking how to hardcode library paths into programs" >&5
6023 hardcode_action=
6024 if test -n "$hardcode_libdir_flag_spec" || \
6025    test -n "$runpath_var"; then
6026
6027   # We can hardcode non-existant directories.
6028   if test "$hardcode_direct" != no &&
6029      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6030      # have to relink, otherwise we might link with an installed library
6031      # when we should be linking with a yet-to-be-installed one
6032      ## test "$hardcode_shlibpath_var" != no &&
6033      test "$hardcode_minus_L" != no; then
6034     # Linking always hardcodes the temporary library directory.
6035     hardcode_action=relink
6036   else
6037     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6038     hardcode_action=immediate
6039   fi
6040 else
6041   # We cannot hardcode anything, or else we can only hardcode existing
6042   # directories.
6043   hardcode_action=unsupported
6044 fi
6045 echo "$ac_t""$hardcode_action" 1>&6
6046
6047 striplib=
6048 old_striplib=
6049 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6050 echo "configure:6051: checking whether stripping libraries is possible" >&5
6051 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6052   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6053   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6054   echo "$ac_t""yes" 1>&6
6055 else
6056   echo "$ac_t""no" 1>&6
6057 fi
6058
6059 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6060 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6061
6062 # PORTME Fill in your ld.so characteristics
6063 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6064 echo "configure:6065: checking dynamic linker characteristics" >&5
6065 library_names_spec=
6066 libname_spec='lib$name'
6067 soname_spec=
6068 postinstall_cmds=
6069 postuninstall_cmds=
6070 finish_cmds=
6071 finish_eval=
6072 shlibpath_var=
6073 shlibpath_overrides_runpath=unknown
6074 version_type=none
6075 dynamic_linker="$host_os ld.so"
6076 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6077 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6078
6079 case $host_os in
6080 aix3*)
6081   version_type=linux
6082   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6083   shlibpath_var=LIBPATH
6084
6085   # AIX has no versioning support, so we append a major version to the name.
6086   soname_spec='${libname}${release}.so$major'
6087   ;;
6088
6089 aix4* | aix5*)
6090   version_type=linux
6091   if test "$host_cpu" = ia64; then
6092     # AIX 5 supports IA64
6093     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6094     shlibpath_var=LD_LIBRARY_PATH
6095   else
6096     # With GCC up to 2.95.x, collect2 would create an import file
6097     # for dependence libraries.  The import file would start with
6098     # the line `#! .'.  This would cause the generated library to
6099     # depend on `.', always an invalid library.  This was fixed in
6100     # development snapshots of GCC prior to 3.0.
6101     case $host_os in
6102       aix4 | aix4.[01] | aix4.[01].*)
6103         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6104              echo ' yes '
6105              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6106           :
6107         else
6108           can_build_shared=no
6109         fi
6110         ;;
6111     esac
6112     # AIX (on Power*) has no versioning support, so currently we can
6113     # not hardcode correct soname into executable. Probably we can
6114     # add versioning support to collect2, so additional links can
6115     # be useful in future.
6116     if test "$aix_use_runtimelinking" = yes; then
6117       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6118       # instead of lib<name>.a to let people know that these are not
6119       # typical AIX shared libraries.
6120       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6121     else
6122       # We preserve .a as extension for shared libraries through AIX4.2
6123       # and later when we are not doing run time linking.
6124       library_names_spec='${libname}${release}.a $libname.a'
6125       soname_spec='${libname}${release}.so$major'
6126     fi
6127     shlibpath_var=LIBPATH
6128   fi
6129   ;;
6130
6131 amigaos*)
6132   library_names_spec='$libname.ixlibrary $libname.a'
6133   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6134   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'
6135   ;;
6136
6137 beos*)
6138   library_names_spec='${libname}.so'
6139   dynamic_linker="$host_os ld.so"
6140   shlibpath_var=LIBRARY_PATH
6141   ;;
6142
6143 bsdi4*)
6144   version_type=linux
6145   need_version=no
6146   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6147   soname_spec='${libname}${release}.so$major'
6148   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6149   shlibpath_var=LD_LIBRARY_PATH
6150   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6151   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6152   export_dynamic_flag_spec=-rdynamic
6153   # the default ld.so.conf also contains /usr/contrib/lib and
6154   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6155   # libtool to hard-code these into programs
6156   ;;
6157
6158 cygwin* | mingw* | pw32*)
6159   version_type=windows
6160   need_version=no
6161   need_lib_prefix=no
6162   case $GCC,$host_os in
6163   yes,cygwin*)
6164     library_names_spec='$libname.dll.a'
6165     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6166     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6167       dldir=$destdir/`dirname \$dlpath`~
6168       test -d \$dldir || mkdir -p \$dldir~
6169       $install_prog .libs/$dlname \$dldir/$dlname'
6170     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6171       dlpath=$dir/\$dldll~
6172        $rm \$dlpath'
6173     ;;
6174   yes,mingw*)
6175     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6176     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6177     ;;
6178   yes,pw32*)
6179     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6180     ;;
6181   *)
6182     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6183     ;;
6184   esac
6185   dynamic_linker='Win32 ld.exe'
6186   # FIXME: first we should search . and the directory the executable is in
6187   shlibpath_var=PATH
6188   ;;
6189
6190 darwin* | rhapsody*)
6191   dynamic_linker="$host_os dyld"
6192   version_type=darwin
6193   need_lib_prefix=no
6194   need_version=no
6195   # FIXME: Relying on posixy $() will cause problems for
6196   #        cross-compilation, but unfortunately the echo tests do not
6197   #        yet detect zsh echo's removal of \ escapes.
6198   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)'
6199   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6200   shlibpath_overrides_runpath=yes
6201   shlibpath_var=DYLD_LIBRARY_PATH
6202   ;;
6203
6204 freebsd1*)
6205   dynamic_linker=no
6206   ;;
6207
6208 freebsd*)
6209   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6210   version_type=freebsd-$objformat
6211   case $version_type in
6212     freebsd-elf*)
6213       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6214       need_version=no
6215       need_lib_prefix=no
6216       ;;
6217     freebsd-*)
6218       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6219       need_version=yes
6220       ;;
6221   esac
6222   shlibpath_var=LD_LIBRARY_PATH
6223   case $host_os in
6224   freebsd2*)
6225     shlibpath_overrides_runpath=yes
6226     ;;
6227   *)
6228     shlibpath_overrides_runpath=no
6229     hardcode_into_libs=yes
6230     ;;
6231   esac
6232   ;;
6233
6234 gnu*)
6235   version_type=linux
6236   need_lib_prefix=no
6237   need_version=no
6238   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6239   soname_spec='${libname}${release}.so$major'
6240   shlibpath_var=LD_LIBRARY_PATH
6241   hardcode_into_libs=yes
6242   ;;
6243
6244 hpux9* | hpux10* | hpux11*)
6245   # Give a soname corresponding to the major version so that dld.sl refuses to
6246   # link against other versions.
6247   dynamic_linker="$host_os dld.sl"
6248   version_type=sunos
6249   need_lib_prefix=no
6250   need_version=no
6251   shlibpath_var=SHLIB_PATH
6252   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6253   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6254   soname_spec='${libname}${release}.sl$major'
6255   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6256   postinstall_cmds='chmod 555 $lib'
6257   ;;
6258
6259 irix5* | irix6*)
6260   version_type=irix
6261   need_lib_prefix=no
6262   need_version=no
6263   soname_spec='${libname}${release}.so$major'
6264   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6265   case $host_os in
6266   irix5*)
6267     libsuff= shlibsuff=
6268     ;;
6269   *)
6270     case $LD in # libtool.m4 will add one of these switches to LD
6271     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6272     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6273     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6274     *) libsuff= shlibsuff= libmagic=never-match;;
6275     esac
6276     ;;
6277   esac
6278   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6279   shlibpath_overrides_runpath=no
6280   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6281   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6282   ;;
6283
6284 # No shared lib support for Linux oldld, aout, or coff.
6285 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6286   dynamic_linker=no
6287   ;;
6288
6289 # This must be Linux ELF.
6290 linux-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   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6297   shlibpath_var=LD_LIBRARY_PATH
6298   shlibpath_overrides_runpath=no
6299   # This implies no fast_install, which is unacceptable.
6300   # Some rework will be needed to allow for fast_install
6301   # before this can be enabled.
6302   hardcode_into_libs=yes
6303
6304   # We used to test for /lib/ld.so.1 and disable shared libraries on
6305   # powerpc, because MkLinux only supported shared libraries with the
6306   # GNU dynamic linker.  Since this was broken with cross compilers,
6307   # most powerpc-linux boxes support dynamic linking these days and
6308   # people can always --disable-shared, the test was removed, and we
6309   # assume the GNU/Linux dynamic linker is in use.
6310   dynamic_linker='GNU/Linux ld.so'
6311   ;;
6312
6313 netbsd*)
6314   version_type=sunos
6315   need_lib_prefix=no
6316   need_version=no
6317   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6318     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6319     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6320     dynamic_linker='NetBSD (a.out) ld.so'
6321   else
6322     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6323     soname_spec='${libname}${release}.so$major'
6324     dynamic_linker='NetBSD ld.elf_so'
6325   fi
6326   shlibpath_var=LD_LIBRARY_PATH
6327   shlibpath_overrides_runpath=yes
6328   hardcode_into_libs=yes
6329   ;;
6330
6331 newsos6)
6332   version_type=linux
6333   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6334   shlibpath_var=LD_LIBRARY_PATH
6335   shlibpath_overrides_runpath=yes
6336   ;;
6337
6338 openbsd*)
6339   version_type=sunos
6340   need_lib_prefix=no
6341   need_version=no
6342   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6343     case "$host_os" in
6344     openbsd2.[89] | openbsd2.[89].*)
6345       shlibpath_overrides_runpath=no
6346       ;;
6347     *)
6348       shlibpath_overrides_runpath=yes
6349       ;;
6350     esac
6351   else
6352     shlibpath_overrides_runpath=yes
6353   fi
6354   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6355   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6356   shlibpath_var=LD_LIBRARY_PATH
6357   ;;
6358
6359 os2*)
6360   libname_spec='$name'
6361   need_lib_prefix=no
6362   library_names_spec='$libname.dll $libname.a'
6363   dynamic_linker='OS/2 ld.exe'
6364   shlibpath_var=LIBPATH
6365   ;;
6366
6367 osf3* | osf4* | osf5*)
6368   version_type=osf
6369   need_version=no
6370   soname_spec='${libname}${release}.so'
6371   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6372   shlibpath_var=LD_LIBRARY_PATH
6373   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6374   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6375   ;;
6376
6377 sco3.2v5*)
6378   version_type=osf
6379   soname_spec='${libname}${release}.so$major'
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   shlibpath_var=LD_LIBRARY_PATH
6382   ;;
6383
6384 solaris*)
6385   version_type=linux
6386   need_lib_prefix=no
6387   need_version=no
6388   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6389   soname_spec='${libname}${release}.so$major'
6390   shlibpath_var=LD_LIBRARY_PATH
6391   shlibpath_overrides_runpath=yes
6392   hardcode_into_libs=yes
6393   # ldd complains unless libraries are executable
6394   postinstall_cmds='chmod +x $lib'
6395   ;;
6396
6397 sunos4*)
6398   version_type=sunos
6399   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6400   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6401   shlibpath_var=LD_LIBRARY_PATH
6402   shlibpath_overrides_runpath=yes
6403   if test "$with_gnu_ld" = yes; then
6404     need_lib_prefix=no
6405   fi
6406   need_version=yes
6407   ;;
6408
6409 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6410   version_type=linux
6411   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6412   soname_spec='${libname}${release}.so$major'
6413   shlibpath_var=LD_LIBRARY_PATH
6414   case $host_vendor in
6415     sni)
6416       shlibpath_overrides_runpath=no
6417       ;;
6418     motorola)
6419       need_lib_prefix=no
6420       need_version=no
6421       shlibpath_overrides_runpath=no
6422       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6423       ;;
6424   esac
6425   ;;
6426
6427 uts4*)
6428   version_type=linux
6429   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6430   soname_spec='${libname}${release}.so$major'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   ;;
6433
6434 dgux*)
6435   version_type=linux
6436   need_lib_prefix=no
6437   need_version=no
6438   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6439   soname_spec='${libname}${release}.so$major'
6440   shlibpath_var=LD_LIBRARY_PATH
6441   ;;
6442
6443 sysv4*MP*)
6444   if test -d /usr/nec ;then
6445     version_type=linux
6446     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6447     soname_spec='$libname.so.$major'
6448     shlibpath_var=LD_LIBRARY_PATH
6449   fi
6450   ;;
6451
6452 *)
6453   dynamic_linker=no
6454   ;;
6455 esac
6456 echo "$ac_t""$dynamic_linker" 1>&6
6457 test "$dynamic_linker" = no && can_build_shared=no
6458
6459 # Report the final consequences.
6460 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6461 echo "configure:6462: checking if libtool supports shared libraries" >&5
6462 echo "$ac_t""$can_build_shared" 1>&6
6463
6464 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6465 echo "configure:6466: checking whether to build shared libraries" >&5
6466 test "$can_build_shared" = "no" && enable_shared=no
6467
6468 # On AIX, shared libraries and static libraries use the same namespace, and
6469 # are all built from PIC.
6470 case "$host_os" in
6471 aix3*)
6472   test "$enable_shared" = yes && enable_static=no
6473   if test -n "$RANLIB"; then
6474     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6475     postinstall_cmds='$RANLIB $lib'
6476   fi
6477   ;;
6478
6479 aix4*)
6480   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6481     test "$enable_shared" = yes && enable_static=no
6482   fi
6483   ;;
6484 esac
6485 echo "$ac_t""$enable_shared" 1>&6
6486
6487 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6488 echo "configure:6489: checking whether to build static libraries" >&5
6489 # Make sure either enable_shared or enable_static is yes.
6490 test "$enable_shared" = yes || enable_static=yes
6491 echo "$ac_t""$enable_static" 1>&6
6492
6493 if test "$hardcode_action" = relink; then
6494   # Fast installation is not supported
6495   enable_fast_install=no
6496 elif test "$shlibpath_overrides_runpath" = yes ||
6497      test "$enable_shared" = no; then
6498   # Fast installation is not necessary
6499   enable_fast_install=needless
6500 fi
6501
6502 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6503 if test "$GCC" = yes; then
6504   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6505 fi
6506
6507 if test "x$enable_dlopen" != xyes; then
6508   enable_dlopen=unknown
6509   enable_dlopen_self=unknown
6510   enable_dlopen_self_static=unknown
6511 else
6512   lt_cv_dlopen=no
6513   lt_cv_dlopen_libs=
6514
6515   case $host_os in
6516   beos*)
6517     lt_cv_dlopen="load_add_on"
6518     lt_cv_dlopen_libs=
6519     lt_cv_dlopen_self=yes
6520     ;;
6521
6522   cygwin* | mingw* | pw32*)
6523     lt_cv_dlopen="LoadLibrary"
6524     lt_cv_dlopen_libs=
6525    ;;
6526
6527   *)
6528     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6529 echo "configure:6530: checking for shl_load" >&5
6530 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6531   echo $ac_n "(cached) $ac_c" 1>&6
6532 else
6533   cat > conftest.$ac_ext <<EOF
6534 #line 6535 "configure"
6535 #include "confdefs.h"
6536 /* System header to define __stub macros and hopefully few prototypes,
6537     which can conflict with char shl_load(); below.  */
6538 #include <assert.h>
6539 /* Override any gcc2 internal prototype to avoid an error.  */
6540 /* We use char because int might match the return type of a gcc2
6541     builtin and then its argument prototype would still apply.  */
6542 char shl_load();
6543 char (*f)();
6544
6545 int main() {
6546
6547 /* The GNU C library defines this for functions which it implements
6548     to always fail with ENOSYS.  Some functions are actually named
6549     something starting with __ and the normal name is an alias.  */
6550 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6551 choke me
6552 #else
6553 f = shl_load;
6554 #endif
6555
6556 ; return 0; }
6557 EOF
6558 if { (eval echo configure:6559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6559   rm -rf conftest*
6560   eval "ac_cv_func_shl_load=yes"
6561 else
6562   echo "configure: failed program was:" >&5
6563   cat conftest.$ac_ext >&5
6564   rm -rf conftest*
6565   eval "ac_cv_func_shl_load=no"
6566 fi
6567 rm -f conftest*
6568 fi
6569
6570 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6571   echo "$ac_t""yes" 1>&6
6572   lt_cv_dlopen="shl_load"
6573 else
6574   echo "$ac_t""no" 1>&6
6575 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6576 echo "configure:6577: checking for shl_load in -ldld" >&5
6577 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6578 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581   ac_save_LIBS="$LIBS"
6582 LIBS="-ldld  $LIBS"
6583 cat > conftest.$ac_ext <<EOF
6584 #line 6585 "configure"
6585 #include "confdefs.h"
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char shl_load();
6590
6591 int main() {
6592 shl_load()
6593 ; return 0; }
6594 EOF
6595 if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6596   rm -rf conftest*
6597   eval "ac_cv_lib_$ac_lib_var=yes"
6598 else
6599   echo "configure: failed program was:" >&5
6600   cat conftest.$ac_ext >&5
6601   rm -rf conftest*
6602   eval "ac_cv_lib_$ac_lib_var=no"
6603 fi
6604 rm -f conftest*
6605 LIBS="$ac_save_LIBS"
6606
6607 fi
6608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6611 else
6612   echo "$ac_t""no" 1>&6
6613 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6614 echo "configure:6615: checking for dlopen" >&5
6615 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6616   echo $ac_n "(cached) $ac_c" 1>&6
6617 else
6618   cat > conftest.$ac_ext <<EOF
6619 #line 6620 "configure"
6620 #include "confdefs.h"
6621 /* System header to define __stub macros and hopefully few prototypes,
6622     which can conflict with char dlopen(); below.  */
6623 #include <assert.h>
6624 /* Override any gcc2 internal prototype to avoid an error.  */
6625 /* We use char because int might match the return type of a gcc2
6626     builtin and then its argument prototype would still apply.  */
6627 char dlopen();
6628 char (*f)();
6629
6630 int main() {
6631
6632 /* The GNU C library defines this for functions which it implements
6633     to always fail with ENOSYS.  Some functions are actually named
6634     something starting with __ and the normal name is an alias.  */
6635 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6636 choke me
6637 #else
6638 f = dlopen;
6639 #endif
6640
6641 ; return 0; }
6642 EOF
6643 if { (eval echo configure:6644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6644   rm -rf conftest*
6645   eval "ac_cv_func_dlopen=yes"
6646 else
6647   echo "configure: failed program was:" >&5
6648   cat conftest.$ac_ext >&5
6649   rm -rf conftest*
6650   eval "ac_cv_func_dlopen=no"
6651 fi
6652 rm -f conftest*
6653 fi
6654
6655 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6656   echo "$ac_t""yes" 1>&6
6657   lt_cv_dlopen="dlopen"
6658 else
6659   echo "$ac_t""no" 1>&6
6660 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6661 echo "configure:6662: checking for dlopen in -ldl" >&5
6662 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   ac_save_LIBS="$LIBS"
6667 LIBS="-ldl  $LIBS"
6668 cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 /* Override any gcc2 internal prototype to avoid an error.  */
6672 /* We use char because int might match the return type of a gcc2
6673     builtin and then its argument prototype would still apply.  */
6674 char dlopen();
6675
6676 int main() {
6677 dlopen()
6678 ; return 0; }
6679 EOF
6680 if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6681   rm -rf conftest*
6682   eval "ac_cv_lib_$ac_lib_var=yes"
6683 else
6684   echo "configure: failed program was:" >&5
6685   cat conftest.$ac_ext >&5
6686   rm -rf conftest*
6687   eval "ac_cv_lib_$ac_lib_var=no"
6688 fi
6689 rm -f conftest*
6690 LIBS="$ac_save_LIBS"
6691
6692 fi
6693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6694   echo "$ac_t""yes" 1>&6
6695   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6696 else
6697   echo "$ac_t""no" 1>&6
6698 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6699 echo "configure:6700: checking for dlopen in -lsvld" >&5
6700 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   ac_save_LIBS="$LIBS"
6705 LIBS="-lsvld  $LIBS"
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char dlopen();
6713
6714 int main() {
6715 dlopen()
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=no"
6726 fi
6727 rm -f conftest*
6728 LIBS="$ac_save_LIBS"
6729
6730 fi
6731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6734 else
6735   echo "$ac_t""no" 1>&6
6736 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6737 echo "configure:6738: checking for dld_link in -ldld" >&5
6738 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6740   echo $ac_n "(cached) $ac_c" 1>&6
6741 else
6742   ac_save_LIBS="$LIBS"
6743 LIBS="-ldld  $LIBS"
6744 cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char dld_link();
6751
6752 int main() {
6753 dld_link()
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   eval "ac_cv_lib_$ac_lib_var=yes"
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=no"
6764 fi
6765 rm -f conftest*
6766 LIBS="$ac_save_LIBS"
6767
6768 fi
6769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6770   echo "$ac_t""yes" 1>&6
6771   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775
6776               
6777 fi
6778
6779             
6780 fi
6781
6782           
6783 fi
6784
6785         
6786 fi
6787
6788       
6789 fi
6790
6791     ;;
6792   esac
6793
6794   if test "x$lt_cv_dlopen" != xno; then
6795     enable_dlopen=yes
6796   else
6797     enable_dlopen=no
6798   fi
6799
6800   case $lt_cv_dlopen in
6801   dlopen)
6802     save_CPPFLAGS="$CPPFLAGS"
6803         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6804
6805     save_LDFLAGS="$LDFLAGS"
6806     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6807
6808     save_LIBS="$LIBS"
6809     LIBS="$lt_cv_dlopen_libs $LIBS"
6810
6811     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6812 echo "configure:6813: checking whether a program can dlopen itself" >&5
6813 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6814   echo $ac_n "(cached) $ac_c" 1>&6
6815 else
6816           if test "$cross_compiling" = yes; then :
6817   lt_cv_dlopen_self=cross
6818 else
6819     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6820   lt_status=$lt_dlunknown
6821   cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824
6825 #if HAVE_DLFCN_H
6826 #include <dlfcn.h>
6827 #endif
6828
6829 #include <stdio.h>
6830
6831 #ifdef RTLD_GLOBAL
6832 #  define LT_DLGLOBAL           RTLD_GLOBAL
6833 #else
6834 #  ifdef DL_GLOBAL
6835 #    define LT_DLGLOBAL         DL_GLOBAL
6836 #  else
6837 #    define LT_DLGLOBAL         0
6838 #  endif
6839 #endif
6840
6841 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6842    find out it does not work in some platform. */
6843 #ifndef LT_DLLAZY_OR_NOW
6844 #  ifdef RTLD_LAZY
6845 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6846 #  else
6847 #    ifdef DL_LAZY
6848 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6849 #    else
6850 #      ifdef RTLD_NOW
6851 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6852 #      else
6853 #        ifdef DL_NOW
6854 #          define LT_DLLAZY_OR_NOW      DL_NOW
6855 #        else
6856 #          define LT_DLLAZY_OR_NOW      0
6857 #        endif
6858 #      endif
6859 #    endif
6860 #  endif
6861 #endif
6862
6863 #ifdef __cplusplus
6864 extern "C" void exit (int);
6865 #endif
6866
6867 void fnord() { int i=42;}
6868 int main ()
6869 {
6870   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6871   int status = $lt_dlunknown;
6872
6873   if (self)
6874     {
6875       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6876       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6877       /* dlclose (self); */
6878     }
6879
6880     exit (status);
6881 }
6882 EOF
6883   if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6884     (./conftest; exit; ) 2>/dev/null
6885     lt_status=$?
6886     case x$lt_status in
6887       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6888       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6889       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6890     esac
6891   else :
6892     # compilation failed
6893     lt_cv_dlopen_self=no
6894   fi
6895 fi
6896 rm -fr conftest*
6897
6898     
6899 fi
6900
6901 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6902
6903     if test "x$lt_cv_dlopen_self" = xyes; then
6904       LDFLAGS="$LDFLAGS $link_static_flag"
6905       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6906 echo "configure:6907: checking whether a statically linked program can dlopen itself" >&5
6907 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6908   echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910           if test "$cross_compiling" = yes; then :
6911   lt_cv_dlopen_self_static=cross
6912 else
6913     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6914   lt_status=$lt_dlunknown
6915   cat > conftest.$ac_ext <<EOF
6916 #line 6917 "configure"
6917 #include "confdefs.h"
6918
6919 #if HAVE_DLFCN_H
6920 #include <dlfcn.h>
6921 #endif
6922
6923 #include <stdio.h>
6924
6925 #ifdef RTLD_GLOBAL
6926 #  define LT_DLGLOBAL           RTLD_GLOBAL
6927 #else
6928 #  ifdef DL_GLOBAL
6929 #    define LT_DLGLOBAL         DL_GLOBAL
6930 #  else
6931 #    define LT_DLGLOBAL         0
6932 #  endif
6933 #endif
6934
6935 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6936    find out it does not work in some platform. */
6937 #ifndef LT_DLLAZY_OR_NOW
6938 #  ifdef RTLD_LAZY
6939 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6940 #  else
6941 #    ifdef DL_LAZY
6942 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6943 #    else
6944 #      ifdef RTLD_NOW
6945 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6946 #      else
6947 #        ifdef DL_NOW
6948 #          define LT_DLLAZY_OR_NOW      DL_NOW
6949 #        else
6950 #          define LT_DLLAZY_OR_NOW      0
6951 #        endif
6952 #      endif
6953 #    endif
6954 #  endif
6955 #endif
6956
6957 #ifdef __cplusplus
6958 extern "C" void exit (int);
6959 #endif
6960
6961 void fnord() { int i=42;}
6962 int main ()
6963 {
6964   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6965   int status = $lt_dlunknown;
6966
6967   if (self)
6968     {
6969       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6970       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6971       /* dlclose (self); */
6972     }
6973
6974     exit (status);
6975 }
6976 EOF
6977   if { (eval echo configure:6978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6978     (./conftest; exit; ) 2>/dev/null
6979     lt_status=$?
6980     case x$lt_status in
6981       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6982       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6983       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6984     esac
6985   else :
6986     # compilation failed
6987     lt_cv_dlopen_self_static=no
6988   fi
6989 fi
6990 rm -fr conftest*
6991
6992       
6993 fi
6994
6995 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6996     fi
6997
6998     CPPFLAGS="$save_CPPFLAGS"
6999     LDFLAGS="$save_LDFLAGS"
7000     LIBS="$save_LIBS"
7001     ;;
7002   esac
7003
7004   case $lt_cv_dlopen_self in
7005   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7006   *) enable_dlopen_self=unknown ;;
7007   esac
7008
7009   case $lt_cv_dlopen_self_static in
7010   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7011   *) enable_dlopen_self_static=unknown ;;
7012   esac
7013 fi
7014
7015
7016 if test "$enable_shared" = yes && test "$GCC" = yes; then
7017   case $archive_cmds in
7018   *'~'*)
7019     # FIXME: we may have to deal with multi-command sequences.
7020     ;;
7021   '$CC '*)
7022     # Test whether the compiler implicitly links with -lc since on some
7023     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7024     # to ld, don't add -lc before -lgcc.
7025     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7026 echo "configure:7027: checking whether -lc should be explicitly linked in" >&5
7027     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7028   echo $ac_n "(cached) $ac_c" 1>&6
7029 else
7030   $rm conftest*
7031     echo 'static int dummy;' > conftest.$ac_ext
7032
7033     if { (eval echo configure:7034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7034       soname=conftest
7035       lib=conftest
7036       libobjs=conftest.$ac_objext
7037       deplibs=
7038       wl=$lt_cv_prog_cc_wl
7039       compiler_flags=-v
7040       linker_flags=-v
7041       verstring=
7042       output_objdir=.
7043       libname=conftest
7044       save_allow_undefined_flag=$allow_undefined_flag
7045       allow_undefined_flag=
7046       if { (eval echo configure:7047: \"$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; }
7047       then
7048         lt_cv_archive_cmds_need_lc=no
7049       else
7050         lt_cv_archive_cmds_need_lc=yes
7051       fi
7052       allow_undefined_flag=$save_allow_undefined_flag
7053     else
7054       cat conftest.err 1>&5
7055     fi
7056 fi
7057
7058     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7059     ;;
7060   esac
7061 fi
7062 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7063
7064 # The second clause should only fire when bootstrapping the
7065 # libtool distribution, otherwise you forgot to ship ltmain.sh
7066 # with your package, and you will get complaints that there are
7067 # no rules to generate ltmain.sh.
7068 if test -f "$ltmain"; then
7069   :
7070 else
7071   # If there is no Makefile yet, we rely on a make rule to execute
7072   # `config.status --recheck' to rerun these tests and create the
7073   # libtool script then.
7074   test -f Makefile && make "$ltmain"
7075 fi
7076
7077 if test -f "$ltmain"; then
7078   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7079   $rm -f "${ofile}T"
7080
7081   echo creating $ofile
7082
7083   # Now quote all the things that may contain metacharacters while being
7084   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7085   # variables and quote the copies for generation of the libtool script.
7086   for var in echo old_CC old_CFLAGS \
7087     AR AR_FLAGS CC LD LN_S NM SHELL \
7088     reload_flag reload_cmds wl \
7089     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7090     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7091     library_names_spec soname_spec \
7092     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7093     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7094     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7095     old_striplib striplib file_magic_cmd export_symbols_cmds \
7096     deplibs_check_method allow_undefined_flag no_undefined_flag \
7097     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7098     global_symbol_to_c_name_address \
7099     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7100     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7101     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7102
7103     case $var in
7104     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7105     old_postinstall_cmds | old_postuninstall_cmds | \
7106     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7107     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7108     postinstall_cmds | postuninstall_cmds | \
7109     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7110       # Double-quote double-evaled strings.
7111       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7112       ;;
7113     *)
7114       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7115       ;;
7116     esac
7117   done
7118
7119   cat <<__EOF__ > "${ofile}T"
7120 #! $SHELL
7121
7122 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7123 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7124 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7125 #
7126 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7127 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7128 #
7129 # This program is free software; you can redistribute it and/or modify
7130 # it under the terms of the GNU General Public License as published by
7131 # the Free Software Foundation; either version 2 of the License, or
7132 # (at your option) any later version.
7133 #
7134 # This program is distributed in the hope that it will be useful, but
7135 # WITHOUT ANY WARRANTY; without even the implied warranty of
7136 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7137 # General Public License for more details.
7138 #
7139 # You should have received a copy of the GNU General Public License
7140 # along with this program; if not, write to the Free Software
7141 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7142 #
7143 # As a special exception to the GNU General Public License, if you
7144 # distribute this file as part of a program that contains a
7145 # configuration script generated by Autoconf, you may include it under
7146 # the same distribution terms that you use for the rest of that program.
7147
7148 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7149 Xsed="sed -e s/^X//"
7150
7151 # The HP-UX ksh and POSIX shell print the target directory to stdout
7152 # if CDPATH is set.
7153 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7154
7155 # ### BEGIN LIBTOOL CONFIG
7156
7157 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7158
7159 # Shell to use when invoking shell scripts.
7160 SHELL=$lt_SHELL
7161
7162 # Whether or not to build shared libraries.
7163 build_libtool_libs=$enable_shared
7164
7165 # Whether or not to build static libraries.
7166 build_old_libs=$enable_static
7167
7168 # Whether or not to add -lc for building shared libraries.
7169 build_libtool_need_lc=$need_lc
7170
7171 # Whether or not to optimize for fast installation.
7172 fast_install=$enable_fast_install
7173
7174 # The host system.
7175 host_alias=$host_alias
7176 host=$host
7177
7178 # An echo program that does not interpret backslashes.
7179 echo=$lt_echo
7180
7181 # The archiver.
7182 AR=$lt_AR
7183 AR_FLAGS=$lt_AR_FLAGS
7184
7185 # The default C compiler.
7186 CC=$lt_CC
7187
7188 # Is the compiler the GNU C compiler?
7189 with_gcc=$GCC
7190
7191 # The linker used to build libraries.
7192 LD=$lt_LD
7193
7194 # Whether we need hard or soft links.
7195 LN_S=$lt_LN_S
7196
7197 # A BSD-compatible nm program.
7198 NM=$lt_NM
7199
7200 # A symbol stripping program
7201 STRIP=$STRIP
7202
7203 # Used to examine libraries when file_magic_cmd begins "file"
7204 MAGIC_CMD=$MAGIC_CMD
7205
7206 # Used on cygwin: DLL creation program.
7207 DLLTOOL="$DLLTOOL"
7208
7209 # Used on cygwin: object dumper.
7210 OBJDUMP="$OBJDUMP"
7211
7212 # Used on cygwin: assembler.
7213 AS="$AS"
7214
7215 # The name of the directory that contains temporary libtool files.
7216 objdir=$objdir
7217
7218 # How to create reloadable object files.
7219 reload_flag=$lt_reload_flag
7220 reload_cmds=$lt_reload_cmds
7221
7222 # How to pass a linker flag through the compiler.
7223 wl=$lt_wl
7224
7225 # Object file suffix (normally "o").
7226 objext="$ac_objext"
7227
7228 # Old archive suffix (normally "a").
7229 libext="$libext"
7230
7231 # Executable file suffix (normally "").
7232 exeext="$exeext"
7233
7234 # Additional compiler flags for building library objects.
7235 pic_flag=$lt_pic_flag
7236 pic_mode=$pic_mode
7237
7238 # Does compiler simultaneously support -c and -o options?
7239 compiler_c_o=$lt_compiler_c_o
7240
7241 # Can we write directly to a .lo ?
7242 compiler_o_lo=$lt_compiler_o_lo
7243
7244 # Must we lock files when doing compilation ?
7245 need_locks=$lt_need_locks
7246
7247 # Do we need the lib prefix for modules?
7248 need_lib_prefix=$need_lib_prefix
7249
7250 # Do we need a version for libraries?
7251 need_version=$need_version
7252
7253 # Whether dlopen is supported.
7254 dlopen_support=$enable_dlopen
7255
7256 # Whether dlopen of programs is supported.
7257 dlopen_self=$enable_dlopen_self
7258
7259 # Whether dlopen of statically linked programs is supported.
7260 dlopen_self_static=$enable_dlopen_self_static
7261
7262 # Compiler flag to prevent dynamic linking.
7263 link_static_flag=$lt_link_static_flag
7264
7265 # Compiler flag to turn off builtin functions.
7266 no_builtin_flag=$lt_no_builtin_flag
7267
7268 # Compiler flag to allow reflexive dlopens.
7269 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7270
7271 # Compiler flag to generate shared objects directly from archives.
7272 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7273
7274 # Compiler flag to generate thread-safe objects.
7275 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7276
7277 # Library versioning type.
7278 version_type=$version_type
7279
7280 # Format of library name prefix.
7281 libname_spec=$lt_libname_spec
7282
7283 # List of archive names.  First name is the real one, the rest are links.
7284 # The last name is the one that the linker finds with -lNAME.
7285 library_names_spec=$lt_library_names_spec
7286
7287 # The coded name of the library, if different from the real name.
7288 soname_spec=$lt_soname_spec
7289
7290 # Commands used to build and install an old-style archive.
7291 RANLIB=$lt_RANLIB
7292 old_archive_cmds=$lt_old_archive_cmds
7293 old_postinstall_cmds=$lt_old_postinstall_cmds
7294 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7295
7296 # Create an old-style archive from a shared archive.
7297 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7298
7299 # Create a temporary old-style archive to link instead of a shared archive.
7300 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7301
7302 # Commands used to build and install a shared archive.
7303 archive_cmds=$lt_archive_cmds
7304 archive_expsym_cmds=$lt_archive_expsym_cmds
7305 postinstall_cmds=$lt_postinstall_cmds
7306 postuninstall_cmds=$lt_postuninstall_cmds
7307
7308 # Commands to strip libraries.
7309 old_striplib=$lt_old_striplib
7310 striplib=$lt_striplib
7311
7312 # Method to check whether dependent libraries are shared objects.
7313 deplibs_check_method=$lt_deplibs_check_method
7314
7315 # Command to use when deplibs_check_method == file_magic.
7316 file_magic_cmd=$lt_file_magic_cmd
7317
7318 # Flag that allows shared libraries with undefined symbols to be built.
7319 allow_undefined_flag=$lt_allow_undefined_flag
7320
7321 # Flag that forces no undefined symbols.
7322 no_undefined_flag=$lt_no_undefined_flag
7323
7324 # Commands used to finish a libtool library installation in a directory.
7325 finish_cmds=$lt_finish_cmds
7326
7327 # Same as above, but a single script fragment to be evaled but not shown.
7328 finish_eval=$lt_finish_eval
7329
7330 # Take the output of nm and produce a listing of raw symbols and C names.
7331 global_symbol_pipe=$lt_global_symbol_pipe
7332
7333 # Transform the output of nm in a proper C declaration
7334 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7335
7336 # Transform the output of nm in a C name address pair
7337 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7338
7339 # This is the shared library runtime path variable.
7340 runpath_var=$runpath_var
7341
7342 # This is the shared library path variable.
7343 shlibpath_var=$shlibpath_var
7344
7345 # Is shlibpath searched before the hard-coded library search path?
7346 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7347
7348 # How to hardcode a shared library path into an executable.
7349 hardcode_action=$hardcode_action
7350
7351 # Whether we should hardcode library paths into libraries.
7352 hardcode_into_libs=$hardcode_into_libs
7353
7354 # Flag to hardcode \$libdir into a binary during linking.
7355 # This must work even if \$libdir does not exist.
7356 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7357
7358 # Whether we need a single -rpath flag with a separated argument.
7359 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7360
7361 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7362 # resulting binary.
7363 hardcode_direct=$hardcode_direct
7364
7365 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7366 # resulting binary.
7367 hardcode_minus_L=$hardcode_minus_L
7368
7369 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7370 # the resulting binary.
7371 hardcode_shlibpath_var=$hardcode_shlibpath_var
7372
7373 # Variables whose values should be saved in libtool wrapper scripts and
7374 # restored at relink time.
7375 variables_saved_for_relink="$variables_saved_for_relink"
7376
7377 # Whether libtool must link a program against all its dependency libraries.
7378 link_all_deplibs=$link_all_deplibs
7379
7380 # Compile-time system search path for libraries
7381 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7382
7383 # Run-time system search path for libraries
7384 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7385
7386 # Fix the shell variable \$srcfile for the compiler.
7387 fix_srcfile_path="$fix_srcfile_path"
7388
7389 # Set to yes if exported symbols are required.
7390 always_export_symbols=$always_export_symbols
7391
7392 # The commands to list exported symbols.
7393 export_symbols_cmds=$lt_export_symbols_cmds
7394
7395 # The commands to extract the exported symbol list from a shared archive.
7396 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7397
7398 # Symbols that should not be listed in the preloaded symbols.
7399 exclude_expsyms=$lt_exclude_expsyms
7400
7401 # Symbols that must always be exported.
7402 include_expsyms=$lt_include_expsyms
7403
7404 # ### END LIBTOOL CONFIG
7405
7406 __EOF__
7407
7408   case $host_os in
7409   aix3*)
7410     cat <<\EOF >> "${ofile}T"
7411
7412 # AIX sometimes has problems with the GCC collect2 program.  For some
7413 # reason, if we set the COLLECT_NAMES environment variable, the problems
7414 # vanish in a puff of smoke.
7415 if test "X${COLLECT_NAMES+set}" != Xset; then
7416   COLLECT_NAMES=
7417   export COLLECT_NAMES
7418 fi
7419 EOF
7420     ;;
7421   esac
7422
7423   case $host_os in
7424   cygwin* | mingw* | pw32* | os2*)
7425     cat <<'EOF' >> "${ofile}T"
7426       # This is a source program that is used to create dlls on Windows
7427       # Don't remove nor modify the starting and closing comments
7428 # /* ltdll.c starts here */
7429 # #define WIN32_LEAN_AND_MEAN
7430 # #include <windows.h>
7431 # #undef WIN32_LEAN_AND_MEAN
7432 # #include <stdio.h>
7433 #
7434 # #ifndef __CYGWIN__
7435 # #  ifdef __CYGWIN32__
7436 # #    define __CYGWIN__ __CYGWIN32__
7437 # #  endif
7438 # #endif
7439 #
7440 # #ifdef __cplusplus
7441 # extern "C" {
7442 # #endif
7443 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7444 # #ifdef __cplusplus
7445 # }
7446 # #endif
7447 #
7448 # #ifdef __CYGWIN__
7449 # #include <cygwin/cygwin_dll.h>
7450 # DECLARE_CYGWIN_DLL( DllMain );
7451 # #endif
7452 # HINSTANCE __hDllInstance_base;
7453 #
7454 # BOOL APIENTRY
7455 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7456 # {
7457 #   __hDllInstance_base = hInst;
7458 #   return TRUE;
7459 # }
7460 # /* ltdll.c ends here */
7461         # This is a source program that is used to create import libraries
7462         # on Windows for dlls which lack them. Don't remove nor modify the
7463         # starting and closing comments
7464 # /* impgen.c starts here */
7465 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7466 #
7467 #  This file is part of GNU libtool.
7468 #
7469 #  This program is free software; you can redistribute it and/or modify
7470 #  it under the terms of the GNU General Public License as published by
7471 #  the Free Software Foundation; either version 2 of the License, or
7472 #  (at your option) any later version.
7473 #
7474 #  This program is distributed in the hope that it will be useful,
7475 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7476 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7477 #  GNU General Public License for more details.
7478 #
7479 #  You should have received a copy of the GNU General Public License
7480 #  along with this program; if not, write to the Free Software
7481 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7482 #  */
7483 #
7484 # #include <stdio.h>            /* for printf() */
7485 # #include <unistd.h>           /* for open(), lseek(), read() */
7486 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7487 # #include <string.h>           /* for strdup() */
7488 #
7489 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7490 # #ifndef O_BINARY
7491 # #define O_BINARY 0
7492 # #endif
7493 #
7494 # static unsigned int
7495 # pe_get16 (fd, offset)
7496 #      int fd;
7497 #      int offset;
7498 # {
7499 #   unsigned char b[2];
7500 #   lseek (fd, offset, SEEK_SET);
7501 #   read (fd, b, 2);
7502 #   return b[0] + (b[1]<<8);
7503 # }
7504 #
7505 # static unsigned int
7506 # pe_get32 (fd, offset)
7507 #     int fd;
7508 #     int offset;
7509 # {
7510 #   unsigned char b[4];
7511 #   lseek (fd, offset, SEEK_SET);
7512 #   read (fd, b, 4);
7513 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7514 # }
7515 #
7516 # static unsigned int
7517 # pe_as32 (ptr)
7518 #      void *ptr;
7519 # {
7520 #   unsigned char *b = ptr;
7521 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7522 # }
7523 #
7524 # int
7525 # main (argc, argv)
7526 #     int argc;
7527 #     char *argv[];
7528 # {
7529 #     int dll;
7530 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7531 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7532 #     unsigned long name_rvas, nexp;
7533 #     unsigned char *expdata, *erva;
7534 #     char *filename, *dll_name;
7535 #
7536 #     filename = argv[1];
7537 #
7538 #     dll = open(filename, O_RDONLY|O_BINARY);
7539 #     if (dll < 1)
7540 #       return 1;
7541 #
7542 #     dll_name = filename;
7543 #
7544 #     for (i=0; filename[i]; i++)
7545 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7546 #           dll_name = filename + i +1;
7547 #
7548 #     pe_header_offset = pe_get32 (dll, 0x3c);
7549 #     opthdr_ofs = pe_header_offset + 4 + 20;
7550 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7551 #
7552 #     if (num_entries < 1) /* no exports */
7553 #       return 1;
7554 #
7555 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7556 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7557 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7558 #     secptr = (pe_header_offset + 4 + 20 +
7559 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7560 #
7561 #     expptr = 0;
7562 #     for (i = 0; i < nsections; i++)
7563 #     {
7564 #       char sname[8];
7565 #       unsigned long secptr1 = secptr + 40 * i;
7566 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7567 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7568 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7569 #       lseek(dll, secptr1, SEEK_SET);
7570 #       read(dll, sname, 8);
7571 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7572 #       {
7573 #           expptr = fptr + (export_rva - vaddr);
7574 #           if (export_rva + export_size > vaddr + vsize)
7575 #               export_size = vsize - (export_rva - vaddr);
7576 #           break;
7577 #       }
7578 #     }
7579 #
7580 #     expdata = (unsigned char*)malloc(export_size);
7581 #     lseek (dll, expptr, SEEK_SET);
7582 #     read (dll, expdata, export_size);
7583 #     erva = expdata - export_rva;
7584 #
7585 #     nexp = pe_as32 (expdata+24);
7586 #     name_rvas = pe_as32 (expdata+32);
7587 #
7588 #     printf ("EXPORTS\n");
7589 #     for (i = 0; i<nexp; i++)
7590 #     {
7591 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7592 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7593 #     }
7594 #
7595 #     return 0;
7596 # }
7597 # /* impgen.c ends here */
7598
7599 EOF
7600     ;;
7601   esac
7602
7603   # We use sed instead of cat because bash on DJGPP gets confused if
7604   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7605   # text mode, it properly converts lines to CR/LF.  This bash problem
7606   # is reportedly fixed, but why not run on old versions too?
7607   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7608
7609   mv -f "${ofile}T" "$ofile" || \
7610     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7611   chmod +x "$ofile"
7612 fi
7613
7614
7615
7616
7617
7618 # This can be used to rebuild libtool when needed
7619 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7620
7621 # Always use our own libtool.
7622 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7623
7624 # Prevent multiple expansion
7625
7626
7627
7628 for ac_prog in mawk gawk nawk awk
7629 do
7630 # Extract the first word of "$ac_prog", so it can be a program name with args.
7631 set dummy $ac_prog; ac_word=$2
7632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7633 echo "configure:7634: checking for $ac_word" >&5
7634 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7635   echo $ac_n "(cached) $ac_c" 1>&6
7636 else
7637   if test -n "$AWK"; then
7638   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7639 else
7640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7641   ac_dummy="$PATH"
7642   for ac_dir in $ac_dummy; do
7643     test -z "$ac_dir" && ac_dir=.
7644     if test -f $ac_dir/$ac_word; then
7645       ac_cv_prog_AWK="$ac_prog"
7646       break
7647     fi
7648   done
7649   IFS="$ac_save_ifs"
7650 fi
7651 fi
7652 AWK="$ac_cv_prog_AWK"
7653 if test -n "$AWK"; then
7654   echo "$ac_t""$AWK" 1>&6
7655 else
7656   echo "$ac_t""no" 1>&6
7657 fi
7658
7659 test -n "$AWK" && break
7660 done
7661
7662 # test for ln hardlink support
7663 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7664 echo "configure:7665: checking whether ln works" >&5
7665 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7666   echo $ac_n "(cached) $ac_c" 1>&6
7667 else
7668   rm -f conftest.src conftest.dst
7669 echo "conftest" > conftest.src
7670 if ln conftest.src conftest.dst 2>/dev/null
7671 then
7672   ol_cv_prog_LN_H="ln"
7673 else
7674   ol_cv_prog_LN_H="cp"
7675 fi
7676 rm -f conftest.src conftest.dst
7677
7678 fi
7679 LN_H="$ol_cv_prog_LN_H"
7680 if test "$ol_cv_prog_LN_H" = "ln"; then
7681         echo "$ac_t""yes" 1>&6
7682 else
7683         echo "$ac_t""no" 1>&6
7684 fi
7685
7686 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7687 echo "configure:7688: checking whether ln -s works" >&5
7688 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7689   echo $ac_n "(cached) $ac_c" 1>&6
7690 else
7691   rm -f conftestdata
7692 if ln -s X conftestdata 2>/dev/null
7693 then
7694   rm -f conftestdata
7695   ac_cv_prog_LN_S="ln -s"
7696 else
7697   ac_cv_prog_LN_S=ln
7698 fi
7699 fi
7700 LN_S="$ac_cv_prog_LN_S"
7701 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7702   echo "$ac_t""yes" 1>&6
7703 else
7704   echo "$ac_t""no" 1>&6
7705 fi
7706
7707
7708 # Extract the first word of "sendmail", so it can be a program name with args.
7709 set dummy sendmail; ac_word=$2
7710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7711 echo "configure:7712: checking for $ac_word" >&5
7712 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   case "$SENDMAIL" in
7716   /*)
7717   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7718   ;;
7719   ?:/*)
7720   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7721   ;;
7722   *)
7723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7724   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7725   for ac_dir in $ac_dummy; do 
7726     test -z "$ac_dir" && ac_dir=.
7727     if test -f $ac_dir/$ac_word; then
7728       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7729       break
7730     fi
7731   done
7732   IFS="$ac_save_ifs"
7733   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7734   ;;
7735 esac
7736 fi
7737 SENDMAIL="$ac_cv_path_SENDMAIL"
7738 if test -n "$SENDMAIL"; then
7739   echo "$ac_t""$SENDMAIL" 1>&6
7740 else
7741   echo "$ac_t""no" 1>&6
7742 fi
7743
7744 # Extract the first word of "vi", so it can be a program name with args.
7745 set dummy vi; ac_word=$2
7746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7747 echo "configure:7748: checking for $ac_word" >&5
7748 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7749   echo $ac_n "(cached) $ac_c" 1>&6
7750 else
7751   case "$EDITOR" in
7752   /*)
7753   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7754   ;;
7755   ?:/*)
7756   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7757   ;;
7758   *)
7759   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7760   ac_dummy="$PATH:/usr/ucb"
7761   for ac_dir in $ac_dummy; do 
7762     test -z "$ac_dir" && ac_dir=.
7763     if test -f $ac_dir/$ac_word; then
7764       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7765       break
7766     fi
7767   done
7768   IFS="$ac_save_ifs"
7769   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7770   ;;
7771 esac
7772 fi
7773 EDITOR="$ac_cv_path_EDITOR"
7774 if test -n "$EDITOR"; then
7775   echo "$ac_t""$EDITOR" 1>&6
7776 else
7777   echo "$ac_t""no" 1>&6
7778 fi
7779
7780 # Extract the first word of "finger", so it can be a program name with args.
7781 set dummy finger; ac_word=$2
7782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7783 echo "configure:7784: checking for $ac_word" >&5
7784 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7785   echo $ac_n "(cached) $ac_c" 1>&6
7786 else
7787   case "$FINGER" in
7788   /*)
7789   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7790   ;;
7791   ?:/*)
7792   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7793   ;;
7794   *)
7795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7796   ac_dummy="$PATH:/usr/ucb"
7797   for ac_dir in $ac_dummy; do 
7798     test -z "$ac_dir" && ac_dir=.
7799     if test -f $ac_dir/$ac_word; then
7800       ac_cv_path_FINGER="$ac_dir/$ac_word"
7801       break
7802     fi
7803   done
7804   IFS="$ac_save_ifs"
7805   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7806   ;;
7807 esac
7808 fi
7809 FINGER="$ac_cv_path_FINGER"
7810 if test -n "$FINGER"; then
7811   echo "$ac_t""$FINGER" 1>&6
7812 else
7813   echo "$ac_t""no" 1>&6
7814 fi
7815
7816
7817 ol_link_perl=no
7818 if test $ol_enable_perl != no ; then
7819         # Extract the first word of "perl", so it can be a program name with args.
7820 set dummy perl; ac_word=$2
7821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7822 echo "configure:7823: checking for $ac_word" >&5
7823 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7824   echo $ac_n "(cached) $ac_c" 1>&6
7825 else
7826   case "$PERLBIN" in
7827   /*)
7828   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7829   ;;
7830   ?:/*)
7831   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7832   ;;
7833   *)
7834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7835   ac_dummy="$PATH"
7836   for ac_dir in $ac_dummy; do 
7837     test -z "$ac_dir" && ac_dir=.
7838     if test -f $ac_dir/$ac_word; then
7839       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7840       break
7841     fi
7842   done
7843   IFS="$ac_save_ifs"
7844   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7845   ;;
7846 esac
7847 fi
7848 PERLBIN="$ac_cv_path_PERLBIN"
7849 if test -n "$PERLBIN"; then
7850   echo "$ac_t""$PERLBIN" 1>&6
7851 else
7852   echo "$ac_t""no" 1>&6
7853 fi
7854
7855
7856         if test "no$PERLBIN" = "no" ; then
7857                 if test $ol_enable_perl = yes ; then
7858                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7859                 fi
7860
7861         else
7862                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7863                 if test x"$ol_with_perl_module" = "xstatic" ; then
7864                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7865                 else
7866                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7867                 fi
7868                                 ol_link_perl=yes
7869         fi
7870 fi
7871
7872 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7873 echo "configure:7874: checking how to run the C preprocessor" >&5
7874 # On Suns, sometimes $CPP names a directory.
7875 if test -n "$CPP" && test -d "$CPP"; then
7876   CPP=
7877 fi
7878 if test -z "$CPP"; then
7879 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7880   echo $ac_n "(cached) $ac_c" 1>&6
7881 else
7882     # This must be in double quotes, not single quotes, because CPP may get
7883   # substituted into the Makefile and "${CC-cc}" will confuse make.
7884   CPP="${CC-cc} -E"
7885   # On the NeXT, cc -E runs the code through the compiler's parser,
7886   # not just through cpp.
7887   cat > conftest.$ac_ext <<EOF
7888 #line 7889 "configure"
7889 #include "confdefs.h"
7890 #include <assert.h>
7891 Syntax Error
7892 EOF
7893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7894 { (eval echo configure:7895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7896 if test -z "$ac_err"; then
7897   :
7898 else
7899   echo "$ac_err" >&5
7900   echo "configure: failed program was:" >&5
7901   cat conftest.$ac_ext >&5
7902   rm -rf conftest*
7903   CPP="${CC-cc} -E -traditional-cpp"
7904   cat > conftest.$ac_ext <<EOF
7905 #line 7906 "configure"
7906 #include "confdefs.h"
7907 #include <assert.h>
7908 Syntax Error
7909 EOF
7910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7911 { (eval echo configure:7912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7913 if test -z "$ac_err"; then
7914   :
7915 else
7916   echo "$ac_err" >&5
7917   echo "configure: failed program was:" >&5
7918   cat conftest.$ac_ext >&5
7919   rm -rf conftest*
7920   CPP="${CC-cc} -nologo -E"
7921   cat > conftest.$ac_ext <<EOF
7922 #line 7923 "configure"
7923 #include "confdefs.h"
7924 #include <assert.h>
7925 Syntax Error
7926 EOF
7927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7928 { (eval echo configure:7929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7930 if test -z "$ac_err"; then
7931   :
7932 else
7933   echo "$ac_err" >&5
7934   echo "configure: failed program was:" >&5
7935   cat conftest.$ac_ext >&5
7936   rm -rf conftest*
7937   CPP=/lib/cpp
7938 fi
7939 rm -f conftest*
7940 fi
7941 rm -f conftest*
7942 fi
7943 rm -f conftest*
7944   ac_cv_prog_CPP="$CPP"
7945 fi
7946   CPP="$ac_cv_prog_CPP"
7947 else
7948   ac_cv_prog_CPP="$CPP"
7949 fi
7950 echo "$ac_t""$CPP" 1>&6
7951
7952
7953 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7954         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7955
7956 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7957         echo "configure: warning: programs compiled here do run here..." 1>&2
7958         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7959
7960 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7961         echo "configure: warning: programs compiled here do not run here..." 1>&2
7962         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7963 fi
7964
7965
7966 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7967 echo "configure:7968: checking for Cygwin environment" >&5
7968 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7969   echo $ac_n "(cached) $ac_c" 1>&6
7970 else
7971   cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974
7975 int main() {
7976
7977 #ifndef __CYGWIN__
7978 #define __CYGWIN__ __CYGWIN32__
7979 #endif
7980 return __CYGWIN__;
7981 ; return 0; }
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7984   rm -rf conftest*
7985   ac_cv_cygwin=yes
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -rf conftest*
7990   ac_cv_cygwin=no
7991 fi
7992 rm -f conftest*
7993 fi
7994
7995 echo "$ac_t""$ac_cv_cygwin" 1>&6
7996 CYGWIN=
7997 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7998 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7999 echo "configure:8000: checking for mingw32 environment" >&5
8000 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   cat > conftest.$ac_ext <<EOF
8004 #line 8005 "configure"
8005 #include "confdefs.h"
8006
8007 int main() {
8008 return __MINGW32__;
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8012   rm -rf conftest*
8013   ac_cv_mingw32=yes
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   ac_cv_mingw32=no
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 echo "$ac_t""$ac_cv_mingw32" 1>&6
8024 MINGW32=
8025 test "$ac_cv_mingw32" = yes && MINGW32=yes
8026
8027
8028
8029 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8030 echo "configure:8031: checking for executable suffix" >&5
8031 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8032   echo $ac_n "(cached) $ac_c" 1>&6
8033 else
8034   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8035   ac_cv_exeext=.exe
8036 else
8037   rm -f conftest*
8038   echo 'int main () { return 0; }' > conftest.$ac_ext
8039   ac_cv_exeext=
8040   if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8041     for file in conftest.*; do
8042       case $file in
8043       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8044       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8045       esac
8046     done
8047   else
8048     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8049   fi
8050   rm -f conftest*
8051   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8052 fi
8053 fi
8054
8055 EXEEXT=""
8056 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8057 echo "$ac_t""${ac_cv_exeext}" 1>&6
8058 ac_exeext=$EXEEXT
8059
8060 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8061 echo "configure:8062: checking for object suffix" >&5
8062 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8063   echo $ac_n "(cached) $ac_c" 1>&6
8064 else
8065   rm -f conftest*
8066 echo 'int i = 1;' > conftest.$ac_ext
8067 if { (eval echo configure:8068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8068   for ac_file in conftest.*; do
8069     case $ac_file in
8070     *.c) ;;
8071     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8072     esac
8073   done
8074 else
8075   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8076 fi
8077 rm -f conftest*
8078 fi
8079
8080 echo "$ac_t""$ac_cv_objext" 1>&6
8081 OBJEXT=$ac_cv_objext
8082 ac_objext=$ac_cv_objext
8083
8084
8085 cat >> confdefs.h <<EOF
8086 #define EXEEXT "${EXEEXT}"
8087 EOF
8088
8089
8090 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8091 echo "configure:8092: checking for be_app in -lbe" >&5
8092 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   ac_save_LIBS="$LIBS"
8097 LIBS="-lbe -lroot -lnet $LIBS"
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char be_app();
8105
8106 int main() {
8107 be_app()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 LIBS="$ac_save_LIBS"
8121
8122 fi
8123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8124   echo "$ac_t""yes" 1>&6
8125   LIBS="$LIBS -lbe -lroot -lnet"
8126 else
8127   echo "$ac_t""no" 1>&6
8128 :
8129 fi
8130
8131
8132
8133
8134
8135 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8136 echo "configure:8137: checking for ${CC-cc} option to accept ANSI C" >&5
8137 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8138   echo $ac_n "(cached) $ac_c" 1>&6
8139 else
8140   am_cv_prog_cc_stdc=no
8141 ac_save_CC="$CC"
8142 # Don't try gcc -ansi; that turns off useful extensions and
8143 # breaks some systems' header files.
8144 # AIX                   -qlanglvl=ansi
8145 # Ultrix and OSF/1      -std1
8146 # HP-UX 10.20 and later -Ae
8147 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8148 # SVR4                  -Xc -D__EXTENSIONS__
8149 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8150 do
8151   CC="$ac_save_CC $ac_arg"
8152   cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 #include <stdarg.h>
8156 #include <stdio.h>
8157 #include <sys/types.h>
8158 #include <sys/stat.h>
8159 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8160 struct buf { int x; };
8161 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8162 static char *e (p, i)
8163      char **p;
8164      int i;
8165 {
8166   return p[i];
8167 }
8168 static char *f (char * (*g) (char **, int), char **p, ...)
8169 {
8170   char *s;
8171   va_list v;
8172   va_start (v,p);
8173   s = g (p, va_arg (v,int));
8174   va_end (v);
8175   return s;
8176 }
8177 int test (int i, double x);
8178 struct s1 {int (*f) (int a);};
8179 struct s2 {int (*f) (double a);};
8180 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8181 int argc;
8182 char **argv;
8183
8184 int main() {
8185
8186 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8187
8188 ; return 0; }
8189 EOF
8190 if { (eval echo configure:8191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8191   rm -rf conftest*
8192   am_cv_prog_cc_stdc="$ac_arg"; break
8193 else
8194   echo "configure: failed program was:" >&5
8195   cat conftest.$ac_ext >&5
8196 fi
8197 rm -f conftest*
8198 done
8199 CC="$ac_save_CC"
8200
8201 fi
8202
8203 if test -z "$am_cv_prog_cc_stdc"; then
8204   echo "$ac_t""none needed" 1>&6
8205 else
8206   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8207 fi
8208 case "x$am_cv_prog_cc_stdc" in
8209   x|xno) ;;
8210   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8211 esac
8212
8213 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8214         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8215 fi
8216
8217 # test for make depend flag
8218 OL_MKDEP=
8219 OL_MKDEP_FLAGS=
8220 if test -z "${MKDEP}"; then
8221         OL_MKDEP="${CC-cc}"
8222         if test -z "${MKDEP_FLAGS}"; then
8223                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8224 echo "configure:8225: checking for ${OL_MKDEP} depend flag" >&5
8225 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   
8229                         ol_cv_mkdep=no
8230                         for flag in "-M" "-xM"; do
8231                                 cat > conftest.c <<EOF
8232  noCode;
8233 EOF
8234                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8235                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8236                                 then
8237                                         if test ! -f conftest."${ac_object}" ; then
8238                                                 ol_cv_mkdep=$flag
8239                                                 OL_MKDEP_FLAGS="$flag"
8240                                                 break
8241                                         fi
8242                                 fi
8243                         done
8244                         rm -f conftest*
8245                 
8246 fi
8247
8248 echo "$ac_t""$ol_cv_mkdep" 1>&6
8249         else
8250                 cc_cv_mkdep=yes
8251                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8252         fi
8253 else
8254         cc_cv_mkdep=yes
8255         OL_MKDEP="${MKDEP}"
8256         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8257 fi
8258
8259
8260
8261 if test "${ol_cv_mkdep}" = no ; then
8262         # this will soon become an error
8263         echo "configure: warning: do not know how to generate dependencies" 1>&2
8264 fi
8265
8266 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8267 echo "configure:8268: checking for afopen in -ls" >&5
8268 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   ac_save_LIBS="$LIBS"
8273 LIBS="-ls  $LIBS"
8274 cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 /* Override any gcc2 internal prototype to avoid an error.  */
8278 /* We use char because int might match the return type of a gcc2
8279     builtin and then its argument prototype would still apply.  */
8280 char afopen();
8281
8282 int main() {
8283 afopen()
8284 ; return 0; }
8285 EOF
8286 if { (eval echo configure:8287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8287   rm -rf conftest*
8288   eval "ac_cv_lib_$ac_lib_var=yes"
8289 else
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_lib_$ac_lib_var=no"
8294 fi
8295 rm -f conftest*
8296 LIBS="$ac_save_LIBS"
8297
8298 fi
8299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8300   echo "$ac_t""yes" 1>&6
8301   
8302         AUTH_LIBS=-ls
8303         cat >> confdefs.h <<\EOF
8304 #define HAVE_AIX_SECURITY 1
8305 EOF
8306
8307
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311
8312
8313
8314 ol_link_modules=no
8315 if test $ol_enable_modules != no ; then
8316         for ac_hdr in ltdl.h
8317 do
8318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8320 echo "configure:8321: checking for $ac_hdr" >&5
8321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 #include <$ac_hdr>
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=yes"
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=no"
8341 fi
8342 rm -f conftest*
8343 fi
8344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8345   echo "$ac_t""yes" 1>&6
8346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8347   cat >> confdefs.h <<EOF
8348 #define $ac_tr_hdr 1
8349 EOF
8350  
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354 done
8355
8356
8357         if test $ac_cv_header_ltdl_h = no ; then
8358                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8359         fi
8360
8361         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8362 echo "configure:8363: checking for lt_dlinit in -lltdl" >&5
8363 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-lltdl  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char lt_dlinit();
8376
8377 int main() {
8378 lt_dlinit()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396   
8397                 MODULES_LIBS=-lltdl
8398                 cat >> confdefs.h <<\EOF
8399 #define HAVE_LIBLTDL 1
8400 EOF
8401
8402         
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406
8407
8408         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8409                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8410         fi
8411         ol_link_modules=yes
8412 else
8413         ol_with_bdb_module=static
8414         ol_with_dnssrv_module=static
8415         ol_with_ldap_module=static
8416         ol_with_ldbm_module=static
8417         ol_with_meta_module=static
8418         ol_with_monitor_module=static
8419         ol_with_passwd_module=static
8420         ol_with_perl_module=static
8421         ol_with_shell_module=static
8422         ol_with_tcl_module=static
8423         ol_with_sql_module=static
8424 fi
8425
8426 # test for EBCDIC
8427 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8428 echo "configure:8429: checking for EBCDIC" >&5
8429 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   
8433         cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436
8437 #if !('M' == 0xd4)
8438 #include <__ASCII__/generate_error.h>
8439 #endif
8440
8441 EOF
8442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8443 { (eval echo configure:8444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8445 if test -z "$ac_err"; then
8446   rm -rf conftest*
8447   ol_cv_cpp_ebcdic=yes
8448 else
8449   echo "$ac_err" >&5
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   ol_cv_cpp_ebcdic=no
8454 fi
8455 rm -f conftest*
8456 fi
8457
8458 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8459 if test $ol_cv_cpp_ebcdic = yes ; then
8460         cat >> confdefs.h <<\EOF
8461 #define HAVE_EBCDIC 1
8462 EOF
8463
8464 fi
8465
8466 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8467 echo "configure:8468: checking for ANSI C header files" >&5
8468 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 #include <stdarg.h>
8476 #include <string.h>
8477 #include <float.h>
8478 EOF
8479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8480 { (eval echo configure:8481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8482 if test -z "$ac_err"; then
8483   rm -rf conftest*
8484   ol_cv_header_stdc=yes
8485 else
8486   echo "$ac_err" >&5
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -rf conftest*
8490   ol_cv_header_stdc=no
8491 fi
8492 rm -f conftest*
8493
8494 if test $ol_cv_header_stdc = yes; then
8495   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 #include <string.h>
8500 EOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "memchr" >/dev/null 2>&1; then
8503   :
8504 else
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 fi
8511
8512 if test $ol_cv_header_stdc = yes; then
8513   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <stdlib.h>
8518 EOF
8519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520   egrep "free" >/dev/null 2>&1; then
8521   :
8522 else
8523   rm -rf conftest*
8524   ol_cv_header_stdc=no
8525 fi
8526 rm -f conftest*
8527
8528 fi
8529
8530 if test $ol_cv_header_stdc = yes; then
8531   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8532 if test "$cross_compiling" = yes; then
8533   :
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <ctype.h>
8539 #ifndef HAVE_EBCDIC
8540 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8541 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8542 #else
8543 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8544                 || ('j' <= (c) && (c) <= 'r') \
8545                 || ('s' <= (c) && (c) <= 'z'))
8546 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8547 #endif
8548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8549 int main () { int i; for (i = 0; i < 256; i++)
8550 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8551 exit (0); }
8552
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8555 then
8556   :
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -fr conftest*
8561   ol_cv_header_stdc=no
8562 fi
8563 rm -fr conftest*
8564 fi
8565
8566 fi
8567 fi
8568
8569 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8570 if test $ol_cv_header_stdc = yes; then
8571   cat >> confdefs.h <<\EOF
8572 #define STDC_HEADERS 1
8573 EOF
8574
8575 fi
8576 ac_cv_header_stdc=disable
8577
8578
8579 if test $ol_cv_header_stdc != yes; then
8580         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8581 fi
8582
8583 ac_header_dirent=no
8584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr that defines DIR" >&5
8589 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <$ac_hdr>
8597 int main() {
8598 DIR *dirp = 0;
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8602   rm -rf conftest*
8603   eval "ac_cv_header_dirent_$ac_safe=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_dirent_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  ac_header_dirent=$ac_hdr; break
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8624 if test $ac_header_dirent = dirent.h; then
8625 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8626 echo "configure:8627: checking for opendir in -ldir" >&5
8627 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   ac_save_LIBS="$LIBS"
8632 LIBS="-ldir  $LIBS"
8633 cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* Override any gcc2 internal prototype to avoid an error.  */
8637 /* We use char because int might match the return type of a gcc2
8638     builtin and then its argument prototype would still apply.  */
8639 char opendir();
8640
8641 int main() {
8642 opendir()
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=no"
8653 fi
8654 rm -f conftest*
8655 LIBS="$ac_save_LIBS"
8656
8657 fi
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   LIBS="$LIBS -ldir"
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 else
8666 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8667 echo "configure:8668: checking for opendir in -lx" >&5
8668 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   ac_save_LIBS="$LIBS"
8673 LIBS="-lx  $LIBS"
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* Override any gcc2 internal prototype to avoid an error.  */
8678 /* We use char because int might match the return type of a gcc2
8679     builtin and then its argument prototype would still apply.  */
8680 char opendir();
8681
8682 int main() {
8683 opendir()
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   eval "ac_cv_lib_$ac_lib_var=yes"
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=no"
8694 fi
8695 rm -f conftest*
8696 LIBS="$ac_save_LIBS"
8697
8698 fi
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701   LIBS="$LIBS -lx"
8702 else
8703   echo "$ac_t""no" 1>&6
8704 fi
8705
8706 fi
8707
8708 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8709 echo "configure:8710: checking for sys/wait.h that is POSIX.1 compatible" >&5
8710 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <sys/wait.h>
8718 #ifndef WEXITSTATUS
8719 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8720 #endif
8721 #ifndef WIFEXITED
8722 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8723 #endif
8724 int main() {
8725 int s;
8726 wait (&s);
8727 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8731   rm -rf conftest*
8732   ac_cv_header_sys_wait_h=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   ac_cv_header_sys_wait_h=no
8738 fi
8739 rm -f conftest*
8740 fi
8741
8742 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8743 if test $ac_cv_header_sys_wait_h = yes; then
8744   cat >> confdefs.h <<\EOF
8745 #define HAVE_SYS_WAIT_H 1
8746 EOF
8747
8748 fi
8749
8750 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8751 echo "configure:8752: checking POSIX termios" >&5
8752 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8753   echo $ac_n "(cached) $ac_c" 1>&6
8754 else
8755   cat > conftest.$ac_ext <<EOF
8756 #line 8757 "configure"
8757 #include "confdefs.h"
8758 #include <sys/types.h>
8759 #include <unistd.h>
8760 #include <termios.h>
8761 int main() {
8762 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8763    tcgetattr(0, 0);
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   am_cv_sys_posix_termios=yes
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   am_cv_sys_posix_termios=no
8774 fi
8775 rm -f conftest*
8776 fi
8777
8778 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8779
8780
8781  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8782 echo "configure:8783: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8783 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8787
8788   gwinsz_in_termios_h=no
8789   if test $am_cv_sys_posix_termios = yes; then
8790     cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #     include <termios.h>
8795 #     ifdef TIOCGWINSZ
8796         yes
8797 #     endif
8798     
8799 EOF
8800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801   egrep "yes" >/dev/null 2>&1; then
8802   rm -rf conftest*
8803   gwinsz_in_termios_h=yes
8804 fi
8805 rm -f conftest*
8806
8807   fi
8808
8809   if test $gwinsz_in_termios_h = no; then
8810     cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #     include <sys/ioctl.h>
8815 #     ifdef TIOCGWINSZ
8816         yes
8817 #     endif
8818     
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "yes" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8824 fi
8825 rm -f conftest*
8826
8827   fi
8828   
8829 fi
8830
8831 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8832   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8833     cat >> confdefs.h <<\EOF
8834 #define GWINSZ_IN_SYS_IOCTL 1
8835 EOF
8836
8837   fi
8838
8839 if test $am_cv_sys_posix_termios = yes ; then
8840         cat >> confdefs.h <<\EOF
8841 #define HAVE_POSIX_TERMIOS 1
8842 EOF
8843
8844 fi
8845
8846 for ac_hdr in \
8847         arpa/inet.h             \
8848         arpa/nameser.h  \
8849         assert.h                \
8850         conio.h                 \
8851         crypt.h                 \
8852         direct.h                \
8853         errno.h                 \
8854         fcntl.h                 \
8855         filio.h                 \
8856         getopt.h                \
8857         grp.h                   \
8858         io.h                    \
8859         libutil.h               \
8860         limits.h                \
8861         locale.h                \
8862         netinet/tcp.h   \
8863         malloc.h                \
8864         memory.h                \
8865         psap.h                  \
8866         pwd.h                   \
8867         process.h               \
8868         resolv.h                \
8869         sgtty.h                 \
8870         shadow.h                \
8871         stddef.h                \
8872         string.h                \
8873         strings.h               \
8874         sysexits.h              \
8875         sys/file.h              \
8876         sys/filio.h             \
8877         sys/errno.h             \
8878         sys/ioctl.h             \
8879         sys/param.h             \
8880         sys/resource.h  \
8881         sys/select.h    \
8882         sys/socket.h    \
8883         sys/syslog.h    \
8884         sys/time.h              \
8885         sys/types.h             \
8886         syslog.h                \
8887         termios.h               \
8888         unistd.h                \
8889         winsock.h               \
8890         winsock2.h              \
8891
8892 do
8893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8895 echo "configure:8896: checking for $ac_hdr" >&5
8896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899   cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902 #include <$ac_hdr>
8903 EOF
8904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8905 { (eval echo configure:8906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8907 if test -z "$ac_err"; then
8908   rm -rf conftest*
8909   eval "ac_cv_header_$ac_safe=yes"
8910 else
8911   echo "$ac_err" >&5
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -rf conftest*
8915   eval "ac_cv_header_$ac_safe=no"
8916 fi
8917 rm -f conftest*
8918 fi
8919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8920   echo "$ac_t""yes" 1>&6
8921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8922   cat >> confdefs.h <<EOF
8923 #define $ac_tr_hdr 1
8924 EOF
8925  
8926 else
8927   echo "$ac_t""no" 1>&6
8928 fi
8929 done
8930
8931
8932
8933
8934 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8935 echo "configure:8936: checking for dlopen" >&5
8936 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8937   echo $ac_n "(cached) $ac_c" 1>&6
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* System header to define __stub macros and hopefully few prototypes,
8943     which can conflict with char dlopen(); below.  */
8944 #include <assert.h>
8945 /* Override any gcc2 internal prototype to avoid an error.  */
8946 /* We use char because int might match the return type of a gcc2
8947     builtin and then its argument prototype would still apply.  */
8948 char dlopen();
8949 char (*f)();
8950
8951 int main() {
8952
8953 /* The GNU C library defines this for functions which it implements
8954     to always fail with ENOSYS.  Some functions are actually named
8955     something starting with __ and the normal name is an alias.  */
8956 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8957 choke me
8958 #else
8959 f = dlopen;
8960 #endif
8961
8962 ; return 0; }
8963 EOF
8964 if { (eval echo configure:8965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8965   rm -rf conftest*
8966   eval "ac_cv_func_dlopen=yes"
8967 else
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   eval "ac_cv_func_dlopen=no"
8972 fi
8973 rm -f conftest*
8974 fi
8975
8976 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978   :
8979 else
8980   echo "$ac_t""no" 1>&6
8981 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8982 echo "configure:8983: checking for dlopen in -ldl" >&5
8983 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8985   echo $ac_n "(cached) $ac_c" 1>&6
8986 else
8987   ac_save_LIBS="$LIBS"
8988 LIBS="-ldl  $LIBS"
8989 cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* Override any gcc2 internal prototype to avoid an error.  */
8993 /* We use char because int might match the return type of a gcc2
8994     builtin and then its argument prototype would still apply.  */
8995 char dlopen();
8996
8997 int main() {
8998 dlopen()
8999 ; return 0; }
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9002   rm -rf conftest*
9003   eval "ac_cv_lib_$ac_lib_var=yes"
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -rf conftest*
9008   eval "ac_cv_lib_$ac_lib_var=no"
9009 fi
9010 rm -f conftest*
9011 LIBS="$ac_save_LIBS"
9012
9013 fi
9014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9015   echo "$ac_t""yes" 1>&6
9016     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9018   cat >> confdefs.h <<EOF
9019 #define $ac_tr_lib 1
9020 EOF
9021
9022   LIBS="-ldl $LIBS"
9023
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027
9028 fi
9029
9030
9031 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9032 echo "configure:9033: checking for sigset in -lV3" >&5
9033 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   ac_save_LIBS="$LIBS"
9038 LIBS="-lV3  $LIBS"
9039 cat > conftest.$ac_ext <<EOF
9040 #line 9041 "configure"
9041 #include "confdefs.h"
9042 /* Override any gcc2 internal prototype to avoid an error.  */
9043 /* We use char because int might match the return type of a gcc2
9044     builtin and then its argument prototype would still apply.  */
9045 char sigset();
9046
9047 int main() {
9048 sigset()
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=no"
9059 fi
9060 rm -f conftest*
9061 LIBS="$ac_save_LIBS"
9062
9063 fi
9064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9065   echo "$ac_t""yes" 1>&6
9066     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9067     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9068   cat >> confdefs.h <<EOF
9069 #define $ac_tr_lib 1
9070 EOF
9071
9072   LIBS="-lV3 $LIBS"
9073
9074 else
9075   echo "$ac_t""no" 1>&6
9076 fi
9077
9078
9079 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9080 echo "configure:9081: checking for winsock" >&5
9081 save_LIBS="$LIBS"
9082 for curlib in ws2_32 wsock32; do
9083         LIBS="$LIBS -l$curlib"
9084         cat > conftest.$ac_ext <<EOF
9085 #line 9086 "configure"
9086 #include "confdefs.h"
9087
9088                         char socket@12();
9089                         char select@20();
9090                         char closesocket@4();
9091                         char gethostname@8();
9092                         
9093 int main() {
9094
9095                         socket@12();
9096                         select@20();
9097                         closesocket@4();
9098                         gethostname@8();
9099                         
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   have_winsock=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   have_winsock=no
9110 fi
9111 rm -f conftest*
9112
9113         if test $have_winsock = yes; then
9114                 cat >> confdefs.h <<\EOF
9115 #define HAVE_WINSOCK 1
9116 EOF
9117
9118                 ac_cv_func_socket=yes
9119                 ac_cv_func_select=yes
9120                 ac_cv_func_closesocket=yes
9121                 ac_cv_func_gethostname=yes
9122                 if test $curlib = ws2_32; then
9123                         have_winsock=winsock2
9124                         cat >> confdefs.h <<\EOF
9125 #define HAVE_WINSOCK2 1
9126 EOF
9127
9128                 fi
9129                 break
9130         fi
9131         LIBS="$save_LIBS"
9132 done
9133 echo "$ac_t""$have_winsock" 1>&6
9134
9135
9136 echo $ac_n "checking for socket""... $ac_c" 1>&6
9137 echo "configure:9138: checking for socket" >&5
9138 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* System header to define __stub macros and hopefully few prototypes,
9145     which can conflict with char socket(); below.  */
9146 #include <assert.h>
9147 /* Override any gcc2 internal prototype to avoid an error.  */
9148 /* We use char because int might match the return type of a gcc2
9149     builtin and then its argument prototype would still apply.  */
9150 char socket();
9151 char (*f)();
9152
9153 int main() {
9154
9155 /* The GNU C library defines this for functions which it implements
9156     to always fail with ENOSYS.  Some functions are actually named
9157     something starting with __ and the normal name is an alias.  */
9158 #if defined (__stub_socket) || defined (__stub___socket)
9159 choke me
9160 #else
9161 f = socket;
9162 #endif
9163
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   eval "ac_cv_func_socket=yes"
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_func_socket=no"
9174 fi
9175 rm -f conftest*
9176 fi
9177
9178 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180   :
9181 else
9182   echo "$ac_t""no" 1>&6
9183         
9184         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9185 echo "configure:9186: checking for main in -lsocket" >&5
9186 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   ac_save_LIBS="$LIBS"
9191 LIBS="-lsocket  $LIBS"
9192 cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195
9196 int main() {
9197 main()
9198 ; return 0; }
9199 EOF
9200 if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=yes"
9203 else
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=no"
9208 fi
9209 rm -f conftest*
9210 LIBS="$ac_save_LIBS"
9211
9212 fi
9213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9214   echo "$ac_t""yes" 1>&6
9215     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9216     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9217   cat >> confdefs.h <<EOF
9218 #define $ac_tr_lib 1
9219 EOF
9220
9221   LIBS="-lsocket $LIBS"
9222
9223 else
9224   echo "$ac_t""no" 1>&6
9225 fi
9226
9227         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9228 echo "configure:9229: checking for main in -lnet" >&5
9229 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9231   echo $ac_n "(cached) $ac_c" 1>&6
9232 else
9233   ac_save_LIBS="$LIBS"
9234 LIBS="-lnet  $LIBS"
9235 cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238
9239 int main() {
9240 main()
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=yes"
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=no"
9251 fi
9252 rm -f conftest*
9253 LIBS="$ac_save_LIBS"
9254
9255 fi
9256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9259     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9260   cat >> confdefs.h <<EOF
9261 #define $ac_tr_lib 1
9262 EOF
9263
9264   LIBS="-lnet $LIBS"
9265
9266 else
9267   echo "$ac_t""no" 1>&6
9268 fi
9269
9270         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9271 echo "configure:9272: checking for main in -lnsl_s" >&5
9272 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   ac_save_LIBS="$LIBS"
9277 LIBS="-lnsl_s  $LIBS"
9278 cat > conftest.$ac_ext <<EOF
9279 #line 9280 "configure"
9280 #include "confdefs.h"
9281
9282 int main() {
9283 main()
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=yes"
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=no"
9294 fi
9295 rm -f conftest*
9296 LIBS="$ac_save_LIBS"
9297
9298 fi
9299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9300   echo "$ac_t""yes" 1>&6
9301     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9303   cat >> confdefs.h <<EOF
9304 #define $ac_tr_lib 1
9305 EOF
9306
9307   LIBS="-lnsl_s $LIBS"
9308
9309 else
9310   echo "$ac_t""no" 1>&6
9311 fi
9312
9313         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9314 echo "configure:9315: checking for main in -lnsl" >&5
9315 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   ac_save_LIBS="$LIBS"
9320 LIBS="-lnsl  $LIBS"
9321 cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324
9325 int main() {
9326 main()
9327 ; return 0; }
9328 EOF
9329 if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9330   rm -rf conftest*
9331   eval "ac_cv_lib_$ac_lib_var=yes"
9332 else
9333   echo "configure: failed program was:" >&5
9334   cat conftest.$ac_ext >&5
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=no"
9337 fi
9338 rm -f conftest*
9339 LIBS="$ac_save_LIBS"
9340
9341 fi
9342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9343   echo "$ac_t""yes" 1>&6
9344     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9345     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9346   cat >> confdefs.h <<EOF
9347 #define $ac_tr_lib 1
9348 EOF
9349
9350   LIBS="-lnsl $LIBS"
9351
9352 else
9353   echo "$ac_t""no" 1>&6
9354 fi
9355
9356         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9357 echo "configure:9358: checking for socket in -linet" >&5
9358 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9360   echo $ac_n "(cached) $ac_c" 1>&6
9361 else
9362   ac_save_LIBS="$LIBS"
9363 LIBS="-linet  $LIBS"
9364 cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 /* Override any gcc2 internal prototype to avoid an error.  */
9368 /* We use char because int might match the return type of a gcc2
9369     builtin and then its argument prototype would still apply.  */
9370 char socket();
9371
9372 int main() {
9373 socket()
9374 ; return 0; }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9377   rm -rf conftest*
9378   eval "ac_cv_lib_$ac_lib_var=yes"
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=no"
9384 fi
9385 rm -f conftest*
9386 LIBS="$ac_save_LIBS"
9387
9388 fi
9389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9390   echo "$ac_t""yes" 1>&6
9391     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9393   cat >> confdefs.h <<EOF
9394 #define $ac_tr_lib 1
9395 EOF
9396
9397   LIBS="-linet $LIBS"
9398
9399 else
9400   echo "$ac_t""no" 1>&6
9401 fi
9402
9403         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9404 echo "configure:9405: checking for main in -lgen" >&5
9405 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   ac_save_LIBS="$LIBS"
9410 LIBS="-lgen  $LIBS"
9411 cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414
9415 int main() {
9416 main()
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=yes"
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_lib_$ac_lib_var=no"
9427 fi
9428 rm -f conftest*
9429 LIBS="$ac_save_LIBS"
9430
9431 fi
9432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9433   echo "$ac_t""yes" 1>&6
9434     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9435     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9436   cat >> confdefs.h <<EOF
9437 #define $ac_tr_lib 1
9438 EOF
9439
9440   LIBS="-lgen $LIBS"
9441
9442 else
9443   echo "$ac_t""no" 1>&6
9444 fi
9445
9446
9447 fi
9448
9449
9450 echo $ac_n "checking for select""... $ac_c" 1>&6
9451 echo "configure:9452: checking for select" >&5
9452 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9453   echo $ac_n "(cached) $ac_c" 1>&6
9454 else
9455   cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 /* System header to define __stub macros and hopefully few prototypes,
9459     which can conflict with char select(); below.  */
9460 #include <assert.h>
9461 /* Override any gcc2 internal prototype to avoid an error.  */
9462 /* We use char because int might match the return type of a gcc2
9463     builtin and then its argument prototype would still apply.  */
9464 char select();
9465 char (*f)();
9466
9467 int main() {
9468
9469 /* The GNU C library defines this for functions which it implements
9470     to always fail with ENOSYS.  Some functions are actually named
9471     something starting with __ and the normal name is an alias.  */
9472 #if defined (__stub_select) || defined (__stub___select)
9473 choke me
9474 #else
9475 f = select;
9476 #endif
9477
9478 ; return 0; }
9479 EOF
9480 if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9481   rm -rf conftest*
9482   eval "ac_cv_func_select=yes"
9483 else
9484   echo "configure: failed program was:" >&5
9485   cat conftest.$ac_ext >&5
9486   rm -rf conftest*
9487   eval "ac_cv_func_select=no"
9488 fi
9489 rm -f conftest*
9490 fi
9491
9492 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9493   echo "$ac_t""yes" 1>&6
9494   :
9495 else
9496   echo "$ac_t""no" 1>&6
9497 { echo "configure: error: select() required." 1>&2; exit 1; }
9498 fi
9499
9500
9501 if test "${ac_cv_header_winsock_h}" != yes; then
9502                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9503 echo "configure:9504: checking types of arguments for select()" >&5
9504  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9505   echo $ac_n "(cached) $ac_c" 1>&6
9506 else
9507    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9514      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9515       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9516        cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 #ifdef HAVE_SYS_TYPES_H
9520 #include <sys/types.h>
9521 #endif
9522 #ifdef HAVE_SYS_TIME_H
9523 #include <sys/time.h>
9524 #endif
9525 #ifdef HAVE_SYS_SELECT_H
9526 #include <sys/select.h>
9527 #endif
9528 #ifdef HAVE_SYS_SOCKET_H
9529 #include <sys/socket.h>
9530 #endif
9531 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);
9532 int main() {
9533
9534 ; return 0; }
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9537   rm -rf conftest*
9538           ac_not_found=no ; break 3
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -rf conftest*
9543   ac_not_found=yes
9544 fi
9545 rm -f conftest*
9546       done
9547      done
9548     done
9549    
9550 fi
9551   
9552 fi
9553  
9554 fi
9555  if test "$ac_not_found" = yes; then
9556   ac_cv_func_select_arg1=int 
9557   ac_cv_func_select_arg234='int *' 
9558   ac_cv_func_select_arg5='struct timeval *'
9559  fi
9560  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9561  cat >> confdefs.h <<EOF
9562 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9563 EOF
9564
9565  cat >> confdefs.h <<EOF
9566 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9567 EOF
9568
9569  cat >> confdefs.h <<EOF
9570 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9571 EOF
9572
9573
9574 fi
9575
9576
9577 for ac_hdr in regex.h 
9578 do
9579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9581 echo "configure:9582: checking for $ac_hdr" >&5
9582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9583   echo $ac_n "(cached) $ac_c" 1>&6
9584 else
9585   cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <$ac_hdr>
9589 EOF
9590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9591 { (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593 if test -z "$ac_err"; then
9594   rm -rf conftest*
9595   eval "ac_cv_header_$ac_safe=yes"
9596 else
9597   echo "$ac_err" >&5
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=no"
9602 fi
9603 rm -f conftest*
9604 fi
9605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9606   echo "$ac_t""yes" 1>&6
9607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9608   cat >> confdefs.h <<EOF
9609 #define $ac_tr_hdr 1
9610 EOF
9611  
9612 else
9613   echo "$ac_t""no" 1>&6
9614 fi
9615 done
9616
9617 if test "$ac_cv_header_regex_h" != yes ; then
9618         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9619 fi
9620
9621 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9622 echo "configure:9623: checking for library containing regfree" >&5
9623 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9624   echo $ac_n "(cached) $ac_c" 1>&6
9625 else
9626   ac_func_search_save_LIBS="$LIBS"
9627 ac_cv_search_regfree="no"
9628 cat > conftest.$ac_ext <<EOF
9629 #line 9630 "configure"
9630 #include "confdefs.h"
9631 /* Override any gcc2 internal prototype to avoid an error.  */
9632 /* We use char because int might match the return type of a gcc2
9633     builtin and then its argument prototype would still apply.  */
9634 char regfree();
9635
9636 int main() {
9637 regfree()
9638 ; return 0; }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9641   rm -rf conftest*
9642   ac_cv_search_regfree="none required"
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646 fi
9647 rm -f conftest*
9648 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9649 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9650 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 /* Override any gcc2 internal prototype to avoid an error.  */
9654 /* We use char because int might match the return type of a gcc2
9655     builtin and then its argument prototype would still apply.  */
9656 char regfree();
9657
9658 int main() {
9659 regfree()
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9663   rm -rf conftest*
9664   ac_cv_search_regfree="-l$ac_lib"
9665 break
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669 fi
9670 rm -f conftest*
9671 done
9672 LIBS="$ac_func_search_save_LIBS"
9673 fi
9674
9675 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9676 if test "$ac_cv_search_regfree" != "no"; then
9677   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9678   :
9679 else :
9680   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9681 fi
9682
9683
9684 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9685 echo "configure:9686: checking for compatible POSIX regex" >&5
9686 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9687   echo $ac_n "(cached) $ac_c" 1>&6
9688 else
9689   
9690         if test "$cross_compiling" = yes; then
9691   ol_cv_c_posix_regex=cross
9692 else
9693   cat > conftest.$ac_ext <<EOF
9694 #line 9695 "configure"
9695 #include "confdefs.h"
9696
9697 #include <sys/types.h>
9698 #include <regex.h>
9699 static char *pattern, *string;
9700 main()
9701 {
9702         int rc;
9703         regex_t re;
9704
9705         pattern = "^A";
9706
9707         if(regcomp(&re, pattern, 0)) {
9708                 return -1;
9709         }
9710         
9711         string = "ALL MATCH";
9712         
9713         rc = regexec(&re, string, 0, (void*)0, 0);
9714
9715         regfree(&re);
9716
9717         return rc;
9718 }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9721 then
9722   ol_cv_c_posix_regex=yes
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -fr conftest*
9727   ol_cv_c_posix_regex=no
9728 fi
9729 rm -fr conftest*
9730 fi
9731
9732 fi
9733
9734 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9735
9736 if test "$ol_cv_c_posix_regex" = no ; then
9737         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9738 fi
9739
9740
9741 have_uuid=no
9742 for ac_hdr in sys/uuid.h
9743 do
9744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9746 echo "configure:9747: checking for $ac_hdr" >&5
9747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9748   echo $ac_n "(cached) $ac_c" 1>&6
9749 else
9750   cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753 #include <$ac_hdr>
9754 EOF
9755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9756 { (eval echo configure:9757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9758 if test -z "$ac_err"; then
9759   rm -rf conftest*
9760   eval "ac_cv_header_$ac_safe=yes"
9761 else
9762   echo "$ac_err" >&5
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   eval "ac_cv_header_$ac_safe=no"
9767 fi
9768 rm -f conftest*
9769 fi
9770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9771   echo "$ac_t""yes" 1>&6
9772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9773   cat >> confdefs.h <<EOF
9774 #define $ac_tr_hdr 1
9775 EOF
9776  
9777 else
9778   echo "$ac_t""no" 1>&6
9779 fi
9780 done
9781
9782 if test $ac_cv_header_sys_uuid_h = yes ; then
9783         save_LIBS="$LIBS"
9784         
9785 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9786 echo "configure:9787: checking for library containing uuid_to_str" >&5
9787 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9788   echo $ac_n "(cached) $ac_c" 1>&6
9789 else
9790   ac_func_search_save_LIBS="$LIBS"
9791 ac_cv_search_uuid_to_str="no"
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 /* Override any gcc2 internal prototype to avoid an error.  */
9796 /* We use char because int might match the return type of a gcc2
9797     builtin and then its argument prototype would still apply.  */
9798 char uuid_to_str();
9799
9800 int main() {
9801 uuid_to_str()
9802 ; return 0; }
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9805   rm -rf conftest*
9806   ac_cv_search_uuid_to_str="none required"
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810 fi
9811 rm -f conftest*
9812 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9813 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9814 cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817 /* Override any gcc2 internal prototype to avoid an error.  */
9818 /* We use char because int might match the return type of a gcc2
9819     builtin and then its argument prototype would still apply.  */
9820 char uuid_to_str();
9821
9822 int main() {
9823 uuid_to_str()
9824 ; return 0; }
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9827   rm -rf conftest*
9828   ac_cv_search_uuid_to_str="-l$ac_lib"
9829 break
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833 fi
9834 rm -f conftest*
9835 done
9836 LIBS="$ac_func_search_save_LIBS"
9837 fi
9838
9839 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9840 if test "$ac_cv_search_uuid_to_str" != "no"; then
9841   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9842   have_uuid=yes
9843 else :
9844   :
9845 fi
9846         LIBS="$save_LIBS"
9847
9848         if test have_uuid = yes ; then
9849                 cat >> confdefs.h <<\EOF
9850 #define HAVE_UUID_TO_STR 1
9851 EOF
9852
9853
9854                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9855                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9856         fi
9857 fi
9858
9859 if test $have_uuid = no ; then
9860         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9861 echo "configure:9862: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9862         save_LIBS="$LIBS"
9863         LIBS="$LIBS -lrpcrt4"
9864         cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867
9868                 char UuidCreate@4();
9869                 char UuidToStringA@8();
9870                 
9871 int main() {
9872
9873                 UuidCreate@4();
9874                 UuidToStringA@8();
9875                 
9876 ; return 0; }
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9879   rm -rf conftest*
9880   need_rpcrt=yes
9881 else
9882   echo "configure: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   rm -rf conftest*
9885   need_rpcrt=no
9886 fi
9887 rm -f conftest*
9888         if test $need_rpcrt = yes; then
9889                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9890         fi
9891         LIBS="$save_LIBS"
9892         echo "$ac_t""$need_rpcrt" 1>&6
9893 fi
9894
9895 ol_link_dnssrv=no
9896 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9897 echo "configure:9898: checking for res_query" >&5
9898 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 /* System header to define __stub macros and hopefully few prototypes,
9905     which can conflict with char res_query(); below.  */
9906 #include <assert.h>
9907 /* Override any gcc2 internal prototype to avoid an error.  */
9908 /* We use char because int might match the return type of a gcc2
9909     builtin and then its argument prototype would still apply.  */
9910 char res_query();
9911 char (*f)();
9912
9913 int main() {
9914
9915 /* The GNU C library defines this for functions which it implements
9916     to always fail with ENOSYS.  Some functions are actually named
9917     something starting with __ and the normal name is an alias.  */
9918 #if defined (__stub_res_query) || defined (__stub___res_query)
9919 choke me
9920 #else
9921 f = res_query;
9922 #endif
9923
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   eval "ac_cv_func_res_query=yes"
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_func_res_query=no"
9934 fi
9935 rm -f conftest*
9936 fi
9937
9938 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9939   echo "$ac_t""yes" 1>&6
9940   :
9941 else
9942   echo "$ac_t""no" 1>&6
9943 fi
9944
9945 if test $ac_cv_func_res_query = no ; then 
9946         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9947 echo "configure:9948: checking for __res_query" >&5
9948 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9949   echo $ac_n "(cached) $ac_c" 1>&6
9950 else
9951   cat > conftest.$ac_ext <<EOF
9952 #line 9953 "configure"
9953 #include "confdefs.h"
9954 /* System header to define __stub macros and hopefully few prototypes,
9955     which can conflict with char __res_query(); below.  */
9956 #include <assert.h>
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 /* We use char because int might match the return type of a gcc2
9959     builtin and then its argument prototype would still apply.  */
9960 char __res_query();
9961 char (*f)();
9962
9963 int main() {
9964
9965 /* The GNU C library defines this for functions which it implements
9966     to always fail with ENOSYS.  Some functions are actually named
9967     something starting with __ and the normal name is an alias.  */
9968 #if defined (__stub___res_query) || defined (__stub_____res_query)
9969 choke me
9970 #else
9971 f = __res_query;
9972 #endif
9973
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   eval "ac_cv_func___res_query=yes"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_func___res_query=no"
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9989   echo "$ac_t""yes" 1>&6
9990   :
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994
9995         ac_cv_func_res_query=$ac_cv_func___res_query
9996 fi
9997
9998 if test $ac_cv_func_res_query = no ; then 
9999         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10000 echo "configure:10001: checking for res_query in -lbind" >&5
10001 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10003   echo $ac_n "(cached) $ac_c" 1>&6
10004 else
10005   ac_save_LIBS="$LIBS"
10006 LIBS="-lbind  $LIBS"
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* Override any gcc2 internal prototype to avoid an error.  */
10011 /* We use char because int might match the return type of a gcc2
10012     builtin and then its argument prototype would still apply.  */
10013 char res_query();
10014
10015 int main() {
10016 res_query()
10017 ; return 0; }
10018 EOF
10019 if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10020   rm -rf conftest*
10021   eval "ac_cv_lib_$ac_lib_var=yes"
10022 else
10023   echo "configure: failed program was:" >&5
10024   cat conftest.$ac_ext >&5
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=no"
10027 fi
10028 rm -f conftest*
10029 LIBS="$ac_save_LIBS"
10030
10031 fi
10032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10033   echo "$ac_t""yes" 1>&6
10034     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10036   cat >> confdefs.h <<EOF
10037 #define $ac_tr_lib 1
10038 EOF
10039
10040   LIBS="-lbind $LIBS"
10041
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045
10046         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10047 fi
10048
10049 if test $ac_cv_func_res_query = no ; then 
10050         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10051 echo "configure:10052: checking for __res_query in -lbind" >&5
10052 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   ac_save_LIBS="$LIBS"
10057 LIBS="-lbind  $LIBS"
10058 cat > conftest.$ac_ext <<EOF
10059 #line 10060 "configure"
10060 #include "confdefs.h"
10061 /* Override any gcc2 internal prototype to avoid an error.  */
10062 /* We use char because int might match the return type of a gcc2
10063     builtin and then its argument prototype would still apply.  */
10064 char __res_query();
10065
10066 int main() {
10067 __res_query()
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10071   rm -rf conftest*
10072   eval "ac_cv_lib_$ac_lib_var=yes"
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   eval "ac_cv_lib_$ac_lib_var=no"
10078 fi
10079 rm -f conftest*
10080 LIBS="$ac_save_LIBS"
10081
10082 fi
10083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10084   echo "$ac_t""yes" 1>&6
10085     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10086     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10087   cat >> confdefs.h <<EOF
10088 #define $ac_tr_lib 1
10089 EOF
10090
10091   LIBS="-lbind $LIBS"
10092
10093 else
10094   echo "$ac_t""no" 1>&6
10095 fi
10096
10097         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10098 fi
10099
10100 if test $ac_cv_func_res_query = no ; then 
10101         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10102 echo "configure:10103: checking for res_query in -lresolv" >&5
10103 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   ac_save_LIBS="$LIBS"
10108 LIBS="-lresolv  $LIBS"
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 /* Override any gcc2 internal prototype to avoid an error.  */
10113 /* We use char because int might match the return type of a gcc2
10114     builtin and then its argument prototype would still apply.  */
10115 char res_query();
10116
10117 int main() {
10118 res_query()
10119 ; return 0; }
10120 EOF
10121 if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10122   rm -rf conftest*
10123   eval "ac_cv_lib_$ac_lib_var=yes"
10124 else
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   eval "ac_cv_lib_$ac_lib_var=no"
10129 fi
10130 rm -f conftest*
10131 LIBS="$ac_save_LIBS"
10132
10133 fi
10134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10135   echo "$ac_t""yes" 1>&6
10136     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10138   cat >> confdefs.h <<EOF
10139 #define $ac_tr_lib 1
10140 EOF
10141
10142   LIBS="-lresolv $LIBS"
10143
10144 else
10145   echo "$ac_t""no" 1>&6
10146 fi
10147
10148         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10149 fi
10150
10151 if test $ac_cv_func_res_query = no ; then 
10152         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10153 echo "configure:10154: checking for __res_query in -lresolv" >&5
10154 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10156   echo $ac_n "(cached) $ac_c" 1>&6
10157 else
10158   ac_save_LIBS="$LIBS"
10159 LIBS="-lresolv  $LIBS"
10160 cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 /* Override any gcc2 internal prototype to avoid an error.  */
10164 /* We use char because int might match the return type of a gcc2
10165     builtin and then its argument prototype would still apply.  */
10166 char __res_query();
10167
10168 int main() {
10169 __res_query()
10170 ; return 0; }
10171 EOF
10172 if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10173   rm -rf conftest*
10174   eval "ac_cv_lib_$ac_lib_var=yes"
10175 else
10176   echo "configure: failed program was:" >&5
10177   cat conftest.$ac_ext >&5
10178   rm -rf conftest*
10179   eval "ac_cv_lib_$ac_lib_var=no"
10180 fi
10181 rm -f conftest*
10182 LIBS="$ac_save_LIBS"
10183
10184 fi
10185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10189   cat >> confdefs.h <<EOF
10190 #define $ac_tr_lib 1
10191 EOF
10192
10193   LIBS="-lresolv $LIBS"
10194
10195 else
10196   echo "$ac_t""no" 1>&6
10197 fi
10198
10199         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10200 fi
10201
10202 if test "$ac_cv_func_res_query" = yes ; then
10203         cat >> confdefs.h <<\EOF
10204 #define HAVE_RES_QUERY 1
10205 EOF
10206
10207
10208         if test $ol_enable_dnssrv != no ; then
10209                 ol_link_dnssrv=yes
10210         fi
10211 fi
10212
10213 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10214         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10215 fi
10216
10217 for ac_func in getaddrinfo gai_strerror inet_ntop 
10218 do
10219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10220 echo "configure:10221: checking for $ac_func" >&5
10221 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10222   echo $ac_n "(cached) $ac_c" 1>&6
10223 else
10224   cat > conftest.$ac_ext <<EOF
10225 #line 10226 "configure"
10226 #include "confdefs.h"
10227 /* System header to define __stub macros and hopefully few prototypes,
10228     which can conflict with char $ac_func(); below.  */
10229 #include <assert.h>
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 /* We use char because int might match the return type of a gcc2
10232     builtin and then its argument prototype would still apply.  */
10233 char $ac_func();
10234 char (*f)();
10235
10236 int main() {
10237
10238 /* The GNU C library defines this for functions which it implements
10239     to always fail with ENOSYS.  Some functions are actually named
10240     something starting with __ and the normal name is an alias.  */
10241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10242 choke me
10243 #else
10244 f = $ac_func;
10245 #endif
10246
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10250   rm -rf conftest*
10251   eval "ac_cv_func_$ac_func=yes"
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_func_$ac_func=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10264   cat >> confdefs.h <<EOF
10265 #define $ac_tr_func 1
10266 EOF
10267  
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271 done
10272
10273
10274 ol_link_ipv6=no
10275 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10276         if test $ol_enable_ipv6 = yes ; then
10277                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10278         fi
10279 elif test $ol_enable_ipv6 != no ; then
10280         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10281 echo "configure:10282: checking INET6_ADDRSTRLEN" >&5
10282 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10283   echo $ac_n "(cached) $ac_c" 1>&6
10284 else
10285   
10286                 cat > conftest.$ac_ext <<EOF
10287 #line 10288 "configure"
10288 #include "confdefs.h"
10289
10290 #                       include <netinet/in.h>
10291 #                       ifdef INET6_ADDRSTRLEN
10292                                 __has_inet6_addrstrlen__;
10293 #                       endif
10294                 
10295 EOF
10296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10297   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10298   rm -rf conftest*
10299   ol_cv_inet6_addrstrlen=yes
10300 else
10301   rm -rf conftest*
10302   ol_cv_inet6_addrstrlen=no
10303 fi
10304 rm -f conftest*
10305
10306 fi
10307
10308 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10309
10310         if test $ol_cv_inet6_addrstrlen = yes ; then
10311                 ol_link_ipv6=yes
10312         elif test $ol_enable_ipv6 = yes ; then
10313                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10314         fi
10315 fi
10316
10317 if test $ol_enable_local != no ; then
10318         for ac_hdr in sys/un.h 
10319 do
10320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10322 echo "configure:10323: checking for $ac_hdr" >&5
10323 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 #include <$ac_hdr>
10330 EOF
10331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10332 { (eval echo configure:10333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10334 if test -z "$ac_err"; then
10335   rm -rf conftest*
10336   eval "ac_cv_header_$ac_safe=yes"
10337 else
10338   echo "$ac_err" >&5
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   eval "ac_cv_header_$ac_safe=no"
10343 fi
10344 rm -f conftest*
10345 fi
10346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10349   cat >> confdefs.h <<EOF
10350 #define $ac_tr_hdr 1
10351 EOF
10352  
10353 else
10354   echo "$ac_t""no" 1>&6
10355 fi
10356 done
10357
10358
10359         if test $ol_enable_local = auto ; then
10360                 ol_enable_local=$ac_cv_header_sys_un_h
10361         elif test $ac_cv_header_sys_un_h = no ; then
10362                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10363         fi
10364 fi
10365
10366 ol_link_kbind=no
10367 ol_link_kpasswd=no
10368 ol_link_krb5=no
10369 ol_link_krb4=no
10370
10371 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10372         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10373         -o $ol_with_kerberos = k425 ; then
10374
10375         for ac_hdr in krb5.h
10376 do
10377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_hdr" >&5
10380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 #include <$ac_hdr>
10387 EOF
10388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10389 { (eval echo configure:10390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10391 if test -z "$ac_err"; then
10392   rm -rf conftest*
10393   eval "ac_cv_header_$ac_safe=yes"
10394 else
10395   echo "$ac_err" >&5
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=no"
10400 fi
10401 rm -f conftest*
10402 fi
10403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10406   cat >> confdefs.h <<EOF
10407 #define $ac_tr_hdr 1
10408 EOF
10409  
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413 done
10414
10415
10416         if test $ac_cv_header_krb5_h = yes ; then
10417                                 for ac_hdr in heim_err.h
10418 do
10419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10421 echo "configure:10422: checking for $ac_hdr" >&5
10422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <$ac_hdr>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 fi
10445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10446   echo "$ac_t""yes" 1>&6
10447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10448   cat >> confdefs.h <<EOF
10449 #define $ac_tr_hdr 1
10450 EOF
10451  
10452 else
10453   echo "$ac_t""no" 1>&6
10454 fi
10455 done
10456
10457                 if test $ac_cv_header_heim_err_h = yes ; then
10458                         krb5_impl=heimdal
10459                 else
10460                         krb5_impl=mit
10461                 fi
10462
10463                 if test $krb5_impl = mit; then
10464                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10465 echo "configure:10466: checking for main in -lk5crypto" >&5
10466 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   ac_save_LIBS="$LIBS"
10471 LIBS="-lk5crypto  $LIBS"
10472 cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 int main() {
10477 main()
10478 ; return 0; }
10479 EOF
10480 if { (eval echo configure:10481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10481   rm -rf conftest*
10482   eval "ac_cv_lib_$ac_lib_var=yes"
10483 else
10484   echo "configure: failed program was:" >&5
10485   cat conftest.$ac_ext >&5
10486   rm -rf conftest*
10487   eval "ac_cv_lib_$ac_lib_var=no"
10488 fi
10489 rm -f conftest*
10490 LIBS="$ac_save_LIBS"
10491
10492 fi
10493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10494   echo "$ac_t""yes" 1>&6
10495   krb5crypto=k5crypto
10496 else
10497   echo "$ac_t""no" 1>&6
10498 krb5crypto=crypto
10499 fi
10500
10501
10502                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10503 echo "configure:10504: checking for main in -lkrb5" >&5
10504 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10505 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   ac_save_LIBS="$LIBS"
10509 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10510 cat > conftest.$ac_ext <<EOF
10511 #line 10512 "configure"
10512 #include "confdefs.h"
10513
10514 int main() {
10515 main()
10516 ; return 0; }
10517 EOF
10518 if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10519   rm -rf conftest*
10520   eval "ac_cv_lib_$ac_lib_var=yes"
10521 else
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=no"
10526 fi
10527 rm -f conftest*
10528 LIBS="$ac_save_LIBS"
10529
10530 fi
10531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533   have_krb5=yes
10534                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10535 else
10536   echo "$ac_t""no" 1>&6
10537 have_krb5=no
10538 fi
10539
10540
10541                 elif test $krb5_impl = heimdal; then
10542                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10543 echo "configure:10544: checking for main in -lkrb5" >&5
10544 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10546   echo $ac_n "(cached) $ac_c" 1>&6
10547 else
10548   ac_save_LIBS="$LIBS"
10549 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553
10554 int main() {
10555 main()
10556 ; return 0; }
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10559   rm -rf conftest*
10560   eval "ac_cv_lib_$ac_lib_var=yes"
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=no"
10566 fi
10567 rm -f conftest*
10568 LIBS="$ac_save_LIBS"
10569
10570 fi
10571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10572   echo "$ac_t""yes" 1>&6
10573   have_krb5=yes
10574                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
10575 else
10576   echo "$ac_t""no" 1>&6
10577 have_krb5=no
10578 fi
10579
10580
10581                         cat >> confdefs.h <<\EOF
10582 #define HAVE_HEIMDAL_KERBEROS 1
10583 EOF
10584
10585
10586                 else
10587                         have_krb5=no
10588                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10589                 fi
10590
10591                 if test $have_krb5 = yes ; then
10592                         ol_link_krb5=yes
10593
10594                         cat >> confdefs.h <<\EOF
10595 #define HAVE_KRB5 1
10596 EOF
10597
10598
10599                         if test $ol_enable_kpasswd != no ; then
10600                                 ol_link_kpasswd=yes;
10601                         fi
10602
10603                         if test $ol_with_kerberos = k5only ; then
10604                                 ol_with_kerberos=found
10605                         fi
10606
10607                 elif test $ol_with_kerberos != auto ; then
10608                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10609                 fi
10610
10611         fi
10612 fi
10613
10614 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10615         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10616
10617         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10618 do
10619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10621 echo "configure:10622: checking for $ac_hdr" >&5
10622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10623   echo $ac_n "(cached) $ac_c" 1>&6
10624 else
10625   cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628 #include <$ac_hdr>
10629 EOF
10630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10631 { (eval echo configure:10632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10633 if test -z "$ac_err"; then
10634   rm -rf conftest*
10635   eval "ac_cv_header_$ac_safe=yes"
10636 else
10637   echo "$ac_err" >&5
10638   echo "configure: failed program was:" >&5
10639   cat conftest.$ac_ext >&5
10640   rm -rf conftest*
10641   eval "ac_cv_header_$ac_safe=no"
10642 fi
10643 rm -f conftest*
10644 fi
10645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10646   echo "$ac_t""yes" 1>&6
10647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10648   cat >> confdefs.h <<EOF
10649 #define $ac_tr_hdr 1
10650 EOF
10651  
10652 else
10653   echo "$ac_t""no" 1>&6
10654 fi
10655 done
10656
10657
10658         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10659                 if test $krb5_impl = mit; then
10660                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10661 echo "configure:10662: checking for main in -lkrb4" >&5
10662 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10664   echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666   ac_save_LIBS="$LIBS"
10667 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10668 cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671
10672 int main() {
10673 main()
10674 ; return 0; }
10675 EOF
10676 if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10677   rm -rf conftest*
10678   eval "ac_cv_lib_$ac_lib_var=yes"
10679 else
10680   echo "configure: failed program was:" >&5
10681   cat conftest.$ac_ext >&5
10682   rm -rf conftest*
10683   eval "ac_cv_lib_$ac_lib_var=no"
10684 fi
10685 rm -f conftest*
10686 LIBS="$ac_save_LIBS"
10687
10688 fi
10689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10690   echo "$ac_t""yes" 1>&6
10691   have_k425=yes
10692                                 KRB4_LIBS="-lkrb4 -ldes425"
10693 else
10694   echo "$ac_t""no" 1>&6
10695 have_k425=no
10696 fi
10697
10698
10699                 elif test $krb5_impl = heimdal; then
10700                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10701 echo "configure:10702: checking for main in -lkrb4" >&5
10702 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10704   echo $ac_n "(cached) $ac_c" 1>&6
10705 else
10706   ac_save_LIBS="$LIBS"
10707 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10708 cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711
10712 int main() {
10713 main()
10714 ; return 0; }
10715 EOF
10716 if { (eval echo configure:10717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10717   rm -rf conftest*
10718   eval "ac_cv_lib_$ac_lib_var=yes"
10719 else
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   eval "ac_cv_lib_$ac_lib_var=no"
10724 fi
10725 rm -f conftest*
10726 LIBS="$ac_save_LIBS"
10727
10728 fi
10729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10730   echo "$ac_t""yes" 1>&6
10731   have_k425=yes
10732                                 KRB4_LIBS="-lkrb4"
10733 else
10734   echo "$ac_t""no" 1>&6
10735 have_k425=no
10736 fi
10737
10738
10739                 else
10740                         have_425=no
10741                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10742                 fi
10743
10744                 if test $have_k425 = yes ; then
10745                         ol_with_kerberos=found
10746                         ol_link_krb4=yes
10747
10748                         cat >> confdefs.h <<\EOF
10749 #define HAVE_KRB425 1
10750 EOF
10751
10752                         cat >> confdefs.h <<\EOF
10753 #define HAVE_KRB4 1
10754 EOF
10755
10756
10757                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10758 echo "configure:10759: checking for des_debug in Kerberos libraries" >&5
10759 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10760   echo $ac_n "(cached) $ac_c" 1>&6
10761 else
10762   
10763                                                                 save_LIBS="$LIBS"
10764                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10765                                 cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768
10769 #include <kerberosIV/krb.h>
10770 #include <kerberosIV/des.h>
10771 extern int des_debug;
10772
10773 int main() {
10774
10775 des_debug = 1;
10776
10777 ; return 0; }
10778 EOF
10779 if { (eval echo configure:10780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10780   rm -rf conftest*
10781   ol_cv_var_des_debug=yes
10782 else
10783   echo "configure: failed program was:" >&5
10784   cat conftest.$ac_ext >&5
10785   rm -rf conftest*
10786   ol_cv_var_des_debug=no
10787 fi
10788 rm -f conftest*
10789                                                                 LIBS="$save_LIBS"
10790                         
10791 fi
10792
10793 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10794
10795                         if test $ol_cv_var_des_debug = yes ; then
10796                                 cat >> confdefs.h <<\EOF
10797 #define HAVE_DES_DEBUG 1
10798 EOF
10799
10800                         fi
10801
10802                         LIBS="$save_LIBS"
10803                 fi
10804         fi
10805 fi
10806
10807 if test $ol_link_krb5 = yes ; then
10808         ol_with_kerberos=found
10809 fi
10810
10811 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10812         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10813
10814         for ac_hdr in krb.h des.h krb-archaeology.h 
10815 do
10816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10818 echo "configure:10819: checking for $ac_hdr" >&5
10819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   cat > conftest.$ac_ext <<EOF
10823 #line 10824 "configure"
10824 #include "confdefs.h"
10825 #include <$ac_hdr>
10826 EOF
10827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10828 { (eval echo configure:10829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10830 if test -z "$ac_err"; then
10831   rm -rf conftest*
10832   eval "ac_cv_header_$ac_safe=yes"
10833 else
10834   echo "$ac_err" >&5
10835   echo "configure: failed program was:" >&5
10836   cat conftest.$ac_ext >&5
10837   rm -rf conftest*
10838   eval "ac_cv_header_$ac_safe=no"
10839 fi
10840 rm -f conftest*
10841 fi
10842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10843   echo "$ac_t""yes" 1>&6
10844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10845   cat >> confdefs.h <<EOF
10846 #define $ac_tr_hdr 1
10847 EOF
10848  
10849 else
10850   echo "$ac_t""no" 1>&6
10851 fi
10852 done
10853
10854
10855         if test $ac_cv_header_krb_h = yes ; then
10856                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10857 echo "configure:10858: checking for main in -lkrb" >&5
10858 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10859 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   ac_save_LIBS="$LIBS"
10863 LIBS="-lkrb -ldes $LIBS"
10864 cat > conftest.$ac_ext <<EOF
10865 #line 10866 "configure"
10866 #include "confdefs.h"
10867
10868 int main() {
10869 main()
10870 ; return 0; }
10871 EOF
10872 if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10873   rm -rf conftest*
10874   eval "ac_cv_lib_$ac_lib_var=yes"
10875 else
10876   echo "configure: failed program was:" >&5
10877   cat conftest.$ac_ext >&5
10878   rm -rf conftest*
10879   eval "ac_cv_lib_$ac_lib_var=no"
10880 fi
10881 rm -f conftest*
10882 LIBS="$ac_save_LIBS"
10883
10884 fi
10885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10886   echo "$ac_t""yes" 1>&6
10887   have_k4=yes
10888 else
10889   echo "$ac_t""no" 1>&6
10890 have_k4=no
10891 fi
10892
10893
10894                 if test $have_k4 = yes ; then
10895                         ol_with_kerberos=found
10896                         ol_link_krb4=yes
10897
10898                         cat >> confdefs.h <<\EOF
10899 #define HAVE_KRB4 1
10900 EOF
10901
10902
10903                         KRB4_LIBS="-lkrb -ldes"
10904
10905                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10906                                 cat >> confdefs.h <<\EOF
10907 #define HAVE_KTH_KERBEROS 1
10908 EOF
10909
10910                         fi
10911                 fi
10912         fi
10913 fi
10914
10915 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10916         ol_link_kpasswd=yes
10917 fi
10918
10919 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10920         ol_link_kbind=yes
10921
10922 elif test $ol_enable_kbind = yes ; then
10923         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10924 fi
10925
10926 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10927         cat >> confdefs.h <<\EOF
10928 #define HAVE_KERBEROS 1
10929 EOF
10930
10931
10932 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10933         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10934 fi
10935
10936 ol_link_tls=no
10937 if test $ol_with_tls != no ; then
10938         for ac_hdr in openssl/ssl.h ssl.h
10939 do
10940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10942 echo "configure:10943: checking for $ac_hdr" >&5
10943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10944   echo $ac_n "(cached) $ac_c" 1>&6
10945 else
10946   cat > conftest.$ac_ext <<EOF
10947 #line 10948 "configure"
10948 #include "confdefs.h"
10949 #include <$ac_hdr>
10950 EOF
10951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10952 { (eval echo configure:10953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10954 if test -z "$ac_err"; then
10955   rm -rf conftest*
10956   eval "ac_cv_header_$ac_safe=yes"
10957 else
10958   echo "$ac_err" >&5
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -rf conftest*
10962   eval "ac_cv_header_$ac_safe=no"
10963 fi
10964 rm -f conftest*
10965 fi
10966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10969   cat >> confdefs.h <<EOF
10970 #define $ac_tr_hdr 1
10971 EOF
10972  
10973 else
10974   echo "$ac_t""no" 1>&6
10975 fi
10976 done
10977
10978         
10979         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10980                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10981 echo "configure:10982: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10982 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10984   echo $ac_n "(cached) $ac_c" 1>&6
10985 else
10986   ac_save_LIBS="$LIBS"
10987 LIBS="-lssl -lcrypto $LIBS"
10988 cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 /* Override any gcc2 internal prototype to avoid an error.  */
10992 /* We use char because int might match the return type of a gcc2
10993     builtin and then its argument prototype would still apply.  */
10994 char SSLeay_add_ssl_algorithms();
10995
10996 int main() {
10997 SSLeay_add_ssl_algorithms()
10998 ; return 0; }
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11001   rm -rf conftest*
11002   eval "ac_cv_lib_$ac_lib_var=yes"
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   eval "ac_cv_lib_$ac_lib_var=no"
11008 fi
11009 rm -f conftest*
11010 LIBS="$ac_save_LIBS"
11011
11012 fi
11013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11014   echo "$ac_t""yes" 1>&6
11015   have_ssleay=yes
11016                         need_rsaref=no
11017 else
11018   echo "$ac_t""no" 1>&6
11019 have_ssleay=no
11020 fi
11021
11022                         
11023                 if test $have_ssleay = no ; then
11024                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11025 echo "configure:11026: checking for SSL_library_init in -lssl" >&5
11026 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11027 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   ac_save_LIBS="$LIBS"
11031 LIBS="-lssl -lcrypto $LIBS"
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 /* Override any gcc2 internal prototype to avoid an error.  */
11036 /* We use char because int might match the return type of a gcc2
11037     builtin and then its argument prototype would still apply.  */
11038 char SSL_library_init();
11039
11040 int main() {
11041 SSL_library_init()
11042 ; return 0; }
11043 EOF
11044 if { (eval echo configure:11045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=yes"
11047 else
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=no"
11052 fi
11053 rm -f conftest*
11054 LIBS="$ac_save_LIBS"
11055
11056 fi
11057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059   have_ssleay=yes
11060                                 need_rsaref=no
11061 else
11062   echo "$ac_t""no" 1>&6
11063 have_ssleay=no
11064 fi
11065
11066                 fi
11067
11068                 if test $have_ssleay = no ; then
11069                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11070 echo "configure:11071: checking for ssl3_accept in -lssl" >&5
11071 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11073   echo $ac_n "(cached) $ac_c" 1>&6
11074 else
11075   ac_save_LIBS="$LIBS"
11076 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11077 cat > conftest.$ac_ext <<EOF
11078 #line 11079 "configure"
11079 #include "confdefs.h"
11080 /* Override any gcc2 internal prototype to avoid an error.  */
11081 /* We use char because int might match the return type of a gcc2
11082     builtin and then its argument prototype would still apply.  */
11083 char ssl3_accept();
11084
11085 int main() {
11086 ssl3_accept()
11087 ; return 0; }
11088 EOF
11089 if { (eval echo configure:11090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=yes"
11092 else
11093   echo "configure: failed program was:" >&5
11094   cat conftest.$ac_ext >&5
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=no"
11097 fi
11098 rm -f conftest*
11099 LIBS="$ac_save_LIBS"
11100
11101 fi
11102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11103   echo "$ac_t""yes" 1>&6
11104   have_ssleay=yes
11105                                 need_rsaref=yes
11106 else
11107   echo "$ac_t""no" 1>&6
11108 have_ssleay=no
11109 fi
11110
11111                 fi
11112
11113                 if test $have_ssleay = yes ; then
11114                         ol_with_tls=found
11115                         ol_link_tls=yes
11116
11117                         cat >> confdefs.h <<\EOF
11118 #define HAVE_SSLEAY 1
11119 EOF
11120
11121
11122                         if test $need_rsaref = yes; then
11123                                 cat >> confdefs.h <<\EOF
11124 #define HAVE_RSAREF 1
11125 EOF
11126
11127
11128                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11129                         else
11130                                 TLS_LIBS="-lssl -lcrypto"
11131                         fi
11132                 fi
11133         fi
11134
11135 else
11136         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11137 fi
11138
11139 if test $ol_link_tls = yes ; then
11140         cat >> confdefs.h <<\EOF
11141 #define HAVE_TLS 1
11142 EOF
11143
11144
11145 elif test $ol_with_tls = auto ; then
11146         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11147         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11148
11149 elif test $ol_with_tls != no ; then
11150         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11151 fi
11152
11153 if test $ol_enable_lmpasswd != no; then
11154         if test $ol_link_tls != yes ; then
11155                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11156         fi
11157
11158         cat >> confdefs.h <<\EOF
11159 #define SLAPD_LMHASH 1
11160 EOF
11161
11162 fi
11163
11164 for ac_func in \
11165         ctime_r                 \
11166         gethostbyname_r gethostbyaddr_r \
11167
11168 do
11169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11170 echo "configure:11171: checking for $ac_func" >&5
11171 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11172   echo $ac_n "(cached) $ac_c" 1>&6
11173 else
11174   cat > conftest.$ac_ext <<EOF
11175 #line 11176 "configure"
11176 #include "confdefs.h"
11177 /* System header to define __stub macros and hopefully few prototypes,
11178     which can conflict with char $ac_func(); below.  */
11179 #include <assert.h>
11180 /* Override any gcc2 internal prototype to avoid an error.  */
11181 /* We use char because int might match the return type of a gcc2
11182     builtin and then its argument prototype would still apply.  */
11183 char $ac_func();
11184 char (*f)();
11185
11186 int main() {
11187
11188 /* The GNU C library defines this for functions which it implements
11189     to always fail with ENOSYS.  Some functions are actually named
11190     something starting with __ and the normal name is an alias.  */
11191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11192 choke me
11193 #else
11194 f = $ac_func;
11195 #endif
11196
11197 ; return 0; }
11198 EOF
11199 if { (eval echo configure:11200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11200   rm -rf conftest*
11201   eval "ac_cv_func_$ac_func=yes"
11202 else
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   eval "ac_cv_func_$ac_func=no"
11207 fi
11208 rm -f conftest*
11209 fi
11210
11211 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11212   echo "$ac_t""yes" 1>&6
11213     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11214   cat >> confdefs.h <<EOF
11215 #define $ac_tr_func 1
11216 EOF
11217  
11218 else
11219   echo "$ac_t""no" 1>&6
11220 fi
11221 done
11222
11223
11224 if test "$ac_cv_func_ctime_r" = no ; then
11225         ol_cv_func_ctime_r_nargs=0
11226 else
11227         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11228 echo "configure:11229: checking number of arguments of ctime_r" >&5
11229 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <time.h>
11236 int main() {
11237 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11241   rm -rf conftest*
11242   ol_cv_func_ctime_r_nargs3=yes
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   ol_cv_func_ctime_r_nargs3=no
11248 fi
11249 rm -f conftest*
11250
11251         cat > conftest.$ac_ext <<EOF
11252 #line 11253 "configure"
11253 #include "confdefs.h"
11254 #include <time.h>
11255 int main() {
11256 time_t ti; char *buffer; ctime_r(&ti,buffer);
11257 ; return 0; }
11258 EOF
11259 if { (eval echo configure:11260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11260   rm -rf conftest*
11261   ol_cv_func_ctime_r_nargs2=yes
11262 else
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -rf conftest*
11266   ol_cv_func_ctime_r_nargs2=no
11267 fi
11268 rm -f conftest*
11269
11270         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11271                 $ol_cv_func_ctime_r_nargs2 = no ; then
11272
11273                 ol_cv_func_ctime_r_nargs=3
11274
11275         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11276                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11277
11278                 ol_cv_func_ctime_r_nargs=2
11279
11280         else
11281                 ol_cv_func_ctime_r_nargs=0
11282         fi
11283   
11284 fi
11285
11286 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11287
11288   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11289         cat >> confdefs.h <<EOF
11290 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11291 EOF
11292
11293   fi
11294
11295 fi
11296
11297 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11298         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11299 echo "configure:11300: checking number of arguments of gethostbyname_r" >&5
11300 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11301   echo $ac_n "(cached) $ac_c" 1>&6
11302 else
11303   cat > conftest.$ac_ext <<EOF
11304 #line 11305 "configure"
11305 #include "confdefs.h"
11306 #include <sys/types.h>
11307 #include <sys/socket.h>
11308 #include <netinet/in.h>
11309 #include <netdb.h>
11310 #define BUFSIZE (sizeof(struct hostent)+10)
11311 int main() {
11312 struct hostent hent; char buffer[BUFSIZE];
11313                 int bufsize=BUFSIZE;int h_errno;
11314                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11315                         buffer, bufsize, &h_errno);
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_gethostbyname_r_nargs5=yes
11321 else
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -rf conftest*
11325   ol_cv_func_gethostbyname_r_nargs5=no
11326 fi
11327 rm -f conftest*
11328
11329         cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 #include <sys/types.h>
11333 #include <sys/socket.h>
11334 #include <netinet/in.h>
11335 #include <netdb.h>
11336 #define BUFSIZE (sizeof(struct hostent)+10)
11337 int main() {
11338 struct hostent hent;struct hostent *rhent;
11339                 char buffer[BUFSIZE];
11340                 int bufsize=BUFSIZE;int h_errno;
11341                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11342                         &rhent, &h_errno);
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11346   rm -rf conftest*
11347   ol_cv_func_gethostbyname_r_nargs6=yes
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   ol_cv_func_gethostbyname_r_nargs6=no
11353 fi
11354 rm -f conftest*
11355
11356         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11357                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11358
11359                 ol_cv_func_gethostbyname_r_nargs=5
11360
11361         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11362                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11363
11364                 ol_cv_func_gethostbyname_r_nargs=6
11365
11366         else
11367                 ol_cv_func_gethostbyname_r_nargs=0
11368         fi
11369   
11370 fi
11371
11372 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11373   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11374         cat >> confdefs.h <<EOF
11375 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11376 EOF
11377
11378   fi
11379
11380 else
11381         ol_cv_func_gethostbyname_r_nargs=0
11382 fi
11383  
11384 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11385         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11386 echo "configure:11387: checking number of arguments of gethostbyaddr_r" >&5
11387 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11388   echo $ac_n "(cached) $ac_c" 1>&6
11389 else
11390   cat > conftest.$ac_ext <<EOF
11391 #line 11392 "configure"
11392 #include "confdefs.h"
11393 #include <sys/types.h>
11394 #include <sys/socket.h>
11395 #include <netinet/in.h>
11396 #include <netdb.h>
11397 #define BUFSIZE (sizeof(struct hostent)+10)
11398 int main() {
11399 struct hostent hent; char buffer[BUFSIZE]; 
11400             struct in_addr add;
11401             size_t alen=sizeof(struct in_addr);
11402             int bufsize=BUFSIZE;int h_errno;
11403                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11404                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11405 ; return 0; }
11406 EOF
11407 if { (eval echo configure:11408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11408   rm -rf conftest*
11409   ol_cv_func_gethostbyaddr_r_nargs7=yes
11410 else
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   ol_cv_func_gethostbyaddr_r_nargs7=no
11415 fi
11416 rm -f conftest*
11417
11418         cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 #include <sys/types.h>
11422 #include <sys/socket.h>
11423 #include <netinet/in.h>
11424 #include <netdb.h>
11425 #define BUFSIZE (sizeof(struct hostent)+10)
11426 int main() {
11427 struct hostent hent;
11428                 struct hostent *rhent; char buffer[BUFSIZE]; 
11429                 struct in_addr add;
11430                 size_t alen=sizeof(struct in_addr);
11431                 int bufsize=BUFSIZE;int h_errno;
11432                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11433                         alen, AF_INET, &hent, buffer, bufsize, 
11434                         &rhent, &h_errno);
11435 ; return 0; }
11436 EOF
11437 if { (eval echo configure:11438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11438   rm -rf conftest*
11439   ol_cv_func_gethostbyaddr_r_nargs8=yes
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   ol_cv_func_gethostbyaddr_r_nargs8=no
11445 fi
11446 rm -f conftest*
11447
11448         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11449                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11450
11451                 ol_cv_func_gethostbyaddr_r_nargs=7
11452
11453         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11454                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11455
11456                 ol_cv_func_gethostbyaddr_r_nargs=8
11457
11458         else
11459                 ol_cv_func_gethostbyaddr_r_nargs=0
11460         fi
11461   
11462 fi
11463
11464 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11465   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11466     cat >> confdefs.h <<EOF
11467 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11468 EOF
11469
11470   fi
11471
11472 else
11473         ol_cv_func_gethostbyaddr_r_nargs=0
11474 fi
11475
11476 if test "$ac_cv_func_ctime_r" = yes \
11477         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11478         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11479         -a "$ac_cv_func_gethostbyname_r" = yes \
11480         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11481         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11482         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11483         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11484         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11485         ; then
11486  
11487         cat >> confdefs.h <<\EOF
11488 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11489 EOF
11490
11491 fi
11492
11493 ol_link_threads=no
11494
11495 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11496         -o $ol_with_threads = nt ; then
11497
11498         
11499         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11500 echo "configure:11501: checking for _beginthread" >&5
11501 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11502   echo $ac_n "(cached) $ac_c" 1>&6
11503 else
11504   cat > conftest.$ac_ext <<EOF
11505 #line 11506 "configure"
11506 #include "confdefs.h"
11507 /* System header to define __stub macros and hopefully few prototypes,
11508     which can conflict with char _beginthread(); below.  */
11509 #include <assert.h>
11510 /* Override any gcc2 internal prototype to avoid an error.  */
11511 /* We use char because int might match the return type of a gcc2
11512     builtin and then its argument prototype would still apply.  */
11513 char _beginthread();
11514 char (*f)();
11515
11516 int main() {
11517
11518 /* The GNU C library defines this for functions which it implements
11519     to always fail with ENOSYS.  Some functions are actually named
11520     something starting with __ and the normal name is an alias.  */
11521 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11522 choke me
11523 #else
11524 f = _beginthread;
11525 #endif
11526
11527 ; return 0; }
11528 EOF
11529 if { (eval echo configure:11530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11530   rm -rf conftest*
11531   eval "ac_cv_func__beginthread=yes"
11532 else
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   eval "ac_cv_func__beginthread=no"
11537 fi
11538 rm -f conftest*
11539 fi
11540
11541 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11542   echo "$ac_t""yes" 1>&6
11543   :
11544 else
11545   echo "$ac_t""no" 1>&6
11546 fi
11547
11548
11549         if test $ac_cv_func__beginthread = yes ; then
11550                 cat >> confdefs.h <<\EOF
11551 #define HAVE_NT_THREADS 1
11552 EOF
11553
11554                 ol_cv_nt_threads=yes
11555         fi
11556
11557
11558         if test "$ol_cv_nt_threads" = yes ; then
11559                 ol_link_threads=nt
11560                 ol_with_threads=found
11561                 ol_with_yielding_select=yes
11562
11563                 cat >> confdefs.h <<\EOF
11564 #define HAVE_NT_SERVICE_MANAGER 1
11565 EOF
11566
11567                 cat >> confdefs.h <<\EOF
11568 #define HAVE_NT_EVENT_LOG 1
11569 EOF
11570
11571         fi
11572
11573         if test $ol_with_threads = nt ; then
11574                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11575         fi
11576 fi
11577
11578 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11579         -o $ol_with_threads = posix ; then
11580
11581         for ac_hdr in pthread.h
11582 do
11583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11585 echo "configure:11586: checking for $ac_hdr" >&5
11586 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11587   echo $ac_n "(cached) $ac_c" 1>&6
11588 else
11589   cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 #include <$ac_hdr>
11593 EOF
11594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11595 { (eval echo configure:11596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11597 if test -z "$ac_err"; then
11598   rm -rf conftest*
11599   eval "ac_cv_header_$ac_safe=yes"
11600 else
11601   echo "$ac_err" >&5
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604   rm -rf conftest*
11605   eval "ac_cv_header_$ac_safe=no"
11606 fi
11607 rm -f conftest*
11608 fi
11609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11610   echo "$ac_t""yes" 1>&6
11611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11612   cat >> confdefs.h <<EOF
11613 #define $ac_tr_hdr 1
11614 EOF
11615  
11616 else
11617   echo "$ac_t""no" 1>&6
11618 fi
11619 done
11620
11621
11622         if test $ac_cv_header_pthread_h = yes ; then
11623                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11624 echo "configure:11625: checking POSIX thread version" >&5
11625 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11626   echo $ac_n "(cached) $ac_c" 1>&6
11627 else
11628   
11629         cat > conftest.$ac_ext <<EOF
11630 #line 11631 "configure"
11631 #include "confdefs.h"
11632
11633 #               include <pthread.h>
11634                 /* this check could be improved */
11635 #               ifdef PTHREAD_ONCE_INIT
11636                         pthread_version_final;
11637 #               endif
11638         
11639 EOF
11640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11641   egrep "pthread_version_final" >/dev/null 2>&1; then
11642   rm -rf conftest*
11643   ol_pthread_final=yes
11644 else
11645   rm -rf conftest*
11646   ol_pthread_final=no
11647 fi
11648 rm -f conftest*
11649
11650
11651         cat > conftest.$ac_ext <<EOF
11652 #line 11653 "configure"
11653 #include "confdefs.h"
11654
11655 #               include <pthread.h>
11656                 /* this check could be improved */
11657 #               ifdef pthread_once_init
11658                         pthread_version_draft4;
11659 #               endif
11660         
11661 EOF
11662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11663   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11664   rm -rf conftest*
11665   ol_pthread_draft4=yes
11666 else
11667   rm -rf conftest*
11668   ol_pthread_draft4=no
11669 fi
11670 rm -f conftest*
11671
11672
11673         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11674                 ol_cv_pthread_version=final
11675         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11676                 ol_cv_pthread_version=draft4
11677         else
11678                 ol_cv_pthread_version=unknown
11679         fi
11680
11681 fi
11682
11683 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11684
11685
11686                 if test $ol_cv_pthread_version = final ; then
11687                         cat >> confdefs.h <<\EOF
11688 #define HAVE_PTHREADS_FINAL 1
11689 EOF
11690
11691                 elif test $ol_cv_pthread_version = draft4 ; then
11692                         cat >> confdefs.h <<\EOF
11693 #define HAVE_PTHREADS_D4 1
11694 EOF
11695
11696                 else
11697                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11698                 fi
11699
11700                 # consider threads found
11701                 ol_with_threads=found
11702
11703                 
11704         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11705 echo "configure:11706: checking for LinuxThreads pthread.h" >&5
11706 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <pthread.h>
11713 EOF
11714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11715   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11716   rm -rf conftest*
11717   ol_cv_header_linux_threads=yes
11718 else
11719   rm -rf conftest*
11720   ol_cv_header_linux_threads=no
11721 fi
11722 rm -f conftest*
11723
11724                 
11725 fi
11726
11727 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11728         if test $ol_cv_header_linux_threads = yes; then
11729                 cat >> confdefs.h <<\EOF
11730 #define HAVE_LINUX_THREADS 1
11731 EOF
11732
11733         fi
11734
11735                 
11736         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11737 echo "configure:11738: checking for GNU Pth pthread.h" >&5
11738 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11739   echo $ac_n "(cached) $ac_c" 1>&6
11740 else
11741   cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744 #include <pthread.h>
11745 #ifdef _POSIX_THREAD_IS_GNU_PTH
11746         __gnu_pth__;
11747 #endif
11748
11749 EOF
11750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11751   egrep "__gnu_pth__" >/dev/null 2>&1; then
11752   rm -rf conftest*
11753   ol_cv_header_gnu_pth_pthread_h=yes
11754 else
11755   rm -rf conftest*
11756   ol_cv_header_gnu_pth_pthread_h=no
11757 fi
11758 rm -f conftest*
11759
11760                 
11761 fi
11762
11763 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11764
11765
11766                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11767                         for ac_hdr in sched.h
11768 do
11769 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11770 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11771 echo "configure:11772: checking for $ac_hdr" >&5
11772 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   cat > conftest.$ac_ext <<EOF
11776 #line 11777 "configure"
11777 #include "confdefs.h"
11778 #include <$ac_hdr>
11779 EOF
11780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11781 { (eval echo configure:11782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11783 if test -z "$ac_err"; then
11784   rm -rf conftest*
11785   eval "ac_cv_header_$ac_safe=yes"
11786 else
11787   echo "$ac_err" >&5
11788   echo "configure: failed program was:" >&5
11789   cat conftest.$ac_ext >&5
11790   rm -rf conftest*
11791   eval "ac_cv_header_$ac_safe=no"
11792 fi
11793 rm -f conftest*
11794 fi
11795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11796   echo "$ac_t""yes" 1>&6
11797     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11798   cat >> confdefs.h <<EOF
11799 #define $ac_tr_hdr 1
11800 EOF
11801  
11802 else
11803   echo "$ac_t""no" 1>&6
11804 fi
11805 done
11806
11807                 fi
11808
11809                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11810                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11811 echo "configure:11812: checking for pthread_create in default libraries" >&5
11812 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11813   echo $ac_n "(cached) $ac_c" 1>&6
11814 else
11815   
11816                 if test "$cross_compiling" = yes; then
11817   cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 /* pthread test headers */
11821 #include <pthread.h>
11822 #ifndef NULL
11823 #define NULL (void*)0
11824 #endif
11825
11826 static void *task(p)
11827         void *p;
11828 {
11829         return (void *) (p == NULL);
11830 }
11831
11832 int main() {
11833
11834         /* pthread test function */
11835         pthread_t t;
11836         int status;
11837         int detach = 1;
11838
11839 #ifdef HAVE_PTHREADS_FINAL
11840         /* Final pthreads */
11841         pthread_attr_t attr;
11842
11843         status = pthread_attr_init(&attr);
11844         if( status ) return status;
11845
11846 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11847         if( !detach ) {
11848 #if defined( PTHREAD_CREATE_JOINABLE )
11849                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11850 #else
11851                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11852 #endif
11853
11854 #ifdef PTHREAD_CREATE_DETACHED
11855         } else {
11856                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11857 #endif
11858         }
11859         if( status ) return status;
11860 #endif
11861
11862         status = pthread_create( &t, &attr, task, NULL );
11863         if( status ) return status;
11864
11865 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11866         if( detach ) {
11867                 /* give thread a chance to complete */
11868                 /* it should remain joinable and hence detachable */
11869                 sleep( 1 );
11870
11871                 status = pthread_detach( t );
11872                 if( status ) return status;
11873         }
11874 #endif
11875
11876 #else
11877         /* Draft 4 pthreads */
11878         status = pthread_create( &t, pthread_attr_default, task, NULL );
11879         if( status ) return status;
11880
11881         if( detach ) {
11882                 /* give thread a chance to complete */
11883                 /* it should remain joinable and hence detachable */
11884                 sleep( 1 );
11885
11886                 status = pthread_detach( &t );
11887                 if( status ) return status;
11888         }
11889 #endif
11890
11891 #ifdef HAVE_LINUX_THREADS
11892         pthread_kill_other_threads_np();
11893 #endif
11894
11895         return 0;
11896
11897 ; return 0; }
11898 EOF
11899 if { (eval echo configure:11900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11900   rm -rf conftest*
11901   ol_cv_pthread_create=yes
11902 else
11903   echo "configure: failed program was:" >&5
11904   cat conftest.$ac_ext >&5
11905   rm -rf conftest*
11906   ol_cv_pthread_create=no
11907 fi
11908 rm -f conftest*
11909 else
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 /* pthread test headers */
11914 #include <pthread.h>
11915 #ifndef NULL
11916 #define NULL (void*)0
11917 #endif
11918
11919 static void *task(p)
11920         void *p;
11921 {
11922         return (void *) (p == NULL);
11923 }
11924
11925
11926 int main(argc, argv)
11927         int argc;
11928         char **argv;
11929 {
11930
11931         /* pthread test function */
11932         pthread_t t;
11933         int status;
11934         int detach = 1;
11935
11936 #ifdef HAVE_PTHREADS_FINAL
11937         /* Final pthreads */
11938         pthread_attr_t attr;
11939
11940         status = pthread_attr_init(&attr);
11941         if( status ) return status;
11942
11943 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11944         if( !detach ) {
11945 #if defined( PTHREAD_CREATE_JOINABLE )
11946                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11947 #else
11948                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11949 #endif
11950
11951 #ifdef PTHREAD_CREATE_DETACHED
11952         } else {
11953                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11954 #endif
11955         }
11956         if( status ) return status;
11957 #endif
11958
11959         status = pthread_create( &t, &attr, task, NULL );
11960         if( status ) return status;
11961
11962 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11963         if( detach ) {
11964                 /* give thread a chance to complete */
11965                 /* it should remain joinable and hence detachable */
11966                 sleep( 1 );
11967
11968                 status = pthread_detach( t );
11969                 if( status ) return status;
11970         }
11971 #endif
11972
11973 #else
11974         /* Draft 4 pthreads */
11975         status = pthread_create( &t, pthread_attr_default, task, NULL );
11976         if( status ) return status;
11977
11978         if( detach ) {
11979                 /* give thread a chance to complete */
11980                 /* it should remain joinable and hence detachable */
11981                 sleep( 1 );
11982
11983                 status = pthread_detach( &t );
11984                 if( status ) return status;
11985         }
11986 #endif
11987
11988 #ifdef HAVE_LINUX_THREADS
11989         pthread_kill_other_threads_np();
11990 #endif
11991
11992         return 0;
11993
11994 }
11995
11996 EOF
11997 if { (eval echo configure:11998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11998 then
11999   ol_cv_pthread_create=yes
12000 else
12001   echo "configure: failed program was:" >&5
12002   cat conftest.$ac_ext >&5
12003   rm -fr conftest*
12004   ol_cv_pthread_create=no
12005 fi
12006 rm -fr conftest*
12007 fi
12008
12009 fi
12010
12011 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12012
12013                 if test $ol_cv_pthread_create != no ; then
12014                         ol_link_threads=posix
12015                         ol_link_pthreads=""
12016                 fi
12017                 
12018                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12019 if test "$ol_link_threads" = no ; then
12020         # try -kthread
12021         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12022 echo "configure:12023: checking for pthread link with -kthread" >&5
12023 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12024   echo $ac_n "(cached) $ac_c" 1>&6
12025 else
12026   
12027                 # save the flags
12028                 ol_LIBS="$LIBS"
12029                 LIBS="-kthread $LIBS"
12030
12031                 if test "$cross_compiling" = yes; then
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 /* pthread test headers */
12036 #include <pthread.h>
12037 #ifndef NULL
12038 #define NULL (void*)0
12039 #endif
12040
12041 static void *task(p)
12042         void *p;
12043 {
12044         return (void *) (p == NULL);
12045 }
12046
12047 int main() {
12048
12049         /* pthread test function */
12050         pthread_t t;
12051         int status;
12052         int detach = 1;
12053
12054 #ifdef HAVE_PTHREADS_FINAL
12055         /* Final pthreads */
12056         pthread_attr_t attr;
12057
12058         status = pthread_attr_init(&attr);
12059         if( status ) return status;
12060
12061 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12062         if( !detach ) {
12063 #if defined( PTHREAD_CREATE_JOINABLE )
12064                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12065 #else
12066                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12067 #endif
12068
12069 #ifdef PTHREAD_CREATE_DETACHED
12070         } else {
12071                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12072 #endif
12073         }
12074         if( status ) return status;
12075 #endif
12076
12077         status = pthread_create( &t, &attr, task, NULL );
12078         if( status ) return status;
12079
12080 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12081         if( detach ) {
12082                 /* give thread a chance to complete */
12083                 /* it should remain joinable and hence detachable */
12084                 sleep( 1 );
12085
12086                 status = pthread_detach( t );
12087                 if( status ) return status;
12088         }
12089 #endif
12090
12091 #else
12092         /* Draft 4 pthreads */
12093         status = pthread_create( &t, pthread_attr_default, task, NULL );
12094         if( status ) return status;
12095
12096         if( detach ) {
12097                 /* give thread a chance to complete */
12098                 /* it should remain joinable and hence detachable */
12099                 sleep( 1 );
12100
12101                 status = pthread_detach( &t );
12102                 if( status ) return status;
12103         }
12104 #endif
12105
12106 #ifdef HAVE_LINUX_THREADS
12107         pthread_kill_other_threads_np();
12108 #endif
12109
12110         return 0;
12111
12112 ; return 0; }
12113 EOF
12114 if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12115   rm -rf conftest*
12116   ol_cv_pthread_kthread=yes
12117 else
12118   echo "configure: failed program was:" >&5
12119   cat conftest.$ac_ext >&5
12120   rm -rf conftest*
12121   ol_cv_pthread_kthread=no
12122 fi
12123 rm -f conftest*
12124 else
12125   cat > conftest.$ac_ext <<EOF
12126 #line 12127 "configure"
12127 #include "confdefs.h"
12128 /* pthread test headers */
12129 #include <pthread.h>
12130 #ifndef NULL
12131 #define NULL (void*)0
12132 #endif
12133
12134 static void *task(p)
12135         void *p;
12136 {
12137         return (void *) (p == NULL);
12138 }
12139
12140
12141 int main(argc, argv)
12142         int argc;
12143         char **argv;
12144 {
12145
12146         /* pthread test function */
12147         pthread_t t;
12148         int status;
12149         int detach = 1;
12150
12151 #ifdef HAVE_PTHREADS_FINAL
12152         /* Final pthreads */
12153         pthread_attr_t attr;
12154
12155         status = pthread_attr_init(&attr);
12156         if( status ) return status;
12157
12158 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12159         if( !detach ) {
12160 #if defined( PTHREAD_CREATE_JOINABLE )
12161                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12162 #else
12163                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12164 #endif
12165
12166 #ifdef PTHREAD_CREATE_DETACHED
12167         } else {
12168                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12169 #endif
12170         }
12171         if( status ) return status;
12172 #endif
12173
12174         status = pthread_create( &t, &attr, task, NULL );
12175         if( status ) return status;
12176
12177 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12178         if( detach ) {
12179                 /* give thread a chance to complete */
12180                 /* it should remain joinable and hence detachable */
12181                 sleep( 1 );
12182
12183                 status = pthread_detach( t );
12184                 if( status ) return status;
12185         }
12186 #endif
12187
12188 #else
12189         /* Draft 4 pthreads */
12190         status = pthread_create( &t, pthread_attr_default, task, NULL );
12191         if( status ) return status;
12192
12193         if( detach ) {
12194                 /* give thread a chance to complete */
12195                 /* it should remain joinable and hence detachable */
12196                 sleep( 1 );
12197
12198                 status = pthread_detach( &t );
12199                 if( status ) return status;
12200         }
12201 #endif
12202
12203 #ifdef HAVE_LINUX_THREADS
12204         pthread_kill_other_threads_np();
12205 #endif
12206
12207         return 0;
12208
12209 }
12210
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12213 then
12214   ol_cv_pthread_kthread=yes
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -fr conftest*
12219   ol_cv_pthread_kthread=no
12220 fi
12221 rm -fr conftest*
12222 fi
12223
12224
12225                 # restore the LIBS
12226                 LIBS="$ol_LIBS"
12227         
12228 fi
12229
12230 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12231
12232         if test $ol_cv_pthread_kthread = yes ; then
12233                 ol_link_pthreads="-kthread"
12234                 ol_link_threads=posix
12235         fi
12236 fi
12237
12238                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12239 if test "$ol_link_threads" = no ; then
12240         # try -pthread
12241         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12242 echo "configure:12243: checking for pthread link with -pthread" >&5
12243 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12244   echo $ac_n "(cached) $ac_c" 1>&6
12245 else
12246   
12247                 # save the flags
12248                 ol_LIBS="$LIBS"
12249                 LIBS="-pthread $LIBS"
12250
12251                 if test "$cross_compiling" = yes; then
12252   cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 /* pthread test headers */
12256 #include <pthread.h>
12257 #ifndef NULL
12258 #define NULL (void*)0
12259 #endif
12260
12261 static void *task(p)
12262         void *p;
12263 {
12264         return (void *) (p == NULL);
12265 }
12266
12267 int main() {
12268
12269         /* pthread test function */
12270         pthread_t t;
12271         int status;
12272         int detach = 1;
12273
12274 #ifdef HAVE_PTHREADS_FINAL
12275         /* Final pthreads */
12276         pthread_attr_t attr;
12277
12278         status = pthread_attr_init(&attr);
12279         if( status ) return status;
12280
12281 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12282         if( !detach ) {
12283 #if defined( PTHREAD_CREATE_JOINABLE )
12284                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12285 #else
12286                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12287 #endif
12288
12289 #ifdef PTHREAD_CREATE_DETACHED
12290         } else {
12291                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12292 #endif
12293         }
12294         if( status ) return status;
12295 #endif
12296
12297         status = pthread_create( &t, &attr, task, NULL );
12298         if( status ) return status;
12299
12300 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12301         if( detach ) {
12302                 /* give thread a chance to complete */
12303                 /* it should remain joinable and hence detachable */
12304                 sleep( 1 );
12305
12306                 status = pthread_detach( t );
12307                 if( status ) return status;
12308         }
12309 #endif
12310
12311 #else
12312         /* Draft 4 pthreads */
12313         status = pthread_create( &t, pthread_attr_default, task, NULL );
12314         if( status ) return status;
12315
12316         if( detach ) {
12317                 /* give thread a chance to complete */
12318                 /* it should remain joinable and hence detachable */
12319                 sleep( 1 );
12320
12321                 status = pthread_detach( &t );
12322                 if( status ) return status;
12323         }
12324 #endif
12325
12326 #ifdef HAVE_LINUX_THREADS
12327         pthread_kill_other_threads_np();
12328 #endif
12329
12330         return 0;
12331
12332 ; return 0; }
12333 EOF
12334 if { (eval echo configure:12335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12335   rm -rf conftest*
12336   ol_cv_pthread_pthread=yes
12337 else
12338   echo "configure: failed program was:" >&5
12339   cat conftest.$ac_ext >&5
12340   rm -rf conftest*
12341   ol_cv_pthread_pthread=no
12342 fi
12343 rm -f conftest*
12344 else
12345   cat > conftest.$ac_ext <<EOF
12346 #line 12347 "configure"
12347 #include "confdefs.h"
12348 /* pthread test headers */
12349 #include <pthread.h>
12350 #ifndef NULL
12351 #define NULL (void*)0
12352 #endif
12353
12354 static void *task(p)
12355         void *p;
12356 {
12357         return (void *) (p == NULL);
12358 }
12359
12360
12361 int main(argc, argv)
12362         int argc;
12363         char **argv;
12364 {
12365
12366         /* pthread test function */
12367         pthread_t t;
12368         int status;
12369         int detach = 1;
12370
12371 #ifdef HAVE_PTHREADS_FINAL
12372         /* Final pthreads */
12373         pthread_attr_t attr;
12374
12375         status = pthread_attr_init(&attr);
12376         if( status ) return status;
12377
12378 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12379         if( !detach ) {
12380 #if defined( PTHREAD_CREATE_JOINABLE )
12381                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12382 #else
12383                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12384 #endif
12385
12386 #ifdef PTHREAD_CREATE_DETACHED
12387         } else {
12388                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12389 #endif
12390         }
12391         if( status ) return status;
12392 #endif
12393
12394         status = pthread_create( &t, &attr, task, NULL );
12395         if( status ) return status;
12396
12397 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12398         if( detach ) {
12399                 /* give thread a chance to complete */
12400                 /* it should remain joinable and hence detachable */
12401                 sleep( 1 );
12402
12403                 status = pthread_detach( t );
12404                 if( status ) return status;
12405         }
12406 #endif
12407
12408 #else
12409         /* Draft 4 pthreads */
12410         status = pthread_create( &t, pthread_attr_default, task, NULL );
12411         if( status ) return status;
12412
12413         if( detach ) {
12414                 /* give thread a chance to complete */
12415                 /* it should remain joinable and hence detachable */
12416                 sleep( 1 );
12417
12418                 status = pthread_detach( &t );
12419                 if( status ) return status;
12420         }
12421 #endif
12422
12423 #ifdef HAVE_LINUX_THREADS
12424         pthread_kill_other_threads_np();
12425 #endif
12426
12427         return 0;
12428
12429 }
12430
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12433 then
12434   ol_cv_pthread_pthread=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -fr conftest*
12439   ol_cv_pthread_pthread=no
12440 fi
12441 rm -fr conftest*
12442 fi
12443
12444
12445                 # restore the LIBS
12446                 LIBS="$ol_LIBS"
12447         
12448 fi
12449
12450 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12451
12452         if test $ol_cv_pthread_pthread = yes ; then
12453                 ol_link_pthreads="-pthread"
12454                 ol_link_threads=posix
12455         fi
12456 fi
12457
12458                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12459 if test "$ol_link_threads" = no ; then
12460         # try -pthreads
12461         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12462 echo "configure:12463: checking for pthread link with -pthreads" >&5
12463 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12464   echo $ac_n "(cached) $ac_c" 1>&6
12465 else
12466   
12467                 # save the flags
12468                 ol_LIBS="$LIBS"
12469                 LIBS="-pthreads $LIBS"
12470
12471                 if test "$cross_compiling" = yes; then
12472   cat > conftest.$ac_ext <<EOF
12473 #line 12474 "configure"
12474 #include "confdefs.h"
12475 /* pthread test headers */
12476 #include <pthread.h>
12477 #ifndef NULL
12478 #define NULL (void*)0
12479 #endif
12480
12481 static void *task(p)
12482         void *p;
12483 {
12484         return (void *) (p == NULL);
12485 }
12486
12487 int main() {
12488
12489         /* pthread test function */
12490         pthread_t t;
12491         int status;
12492         int detach = 1;
12493
12494 #ifdef HAVE_PTHREADS_FINAL
12495         /* Final pthreads */
12496         pthread_attr_t attr;
12497
12498         status = pthread_attr_init(&attr);
12499         if( status ) return status;
12500
12501 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12502         if( !detach ) {
12503 #if defined( PTHREAD_CREATE_JOINABLE )
12504                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12505 #else
12506                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12507 #endif
12508
12509 #ifdef PTHREAD_CREATE_DETACHED
12510         } else {
12511                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12512 #endif
12513         }
12514         if( status ) return status;
12515 #endif
12516
12517         status = pthread_create( &t, &attr, task, NULL );
12518         if( status ) return status;
12519
12520 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12521         if( detach ) {
12522                 /* give thread a chance to complete */
12523                 /* it should remain joinable and hence detachable */
12524                 sleep( 1 );
12525
12526                 status = pthread_detach( t );
12527                 if( status ) return status;
12528         }
12529 #endif
12530
12531 #else
12532         /* Draft 4 pthreads */
12533         status = pthread_create( &t, pthread_attr_default, task, NULL );
12534         if( status ) return status;
12535
12536         if( detach ) {
12537                 /* give thread a chance to complete */
12538                 /* it should remain joinable and hence detachable */
12539                 sleep( 1 );
12540
12541                 status = pthread_detach( &t );
12542                 if( status ) return status;
12543         }
12544 #endif
12545
12546 #ifdef HAVE_LINUX_THREADS
12547         pthread_kill_other_threads_np();
12548 #endif
12549
12550         return 0;
12551
12552 ; return 0; }
12553 EOF
12554 if { (eval echo configure:12555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12555   rm -rf conftest*
12556   ol_cv_pthread_pthreads=yes
12557 else
12558   echo "configure: failed program was:" >&5
12559   cat conftest.$ac_ext >&5
12560   rm -rf conftest*
12561   ol_cv_pthread_pthreads=no
12562 fi
12563 rm -f conftest*
12564 else
12565   cat > conftest.$ac_ext <<EOF
12566 #line 12567 "configure"
12567 #include "confdefs.h"
12568 /* pthread test headers */
12569 #include <pthread.h>
12570 #ifndef NULL
12571 #define NULL (void*)0
12572 #endif
12573
12574 static void *task(p)
12575         void *p;
12576 {
12577         return (void *) (p == NULL);
12578 }
12579
12580
12581 int main(argc, argv)
12582         int argc;
12583         char **argv;
12584 {
12585
12586         /* pthread test function */
12587         pthread_t t;
12588         int status;
12589         int detach = 1;
12590
12591 #ifdef HAVE_PTHREADS_FINAL
12592         /* Final pthreads */
12593         pthread_attr_t attr;
12594
12595         status = pthread_attr_init(&attr);
12596         if( status ) return status;
12597
12598 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12599         if( !detach ) {
12600 #if defined( PTHREAD_CREATE_JOINABLE )
12601                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12602 #else
12603                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12604 #endif
12605
12606 #ifdef PTHREAD_CREATE_DETACHED
12607         } else {
12608                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12609 #endif
12610         }
12611         if( status ) return status;
12612 #endif
12613
12614         status = pthread_create( &t, &attr, task, NULL );
12615         if( status ) return status;
12616
12617 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12618         if( detach ) {
12619                 /* give thread a chance to complete */
12620                 /* it should remain joinable and hence detachable */
12621                 sleep( 1 );
12622
12623                 status = pthread_detach( t );
12624                 if( status ) return status;
12625         }
12626 #endif
12627
12628 #else
12629         /* Draft 4 pthreads */
12630         status = pthread_create( &t, pthread_attr_default, task, NULL );
12631         if( status ) return status;
12632
12633         if( detach ) {
12634                 /* give thread a chance to complete */
12635                 /* it should remain joinable and hence detachable */
12636                 sleep( 1 );
12637
12638                 status = pthread_detach( &t );
12639                 if( status ) return status;
12640         }
12641 #endif
12642
12643 #ifdef HAVE_LINUX_THREADS
12644         pthread_kill_other_threads_np();
12645 #endif
12646
12647         return 0;
12648
12649 }
12650
12651 EOF
12652 if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12653 then
12654   ol_cv_pthread_pthreads=yes
12655 else
12656   echo "configure: failed program was:" >&5
12657   cat conftest.$ac_ext >&5
12658   rm -fr conftest*
12659   ol_cv_pthread_pthreads=no
12660 fi
12661 rm -fr conftest*
12662 fi
12663
12664
12665                 # restore the LIBS
12666                 LIBS="$ol_LIBS"
12667         
12668 fi
12669
12670 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12671
12672         if test $ol_cv_pthread_pthreads = yes ; then
12673                 ol_link_pthreads="-pthreads"
12674                 ol_link_threads=posix
12675         fi
12676 fi
12677
12678                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12679 if test "$ol_link_threads" = no ; then
12680         # try -mthreads
12681         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12682 echo "configure:12683: checking for pthread link with -mthreads" >&5
12683 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12684   echo $ac_n "(cached) $ac_c" 1>&6
12685 else
12686   
12687                 # save the flags
12688                 ol_LIBS="$LIBS"
12689                 LIBS="-mthreads $LIBS"
12690
12691                 if test "$cross_compiling" = yes; then
12692   cat > conftest.$ac_ext <<EOF
12693 #line 12694 "configure"
12694 #include "confdefs.h"
12695 /* pthread test headers */
12696 #include <pthread.h>
12697 #ifndef NULL
12698 #define NULL (void*)0
12699 #endif
12700
12701 static void *task(p)
12702         void *p;
12703 {
12704         return (void *) (p == NULL);
12705 }
12706
12707 int main() {
12708
12709         /* pthread test function */
12710         pthread_t t;
12711         int status;
12712         int detach = 1;
12713
12714 #ifdef HAVE_PTHREADS_FINAL
12715         /* Final pthreads */
12716         pthread_attr_t attr;
12717
12718         status = pthread_attr_init(&attr);
12719         if( status ) return status;
12720
12721 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12722         if( !detach ) {
12723 #if defined( PTHREAD_CREATE_JOINABLE )
12724                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12725 #else
12726                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12727 #endif
12728
12729 #ifdef PTHREAD_CREATE_DETACHED
12730         } else {
12731                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12732 #endif
12733         }
12734         if( status ) return status;
12735 #endif
12736
12737         status = pthread_create( &t, &attr, task, NULL );
12738         if( status ) return status;
12739
12740 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12741         if( detach ) {
12742                 /* give thread a chance to complete */
12743                 /* it should remain joinable and hence detachable */
12744                 sleep( 1 );
12745
12746                 status = pthread_detach( t );
12747                 if( status ) return status;
12748         }
12749 #endif
12750
12751 #else
12752         /* Draft 4 pthreads */
12753         status = pthread_create( &t, pthread_attr_default, task, NULL );
12754         if( status ) return status;
12755
12756         if( detach ) {
12757                 /* give thread a chance to complete */
12758                 /* it should remain joinable and hence detachable */
12759                 sleep( 1 );
12760
12761                 status = pthread_detach( &t );
12762                 if( status ) return status;
12763         }
12764 #endif
12765
12766 #ifdef HAVE_LINUX_THREADS
12767         pthread_kill_other_threads_np();
12768 #endif
12769
12770         return 0;
12771
12772 ; return 0; }
12773 EOF
12774 if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12775   rm -rf conftest*
12776   ol_cv_pthread_mthreads=yes
12777 else
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   ol_cv_pthread_mthreads=no
12782 fi
12783 rm -f conftest*
12784 else
12785   cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 /* pthread test headers */
12789 #include <pthread.h>
12790 #ifndef NULL
12791 #define NULL (void*)0
12792 #endif
12793
12794 static void *task(p)
12795         void *p;
12796 {
12797         return (void *) (p == NULL);
12798 }
12799
12800
12801 int main(argc, argv)
12802         int argc;
12803         char **argv;
12804 {
12805
12806         /* pthread test function */
12807         pthread_t t;
12808         int status;
12809         int detach = 1;
12810
12811 #ifdef HAVE_PTHREADS_FINAL
12812         /* Final pthreads */
12813         pthread_attr_t attr;
12814
12815         status = pthread_attr_init(&attr);
12816         if( status ) return status;
12817
12818 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12819         if( !detach ) {
12820 #if defined( PTHREAD_CREATE_JOINABLE )
12821                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12822 #else
12823                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12824 #endif
12825
12826 #ifdef PTHREAD_CREATE_DETACHED
12827         } else {
12828                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12829 #endif
12830         }
12831         if( status ) return status;
12832 #endif
12833
12834         status = pthread_create( &t, &attr, task, NULL );
12835         if( status ) return status;
12836
12837 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12838         if( detach ) {
12839                 /* give thread a chance to complete */
12840                 /* it should remain joinable and hence detachable */
12841                 sleep( 1 );
12842
12843                 status = pthread_detach( t );
12844                 if( status ) return status;
12845         }
12846 #endif
12847
12848 #else
12849         /* Draft 4 pthreads */
12850         status = pthread_create( &t, pthread_attr_default, task, NULL );
12851         if( status ) return status;
12852
12853         if( detach ) {
12854                 /* give thread a chance to complete */
12855                 /* it should remain joinable and hence detachable */
12856                 sleep( 1 );
12857
12858                 status = pthread_detach( &t );
12859                 if( status ) return status;
12860         }
12861 #endif
12862
12863 #ifdef HAVE_LINUX_THREADS
12864         pthread_kill_other_threads_np();
12865 #endif
12866
12867         return 0;
12868
12869 }
12870
12871 EOF
12872 if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12873 then
12874   ol_cv_pthread_mthreads=yes
12875 else
12876   echo "configure: failed program was:" >&5
12877   cat conftest.$ac_ext >&5
12878   rm -fr conftest*
12879   ol_cv_pthread_mthreads=no
12880 fi
12881 rm -fr conftest*
12882 fi
12883
12884
12885                 # restore the LIBS
12886                 LIBS="$ol_LIBS"
12887         
12888 fi
12889
12890 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12891
12892         if test $ol_cv_pthread_mthreads = yes ; then
12893                 ol_link_pthreads="-mthreads"
12894                 ol_link_threads=posix
12895         fi
12896 fi
12897
12898                 # Pthread try link: -thread (ol_cv_pthread_thread)
12899 if test "$ol_link_threads" = no ; then
12900         # try -thread
12901         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12902 echo "configure:12903: checking for pthread link with -thread" >&5
12903 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12904   echo $ac_n "(cached) $ac_c" 1>&6
12905 else
12906   
12907                 # save the flags
12908                 ol_LIBS="$LIBS"
12909                 LIBS="-thread $LIBS"
12910
12911                 if test "$cross_compiling" = yes; then
12912   cat > conftest.$ac_ext <<EOF
12913 #line 12914 "configure"
12914 #include "confdefs.h"
12915 /* pthread test headers */
12916 #include <pthread.h>
12917 #ifndef NULL
12918 #define NULL (void*)0
12919 #endif
12920
12921 static void *task(p)
12922         void *p;
12923 {
12924         return (void *) (p == NULL);
12925 }
12926
12927 int main() {
12928
12929         /* pthread test function */
12930         pthread_t t;
12931         int status;
12932         int detach = 1;
12933
12934 #ifdef HAVE_PTHREADS_FINAL
12935         /* Final pthreads */
12936         pthread_attr_t attr;
12937
12938         status = pthread_attr_init(&attr);
12939         if( status ) return status;
12940
12941 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12942         if( !detach ) {
12943 #if defined( PTHREAD_CREATE_JOINABLE )
12944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12945 #else
12946                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12947 #endif
12948
12949 #ifdef PTHREAD_CREATE_DETACHED
12950         } else {
12951                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12952 #endif
12953         }
12954         if( status ) return status;
12955 #endif
12956
12957         status = pthread_create( &t, &attr, task, NULL );
12958         if( status ) return status;
12959
12960 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12961         if( detach ) {
12962                 /* give thread a chance to complete */
12963                 /* it should remain joinable and hence detachable */
12964                 sleep( 1 );
12965
12966                 status = pthread_detach( t );
12967                 if( status ) return status;
12968         }
12969 #endif
12970
12971 #else
12972         /* Draft 4 pthreads */
12973         status = pthread_create( &t, pthread_attr_default, task, NULL );
12974         if( status ) return status;
12975
12976         if( detach ) {
12977                 /* give thread a chance to complete */
12978                 /* it should remain joinable and hence detachable */
12979                 sleep( 1 );
12980
12981                 status = pthread_detach( &t );
12982                 if( status ) return status;
12983         }
12984 #endif
12985
12986 #ifdef HAVE_LINUX_THREADS
12987         pthread_kill_other_threads_np();
12988 #endif
12989
12990         return 0;
12991
12992 ; return 0; }
12993 EOF
12994 if { (eval echo configure:12995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12995   rm -rf conftest*
12996   ol_cv_pthread_thread=yes
12997 else
12998   echo "configure: failed program was:" >&5
12999   cat conftest.$ac_ext >&5
13000   rm -rf conftest*
13001   ol_cv_pthread_thread=no
13002 fi
13003 rm -f conftest*
13004 else
13005   cat > conftest.$ac_ext <<EOF
13006 #line 13007 "configure"
13007 #include "confdefs.h"
13008 /* pthread test headers */
13009 #include <pthread.h>
13010 #ifndef NULL
13011 #define NULL (void*)0
13012 #endif
13013
13014 static void *task(p)
13015         void *p;
13016 {
13017         return (void *) (p == NULL);
13018 }
13019
13020
13021 int main(argc, argv)
13022         int argc;
13023         char **argv;
13024 {
13025
13026         /* pthread test function */
13027         pthread_t t;
13028         int status;
13029         int detach = 1;
13030
13031 #ifdef HAVE_PTHREADS_FINAL
13032         /* Final pthreads */
13033         pthread_attr_t attr;
13034
13035         status = pthread_attr_init(&attr);
13036         if( status ) return status;
13037
13038 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13039         if( !detach ) {
13040 #if defined( PTHREAD_CREATE_JOINABLE )
13041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13042 #else
13043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13044 #endif
13045
13046 #ifdef PTHREAD_CREATE_DETACHED
13047         } else {
13048                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13049 #endif
13050         }
13051         if( status ) return status;
13052 #endif
13053
13054         status = pthread_create( &t, &attr, task, NULL );
13055         if( status ) return status;
13056
13057 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13058         if( detach ) {
13059                 /* give thread a chance to complete */
13060                 /* it should remain joinable and hence detachable */
13061                 sleep( 1 );
13062
13063                 status = pthread_detach( t );
13064                 if( status ) return status;
13065         }
13066 #endif
13067
13068 #else
13069         /* Draft 4 pthreads */
13070         status = pthread_create( &t, pthread_attr_default, task, NULL );
13071         if( status ) return status;
13072
13073         if( detach ) {
13074                 /* give thread a chance to complete */
13075                 /* it should remain joinable and hence detachable */
13076                 sleep( 1 );
13077
13078                 status = pthread_detach( &t );
13079                 if( status ) return status;
13080         }
13081 #endif
13082
13083 #ifdef HAVE_LINUX_THREADS
13084         pthread_kill_other_threads_np();
13085 #endif
13086
13087         return 0;
13088
13089 }
13090
13091 EOF
13092 if { (eval echo configure:13093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13093 then
13094   ol_cv_pthread_thread=yes
13095 else
13096   echo "configure: failed program was:" >&5
13097   cat conftest.$ac_ext >&5
13098   rm -fr conftest*
13099   ol_cv_pthread_thread=no
13100 fi
13101 rm -fr conftest*
13102 fi
13103
13104
13105                 # restore the LIBS
13106                 LIBS="$ol_LIBS"
13107         
13108 fi
13109
13110 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13111
13112         if test $ol_cv_pthread_thread = yes ; then
13113                 ol_link_pthreads="-thread"
13114                 ol_link_threads=posix
13115         fi
13116 fi
13117
13118
13119                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13120 if test "$ol_link_threads" = no ; then
13121         # try -lpthread -lmach -lexc -lc_r
13122         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13123 echo "configure:13124: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13124 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13125   echo $ac_n "(cached) $ac_c" 1>&6
13126 else
13127   
13128                 # save the flags
13129                 ol_LIBS="$LIBS"
13130                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13131
13132                 if test "$cross_compiling" = yes; then
13133   cat > conftest.$ac_ext <<EOF
13134 #line 13135 "configure"
13135 #include "confdefs.h"
13136 /* pthread test headers */
13137 #include <pthread.h>
13138 #ifndef NULL
13139 #define NULL (void*)0
13140 #endif
13141
13142 static void *task(p)
13143         void *p;
13144 {
13145         return (void *) (p == NULL);
13146 }
13147
13148 int main() {
13149
13150         /* pthread test function */
13151         pthread_t t;
13152         int status;
13153         int detach = 1;
13154
13155 #ifdef HAVE_PTHREADS_FINAL
13156         /* Final pthreads */
13157         pthread_attr_t attr;
13158
13159         status = pthread_attr_init(&attr);
13160         if( status ) return status;
13161
13162 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13163         if( !detach ) {
13164 #if defined( PTHREAD_CREATE_JOINABLE )
13165                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13166 #else
13167                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13168 #endif
13169
13170 #ifdef PTHREAD_CREATE_DETACHED
13171         } else {
13172                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13173 #endif
13174         }
13175         if( status ) return status;
13176 #endif
13177
13178         status = pthread_create( &t, &attr, task, NULL );
13179         if( status ) return status;
13180
13181 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13182         if( detach ) {
13183                 /* give thread a chance to complete */
13184                 /* it should remain joinable and hence detachable */
13185                 sleep( 1 );
13186
13187                 status = pthread_detach( t );
13188                 if( status ) return status;
13189         }
13190 #endif
13191
13192 #else
13193         /* Draft 4 pthreads */
13194         status = pthread_create( &t, pthread_attr_default, task, NULL );
13195         if( status ) return status;
13196
13197         if( detach ) {
13198                 /* give thread a chance to complete */
13199                 /* it should remain joinable and hence detachable */
13200                 sleep( 1 );
13201
13202                 status = pthread_detach( &t );
13203                 if( status ) return status;
13204         }
13205 #endif
13206
13207 #ifdef HAVE_LINUX_THREADS
13208         pthread_kill_other_threads_np();
13209 #endif
13210
13211         return 0;
13212
13213 ; return 0; }
13214 EOF
13215 if { (eval echo configure:13216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13216   rm -rf conftest*
13217   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13218 else
13219   echo "configure: failed program was:" >&5
13220   cat conftest.$ac_ext >&5
13221   rm -rf conftest*
13222   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13223 fi
13224 rm -f conftest*
13225 else
13226   cat > conftest.$ac_ext <<EOF
13227 #line 13228 "configure"
13228 #include "confdefs.h"
13229 /* pthread test headers */
13230 #include <pthread.h>
13231 #ifndef NULL
13232 #define NULL (void*)0
13233 #endif
13234
13235 static void *task(p)
13236         void *p;
13237 {
13238         return (void *) (p == NULL);
13239 }
13240
13241
13242 int main(argc, argv)
13243         int argc;
13244         char **argv;
13245 {
13246
13247         /* pthread test function */
13248         pthread_t t;
13249         int status;
13250         int detach = 1;
13251
13252 #ifdef HAVE_PTHREADS_FINAL
13253         /* Final pthreads */
13254         pthread_attr_t attr;
13255
13256         status = pthread_attr_init(&attr);
13257         if( status ) return status;
13258
13259 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13260         if( !detach ) {
13261 #if defined( PTHREAD_CREATE_JOINABLE )
13262                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13263 #else
13264                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13265 #endif
13266
13267 #ifdef PTHREAD_CREATE_DETACHED
13268         } else {
13269                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13270 #endif
13271         }
13272         if( status ) return status;
13273 #endif
13274
13275         status = pthread_create( &t, &attr, task, NULL );
13276         if( status ) return status;
13277
13278 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13279         if( detach ) {
13280                 /* give thread a chance to complete */
13281                 /* it should remain joinable and hence detachable */
13282                 sleep( 1 );
13283
13284                 status = pthread_detach( t );
13285                 if( status ) return status;
13286         }
13287 #endif
13288
13289 #else
13290         /* Draft 4 pthreads */
13291         status = pthread_create( &t, pthread_attr_default, task, NULL );
13292         if( status ) return status;
13293
13294         if( detach ) {
13295                 /* give thread a chance to complete */
13296                 /* it should remain joinable and hence detachable */
13297                 sleep( 1 );
13298
13299                 status = pthread_detach( &t );
13300                 if( status ) return status;
13301         }
13302 #endif
13303
13304 #ifdef HAVE_LINUX_THREADS
13305         pthread_kill_other_threads_np();
13306 #endif
13307
13308         return 0;
13309
13310 }
13311
13312 EOF
13313 if { (eval echo configure:13314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13314 then
13315   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13316 else
13317   echo "configure: failed program was:" >&5
13318   cat conftest.$ac_ext >&5
13319   rm -fr conftest*
13320   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13321 fi
13322 rm -fr conftest*
13323 fi
13324
13325
13326                 # restore the LIBS
13327                 LIBS="$ol_LIBS"
13328         
13329 fi
13330
13331 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13332
13333         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13334                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13335                 ol_link_threads=posix
13336         fi
13337 fi
13338
13339                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13340 if test "$ol_link_threads" = no ; then
13341         # try -lpthread -lmach -lexc
13342         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13343 echo "configure:13344: checking for pthread link with -lpthread -lmach -lexc" >&5
13344 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13345   echo $ac_n "(cached) $ac_c" 1>&6
13346 else
13347   
13348                 # save the flags
13349                 ol_LIBS="$LIBS"
13350                 LIBS="-lpthread -lmach -lexc $LIBS"
13351
13352                 if test "$cross_compiling" = yes; then
13353   cat > conftest.$ac_ext <<EOF
13354 #line 13355 "configure"
13355 #include "confdefs.h"
13356 /* pthread test headers */
13357 #include <pthread.h>
13358 #ifndef NULL
13359 #define NULL (void*)0
13360 #endif
13361
13362 static void *task(p)
13363         void *p;
13364 {
13365         return (void *) (p == NULL);
13366 }
13367
13368 int main() {
13369
13370         /* pthread test function */
13371         pthread_t t;
13372         int status;
13373         int detach = 1;
13374
13375 #ifdef HAVE_PTHREADS_FINAL
13376         /* Final pthreads */
13377         pthread_attr_t attr;
13378
13379         status = pthread_attr_init(&attr);
13380         if( status ) return status;
13381
13382 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13383         if( !detach ) {
13384 #if defined( PTHREAD_CREATE_JOINABLE )
13385                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13386 #else
13387                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13388 #endif
13389
13390 #ifdef PTHREAD_CREATE_DETACHED
13391         } else {
13392                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13393 #endif
13394         }
13395         if( status ) return status;
13396 #endif
13397
13398         status = pthread_create( &t, &attr, task, NULL );
13399         if( status ) return status;
13400
13401 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13402         if( detach ) {
13403                 /* give thread a chance to complete */
13404                 /* it should remain joinable and hence detachable */
13405                 sleep( 1 );
13406
13407                 status = pthread_detach( t );
13408                 if( status ) return status;
13409         }
13410 #endif
13411
13412 #else
13413         /* Draft 4 pthreads */
13414         status = pthread_create( &t, pthread_attr_default, task, NULL );
13415         if( status ) return status;
13416
13417         if( detach ) {
13418                 /* give thread a chance to complete */
13419                 /* it should remain joinable and hence detachable */
13420                 sleep( 1 );
13421
13422                 status = pthread_detach( &t );
13423                 if( status ) return status;
13424         }
13425 #endif
13426
13427 #ifdef HAVE_LINUX_THREADS
13428         pthread_kill_other_threads_np();
13429 #endif
13430
13431         return 0;
13432
13433 ; return 0; }
13434 EOF
13435 if { (eval echo configure:13436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13436   rm -rf conftest*
13437   ol_cv_pthread_lpthread_lmach_lexc=yes
13438 else
13439   echo "configure: failed program was:" >&5
13440   cat conftest.$ac_ext >&5
13441   rm -rf conftest*
13442   ol_cv_pthread_lpthread_lmach_lexc=no
13443 fi
13444 rm -f conftest*
13445 else
13446   cat > conftest.$ac_ext <<EOF
13447 #line 13448 "configure"
13448 #include "confdefs.h"
13449 /* pthread test headers */
13450 #include <pthread.h>
13451 #ifndef NULL
13452 #define NULL (void*)0
13453 #endif
13454
13455 static void *task(p)
13456         void *p;
13457 {
13458         return (void *) (p == NULL);
13459 }
13460
13461
13462 int main(argc, argv)
13463         int argc;
13464         char **argv;
13465 {
13466
13467         /* pthread test function */
13468         pthread_t t;
13469         int status;
13470         int detach = 1;
13471
13472 #ifdef HAVE_PTHREADS_FINAL
13473         /* Final pthreads */
13474         pthread_attr_t attr;
13475
13476         status = pthread_attr_init(&attr);
13477         if( status ) return status;
13478
13479 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13480         if( !detach ) {
13481 #if defined( PTHREAD_CREATE_JOINABLE )
13482                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13483 #else
13484                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13485 #endif
13486
13487 #ifdef PTHREAD_CREATE_DETACHED
13488         } else {
13489                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13490 #endif
13491         }
13492         if( status ) return status;
13493 #endif
13494
13495         status = pthread_create( &t, &attr, task, NULL );
13496         if( status ) return status;
13497
13498 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13499         if( detach ) {
13500                 /* give thread a chance to complete */
13501                 /* it should remain joinable and hence detachable */
13502                 sleep( 1 );
13503
13504                 status = pthread_detach( t );
13505                 if( status ) return status;
13506         }
13507 #endif
13508
13509 #else
13510         /* Draft 4 pthreads */
13511         status = pthread_create( &t, pthread_attr_default, task, NULL );
13512         if( status ) return status;
13513
13514         if( detach ) {
13515                 /* give thread a chance to complete */
13516                 /* it should remain joinable and hence detachable */
13517                 sleep( 1 );
13518
13519                 status = pthread_detach( &t );
13520                 if( status ) return status;
13521         }
13522 #endif
13523
13524 #ifdef HAVE_LINUX_THREADS
13525         pthread_kill_other_threads_np();
13526 #endif
13527
13528         return 0;
13529
13530 }
13531
13532 EOF
13533 if { (eval echo configure:13534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13534 then
13535   ol_cv_pthread_lpthread_lmach_lexc=yes
13536 else
13537   echo "configure: failed program was:" >&5
13538   cat conftest.$ac_ext >&5
13539   rm -fr conftest*
13540   ol_cv_pthread_lpthread_lmach_lexc=no
13541 fi
13542 rm -fr conftest*
13543 fi
13544
13545
13546                 # restore the LIBS
13547                 LIBS="$ol_LIBS"
13548         
13549 fi
13550
13551 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13552
13553         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13554                 ol_link_pthreads="-lpthread -lmach -lexc"
13555                 ol_link_threads=posix
13556         fi
13557 fi
13558
13559
13560                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13561 if test "$ol_link_threads" = no ; then
13562         # try -lpthread -Wl,-woff,85
13563         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13564 echo "configure:13565: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13565 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13566   echo $ac_n "(cached) $ac_c" 1>&6
13567 else
13568   
13569                 # save the flags
13570                 ol_LIBS="$LIBS"
13571                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13572
13573                 if test "$cross_compiling" = yes; then
13574   cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 /* pthread test headers */
13578 #include <pthread.h>
13579 #ifndef NULL
13580 #define NULL (void*)0
13581 #endif
13582
13583 static void *task(p)
13584         void *p;
13585 {
13586         return (void *) (p == NULL);
13587 }
13588
13589 int main() {
13590
13591         /* pthread test function */
13592         pthread_t t;
13593         int status;
13594         int detach = 1;
13595
13596 #ifdef HAVE_PTHREADS_FINAL
13597         /* Final pthreads */
13598         pthread_attr_t attr;
13599
13600         status = pthread_attr_init(&attr);
13601         if( status ) return status;
13602
13603 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13604         if( !detach ) {
13605 #if defined( PTHREAD_CREATE_JOINABLE )
13606                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13607 #else
13608                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13609 #endif
13610
13611 #ifdef PTHREAD_CREATE_DETACHED
13612         } else {
13613                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13614 #endif
13615         }
13616         if( status ) return status;
13617 #endif
13618
13619         status = pthread_create( &t, &attr, task, NULL );
13620         if( status ) return status;
13621
13622 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13623         if( detach ) {
13624                 /* give thread a chance to complete */
13625                 /* it should remain joinable and hence detachable */
13626                 sleep( 1 );
13627
13628                 status = pthread_detach( t );
13629                 if( status ) return status;
13630         }
13631 #endif
13632
13633 #else
13634         /* Draft 4 pthreads */
13635         status = pthread_create( &t, pthread_attr_default, task, NULL );
13636         if( status ) return status;
13637
13638         if( detach ) {
13639                 /* give thread a chance to complete */
13640                 /* it should remain joinable and hence detachable */
13641                 sleep( 1 );
13642
13643                 status = pthread_detach( &t );
13644                 if( status ) return status;
13645         }
13646 #endif
13647
13648 #ifdef HAVE_LINUX_THREADS
13649         pthread_kill_other_threads_np();
13650 #endif
13651
13652         return 0;
13653
13654 ; return 0; }
13655 EOF
13656 if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13657   rm -rf conftest*
13658   ol_cv_pthread_lib_lpthread_woff=yes
13659 else
13660   echo "configure: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   rm -rf conftest*
13663   ol_cv_pthread_lib_lpthread_woff=no
13664 fi
13665 rm -f conftest*
13666 else
13667   cat > conftest.$ac_ext <<EOF
13668 #line 13669 "configure"
13669 #include "confdefs.h"
13670 /* pthread test headers */
13671 #include <pthread.h>
13672 #ifndef NULL
13673 #define NULL (void*)0
13674 #endif
13675
13676 static void *task(p)
13677         void *p;
13678 {
13679         return (void *) (p == NULL);
13680 }
13681
13682
13683 int main(argc, argv)
13684         int argc;
13685         char **argv;
13686 {
13687
13688         /* pthread test function */
13689         pthread_t t;
13690         int status;
13691         int detach = 1;
13692
13693 #ifdef HAVE_PTHREADS_FINAL
13694         /* Final pthreads */
13695         pthread_attr_t attr;
13696
13697         status = pthread_attr_init(&attr);
13698         if( status ) return status;
13699
13700 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13701         if( !detach ) {
13702 #if defined( PTHREAD_CREATE_JOINABLE )
13703                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13704 #else
13705                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13706 #endif
13707
13708 #ifdef PTHREAD_CREATE_DETACHED
13709         } else {
13710                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13711 #endif
13712         }
13713         if( status ) return status;
13714 #endif
13715
13716         status = pthread_create( &t, &attr, task, NULL );
13717         if( status ) return status;
13718
13719 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13720         if( detach ) {
13721                 /* give thread a chance to complete */
13722                 /* it should remain joinable and hence detachable */
13723                 sleep( 1 );
13724
13725                 status = pthread_detach( t );
13726                 if( status ) return status;
13727         }
13728 #endif
13729
13730 #else
13731         /* Draft 4 pthreads */
13732         status = pthread_create( &t, pthread_attr_default, task, NULL );
13733         if( status ) return status;
13734
13735         if( detach ) {
13736                 /* give thread a chance to complete */
13737                 /* it should remain joinable and hence detachable */
13738                 sleep( 1 );
13739
13740                 status = pthread_detach( &t );
13741                 if( status ) return status;
13742         }
13743 #endif
13744
13745 #ifdef HAVE_LINUX_THREADS
13746         pthread_kill_other_threads_np();
13747 #endif
13748
13749         return 0;
13750
13751 }
13752
13753 EOF
13754 if { (eval echo configure:13755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13755 then
13756   ol_cv_pthread_lib_lpthread_woff=yes
13757 else
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -fr conftest*
13761   ol_cv_pthread_lib_lpthread_woff=no
13762 fi
13763 rm -fr conftest*
13764 fi
13765
13766
13767                 # restore the LIBS
13768                 LIBS="$ol_LIBS"
13769         
13770 fi
13771
13772 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13773
13774         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13775                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13776                 ol_link_threads=posix
13777         fi
13778 fi
13779
13780
13781                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13782 if test "$ol_link_threads" = no ; then
13783         # try -lpthread
13784         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13785 echo "configure:13786: checking for pthread link with -lpthread" >&5
13786 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13787   echo $ac_n "(cached) $ac_c" 1>&6
13788 else
13789   
13790                 # save the flags
13791                 ol_LIBS="$LIBS"
13792                 LIBS="-lpthread $LIBS"
13793
13794                 if test "$cross_compiling" = yes; then
13795   cat > conftest.$ac_ext <<EOF
13796 #line 13797 "configure"
13797 #include "confdefs.h"
13798 /* pthread test headers */
13799 #include <pthread.h>
13800 #ifndef NULL
13801 #define NULL (void*)0
13802 #endif
13803
13804 static void *task(p)
13805         void *p;
13806 {
13807         return (void *) (p == NULL);
13808 }
13809
13810 int main() {
13811
13812         /* pthread test function */
13813         pthread_t t;
13814         int status;
13815         int detach = 1;
13816
13817 #ifdef HAVE_PTHREADS_FINAL
13818         /* Final pthreads */
13819         pthread_attr_t attr;
13820
13821         status = pthread_attr_init(&attr);
13822         if( status ) return status;
13823
13824 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13825         if( !detach ) {
13826 #if defined( PTHREAD_CREATE_JOINABLE )
13827                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13828 #else
13829                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13830 #endif
13831
13832 #ifdef PTHREAD_CREATE_DETACHED
13833         } else {
13834                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13835 #endif
13836         }
13837         if( status ) return status;
13838 #endif
13839
13840         status = pthread_create( &t, &attr, task, NULL );
13841         if( status ) return status;
13842
13843 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13844         if( detach ) {
13845                 /* give thread a chance to complete */
13846                 /* it should remain joinable and hence detachable */
13847                 sleep( 1 );
13848
13849                 status = pthread_detach( t );
13850                 if( status ) return status;
13851         }
13852 #endif
13853
13854 #else
13855         /* Draft 4 pthreads */
13856         status = pthread_create( &t, pthread_attr_default, task, NULL );
13857         if( status ) return status;
13858
13859         if( detach ) {
13860                 /* give thread a chance to complete */
13861                 /* it should remain joinable and hence detachable */
13862                 sleep( 1 );
13863
13864                 status = pthread_detach( &t );
13865                 if( status ) return status;
13866         }
13867 #endif
13868
13869 #ifdef HAVE_LINUX_THREADS
13870         pthread_kill_other_threads_np();
13871 #endif
13872
13873         return 0;
13874
13875 ; return 0; }
13876 EOF
13877 if { (eval echo configure:13878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13878   rm -rf conftest*
13879   ol_cv_pthread_lpthread=yes
13880 else
13881   echo "configure: failed program was:" >&5
13882   cat conftest.$ac_ext >&5
13883   rm -rf conftest*
13884   ol_cv_pthread_lpthread=no
13885 fi
13886 rm -f conftest*
13887 else
13888   cat > conftest.$ac_ext <<EOF
13889 #line 13890 "configure"
13890 #include "confdefs.h"
13891 /* pthread test headers */
13892 #include <pthread.h>
13893 #ifndef NULL
13894 #define NULL (void*)0
13895 #endif
13896
13897 static void *task(p)
13898         void *p;
13899 {
13900         return (void *) (p == NULL);
13901 }
13902
13903
13904 int main(argc, argv)
13905         int argc;
13906         char **argv;
13907 {
13908
13909         /* pthread test function */
13910         pthread_t t;
13911         int status;
13912         int detach = 1;
13913
13914 #ifdef HAVE_PTHREADS_FINAL
13915         /* Final pthreads */
13916         pthread_attr_t attr;
13917
13918         status = pthread_attr_init(&attr);
13919         if( status ) return status;
13920
13921 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13922         if( !detach ) {
13923 #if defined( PTHREAD_CREATE_JOINABLE )
13924                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13925 #else
13926                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13927 #endif
13928
13929 #ifdef PTHREAD_CREATE_DETACHED
13930         } else {
13931                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13932 #endif
13933         }
13934         if( status ) return status;
13935 #endif
13936
13937         status = pthread_create( &t, &attr, task, NULL );
13938         if( status ) return status;
13939
13940 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13941         if( detach ) {
13942                 /* give thread a chance to complete */
13943                 /* it should remain joinable and hence detachable */
13944                 sleep( 1 );
13945
13946                 status = pthread_detach( t );
13947                 if( status ) return status;
13948         }
13949 #endif
13950
13951 #else
13952         /* Draft 4 pthreads */
13953         status = pthread_create( &t, pthread_attr_default, task, NULL );
13954         if( status ) return status;
13955
13956         if( detach ) {
13957                 /* give thread a chance to complete */
13958                 /* it should remain joinable and hence detachable */
13959                 sleep( 1 );
13960
13961                 status = pthread_detach( &t );
13962                 if( status ) return status;
13963         }
13964 #endif
13965
13966 #ifdef HAVE_LINUX_THREADS
13967         pthread_kill_other_threads_np();
13968 #endif
13969
13970         return 0;
13971
13972 }
13973
13974 EOF
13975 if { (eval echo configure:13976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13976 then
13977   ol_cv_pthread_lpthread=yes
13978 else
13979   echo "configure: failed program was:" >&5
13980   cat conftest.$ac_ext >&5
13981   rm -fr conftest*
13982   ol_cv_pthread_lpthread=no
13983 fi
13984 rm -fr conftest*
13985 fi
13986
13987
13988                 # restore the LIBS
13989                 LIBS="$ol_LIBS"
13990         
13991 fi
13992
13993 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13994
13995         if test $ol_cv_pthread_lpthread = yes ; then
13996                 ol_link_pthreads="-lpthread"
13997                 ol_link_threads=posix
13998         fi
13999 fi
14000
14001                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14002 if test "$ol_link_threads" = no ; then
14003         # try -lc_r
14004         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14005 echo "configure:14006: checking for pthread link with -lc_r" >&5
14006 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14007   echo $ac_n "(cached) $ac_c" 1>&6
14008 else
14009   
14010                 # save the flags
14011                 ol_LIBS="$LIBS"
14012                 LIBS="-lc_r $LIBS"
14013
14014                 if test "$cross_compiling" = yes; then
14015   cat > conftest.$ac_ext <<EOF
14016 #line 14017 "configure"
14017 #include "confdefs.h"
14018 /* pthread test headers */
14019 #include <pthread.h>
14020 #ifndef NULL
14021 #define NULL (void*)0
14022 #endif
14023
14024 static void *task(p)
14025         void *p;
14026 {
14027         return (void *) (p == NULL);
14028 }
14029
14030 int main() {
14031
14032         /* pthread test function */
14033         pthread_t t;
14034         int status;
14035         int detach = 1;
14036
14037 #ifdef HAVE_PTHREADS_FINAL
14038         /* Final pthreads */
14039         pthread_attr_t attr;
14040
14041         status = pthread_attr_init(&attr);
14042         if( status ) return status;
14043
14044 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14045         if( !detach ) {
14046 #if defined( PTHREAD_CREATE_JOINABLE )
14047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14048 #else
14049                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14050 #endif
14051
14052 #ifdef PTHREAD_CREATE_DETACHED
14053         } else {
14054                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14055 #endif
14056         }
14057         if( status ) return status;
14058 #endif
14059
14060         status = pthread_create( &t, &attr, task, NULL );
14061         if( status ) return status;
14062
14063 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14064         if( detach ) {
14065                 /* give thread a chance to complete */
14066                 /* it should remain joinable and hence detachable */
14067                 sleep( 1 );
14068
14069                 status = pthread_detach( t );
14070                 if( status ) return status;
14071         }
14072 #endif
14073
14074 #else
14075         /* Draft 4 pthreads */
14076         status = pthread_create( &t, pthread_attr_default, task, NULL );
14077         if( status ) return status;
14078
14079         if( detach ) {
14080                 /* give thread a chance to complete */
14081                 /* it should remain joinable and hence detachable */
14082                 sleep( 1 );
14083
14084                 status = pthread_detach( &t );
14085                 if( status ) return status;
14086         }
14087 #endif
14088
14089 #ifdef HAVE_LINUX_THREADS
14090         pthread_kill_other_threads_np();
14091 #endif
14092
14093         return 0;
14094
14095 ; return 0; }
14096 EOF
14097 if { (eval echo configure:14098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14098   rm -rf conftest*
14099   ol_cv_pthread_lc_r=yes
14100 else
14101   echo "configure: failed program was:" >&5
14102   cat conftest.$ac_ext >&5
14103   rm -rf conftest*
14104   ol_cv_pthread_lc_r=no
14105 fi
14106 rm -f conftest*
14107 else
14108   cat > conftest.$ac_ext <<EOF
14109 #line 14110 "configure"
14110 #include "confdefs.h"
14111 /* pthread test headers */
14112 #include <pthread.h>
14113 #ifndef NULL
14114 #define NULL (void*)0
14115 #endif
14116
14117 static void *task(p)
14118         void *p;
14119 {
14120         return (void *) (p == NULL);
14121 }
14122
14123
14124 int main(argc, argv)
14125         int argc;
14126         char **argv;
14127 {
14128
14129         /* pthread test function */
14130         pthread_t t;
14131         int status;
14132         int detach = 1;
14133
14134 #ifdef HAVE_PTHREADS_FINAL
14135         /* Final pthreads */
14136         pthread_attr_t attr;
14137
14138         status = pthread_attr_init(&attr);
14139         if( status ) return status;
14140
14141 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14142         if( !detach ) {
14143 #if defined( PTHREAD_CREATE_JOINABLE )
14144                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14145 #else
14146                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14147 #endif
14148
14149 #ifdef PTHREAD_CREATE_DETACHED
14150         } else {
14151                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14152 #endif
14153         }
14154         if( status ) return status;
14155 #endif
14156
14157         status = pthread_create( &t, &attr, task, NULL );
14158         if( status ) return status;
14159
14160 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14161         if( detach ) {
14162                 /* give thread a chance to complete */
14163                 /* it should remain joinable and hence detachable */
14164                 sleep( 1 );
14165
14166                 status = pthread_detach( t );
14167                 if( status ) return status;
14168         }
14169 #endif
14170
14171 #else
14172         /* Draft 4 pthreads */
14173         status = pthread_create( &t, pthread_attr_default, task, NULL );
14174         if( status ) return status;
14175
14176         if( detach ) {
14177                 /* give thread a chance to complete */
14178                 /* it should remain joinable and hence detachable */
14179                 sleep( 1 );
14180
14181                 status = pthread_detach( &t );
14182                 if( status ) return status;
14183         }
14184 #endif
14185
14186 #ifdef HAVE_LINUX_THREADS
14187         pthread_kill_other_threads_np();
14188 #endif
14189
14190         return 0;
14191
14192 }
14193
14194 EOF
14195 if { (eval echo configure:14196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14196 then
14197   ol_cv_pthread_lc_r=yes
14198 else
14199   echo "configure: failed program was:" >&5
14200   cat conftest.$ac_ext >&5
14201   rm -fr conftest*
14202   ol_cv_pthread_lc_r=no
14203 fi
14204 rm -fr conftest*
14205 fi
14206
14207
14208                 # restore the LIBS
14209                 LIBS="$ol_LIBS"
14210         
14211 fi
14212
14213 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14214
14215         if test $ol_cv_pthread_lc_r = yes ; then
14216                 ol_link_pthreads="-lc_r"
14217                 ol_link_threads=posix
14218         fi
14219 fi
14220
14221
14222                 # Pthread try link: -threads (ol_cv_pthread_threads)
14223 if test "$ol_link_threads" = no ; then
14224         # try -threads
14225         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14226 echo "configure:14227: checking for pthread link with -threads" >&5
14227 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14228   echo $ac_n "(cached) $ac_c" 1>&6
14229 else
14230   
14231                 # save the flags
14232                 ol_LIBS="$LIBS"
14233                 LIBS="-threads $LIBS"
14234
14235                 if test "$cross_compiling" = yes; then
14236   cat > conftest.$ac_ext <<EOF
14237 #line 14238 "configure"
14238 #include "confdefs.h"
14239 /* pthread test headers */
14240 #include <pthread.h>
14241 #ifndef NULL
14242 #define NULL (void*)0
14243 #endif
14244
14245 static void *task(p)
14246         void *p;
14247 {
14248         return (void *) (p == NULL);
14249 }
14250
14251 int main() {
14252
14253         /* pthread test function */
14254         pthread_t t;
14255         int status;
14256         int detach = 1;
14257
14258 #ifdef HAVE_PTHREADS_FINAL
14259         /* Final pthreads */
14260         pthread_attr_t attr;
14261
14262         status = pthread_attr_init(&attr);
14263         if( status ) return status;
14264
14265 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14266         if( !detach ) {
14267 #if defined( PTHREAD_CREATE_JOINABLE )
14268                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14269 #else
14270                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14271 #endif
14272
14273 #ifdef PTHREAD_CREATE_DETACHED
14274         } else {
14275                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14276 #endif
14277         }
14278         if( status ) return status;
14279 #endif
14280
14281         status = pthread_create( &t, &attr, task, NULL );
14282         if( status ) return status;
14283
14284 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14285         if( detach ) {
14286                 /* give thread a chance to complete */
14287                 /* it should remain joinable and hence detachable */
14288                 sleep( 1 );
14289
14290                 status = pthread_detach( t );
14291                 if( status ) return status;
14292         }
14293 #endif
14294
14295 #else
14296         /* Draft 4 pthreads */
14297         status = pthread_create( &t, pthread_attr_default, task, NULL );
14298         if( status ) return status;
14299
14300         if( detach ) {
14301                 /* give thread a chance to complete */
14302                 /* it should remain joinable and hence detachable */
14303                 sleep( 1 );
14304
14305                 status = pthread_detach( &t );
14306                 if( status ) return status;
14307         }
14308 #endif
14309
14310 #ifdef HAVE_LINUX_THREADS
14311         pthread_kill_other_threads_np();
14312 #endif
14313
14314         return 0;
14315
14316 ; return 0; }
14317 EOF
14318 if { (eval echo configure:14319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14319   rm -rf conftest*
14320   ol_cv_pthread_threads=yes
14321 else
14322   echo "configure: failed program was:" >&5
14323   cat conftest.$ac_ext >&5
14324   rm -rf conftest*
14325   ol_cv_pthread_threads=no
14326 fi
14327 rm -f conftest*
14328 else
14329   cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 /* pthread test headers */
14333 #include <pthread.h>
14334 #ifndef NULL
14335 #define NULL (void*)0
14336 #endif
14337
14338 static void *task(p)
14339         void *p;
14340 {
14341         return (void *) (p == NULL);
14342 }
14343
14344
14345 int main(argc, argv)
14346         int argc;
14347         char **argv;
14348 {
14349
14350         /* pthread test function */
14351         pthread_t t;
14352         int status;
14353         int detach = 1;
14354
14355 #ifdef HAVE_PTHREADS_FINAL
14356         /* Final pthreads */
14357         pthread_attr_t attr;
14358
14359         status = pthread_attr_init(&attr);
14360         if( status ) return status;
14361
14362 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14363         if( !detach ) {
14364 #if defined( PTHREAD_CREATE_JOINABLE )
14365                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14366 #else
14367                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14368 #endif
14369
14370 #ifdef PTHREAD_CREATE_DETACHED
14371         } else {
14372                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14373 #endif
14374         }
14375         if( status ) return status;
14376 #endif
14377
14378         status = pthread_create( &t, &attr, task, NULL );
14379         if( status ) return status;
14380
14381 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14382         if( detach ) {
14383                 /* give thread a chance to complete */
14384                 /* it should remain joinable and hence detachable */
14385                 sleep( 1 );
14386
14387                 status = pthread_detach( t );
14388                 if( status ) return status;
14389         }
14390 #endif
14391
14392 #else
14393         /* Draft 4 pthreads */
14394         status = pthread_create( &t, pthread_attr_default, task, NULL );
14395         if( status ) return status;
14396
14397         if( detach ) {
14398                 /* give thread a chance to complete */
14399                 /* it should remain joinable and hence detachable */
14400                 sleep( 1 );
14401
14402                 status = pthread_detach( &t );
14403                 if( status ) return status;
14404         }
14405 #endif
14406
14407 #ifdef HAVE_LINUX_THREADS
14408         pthread_kill_other_threads_np();
14409 #endif
14410
14411         return 0;
14412
14413 }
14414
14415 EOF
14416 if { (eval echo configure:14417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14417 then
14418   ol_cv_pthread_threads=yes
14419 else
14420   echo "configure: failed program was:" >&5
14421   cat conftest.$ac_ext >&5
14422   rm -fr conftest*
14423   ol_cv_pthread_threads=no
14424 fi
14425 rm -fr conftest*
14426 fi
14427
14428
14429                 # restore the LIBS
14430                 LIBS="$ol_LIBS"
14431         
14432 fi
14433
14434 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14435
14436         if test $ol_cv_pthread_threads = yes ; then
14437                 ol_link_pthreads="-threads"
14438                 ol_link_threads=posix
14439         fi
14440 fi
14441
14442
14443                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14444 if test "$ol_link_threads" = no ; then
14445         # try -lpthreads -lmach -lexc -lc_r
14446         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14447 echo "configure:14448: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14448 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14449   echo $ac_n "(cached) $ac_c" 1>&6
14450 else
14451   
14452                 # save the flags
14453                 ol_LIBS="$LIBS"
14454                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14455
14456                 if test "$cross_compiling" = yes; then
14457   cat > conftest.$ac_ext <<EOF
14458 #line 14459 "configure"
14459 #include "confdefs.h"
14460 /* pthread test headers */
14461 #include <pthread.h>
14462 #ifndef NULL
14463 #define NULL (void*)0
14464 #endif
14465
14466 static void *task(p)
14467         void *p;
14468 {
14469         return (void *) (p == NULL);
14470 }
14471
14472 int main() {
14473
14474         /* pthread test function */
14475         pthread_t t;
14476         int status;
14477         int detach = 1;
14478
14479 #ifdef HAVE_PTHREADS_FINAL
14480         /* Final pthreads */
14481         pthread_attr_t attr;
14482
14483         status = pthread_attr_init(&attr);
14484         if( status ) return status;
14485
14486 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14487         if( !detach ) {
14488 #if defined( PTHREAD_CREATE_JOINABLE )
14489                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14490 #else
14491                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14492 #endif
14493
14494 #ifdef PTHREAD_CREATE_DETACHED
14495         } else {
14496                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14497 #endif
14498         }
14499         if( status ) return status;
14500 #endif
14501
14502         status = pthread_create( &t, &attr, task, NULL );
14503         if( status ) return status;
14504
14505 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14506         if( detach ) {
14507                 /* give thread a chance to complete */
14508                 /* it should remain joinable and hence detachable */
14509                 sleep( 1 );
14510
14511                 status = pthread_detach( t );
14512                 if( status ) return status;
14513         }
14514 #endif
14515
14516 #else
14517         /* Draft 4 pthreads */
14518         status = pthread_create( &t, pthread_attr_default, task, NULL );
14519         if( status ) return status;
14520
14521         if( detach ) {
14522                 /* give thread a chance to complete */
14523                 /* it should remain joinable and hence detachable */
14524                 sleep( 1 );
14525
14526                 status = pthread_detach( &t );
14527                 if( status ) return status;
14528         }
14529 #endif
14530
14531 #ifdef HAVE_LINUX_THREADS
14532         pthread_kill_other_threads_np();
14533 #endif
14534
14535         return 0;
14536
14537 ; return 0; }
14538 EOF
14539 if { (eval echo configure:14540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14540   rm -rf conftest*
14541   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14542 else
14543   echo "configure: failed program was:" >&5
14544   cat conftest.$ac_ext >&5
14545   rm -rf conftest*
14546   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14547 fi
14548 rm -f conftest*
14549 else
14550   cat > conftest.$ac_ext <<EOF
14551 #line 14552 "configure"
14552 #include "confdefs.h"
14553 /* pthread test headers */
14554 #include <pthread.h>
14555 #ifndef NULL
14556 #define NULL (void*)0
14557 #endif
14558
14559 static void *task(p)
14560         void *p;
14561 {
14562         return (void *) (p == NULL);
14563 }
14564
14565
14566 int main(argc, argv)
14567         int argc;
14568         char **argv;
14569 {
14570
14571         /* pthread test function */
14572         pthread_t t;
14573         int status;
14574         int detach = 1;
14575
14576 #ifdef HAVE_PTHREADS_FINAL
14577         /* Final pthreads */
14578         pthread_attr_t attr;
14579
14580         status = pthread_attr_init(&attr);
14581         if( status ) return status;
14582
14583 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14584         if( !detach ) {
14585 #if defined( PTHREAD_CREATE_JOINABLE )
14586                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14587 #else
14588                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14589 #endif
14590
14591 #ifdef PTHREAD_CREATE_DETACHED
14592         } else {
14593                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14594 #endif
14595         }
14596         if( status ) return status;
14597 #endif
14598
14599         status = pthread_create( &t, &attr, task, NULL );
14600         if( status ) return status;
14601
14602 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14603         if( detach ) {
14604                 /* give thread a chance to complete */
14605                 /* it should remain joinable and hence detachable */
14606                 sleep( 1 );
14607
14608                 status = pthread_detach( t );
14609                 if( status ) return status;
14610         }
14611 #endif
14612
14613 #else
14614         /* Draft 4 pthreads */
14615         status = pthread_create( &t, pthread_attr_default, task, NULL );
14616         if( status ) return status;
14617
14618         if( detach ) {
14619                 /* give thread a chance to complete */
14620                 /* it should remain joinable and hence detachable */
14621                 sleep( 1 );
14622
14623                 status = pthread_detach( &t );
14624                 if( status ) return status;
14625         }
14626 #endif
14627
14628 #ifdef HAVE_LINUX_THREADS
14629         pthread_kill_other_threads_np();
14630 #endif
14631
14632         return 0;
14633
14634 }
14635
14636 EOF
14637 if { (eval echo configure:14638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14638 then
14639   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14640 else
14641   echo "configure: failed program was:" >&5
14642   cat conftest.$ac_ext >&5
14643   rm -fr conftest*
14644   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14645 fi
14646 rm -fr conftest*
14647 fi
14648
14649
14650                 # restore the LIBS
14651                 LIBS="$ol_LIBS"
14652         
14653 fi
14654
14655 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14656
14657         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14658                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14659                 ol_link_threads=posix
14660         fi
14661 fi
14662
14663                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14664 if test "$ol_link_threads" = no ; then
14665         # try -lpthreads -lmach -lexc
14666         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14667 echo "configure:14668: checking for pthread link with -lpthreads -lmach -lexc" >&5
14668 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14669   echo $ac_n "(cached) $ac_c" 1>&6
14670 else
14671   
14672                 # save the flags
14673                 ol_LIBS="$LIBS"
14674                 LIBS="-lpthreads -lmach -lexc $LIBS"
14675
14676                 if test "$cross_compiling" = yes; then
14677   cat > conftest.$ac_ext <<EOF
14678 #line 14679 "configure"
14679 #include "confdefs.h"
14680 /* pthread test headers */
14681 #include <pthread.h>
14682 #ifndef NULL
14683 #define NULL (void*)0
14684 #endif
14685
14686 static void *task(p)
14687         void *p;
14688 {
14689         return (void *) (p == NULL);
14690 }
14691
14692 int main() {
14693
14694         /* pthread test function */
14695         pthread_t t;
14696         int status;
14697         int detach = 1;
14698
14699 #ifdef HAVE_PTHREADS_FINAL
14700         /* Final pthreads */
14701         pthread_attr_t attr;
14702
14703         status = pthread_attr_init(&attr);
14704         if( status ) return status;
14705
14706 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14707         if( !detach ) {
14708 #if defined( PTHREAD_CREATE_JOINABLE )
14709                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14710 #else
14711                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14712 #endif
14713
14714 #ifdef PTHREAD_CREATE_DETACHED
14715         } else {
14716                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14717 #endif
14718         }
14719         if( status ) return status;
14720 #endif
14721
14722         status = pthread_create( &t, &attr, task, NULL );
14723         if( status ) return status;
14724
14725 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14726         if( detach ) {
14727                 /* give thread a chance to complete */
14728                 /* it should remain joinable and hence detachable */
14729                 sleep( 1 );
14730
14731                 status = pthread_detach( t );
14732                 if( status ) return status;
14733         }
14734 #endif
14735
14736 #else
14737         /* Draft 4 pthreads */
14738         status = pthread_create( &t, pthread_attr_default, task, NULL );
14739         if( status ) return status;
14740
14741         if( detach ) {
14742                 /* give thread a chance to complete */
14743                 /* it should remain joinable and hence detachable */
14744                 sleep( 1 );
14745
14746                 status = pthread_detach( &t );
14747                 if( status ) return status;
14748         }
14749 #endif
14750
14751 #ifdef HAVE_LINUX_THREADS
14752         pthread_kill_other_threads_np();
14753 #endif
14754
14755         return 0;
14756
14757 ; return 0; }
14758 EOF
14759 if { (eval echo configure:14760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14760   rm -rf conftest*
14761   ol_cv_pthread_lpthreads_lmach_lexc=yes
14762 else
14763   echo "configure: failed program was:" >&5
14764   cat conftest.$ac_ext >&5
14765   rm -rf conftest*
14766   ol_cv_pthread_lpthreads_lmach_lexc=no
14767 fi
14768 rm -f conftest*
14769 else
14770   cat > conftest.$ac_ext <<EOF
14771 #line 14772 "configure"
14772 #include "confdefs.h"
14773 /* pthread test headers */
14774 #include <pthread.h>
14775 #ifndef NULL
14776 #define NULL (void*)0
14777 #endif
14778
14779 static void *task(p)
14780         void *p;
14781 {
14782         return (void *) (p == NULL);
14783 }
14784
14785
14786 int main(argc, argv)
14787         int argc;
14788         char **argv;
14789 {
14790
14791         /* pthread test function */
14792         pthread_t t;
14793         int status;
14794         int detach = 1;
14795
14796 #ifdef HAVE_PTHREADS_FINAL
14797         /* Final pthreads */
14798         pthread_attr_t attr;
14799
14800         status = pthread_attr_init(&attr);
14801         if( status ) return status;
14802
14803 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14804         if( !detach ) {
14805 #if defined( PTHREAD_CREATE_JOINABLE )
14806                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14807 #else
14808                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14809 #endif
14810
14811 #ifdef PTHREAD_CREATE_DETACHED
14812         } else {
14813                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14814 #endif
14815         }
14816         if( status ) return status;
14817 #endif
14818
14819         status = pthread_create( &t, &attr, task, NULL );
14820         if( status ) return status;
14821
14822 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14823         if( detach ) {
14824                 /* give thread a chance to complete */
14825                 /* it should remain joinable and hence detachable */
14826                 sleep( 1 );
14827
14828                 status = pthread_detach( t );
14829                 if( status ) return status;
14830         }
14831 #endif
14832
14833 #else
14834         /* Draft 4 pthreads */
14835         status = pthread_create( &t, pthread_attr_default, task, NULL );
14836         if( status ) return status;
14837
14838         if( detach ) {
14839                 /* give thread a chance to complete */
14840                 /* it should remain joinable and hence detachable */
14841                 sleep( 1 );
14842
14843                 status = pthread_detach( &t );
14844                 if( status ) return status;
14845         }
14846 #endif
14847
14848 #ifdef HAVE_LINUX_THREADS
14849         pthread_kill_other_threads_np();
14850 #endif
14851
14852         return 0;
14853
14854 }
14855
14856 EOF
14857 if { (eval echo configure:14858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14858 then
14859   ol_cv_pthread_lpthreads_lmach_lexc=yes
14860 else
14861   echo "configure: failed program was:" >&5
14862   cat conftest.$ac_ext >&5
14863   rm -fr conftest*
14864   ol_cv_pthread_lpthreads_lmach_lexc=no
14865 fi
14866 rm -fr conftest*
14867 fi
14868
14869
14870                 # restore the LIBS
14871                 LIBS="$ol_LIBS"
14872         
14873 fi
14874
14875 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14876
14877         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14878                 ol_link_pthreads="-lpthreads -lmach -lexc"
14879                 ol_link_threads=posix
14880         fi
14881 fi
14882
14883                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14884 if test "$ol_link_threads" = no ; then
14885         # try -lpthreads -lexc
14886         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14887 echo "configure:14888: checking for pthread link with -lpthreads -lexc" >&5
14888 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14889   echo $ac_n "(cached) $ac_c" 1>&6
14890 else
14891   
14892                 # save the flags
14893                 ol_LIBS="$LIBS"
14894                 LIBS="-lpthreads -lexc $LIBS"
14895
14896                 if test "$cross_compiling" = yes; then
14897   cat > conftest.$ac_ext <<EOF
14898 #line 14899 "configure"
14899 #include "confdefs.h"
14900 /* pthread test headers */
14901 #include <pthread.h>
14902 #ifndef NULL
14903 #define NULL (void*)0
14904 #endif
14905
14906 static void *task(p)
14907         void *p;
14908 {
14909         return (void *) (p == NULL);
14910 }
14911
14912 int main() {
14913
14914         /* pthread test function */
14915         pthread_t t;
14916         int status;
14917         int detach = 1;
14918
14919 #ifdef HAVE_PTHREADS_FINAL
14920         /* Final pthreads */
14921         pthread_attr_t attr;
14922
14923         status = pthread_attr_init(&attr);
14924         if( status ) return status;
14925
14926 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14927         if( !detach ) {
14928 #if defined( PTHREAD_CREATE_JOINABLE )
14929                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14930 #else
14931                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14932 #endif
14933
14934 #ifdef PTHREAD_CREATE_DETACHED
14935         } else {
14936                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14937 #endif
14938         }
14939         if( status ) return status;
14940 #endif
14941
14942         status = pthread_create( &t, &attr, task, NULL );
14943         if( status ) return status;
14944
14945 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14946         if( detach ) {
14947                 /* give thread a chance to complete */
14948                 /* it should remain joinable and hence detachable */
14949                 sleep( 1 );
14950
14951                 status = pthread_detach( t );
14952                 if( status ) return status;
14953         }
14954 #endif
14955
14956 #else
14957         /* Draft 4 pthreads */
14958         status = pthread_create( &t, pthread_attr_default, task, NULL );
14959         if( status ) return status;
14960
14961         if( detach ) {
14962                 /* give thread a chance to complete */
14963                 /* it should remain joinable and hence detachable */
14964                 sleep( 1 );
14965
14966                 status = pthread_detach( &t );
14967                 if( status ) return status;
14968         }
14969 #endif
14970
14971 #ifdef HAVE_LINUX_THREADS
14972         pthread_kill_other_threads_np();
14973 #endif
14974
14975         return 0;
14976
14977 ; return 0; }
14978 EOF
14979 if { (eval echo configure:14980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14980   rm -rf conftest*
14981   ol_cv_pthread_lpthreads_lexc=yes
14982 else
14983   echo "configure: failed program was:" >&5
14984   cat conftest.$ac_ext >&5
14985   rm -rf conftest*
14986   ol_cv_pthread_lpthreads_lexc=no
14987 fi
14988 rm -f conftest*
14989 else
14990   cat > conftest.$ac_ext <<EOF
14991 #line 14992 "configure"
14992 #include "confdefs.h"
14993 /* pthread test headers */
14994 #include <pthread.h>
14995 #ifndef NULL
14996 #define NULL (void*)0
14997 #endif
14998
14999 static void *task(p)
15000         void *p;
15001 {
15002         return (void *) (p == NULL);
15003 }
15004
15005
15006 int main(argc, argv)
15007         int argc;
15008         char **argv;
15009 {
15010
15011         /* pthread test function */
15012         pthread_t t;
15013         int status;
15014         int detach = 1;
15015
15016 #ifdef HAVE_PTHREADS_FINAL
15017         /* Final pthreads */
15018         pthread_attr_t attr;
15019
15020         status = pthread_attr_init(&attr);
15021         if( status ) return status;
15022
15023 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15024         if( !detach ) {
15025 #if defined( PTHREAD_CREATE_JOINABLE )
15026                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15027 #else
15028                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15029 #endif
15030
15031 #ifdef PTHREAD_CREATE_DETACHED
15032         } else {
15033                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15034 #endif
15035         }
15036         if( status ) return status;
15037 #endif
15038
15039         status = pthread_create( &t, &attr, task, NULL );
15040         if( status ) return status;
15041
15042 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15043         if( detach ) {
15044                 /* give thread a chance to complete */
15045                 /* it should remain joinable and hence detachable */
15046                 sleep( 1 );
15047
15048                 status = pthread_detach( t );
15049                 if( status ) return status;
15050         }
15051 #endif
15052
15053 #else
15054         /* Draft 4 pthreads */
15055         status = pthread_create( &t, pthread_attr_default, task, NULL );
15056         if( status ) return status;
15057
15058         if( detach ) {
15059                 /* give thread a chance to complete */
15060                 /* it should remain joinable and hence detachable */
15061                 sleep( 1 );
15062
15063                 status = pthread_detach( &t );
15064                 if( status ) return status;
15065         }
15066 #endif
15067
15068 #ifdef HAVE_LINUX_THREADS
15069         pthread_kill_other_threads_np();
15070 #endif
15071
15072         return 0;
15073
15074 }
15075
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15078 then
15079   ol_cv_pthread_lpthreads_lexc=yes
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -fr conftest*
15084   ol_cv_pthread_lpthreads_lexc=no
15085 fi
15086 rm -fr conftest*
15087 fi
15088
15089
15090                 # restore the LIBS
15091                 LIBS="$ol_LIBS"
15092         
15093 fi
15094
15095 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15096
15097         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15098                 ol_link_pthreads="-lpthreads -lexc"
15099                 ol_link_threads=posix
15100         fi
15101 fi
15102
15103
15104                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15105 if test "$ol_link_threads" = no ; then
15106         # try -lpthreads
15107         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15108 echo "configure:15109: checking for pthread link with -lpthreads" >&5
15109 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15110   echo $ac_n "(cached) $ac_c" 1>&6
15111 else
15112   
15113                 # save the flags
15114                 ol_LIBS="$LIBS"
15115                 LIBS="-lpthreads $LIBS"
15116
15117                 if test "$cross_compiling" = yes; then
15118   cat > conftest.$ac_ext <<EOF
15119 #line 15120 "configure"
15120 #include "confdefs.h"
15121 /* pthread test headers */
15122 #include <pthread.h>
15123 #ifndef NULL
15124 #define NULL (void*)0
15125 #endif
15126
15127 static void *task(p)
15128         void *p;
15129 {
15130         return (void *) (p == NULL);
15131 }
15132
15133 int main() {
15134
15135         /* pthread test function */
15136         pthread_t t;
15137         int status;
15138         int detach = 1;
15139
15140 #ifdef HAVE_PTHREADS_FINAL
15141         /* Final pthreads */
15142         pthread_attr_t attr;
15143
15144         status = pthread_attr_init(&attr);
15145         if( status ) return status;
15146
15147 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15148         if( !detach ) {
15149 #if defined( PTHREAD_CREATE_JOINABLE )
15150                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15151 #else
15152                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15153 #endif
15154
15155 #ifdef PTHREAD_CREATE_DETACHED
15156         } else {
15157                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15158 #endif
15159         }
15160         if( status ) return status;
15161 #endif
15162
15163         status = pthread_create( &t, &attr, task, NULL );
15164         if( status ) return status;
15165
15166 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15167         if( detach ) {
15168                 /* give thread a chance to complete */
15169                 /* it should remain joinable and hence detachable */
15170                 sleep( 1 );
15171
15172                 status = pthread_detach( t );
15173                 if( status ) return status;
15174         }
15175 #endif
15176
15177 #else
15178         /* Draft 4 pthreads */
15179         status = pthread_create( &t, pthread_attr_default, task, NULL );
15180         if( status ) return status;
15181
15182         if( detach ) {
15183                 /* give thread a chance to complete */
15184                 /* it should remain joinable and hence detachable */
15185                 sleep( 1 );
15186
15187                 status = pthread_detach( &t );
15188                 if( status ) return status;
15189         }
15190 #endif
15191
15192 #ifdef HAVE_LINUX_THREADS
15193         pthread_kill_other_threads_np();
15194 #endif
15195
15196         return 0;
15197
15198 ; return 0; }
15199 EOF
15200 if { (eval echo configure:15201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15201   rm -rf conftest*
15202   ol_cv_pthread_lib_lpthreads=yes
15203 else
15204   echo "configure: failed program was:" >&5
15205   cat conftest.$ac_ext >&5
15206   rm -rf conftest*
15207   ol_cv_pthread_lib_lpthreads=no
15208 fi
15209 rm -f conftest*
15210 else
15211   cat > conftest.$ac_ext <<EOF
15212 #line 15213 "configure"
15213 #include "confdefs.h"
15214 /* pthread test headers */
15215 #include <pthread.h>
15216 #ifndef NULL
15217 #define NULL (void*)0
15218 #endif
15219
15220 static void *task(p)
15221         void *p;
15222 {
15223         return (void *) (p == NULL);
15224 }
15225
15226
15227 int main(argc, argv)
15228         int argc;
15229         char **argv;
15230 {
15231
15232         /* pthread test function */
15233         pthread_t t;
15234         int status;
15235         int detach = 1;
15236
15237 #ifdef HAVE_PTHREADS_FINAL
15238         /* Final pthreads */
15239         pthread_attr_t attr;
15240
15241         status = pthread_attr_init(&attr);
15242         if( status ) return status;
15243
15244 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15245         if( !detach ) {
15246 #if defined( PTHREAD_CREATE_JOINABLE )
15247                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15248 #else
15249                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15250 #endif
15251
15252 #ifdef PTHREAD_CREATE_DETACHED
15253         } else {
15254                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15255 #endif
15256         }
15257         if( status ) return status;
15258 #endif
15259
15260         status = pthread_create( &t, &attr, task, NULL );
15261         if( status ) return status;
15262
15263 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15264         if( detach ) {
15265                 /* give thread a chance to complete */
15266                 /* it should remain joinable and hence detachable */
15267                 sleep( 1 );
15268
15269                 status = pthread_detach( t );
15270                 if( status ) return status;
15271         }
15272 #endif
15273
15274 #else
15275         /* Draft 4 pthreads */
15276         status = pthread_create( &t, pthread_attr_default, task, NULL );
15277         if( status ) return status;
15278
15279         if( detach ) {
15280                 /* give thread a chance to complete */
15281                 /* it should remain joinable and hence detachable */
15282                 sleep( 1 );
15283
15284                 status = pthread_detach( &t );
15285                 if( status ) return status;
15286         }
15287 #endif
15288
15289 #ifdef HAVE_LINUX_THREADS
15290         pthread_kill_other_threads_np();
15291 #endif
15292
15293         return 0;
15294
15295 }
15296
15297 EOF
15298 if { (eval echo configure:15299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15299 then
15300   ol_cv_pthread_lib_lpthreads=yes
15301 else
15302   echo "configure: failed program was:" >&5
15303   cat conftest.$ac_ext >&5
15304   rm -fr conftest*
15305   ol_cv_pthread_lib_lpthreads=no
15306 fi
15307 rm -fr conftest*
15308 fi
15309
15310
15311                 # restore the LIBS
15312                 LIBS="$ol_LIBS"
15313         
15314 fi
15315
15316 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15317
15318         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15319                 ol_link_pthreads="-lpthreads"
15320                 ol_link_threads=posix
15321         fi
15322 fi
15323
15324
15325                 if test $ol_link_threads != no ; then
15326                         cat >> confdefs.h <<\EOF
15327 #define HAVE_PTHREADS 1
15328 EOF
15329
15330
15331                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15332
15333                                                 save_CPPFLAGS="$CPPFLAGS"
15334                         save_LIBS="$LIBS"
15335                         LIBS="$LTHREAD_LIBS $LIBS"
15336
15337                                                                                                 for ac_func in sched_yield pthread_yield
15338 do
15339 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15340 echo "configure:15341: checking for $ac_func" >&5
15341 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15342   echo $ac_n "(cached) $ac_c" 1>&6
15343 else
15344   cat > conftest.$ac_ext <<EOF
15345 #line 15346 "configure"
15346 #include "confdefs.h"
15347 /* System header to define __stub macros and hopefully few prototypes,
15348     which can conflict with char $ac_func(); below.  */
15349 #include <assert.h>
15350 /* Override any gcc2 internal prototype to avoid an error.  */
15351 /* We use char because int might match the return type of a gcc2
15352     builtin and then its argument prototype would still apply.  */
15353 char $ac_func();
15354 char (*f)();
15355
15356 int main() {
15357
15358 /* The GNU C library defines this for functions which it implements
15359     to always fail with ENOSYS.  Some functions are actually named
15360     something starting with __ and the normal name is an alias.  */
15361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15362 choke me
15363 #else
15364 f = $ac_func;
15365 #endif
15366
15367 ; return 0; }
15368 EOF
15369 if { (eval echo configure:15370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15370   rm -rf conftest*
15371   eval "ac_cv_func_$ac_func=yes"
15372 else
15373   echo "configure: failed program was:" >&5
15374   cat conftest.$ac_ext >&5
15375   rm -rf conftest*
15376   eval "ac_cv_func_$ac_func=no"
15377 fi
15378 rm -f conftest*
15379 fi
15380
15381 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15382   echo "$ac_t""yes" 1>&6
15383     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15384   cat >> confdefs.h <<EOF
15385 #define $ac_tr_func 1
15386 EOF
15387  
15388 else
15389   echo "$ac_t""no" 1>&6
15390 fi
15391 done
15392
15393
15394                         if test $ac_cv_func_sched_yield = no -a \
15395                                 $ac_cv_func_pthread_yield = no ; then
15396                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15397 echo "configure:15398: checking for sched_yield in -lrt" >&5
15398 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15400   echo $ac_n "(cached) $ac_c" 1>&6
15401 else
15402   ac_save_LIBS="$LIBS"
15403 LIBS="-lrt  $LIBS"
15404 cat > conftest.$ac_ext <<EOF
15405 #line 15406 "configure"
15406 #include "confdefs.h"
15407 /* Override any gcc2 internal prototype to avoid an error.  */
15408 /* We use char because int might match the return type of a gcc2
15409     builtin and then its argument prototype would still apply.  */
15410 char sched_yield();
15411
15412 int main() {
15413 sched_yield()
15414 ; return 0; }
15415 EOF
15416 if { (eval echo configure:15417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15417   rm -rf conftest*
15418   eval "ac_cv_lib_$ac_lib_var=yes"
15419 else
15420   echo "configure: failed program was:" >&5
15421   cat conftest.$ac_ext >&5
15422   rm -rf conftest*
15423   eval "ac_cv_lib_$ac_lib_var=no"
15424 fi
15425 rm -f conftest*
15426 LIBS="$ac_save_LIBS"
15427
15428 fi
15429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15430   echo "$ac_t""yes" 1>&6
15431   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15432                                         cat >> confdefs.h <<\EOF
15433 #define HAVE_SCHED_YIELD 1
15434 EOF
15435
15436                                         ac_cv_func_sched_yield=yes
15437 else
15438   echo "$ac_t""no" 1>&6
15439 ac_cv_func_sched_yield=no
15440 fi
15441
15442                         fi
15443                         if test $ac_cv_func_sched_yield = no -a \
15444                                 $ac_cv_func_pthread_yield = no ; then
15445                                                                                                 for ac_func in thr_yield
15446 do
15447 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15448 echo "configure:15449: checking for $ac_func" >&5
15449 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15450   echo $ac_n "(cached) $ac_c" 1>&6
15451 else
15452   cat > conftest.$ac_ext <<EOF
15453 #line 15454 "configure"
15454 #include "confdefs.h"
15455 /* System header to define __stub macros and hopefully few prototypes,
15456     which can conflict with char $ac_func(); below.  */
15457 #include <assert.h>
15458 /* Override any gcc2 internal prototype to avoid an error.  */
15459 /* We use char because int might match the return type of a gcc2
15460     builtin and then its argument prototype would still apply.  */
15461 char $ac_func();
15462 char (*f)();
15463
15464 int main() {
15465
15466 /* The GNU C library defines this for functions which it implements
15467     to always fail with ENOSYS.  Some functions are actually named
15468     something starting with __ and the normal name is an alias.  */
15469 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15470 choke me
15471 #else
15472 f = $ac_func;
15473 #endif
15474
15475 ; return 0; }
15476 EOF
15477 if { (eval echo configure:15478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15478   rm -rf conftest*
15479   eval "ac_cv_func_$ac_func=yes"
15480 else
15481   echo "configure: failed program was:" >&5
15482   cat conftest.$ac_ext >&5
15483   rm -rf conftest*
15484   eval "ac_cv_func_$ac_func=no"
15485 fi
15486 rm -f conftest*
15487 fi
15488
15489 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15490   echo "$ac_t""yes" 1>&6
15491     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15492   cat >> confdefs.h <<EOF
15493 #define $ac_tr_func 1
15494 EOF
15495  
15496 else
15497   echo "$ac_t""no" 1>&6
15498 fi
15499 done
15500
15501                         fi
15502                         if test $ac_cv_func_sched_yield = no -a \
15503                                 $ac_cv_func_pthread_yield = no -a \
15504                                 "$ac_cv_func_thr_yield" = no ; then
15505                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15506                         fi
15507
15508                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15509 do
15510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15511 echo "configure:15512: checking for $ac_func" >&5
15512 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15513   echo $ac_n "(cached) $ac_c" 1>&6
15514 else
15515   cat > conftest.$ac_ext <<EOF
15516 #line 15517 "configure"
15517 #include "confdefs.h"
15518 /* System header to define __stub macros and hopefully few prototypes,
15519     which can conflict with char $ac_func(); below.  */
15520 #include <assert.h>
15521 /* Override any gcc2 internal prototype to avoid an error.  */
15522 /* We use char because int might match the return type of a gcc2
15523     builtin and then its argument prototype would still apply.  */
15524 char $ac_func();
15525 char (*f)();
15526
15527 int main() {
15528
15529 /* The GNU C library defines this for functions which it implements
15530     to always fail with ENOSYS.  Some functions are actually named
15531     something starting with __ and the normal name is an alias.  */
15532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15533 choke me
15534 #else
15535 f = $ac_func;
15536 #endif
15537
15538 ; return 0; }
15539 EOF
15540 if { (eval echo configure:15541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15541   rm -rf conftest*
15542   eval "ac_cv_func_$ac_func=yes"
15543 else
15544   echo "configure: failed program was:" >&5
15545   cat conftest.$ac_ext >&5
15546   rm -rf conftest*
15547   eval "ac_cv_func_$ac_func=no"
15548 fi
15549 rm -f conftest*
15550 fi
15551
15552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15553   echo "$ac_t""yes" 1>&6
15554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15555   cat >> confdefs.h <<EOF
15556 #define $ac_tr_func 1
15557 EOF
15558  
15559 else
15560   echo "$ac_t""no" 1>&6
15561 fi
15562 done
15563
15564
15565                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15566 echo "configure:15567: checking for pthread_detach with <pthread.h>" >&5
15567 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15568   echo $ac_n "(cached) $ac_c" 1>&6
15569 else
15570   
15571                                                                 cat > conftest.$ac_ext <<EOF
15572 #line 15573 "configure"
15573 #include "confdefs.h"
15574
15575 #include <pthread.h>
15576 #ifndef NULL
15577 #define NULL (void*)0
15578 #endif
15579
15580 int main() {
15581 pthread_detach(NULL);
15582 ; return 0; }
15583 EOF
15584 if { (eval echo configure:15585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15585   rm -rf conftest*
15586   ol_cv_func_pthread_detach=yes
15587 else
15588   echo "configure: failed program was:" >&5
15589   cat conftest.$ac_ext >&5
15590   rm -rf conftest*
15591   ol_cv_func_pthread_detach=no
15592 fi
15593 rm -f conftest*
15594                         
15595 fi
15596
15597 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15598
15599                         if test $ol_cv_func_pthread_detach = no ; then
15600                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15601                         fi
15602
15603                         cat >> confdefs.h <<\EOF
15604 #define HAVE_PTHREAD_DETACH 1
15605 EOF
15606
15607
15608                                                 for ac_func in \
15609                                 pthread_setconcurrency \
15610                                 pthread_getconcurrency \
15611                                 thr_setconcurrency \
15612                                 thr_getconcurrency \
15613                         
15614 do
15615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15616 echo "configure:15617: checking for $ac_func" >&5
15617 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15618   echo $ac_n "(cached) $ac_c" 1>&6
15619 else
15620   cat > conftest.$ac_ext <<EOF
15621 #line 15622 "configure"
15622 #include "confdefs.h"
15623 /* System header to define __stub macros and hopefully few prototypes,
15624     which can conflict with char $ac_func(); below.  */
15625 #include <assert.h>
15626 /* Override any gcc2 internal prototype to avoid an error.  */
15627 /* We use char because int might match the return type of a gcc2
15628     builtin and then its argument prototype would still apply.  */
15629 char $ac_func();
15630 char (*f)();
15631
15632 int main() {
15633
15634 /* The GNU C library defines this for functions which it implements
15635     to always fail with ENOSYS.  Some functions are actually named
15636     something starting with __ and the normal name is an alias.  */
15637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15638 choke me
15639 #else
15640 f = $ac_func;
15641 #endif
15642
15643 ; return 0; }
15644 EOF
15645 if { (eval echo configure:15646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15646   rm -rf conftest*
15647   eval "ac_cv_func_$ac_func=yes"
15648 else
15649   echo "configure: failed program was:" >&5
15650   cat conftest.$ac_ext >&5
15651   rm -rf conftest*
15652   eval "ac_cv_func_$ac_func=no"
15653 fi
15654 rm -f conftest*
15655 fi
15656
15657 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15658   echo "$ac_t""yes" 1>&6
15659     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15660   cat >> confdefs.h <<EOF
15661 #define $ac_tr_func 1
15662 EOF
15663  
15664 else
15665   echo "$ac_t""no" 1>&6
15666 fi
15667 done
15668
15669
15670                         
15671         for ac_func in pthread_kill_other_threads_np
15672 do
15673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15674 echo "configure:15675: checking for $ac_func" >&5
15675 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   cat > conftest.$ac_ext <<EOF
15679 #line 15680 "configure"
15680 #include "confdefs.h"
15681 /* System header to define __stub macros and hopefully few prototypes,
15682     which can conflict with char $ac_func(); below.  */
15683 #include <assert.h>
15684 /* Override any gcc2 internal prototype to avoid an error.  */
15685 /* We use char because int might match the return type of a gcc2
15686     builtin and then its argument prototype would still apply.  */
15687 char $ac_func();
15688 char (*f)();
15689
15690 int main() {
15691
15692 /* The GNU C library defines this for functions which it implements
15693     to always fail with ENOSYS.  Some functions are actually named
15694     something starting with __ and the normal name is an alias.  */
15695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15696 choke me
15697 #else
15698 f = $ac_func;
15699 #endif
15700
15701 ; return 0; }
15702 EOF
15703 if { (eval echo configure:15704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15704   rm -rf conftest*
15705   eval "ac_cv_func_$ac_func=yes"
15706 else
15707   echo "configure: failed program was:" >&5
15708   cat conftest.$ac_ext >&5
15709   rm -rf conftest*
15710   eval "ac_cv_func_$ac_func=no"
15711 fi
15712 rm -f conftest*
15713 fi
15714
15715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15716   echo "$ac_t""yes" 1>&6
15717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15718   cat >> confdefs.h <<EOF
15719 #define $ac_tr_func 1
15720 EOF
15721  
15722 else
15723   echo "$ac_t""no" 1>&6
15724 fi
15725 done
15726
15727         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15728 echo "configure:15729: checking for LinuxThreads implementation" >&5
15729 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15730   echo $ac_n "(cached) $ac_c" 1>&6
15731 else
15732   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15733 fi
15734
15735 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15736
15737                         
15738         
15739         
15740         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15741 echo "configure:15742: checking for LinuxThreads consistency" >&5
15742 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15743   echo $ac_n "(cached) $ac_c" 1>&6
15744 else
15745   
15746                 if test $ol_cv_header_linux_threads = yes -a \
15747                         $ol_cv_sys_linux_threads = yes; then
15748                         ol_cv_linux_threads=yes
15749                 elif test $ol_cv_header_linux_threads = no -a \
15750                         $ol_cv_sys_linux_threads = no; then
15751                         ol_cv_linux_threads=no
15752                 else
15753                         ol_cv_linux_threads=error
15754                 fi
15755         
15756 fi
15757
15758 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15759
15760
15761                         if test $ol_cv_linux_threads = error; then
15762                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15763                         fi
15764
15765                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15766 echo "configure:15767: checking if pthread_create() works" >&5
15767 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15768   echo $ac_n "(cached) $ac_c" 1>&6
15769 else
15770   
15771                         if test "$cross_compiling" = yes; then
15772                                 ol_cv_pthread_create_works=yes
15773 else
15774   cat > conftest.$ac_ext <<EOF
15775 #line 15776 "configure"
15776 #include "confdefs.h"
15777 /* pthread test headers */
15778 #include <pthread.h>
15779 #ifndef NULL
15780 #define NULL (void*)0
15781 #endif
15782
15783 static void *task(p)
15784         void *p;
15785 {
15786         return (void *) (p == NULL);
15787 }
15788
15789
15790 int main(argc, argv)
15791         int argc;
15792         char **argv;
15793 {
15794
15795         /* pthread test function */
15796         pthread_t t;
15797         int status;
15798         int detach = 1;
15799
15800 #ifdef HAVE_PTHREADS_FINAL
15801         /* Final pthreads */
15802         pthread_attr_t attr;
15803
15804         status = pthread_attr_init(&attr);
15805         if( status ) return status;
15806
15807 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15808         if( !detach ) {
15809 #if defined( PTHREAD_CREATE_JOINABLE )
15810                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15811 #else
15812                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15813 #endif
15814
15815 #ifdef PTHREAD_CREATE_DETACHED
15816         } else {
15817                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15818 #endif
15819         }
15820         if( status ) return status;
15821 #endif
15822
15823         status = pthread_create( &t, &attr, task, NULL );
15824         if( status ) return status;
15825
15826 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15827         if( detach ) {
15828                 /* give thread a chance to complete */
15829                 /* it should remain joinable and hence detachable */
15830                 sleep( 1 );
15831
15832                 status = pthread_detach( t );
15833                 if( status ) return status;
15834         }
15835 #endif
15836
15837 #else
15838         /* Draft 4 pthreads */
15839         status = pthread_create( &t, pthread_attr_default, task, NULL );
15840         if( status ) return status;
15841
15842         if( detach ) {
15843                 /* give thread a chance to complete */
15844                 /* it should remain joinable and hence detachable */
15845                 sleep( 1 );
15846
15847                 status = pthread_detach( &t );
15848                 if( status ) return status;
15849         }
15850 #endif
15851
15852 #ifdef HAVE_LINUX_THREADS
15853         pthread_kill_other_threads_np();
15854 #endif
15855
15856         return 0;
15857
15858 }
15859
15860 EOF
15861 if { (eval echo configure:15862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15862 then
15863   ol_cv_pthread_create_works=yes
15864 else
15865   echo "configure: failed program was:" >&5
15866   cat conftest.$ac_ext >&5
15867   rm -fr conftest*
15868   ol_cv_pthread_create_works=no
15869 fi
15870 rm -fr conftest*
15871 fi
15872
15873 fi
15874
15875 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15876
15877                         if test $ol_cv_pthread_create_works = no ; then
15878                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15879                         fi
15880
15881                                                 if test $ol_with_yielding_select = auto ; then
15882                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15883 echo "configure:15884: checking if select yields when using pthreads" >&5
15884 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15885   echo $ac_n "(cached) $ac_c" 1>&6
15886 else
15887   
15888                                 if test "$cross_compiling" = yes; then
15889   ol_cv_pthread_select_yields=cross
15890 else
15891   cat > conftest.$ac_ext <<EOF
15892 #line 15893 "configure"
15893 #include "confdefs.h"
15894
15895 #include <sys/types.h>
15896 #include <sys/time.h>
15897 #include <unistd.h>
15898 #include <pthread.h>
15899 #ifndef NULL
15900 #define NULL (void*) 0
15901 #endif
15902
15903 static int fildes[2];
15904
15905 static void *task(p)
15906         void *p;
15907 {
15908         int i;
15909         struct timeval tv;
15910
15911         fd_set rfds;
15912
15913         tv.tv_sec=10;
15914         tv.tv_usec=0;
15915
15916         FD_ZERO(&rfds);
15917         FD_SET(fildes[0], &rfds);
15918
15919         /* we're not interested in any fds */
15920         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15921
15922         if(i < 0) {
15923                 perror("select");
15924                 exit(10);
15925         }
15926
15927         exit(0); /* if we exit here, the select blocked the whole process */
15928 }
15929
15930 int main(argc, argv)
15931         int argc;
15932         char **argv;
15933 {
15934         pthread_t t;
15935
15936         /* create a pipe to select */
15937         if(pipe(&fildes[0])) {
15938                 perror("select");
15939                 exit(1);
15940         }
15941
15942 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15943         (void) pthread_setconcurrency(2);
15944 #else
15945 #ifdef HAVE_THR_SETCONCURRENCY
15946         /* Set Solaris LWP concurrency to 2 */
15947         thr_setconcurrency(2);
15948 #endif
15949 #endif
15950
15951 #if HAVE_PTHREADS_D4
15952         pthread_create(&t, pthread_attr_default, task, NULL);
15953 #else
15954         pthread_create(&t, NULL, task, NULL);
15955 #endif
15956
15957 #if HAVE_SCHED_YIELD
15958         sched_yield();  /* make sure task runs first */
15959 #else
15960 #ifdef HAVE_PTHREAD_YIELD
15961         pthread_yield();        /* make sure task runs first */
15962 #endif
15963 #endif
15964
15965         exit(2);
15966 }
15967 EOF
15968 if { (eval echo configure:15969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15969 then
15970   ol_cv_pthread_select_yields=no
15971 else
15972   echo "configure: failed program was:" >&5
15973   cat conftest.$ac_ext >&5
15974   rm -fr conftest*
15975   ol_cv_pthread_select_yields=yes
15976 fi
15977 rm -fr conftest*
15978 fi
15979
15980 fi
15981
15982 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15983
15984                                 if test $ol_cv_pthread_select_yields = cross ; then
15985                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15986                                 fi
15987
15988                                 if test $ol_cv_pthread_select_yields = yes ; then
15989                                         ol_with_yielding_select=yes
15990                                 fi
15991                         fi
15992
15993                                                 CPPFLAGS="$save_CPPFLAGS"
15994                         LIBS="$save_LIBS"
15995                 else
15996                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15997                 fi
15998         fi
15999
16000         if test $ol_with_threads = posix ; then
16001                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16002         fi
16003 fi
16004
16005 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16006         -o $ol_with_threads = mach ; then
16007
16008                 for ac_hdr in mach/cthreads.h cthreads.h
16009 do
16010 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16011 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16012 echo "configure:16013: checking for $ac_hdr" >&5
16013 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16014   echo $ac_n "(cached) $ac_c" 1>&6
16015 else
16016   cat > conftest.$ac_ext <<EOF
16017 #line 16018 "configure"
16018 #include "confdefs.h"
16019 #include <$ac_hdr>
16020 EOF
16021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16022 { (eval echo configure:16023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16024 if test -z "$ac_err"; then
16025   rm -rf conftest*
16026   eval "ac_cv_header_$ac_safe=yes"
16027 else
16028   echo "$ac_err" >&5
16029   echo "configure: failed program was:" >&5
16030   cat conftest.$ac_ext >&5
16031   rm -rf conftest*
16032   eval "ac_cv_header_$ac_safe=no"
16033 fi
16034 rm -f conftest*
16035 fi
16036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16037   echo "$ac_t""yes" 1>&6
16038     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16039   cat >> confdefs.h <<EOF
16040 #define $ac_tr_hdr 1
16041 EOF
16042  
16043 else
16044   echo "$ac_t""no" 1>&6
16045 fi
16046 done
16047
16048         if test $ac_cv_header_mach_cthreads_h = yes ; then
16049                 ol_with_threads=found
16050
16051                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16052 echo "configure:16053: checking for cthread_fork" >&5
16053 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16054   echo $ac_n "(cached) $ac_c" 1>&6
16055 else
16056   cat > conftest.$ac_ext <<EOF
16057 #line 16058 "configure"
16058 #include "confdefs.h"
16059 /* System header to define __stub macros and hopefully few prototypes,
16060     which can conflict with char cthread_fork(); below.  */
16061 #include <assert.h>
16062 /* Override any gcc2 internal prototype to avoid an error.  */
16063 /* We use char because int might match the return type of a gcc2
16064     builtin and then its argument prototype would still apply.  */
16065 char cthread_fork();
16066 char (*f)();
16067
16068 int main() {
16069
16070 /* The GNU C library defines this for functions which it implements
16071     to always fail with ENOSYS.  Some functions are actually named
16072     something starting with __ and the normal name is an alias.  */
16073 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16074 choke me
16075 #else
16076 f = cthread_fork;
16077 #endif
16078
16079 ; return 0; }
16080 EOF
16081 if { (eval echo configure:16082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16082   rm -rf conftest*
16083   eval "ac_cv_func_cthread_fork=yes"
16084 else
16085   echo "configure: failed program was:" >&5
16086   cat conftest.$ac_ext >&5
16087   rm -rf conftest*
16088   eval "ac_cv_func_cthread_fork=no"
16089 fi
16090 rm -f conftest*
16091 fi
16092
16093 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16094   echo "$ac_t""yes" 1>&6
16095   ol_link_threads=yes
16096 else
16097   echo "$ac_t""no" 1>&6
16098 fi
16099
16100
16101                 if test $ol_link_threads = no ; then
16102                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16103 echo "configure:16104: checking for cthread_fork with -all_load" >&5
16104 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16105   echo $ac_n "(cached) $ac_c" 1>&6
16106 else
16107   
16108                                                                 save_LIBS="$LIBS"
16109                                 LIBS="-all_load $LIBS"
16110                                 cat > conftest.$ac_ext <<EOF
16111 #line 16112 "configure"
16112 #include "confdefs.h"
16113 #include <mach/cthreads.h>
16114 int main() {
16115
16116                                         cthread_fork((void *)0, (void *)0);
16117                                         
16118 ; return 0; }
16119 EOF
16120 if { (eval echo configure:16121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16121   rm -rf conftest*
16122   ol_cv_cthread_all_load=yes
16123 else
16124   echo "configure: failed program was:" >&5
16125   cat conftest.$ac_ext >&5
16126   rm -rf conftest*
16127   ol_cv_cthread_all_load=no
16128 fi
16129 rm -f conftest*
16130                                                                 LIBS="$save_LIBS"
16131                         
16132 fi
16133
16134 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16135
16136                         if test $ol_cv_cthread_all_load = yes ; then
16137                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16138                                 ol_link_threads=mach
16139                                 ol_with_threads=found
16140                         fi
16141                 fi
16142
16143         elif test $ac_cv_header_cthreads_h = yes ; then
16144                                 
16145                 ol_with_threads=found
16146  
16147                                 save_LIBS="$LIBS"
16148                 LIBS="$LIBS -lthreads"
16149                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16150 echo "configure:16151: checking for cthread_fork" >&5
16151 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16152   echo $ac_n "(cached) $ac_c" 1>&6
16153 else
16154   cat > conftest.$ac_ext <<EOF
16155 #line 16156 "configure"
16156 #include "confdefs.h"
16157 /* System header to define __stub macros and hopefully few prototypes,
16158     which can conflict with char cthread_fork(); below.  */
16159 #include <assert.h>
16160 /* Override any gcc2 internal prototype to avoid an error.  */
16161 /* We use char because int might match the return type of a gcc2
16162     builtin and then its argument prototype would still apply.  */
16163 char cthread_fork();
16164 char (*f)();
16165
16166 int main() {
16167
16168 /* The GNU C library defines this for functions which it implements
16169     to always fail with ENOSYS.  Some functions are actually named
16170     something starting with __ and the normal name is an alias.  */
16171 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16172 choke me
16173 #else
16174 f = cthread_fork;
16175 #endif
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   eval "ac_cv_func_cthread_fork=yes"
16182 else
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   eval "ac_cv_func_cthread_fork=no"
16187 fi
16188 rm -f conftest*
16189 fi
16190
16191 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16192   echo "$ac_t""yes" 1>&6
16193   ol_link_threads=yes
16194 else
16195   echo "$ac_t""no" 1>&6
16196 fi
16197
16198                 LIBS="$save_LIBS"
16199
16200                 if test $ol_link_threads = yes ; then
16201                         LTHREAD_LIBS="-lthreads"
16202                         ol_link_threads=mach
16203                         ol_with_threads=found
16204                 else
16205                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16206                 fi
16207
16208         elif test $ol_with_threads = mach ; then
16209                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16210         fi
16211
16212         if test $ol_link_threads = mach ; then
16213                 cat >> confdefs.h <<\EOF
16214 #define HAVE_MACH_CTHREADS 1
16215 EOF
16216
16217         elif test $ol_with_threads = found ; then
16218                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16219         fi
16220 fi
16221
16222 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16223         -o $ol_with_threads = pth ; then
16224
16225         for ac_hdr in pth.h
16226 do
16227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16229 echo "configure:16230: checking for $ac_hdr" >&5
16230 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16231   echo $ac_n "(cached) $ac_c" 1>&6
16232 else
16233   cat > conftest.$ac_ext <<EOF
16234 #line 16235 "configure"
16235 #include "confdefs.h"
16236 #include <$ac_hdr>
16237 EOF
16238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16239 { (eval echo configure:16240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16241 if test -z "$ac_err"; then
16242   rm -rf conftest*
16243   eval "ac_cv_header_$ac_safe=yes"
16244 else
16245   echo "$ac_err" >&5
16246   echo "configure: failed program was:" >&5
16247   cat conftest.$ac_ext >&5
16248   rm -rf conftest*
16249   eval "ac_cv_header_$ac_safe=no"
16250 fi
16251 rm -f conftest*
16252 fi
16253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16254   echo "$ac_t""yes" 1>&6
16255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16256   cat >> confdefs.h <<EOF
16257 #define $ac_tr_hdr 1
16258 EOF
16259  
16260 else
16261   echo "$ac_t""no" 1>&6
16262 fi
16263 done
16264
16265
16266         if test $ac_cv_header_pth_h = yes ; then
16267                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16268 echo "configure:16269: checking for pth_version in -lpth" >&5
16269 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16271   echo $ac_n "(cached) $ac_c" 1>&6
16272 else
16273   ac_save_LIBS="$LIBS"
16274 LIBS="-lpth  $LIBS"
16275 cat > conftest.$ac_ext <<EOF
16276 #line 16277 "configure"
16277 #include "confdefs.h"
16278 /* Override any gcc2 internal prototype to avoid an error.  */
16279 /* We use char because int might match the return type of a gcc2
16280     builtin and then its argument prototype would still apply.  */
16281 char pth_version();
16282
16283 int main() {
16284 pth_version()
16285 ; return 0; }
16286 EOF
16287 if { (eval echo configure:16288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16288   rm -rf conftest*
16289   eval "ac_cv_lib_$ac_lib_var=yes"
16290 else
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   eval "ac_cv_lib_$ac_lib_var=no"
16295 fi
16296 rm -f conftest*
16297 LIBS="$ac_save_LIBS"
16298
16299 fi
16300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16301   echo "$ac_t""yes" 1>&6
16302   have_pth=yes
16303 else
16304   echo "$ac_t""no" 1>&6
16305 have_pth=no
16306 fi
16307
16308
16309                 if test $have_pth = yes ; then
16310                         cat >> confdefs.h <<\EOF
16311 #define HAVE_GNU_PTH 1
16312 EOF
16313
16314                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16315                         ol_link_threads=pth
16316                         ol_with_threads=found
16317
16318                         if test $ol_with_yielding_select = auto ; then
16319                                 ol_with_yielding_select=yes
16320                         fi
16321                 fi
16322         fi
16323 fi
16324
16325 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16326         -o $ol_with_threads = lwp ; then
16327
16328                 for ac_hdr in thread.h synch.h
16329 do
16330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16332 echo "configure:16333: checking for $ac_hdr" >&5
16333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16334   echo $ac_n "(cached) $ac_c" 1>&6
16335 else
16336   cat > conftest.$ac_ext <<EOF
16337 #line 16338 "configure"
16338 #include "confdefs.h"
16339 #include <$ac_hdr>
16340 EOF
16341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16342 { (eval echo configure:16343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16344 if test -z "$ac_err"; then
16345   rm -rf conftest*
16346   eval "ac_cv_header_$ac_safe=yes"
16347 else
16348   echo "$ac_err" >&5
16349   echo "configure: failed program was:" >&5
16350   cat conftest.$ac_ext >&5
16351   rm -rf conftest*
16352   eval "ac_cv_header_$ac_safe=no"
16353 fi
16354 rm -f conftest*
16355 fi
16356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16357   echo "$ac_t""yes" 1>&6
16358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16359   cat >> confdefs.h <<EOF
16360 #define $ac_tr_hdr 1
16361 EOF
16362  
16363 else
16364   echo "$ac_t""no" 1>&6
16365 fi
16366 done
16367
16368         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16369                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16370 echo "configure:16371: checking for thr_create in -lthread" >&5
16371 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16373   echo $ac_n "(cached) $ac_c" 1>&6
16374 else
16375   ac_save_LIBS="$LIBS"
16376 LIBS="-lthread  $LIBS"
16377 cat > conftest.$ac_ext <<EOF
16378 #line 16379 "configure"
16379 #include "confdefs.h"
16380 /* Override any gcc2 internal prototype to avoid an error.  */
16381 /* We use char because int might match the return type of a gcc2
16382     builtin and then its argument prototype would still apply.  */
16383 char thr_create();
16384
16385 int main() {
16386 thr_create()
16387 ; return 0; }
16388 EOF
16389 if { (eval echo configure:16390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16390   rm -rf conftest*
16391   eval "ac_cv_lib_$ac_lib_var=yes"
16392 else
16393   echo "configure: failed program was:" >&5
16394   cat conftest.$ac_ext >&5
16395   rm -rf conftest*
16396   eval "ac_cv_lib_$ac_lib_var=no"
16397 fi
16398 rm -f conftest*
16399 LIBS="$ac_save_LIBS"
16400
16401 fi
16402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16403   echo "$ac_t""yes" 1>&6
16404   have_thr=yes
16405 else
16406   echo "$ac_t""no" 1>&6
16407 have_thr=no
16408 fi
16409
16410
16411                 if test $have_thr = yes ; then
16412                         cat >> confdefs.h <<\EOF
16413 #define HAVE_THR 1
16414 EOF
16415
16416                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16417                         ol_link_threads=thr
16418
16419                         if test $ol_with_yielding_select = auto ; then
16420                                 ol_with_yielding_select=yes
16421                         fi
16422
16423                                                 for ac_func in \
16424                                 thr_setconcurrency \
16425                                 thr_getconcurrency \
16426                         
16427 do
16428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16429 echo "configure:16430: checking for $ac_func" >&5
16430 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16431   echo $ac_n "(cached) $ac_c" 1>&6
16432 else
16433   cat > conftest.$ac_ext <<EOF
16434 #line 16435 "configure"
16435 #include "confdefs.h"
16436 /* System header to define __stub macros and hopefully few prototypes,
16437     which can conflict with char $ac_func(); below.  */
16438 #include <assert.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 $ac_func();
16443 char (*f)();
16444
16445 int main() {
16446
16447 /* The GNU C library defines this for functions which it implements
16448     to always fail with ENOSYS.  Some functions are actually named
16449     something starting with __ and the normal name is an alias.  */
16450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16451 choke me
16452 #else
16453 f = $ac_func;
16454 #endif
16455
16456 ; return 0; }
16457 EOF
16458 if { (eval echo configure:16459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16459   rm -rf conftest*
16460   eval "ac_cv_func_$ac_func=yes"
16461 else
16462   echo "configure: failed program was:" >&5
16463   cat conftest.$ac_ext >&5
16464   rm -rf conftest*
16465   eval "ac_cv_func_$ac_func=no"
16466 fi
16467 rm -f conftest*
16468 fi
16469
16470 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16471   echo "$ac_t""yes" 1>&6
16472     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16473   cat >> confdefs.h <<EOF
16474 #define $ac_tr_func 1
16475 EOF
16476  
16477 else
16478   echo "$ac_t""no" 1>&6
16479 fi
16480 done
16481
16482                 fi
16483         fi
16484
16485                 for ac_hdr in lwp/lwp.h
16486 do
16487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16489 echo "configure:16490: checking for $ac_hdr" >&5
16490 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16491   echo $ac_n "(cached) $ac_c" 1>&6
16492 else
16493   cat > conftest.$ac_ext <<EOF
16494 #line 16495 "configure"
16495 #include "confdefs.h"
16496 #include <$ac_hdr>
16497 EOF
16498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16499 { (eval echo configure:16500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16501 if test -z "$ac_err"; then
16502   rm -rf conftest*
16503   eval "ac_cv_header_$ac_safe=yes"
16504 else
16505   echo "$ac_err" >&5
16506   echo "configure: failed program was:" >&5
16507   cat conftest.$ac_ext >&5
16508   rm -rf conftest*
16509   eval "ac_cv_header_$ac_safe=no"
16510 fi
16511 rm -f conftest*
16512 fi
16513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16514   echo "$ac_t""yes" 1>&6
16515     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16516   cat >> confdefs.h <<EOF
16517 #define $ac_tr_hdr 1
16518 EOF
16519  
16520 else
16521   echo "$ac_t""no" 1>&6
16522 fi
16523 done
16524
16525         if test $ac_cv_header_lwp_lwp_h = yes ; then
16526                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16527 echo "configure:16528: checking for lwp_create in -llwp" >&5
16528 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16530   echo $ac_n "(cached) $ac_c" 1>&6
16531 else
16532   ac_save_LIBS="$LIBS"
16533 LIBS="-llwp  $LIBS"
16534 cat > conftest.$ac_ext <<EOF
16535 #line 16536 "configure"
16536 #include "confdefs.h"
16537 /* Override any gcc2 internal prototype to avoid an error.  */
16538 /* We use char because int might match the return type of a gcc2
16539     builtin and then its argument prototype would still apply.  */
16540 char lwp_create();
16541
16542 int main() {
16543 lwp_create()
16544 ; return 0; }
16545 EOF
16546 if { (eval echo configure:16547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16547   rm -rf conftest*
16548   eval "ac_cv_lib_$ac_lib_var=yes"
16549 else
16550   echo "configure: failed program was:" >&5
16551   cat conftest.$ac_ext >&5
16552   rm -rf conftest*
16553   eval "ac_cv_lib_$ac_lib_var=no"
16554 fi
16555 rm -f conftest*
16556 LIBS="$ac_save_LIBS"
16557
16558 fi
16559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16560   echo "$ac_t""yes" 1>&6
16561   have_lwp=yes
16562 else
16563   echo "$ac_t""no" 1>&6
16564 have_lwp=no
16565 fi
16566
16567
16568                 if test $have_lwp = yes ; then
16569                         cat >> confdefs.h <<\EOF
16570 #define HAVE_LWP 1
16571 EOF
16572
16573                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16574                         ol_link_threads=lwp
16575
16576                         if test $ol_with_yielding_select = auto ; then
16577                                 ol_with_yielding_select=no
16578                         fi
16579                 fi
16580         fi
16581 fi
16582
16583 if test $ol_with_yielding_select = yes ; then
16584         cat >> confdefs.h <<\EOF
16585 #define HAVE_YIELDING_SELECT 1
16586 EOF
16587
16588 fi
16589
16590 if test $ol_with_threads = manual ; then
16591                 ol_link_threads=yes
16592
16593         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16594
16595         for ac_hdr in pthread.h sched.h
16596 do
16597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16599 echo "configure:16600: checking for $ac_hdr" >&5
16600 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16601   echo $ac_n "(cached) $ac_c" 1>&6
16602 else
16603   cat > conftest.$ac_ext <<EOF
16604 #line 16605 "configure"
16605 #include "confdefs.h"
16606 #include <$ac_hdr>
16607 EOF
16608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16609 { (eval echo configure:16610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16611 if test -z "$ac_err"; then
16612   rm -rf conftest*
16613   eval "ac_cv_header_$ac_safe=yes"
16614 else
16615   echo "$ac_err" >&5
16616   echo "configure: failed program was:" >&5
16617   cat conftest.$ac_ext >&5
16618   rm -rf conftest*
16619   eval "ac_cv_header_$ac_safe=no"
16620 fi
16621 rm -f conftest*
16622 fi
16623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16624   echo "$ac_t""yes" 1>&6
16625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16626   cat >> confdefs.h <<EOF
16627 #define $ac_tr_hdr 1
16628 EOF
16629  
16630 else
16631   echo "$ac_t""no" 1>&6
16632 fi
16633 done
16634
16635         for ac_func in sched_yield pthread_yield
16636 do
16637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16638 echo "configure:16639: checking for $ac_func" >&5
16639 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16640   echo $ac_n "(cached) $ac_c" 1>&6
16641 else
16642   cat > conftest.$ac_ext <<EOF
16643 #line 16644 "configure"
16644 #include "confdefs.h"
16645 /* System header to define __stub macros and hopefully few prototypes,
16646     which can conflict with char $ac_func(); below.  */
16647 #include <assert.h>
16648 /* Override any gcc2 internal prototype to avoid an error.  */
16649 /* We use char because int might match the return type of a gcc2
16650     builtin and then its argument prototype would still apply.  */
16651 char $ac_func();
16652 char (*f)();
16653
16654 int main() {
16655
16656 /* The GNU C library defines this for functions which it implements
16657     to always fail with ENOSYS.  Some functions are actually named
16658     something starting with __ and the normal name is an alias.  */
16659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16660 choke me
16661 #else
16662 f = $ac_func;
16663 #endif
16664
16665 ; return 0; }
16666 EOF
16667 if { (eval echo configure:16668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16668   rm -rf conftest*
16669   eval "ac_cv_func_$ac_func=yes"
16670 else
16671   echo "configure: failed program was:" >&5
16672   cat conftest.$ac_ext >&5
16673   rm -rf conftest*
16674   eval "ac_cv_func_$ac_func=no"
16675 fi
16676 rm -f conftest*
16677 fi
16678
16679 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16680   echo "$ac_t""yes" 1>&6
16681     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16682   cat >> confdefs.h <<EOF
16683 #define $ac_tr_func 1
16684 EOF
16685  
16686 else
16687   echo "$ac_t""no" 1>&6
16688 fi
16689 done
16690
16691         
16692         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16693 echo "configure:16694: checking for LinuxThreads pthread.h" >&5
16694 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16695   echo $ac_n "(cached) $ac_c" 1>&6
16696 else
16697   cat > conftest.$ac_ext <<EOF
16698 #line 16699 "configure"
16699 #include "confdefs.h"
16700 #include <pthread.h>
16701 EOF
16702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16703   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16704   rm -rf conftest*
16705   ol_cv_header_linux_threads=yes
16706 else
16707   rm -rf conftest*
16708   ol_cv_header_linux_threads=no
16709 fi
16710 rm -f conftest*
16711
16712                 
16713 fi
16714
16715 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16716         if test $ol_cv_header_linux_threads = yes; then
16717                 cat >> confdefs.h <<\EOF
16718 #define HAVE_LINUX_THREADS 1
16719 EOF
16720
16721         fi
16722
16723
16724         for ac_hdr in mach/cthreads.h
16725 do
16726 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16727 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16728 echo "configure:16729: checking for $ac_hdr" >&5
16729 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16730   echo $ac_n "(cached) $ac_c" 1>&6
16731 else
16732   cat > conftest.$ac_ext <<EOF
16733 #line 16734 "configure"
16734 #include "confdefs.h"
16735 #include <$ac_hdr>
16736 EOF
16737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16738 { (eval echo configure:16739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16740 if test -z "$ac_err"; then
16741   rm -rf conftest*
16742   eval "ac_cv_header_$ac_safe=yes"
16743 else
16744   echo "$ac_err" >&5
16745   echo "configure: failed program was:" >&5
16746   cat conftest.$ac_ext >&5
16747   rm -rf conftest*
16748   eval "ac_cv_header_$ac_safe=no"
16749 fi
16750 rm -f conftest*
16751 fi
16752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16753   echo "$ac_t""yes" 1>&6
16754     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16755   cat >> confdefs.h <<EOF
16756 #define $ac_tr_hdr 1
16757 EOF
16758  
16759 else
16760   echo "$ac_t""no" 1>&6
16761 fi
16762 done
16763
16764         for ac_hdr in lwp/lwp.h
16765 do
16766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16768 echo "configure:16769: checking for $ac_hdr" >&5
16769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16770   echo $ac_n "(cached) $ac_c" 1>&6
16771 else
16772   cat > conftest.$ac_ext <<EOF
16773 #line 16774 "configure"
16774 #include "confdefs.h"
16775 #include <$ac_hdr>
16776 EOF
16777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16778 { (eval echo configure:16779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16780 if test -z "$ac_err"; then
16781   rm -rf conftest*
16782   eval "ac_cv_header_$ac_safe=yes"
16783 else
16784   echo "$ac_err" >&5
16785   echo "configure: failed program was:" >&5
16786   cat conftest.$ac_ext >&5
16787   rm -rf conftest*
16788   eval "ac_cv_header_$ac_safe=no"
16789 fi
16790 rm -f conftest*
16791 fi
16792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16793   echo "$ac_t""yes" 1>&6
16794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16795   cat >> confdefs.h <<EOF
16796 #define $ac_tr_hdr 1
16797 EOF
16798  
16799 else
16800   echo "$ac_t""no" 1>&6
16801 fi
16802 done
16803
16804         for ac_hdr in thread.h synch.h
16805 do
16806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16808 echo "configure:16809: checking for $ac_hdr" >&5
16809 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16810   echo $ac_n "(cached) $ac_c" 1>&6
16811 else
16812   cat > conftest.$ac_ext <<EOF
16813 #line 16814 "configure"
16814 #include "confdefs.h"
16815 #include <$ac_hdr>
16816 EOF
16817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16818 { (eval echo configure:16819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16820 if test -z "$ac_err"; then
16821   rm -rf conftest*
16822   eval "ac_cv_header_$ac_safe=yes"
16823 else
16824   echo "$ac_err" >&5
16825   echo "configure: failed program was:" >&5
16826   cat conftest.$ac_ext >&5
16827   rm -rf conftest*
16828   eval "ac_cv_header_$ac_safe=no"
16829 fi
16830 rm -f conftest*
16831 fi
16832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16833   echo "$ac_t""yes" 1>&6
16834     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16835   cat >> confdefs.h <<EOF
16836 #define $ac_tr_hdr 1
16837 EOF
16838  
16839 else
16840   echo "$ac_t""no" 1>&6
16841 fi
16842 done
16843
16844 fi
16845
16846 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16847                         cat >> confdefs.h <<\EOF
16848 #define REENTRANT 1
16849 EOF
16850
16851         cat >> confdefs.h <<\EOF
16852 #define _REENTRANT 1
16853 EOF
16854
16855         cat >> confdefs.h <<\EOF
16856 #define THREAD_SAFE 1
16857 EOF
16858
16859         cat >> confdefs.h <<\EOF
16860 #define _THREAD_SAFE 1
16861 EOF
16862
16863         cat >> confdefs.h <<\EOF
16864 #define THREADSAFE 1
16865 EOF
16866
16867         cat >> confdefs.h <<\EOF
16868 #define _THREADSAFE 1
16869 EOF
16870
16871         cat >> confdefs.h <<\EOF
16872 #define _SGI_MP_SOURCE 1
16873 EOF
16874
16875
16876                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16877 echo "configure:16878: checking for thread specific errno" >&5
16878 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16879   echo $ac_n "(cached) $ac_c" 1>&6
16880 else
16881   
16882                 cat > conftest.$ac_ext <<EOF
16883 #line 16884 "configure"
16884 #include "confdefs.h"
16885 #include <errno.h>
16886 int main() {
16887 errno = 0;
16888 ; return 0; }
16889 EOF
16890 if { (eval echo configure:16891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16891   rm -rf conftest*
16892   ol_cv_errno_thread_specific=yes
16893 else
16894   echo "configure: failed program was:" >&5
16895   cat conftest.$ac_ext >&5
16896   rm -rf conftest*
16897   ol_cv_errno_thread_specific=no
16898 fi
16899 rm -f conftest*
16900         
16901 fi
16902
16903 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16904
16905                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16906 echo "configure:16907: checking for thread specific h_errno" >&5
16907 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16908   echo $ac_n "(cached) $ac_c" 1>&6
16909 else
16910   
16911                 cat > conftest.$ac_ext <<EOF
16912 #line 16913 "configure"
16913 #include "confdefs.h"
16914 #include <netdb.h>
16915 int main() {
16916 h_errno = 0;
16917 ; return 0; }
16918 EOF
16919 if { (eval echo configure:16920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16920   rm -rf conftest*
16921   ol_cv_h_errno_thread_specific=yes
16922 else
16923   echo "configure: failed program was:" >&5
16924   cat conftest.$ac_ext >&5
16925   rm -rf conftest*
16926   ol_cv_h_errno_thread_specific=no
16927 fi
16928 rm -f conftest*
16929         
16930 fi
16931
16932 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16933
16934         if test $ol_cv_errno_thread_specific != yes \
16935                 -o $ol_cv_h_errno_thread_specific != yes ; then
16936                 LIBS="$LTHREAD_LIBS $LIBS"
16937                 LTHREAD_LIBS=""
16938         fi
16939
16940 fi  
16941
16942 if test $ol_link_threads = no ; then
16943         if test $ol_with_threads = yes ; then
16944                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16945         fi
16946
16947         if test $ol_with_threads = auto ; then
16948                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16949                 ol_with_threads=no
16950         fi
16951
16952         cat >> confdefs.h <<\EOF
16953 #define NO_THREADS 1
16954 EOF
16955
16956         LTHREAD_LIBS=""
16957 fi
16958
16959 if test $ol_link_threads != no ; then
16960         cat >> confdefs.h <<\EOF
16961 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16962 EOF
16963
16964 fi
16965
16966 ol_link_ldbm=no 
16967
16968 if test $ol_with_ldbm_api = auto \
16969         -o $ol_with_ldbm_api = berkeley \
16970         -o $ol_with_ldbm_api = bcompat ; then
16971
16972         if test $ol_with_ldbm_api = bcompat; then \
16973                 for ac_hdr in db_185.h db.h
16974 do
16975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16977 echo "configure:16978: checking for $ac_hdr" >&5
16978 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16979   echo $ac_n "(cached) $ac_c" 1>&6
16980 else
16981   cat > conftest.$ac_ext <<EOF
16982 #line 16983 "configure"
16983 #include "confdefs.h"
16984 #include <$ac_hdr>
16985 EOF
16986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16987 { (eval echo configure:16988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16989 if test -z "$ac_err"; then
16990   rm -rf conftest*
16991   eval "ac_cv_header_$ac_safe=yes"
16992 else
16993   echo "$ac_err" >&5
16994   echo "configure: failed program was:" >&5
16995   cat conftest.$ac_ext >&5
16996   rm -rf conftest*
16997   eval "ac_cv_header_$ac_safe=no"
16998 fi
16999 rm -f conftest*
17000 fi
17001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17002   echo "$ac_t""yes" 1>&6
17003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17004   cat >> confdefs.h <<EOF
17005 #define $ac_tr_hdr 1
17006 EOF
17007  
17008 else
17009   echo "$ac_t""no" 1>&6
17010 fi
17011 done
17012
17013 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17014         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17015 echo "configure:17016: checking if Berkeley DB header compatibility" >&5
17016 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17017   echo $ac_n "(cached) $ac_c" 1>&6
17018 else
17019   
17020                 cat > conftest.$ac_ext <<EOF
17021 #line 17022 "configure"
17022 #include "confdefs.h"
17023
17024 #if HAVE_DB_185_H
17025 #       include <db_185.h>
17026 #else
17027 #       include <db.h>
17028 #endif
17029
17030  /* this check could be improved */
17031 #ifndef DB_VERSION_MAJOR
17032 #       define DB_VERSION_MAJOR 1
17033 #endif
17034
17035 #if DB_VERSION_MAJOR == 1 
17036         __db_version_1
17037 #endif
17038
17039 EOF
17040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17041   egrep "__db_version_1" >/dev/null 2>&1; then
17042   rm -rf conftest*
17043   ol_cv_header_db1=yes
17044 else
17045   rm -rf conftest*
17046   ol_cv_header_db1=no
17047 fi
17048 rm -f conftest*
17049
17050 fi
17051
17052 echo "$ac_t""$ol_cv_header_db1" 1>&6
17053
17054         if test $ol_cv_header_db1 = yes ; then
17055                 ol_cv_lib_db=no
17056 if test $ol_cv_lib_db = no ; then
17057         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17058 echo "configure:17059: checking for Berkeley DB link (default)" >&5
17059 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17060   echo $ac_n "(cached) $ac_c" 1>&6
17061 else
17062   
17063         ol_DB_LIB=
17064         ol_LIBS=$LIBS
17065         LIBS="$ol_DB_LIB $LIBS"
17066
17067         cat > conftest.$ac_ext <<EOF
17068 #line 17069 "configure"
17069 #include "confdefs.h"
17070
17071 #ifdef HAVE_DB_185_H
17072 # include <db_185.h>
17073 #else
17074 # include <db.h>
17075 #endif
17076
17077 #ifndef DB_VERSION_MAJOR
17078 # define DB_VERSION_MAJOR 1
17079 #endif
17080
17081 #ifndef NULL
17082 #define NULL ((void*)0)
17083 #endif
17084
17085 int main() {
17086
17087 #if DB_VERSION_MAJOR > 1
17088         {
17089                 char *version;
17090                 int major, minor, patch;
17091
17092                 version = db_version( &major, &minor, &patch );
17093
17094                 if( major != DB_VERSION_MAJOR ||
17095                         minor < DB_VERSION_MINOR )
17096                 {
17097                         printf("Berkeley DB version mismatch\n"
17098                                 "\texpected: %s\n\tgot: %s\n",
17099                                 DB_VERSION_STRING, version);
17100                         return 1;
17101                 }
17102         }
17103 #endif
17104
17105 #if DB_VERSION_MAJOR > 2
17106         db_env_create( NULL, 0 );
17107 #elif DB_VERSION_MAJOR > 1
17108         db_appexit( NULL );
17109 #else
17110         (void) dbopen( NULL, 0, 0, 0, NULL);
17111 #endif
17112
17113 ; return 0; }
17114 EOF
17115 if { (eval echo configure:17116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17116   rm -rf conftest*
17117   ol_cv_db_none=yes
17118 else
17119   echo "configure: failed program was:" >&5
17120   cat conftest.$ac_ext >&5
17121   rm -rf conftest*
17122   ol_cv_db_none=no
17123 fi
17124 rm -f conftest*
17125
17126         LIBS="$ol_LIBS"
17127
17128 fi
17129
17130 echo "$ac_t""$ol_cv_db_none" 1>&6
17131
17132         if test $ol_cv_db_none = yes ; then
17133                 ol_cv_lib_db=yes
17134         fi
17135 fi
17136
17137 if test $ol_cv_lib_db = no ; then
17138         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17139 echo "configure:17140: checking for Berkeley DB link (-ldb)" >&5
17140 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17141   echo $ac_n "(cached) $ac_c" 1>&6
17142 else
17143   
17144         ol_DB_LIB=-ldb
17145         ol_LIBS=$LIBS
17146         LIBS="$ol_DB_LIB $LIBS"
17147
17148         cat > conftest.$ac_ext <<EOF
17149 #line 17150 "configure"
17150 #include "confdefs.h"
17151
17152 #ifdef HAVE_DB_185_H
17153 # include <db_185.h>
17154 #else
17155 # include <db.h>
17156 #endif
17157
17158 #ifndef DB_VERSION_MAJOR
17159 # define DB_VERSION_MAJOR 1
17160 #endif
17161
17162 #ifndef NULL
17163 #define NULL ((void*)0)
17164 #endif
17165
17166 int main() {
17167
17168 #if DB_VERSION_MAJOR > 1
17169         {
17170                 char *version;
17171                 int major, minor, patch;
17172
17173                 version = db_version( &major, &minor, &patch );
17174
17175                 if( major != DB_VERSION_MAJOR ||
17176                         minor < DB_VERSION_MINOR )
17177                 {
17178                         printf("Berkeley DB version mismatch\n"
17179                                 "\texpected: %s\n\tgot: %s\n",
17180                                 DB_VERSION_STRING, version);
17181                         return 1;
17182                 }
17183         }
17184 #endif
17185
17186 #if DB_VERSION_MAJOR > 2
17187         db_env_create( NULL, 0 );
17188 #elif DB_VERSION_MAJOR > 1
17189         db_appexit( NULL );
17190 #else
17191         (void) dbopen( NULL, 0, 0, 0, NULL);
17192 #endif
17193
17194 ; return 0; }
17195 EOF
17196 if { (eval echo configure:17197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17197   rm -rf conftest*
17198   ol_cv_db_db=yes
17199 else
17200   echo "configure: failed program was:" >&5
17201   cat conftest.$ac_ext >&5
17202   rm -rf conftest*
17203   ol_cv_db_db=no
17204 fi
17205 rm -f conftest*
17206
17207         LIBS="$ol_LIBS"
17208
17209 fi
17210
17211 echo "$ac_t""$ol_cv_db_db" 1>&6
17212
17213         if test $ol_cv_db_db = yes ; then
17214                 ol_cv_lib_db=-ldb
17215         fi
17216 fi
17217
17218 if test $ol_cv_lib_db = no ; then
17219         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17220 echo "configure:17221: checking for Berkeley DB link (-ldb4)" >&5
17221 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17222   echo $ac_n "(cached) $ac_c" 1>&6
17223 else
17224   
17225         ol_DB_LIB=-ldb4
17226         ol_LIBS=$LIBS
17227         LIBS="$ol_DB_LIB $LIBS"
17228
17229         cat > conftest.$ac_ext <<EOF
17230 #line 17231 "configure"
17231 #include "confdefs.h"
17232
17233 #ifdef HAVE_DB_185_H
17234 # include <db_185.h>
17235 #else
17236 # include <db.h>
17237 #endif
17238
17239 #ifndef DB_VERSION_MAJOR
17240 # define DB_VERSION_MAJOR 1
17241 #endif
17242
17243 #ifndef NULL
17244 #define NULL ((void*)0)
17245 #endif
17246
17247 int main() {
17248
17249 #if DB_VERSION_MAJOR > 1
17250         {
17251                 char *version;
17252                 int major, minor, patch;
17253
17254                 version = db_version( &major, &minor, &patch );
17255
17256                 if( major != DB_VERSION_MAJOR ||
17257                         minor < DB_VERSION_MINOR )
17258                 {
17259                         printf("Berkeley DB version mismatch\n"
17260                                 "\texpected: %s\n\tgot: %s\n",
17261                                 DB_VERSION_STRING, version);
17262                         return 1;
17263                 }
17264         }
17265 #endif
17266
17267 #if DB_VERSION_MAJOR > 2
17268         db_env_create( NULL, 0 );
17269 #elif DB_VERSION_MAJOR > 1
17270         db_appexit( NULL );
17271 #else
17272         (void) dbopen( NULL, 0, 0, 0, NULL);
17273 #endif
17274
17275 ; return 0; }
17276 EOF
17277 if { (eval echo configure:17278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17278   rm -rf conftest*
17279   ol_cv_db_db4=yes
17280 else
17281   echo "configure: failed program was:" >&5
17282   cat conftest.$ac_ext >&5
17283   rm -rf conftest*
17284   ol_cv_db_db4=no
17285 fi
17286 rm -f conftest*
17287
17288         LIBS="$ol_LIBS"
17289
17290 fi
17291
17292 echo "$ac_t""$ol_cv_db_db4" 1>&6
17293
17294         if test $ol_cv_db_db4 = yes ; then
17295                 ol_cv_lib_db=-ldb4
17296         fi
17297 fi
17298
17299 if test $ol_cv_lib_db = no ; then
17300         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17301 echo "configure:17302: checking for Berkeley DB link (-ldb3)" >&5
17302 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17303   echo $ac_n "(cached) $ac_c" 1>&6
17304 else
17305   
17306         ol_DB_LIB=-ldb3
17307         ol_LIBS=$LIBS
17308         LIBS="$ol_DB_LIB $LIBS"
17309
17310         cat > conftest.$ac_ext <<EOF
17311 #line 17312 "configure"
17312 #include "confdefs.h"
17313
17314 #ifdef HAVE_DB_185_H
17315 # include <db_185.h>
17316 #else
17317 # include <db.h>
17318 #endif
17319
17320 #ifndef DB_VERSION_MAJOR
17321 # define DB_VERSION_MAJOR 1
17322 #endif
17323
17324 #ifndef NULL
17325 #define NULL ((void*)0)
17326 #endif
17327
17328 int main() {
17329
17330 #if DB_VERSION_MAJOR > 1
17331         {
17332                 char *version;
17333                 int major, minor, patch;
17334
17335                 version = db_version( &major, &minor, &patch );
17336
17337                 if( major != DB_VERSION_MAJOR ||
17338                         minor < DB_VERSION_MINOR )
17339                 {
17340                         printf("Berkeley DB version mismatch\n"
17341                                 "\texpected: %s\n\tgot: %s\n",
17342                                 DB_VERSION_STRING, version);
17343                         return 1;
17344                 }
17345         }
17346 #endif
17347
17348 #if DB_VERSION_MAJOR > 2
17349         db_env_create( NULL, 0 );
17350 #elif DB_VERSION_MAJOR > 1
17351         db_appexit( NULL );
17352 #else
17353         (void) dbopen( NULL, 0, 0, 0, NULL);
17354 #endif
17355
17356 ; return 0; }
17357 EOF
17358 if { (eval echo configure:17359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17359   rm -rf conftest*
17360   ol_cv_db_db3=yes
17361 else
17362   echo "configure: failed program was:" >&5
17363   cat conftest.$ac_ext >&5
17364   rm -rf conftest*
17365   ol_cv_db_db3=no
17366 fi
17367 rm -f conftest*
17368
17369         LIBS="$ol_LIBS"
17370
17371 fi
17372
17373 echo "$ac_t""$ol_cv_db_db3" 1>&6
17374
17375         if test $ol_cv_db_db3 = yes ; then
17376                 ol_cv_lib_db=-ldb3
17377         fi
17378 fi
17379
17380 if test $ol_cv_lib_db = no ; then
17381         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17382 echo "configure:17383: checking for Berkeley DB link (-ldb2)" >&5
17383 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17384   echo $ac_n "(cached) $ac_c" 1>&6
17385 else
17386   
17387         ol_DB_LIB=-ldb2
17388         ol_LIBS=$LIBS
17389         LIBS="$ol_DB_LIB $LIBS"
17390
17391         cat > conftest.$ac_ext <<EOF
17392 #line 17393 "configure"
17393 #include "confdefs.h"
17394
17395 #ifdef HAVE_DB_185_H
17396 # include <db_185.h>
17397 #else
17398 # include <db.h>
17399 #endif
17400
17401 #ifndef DB_VERSION_MAJOR
17402 # define DB_VERSION_MAJOR 1
17403 #endif
17404
17405 #ifndef NULL
17406 #define NULL ((void*)0)
17407 #endif
17408
17409 int main() {
17410
17411 #if DB_VERSION_MAJOR > 1
17412         {
17413                 char *version;
17414                 int major, minor, patch;
17415
17416                 version = db_version( &major, &minor, &patch );
17417
17418                 if( major != DB_VERSION_MAJOR ||
17419                         minor < DB_VERSION_MINOR )
17420                 {
17421                         printf("Berkeley DB version mismatch\n"
17422                                 "\texpected: %s\n\tgot: %s\n",
17423                                 DB_VERSION_STRING, version);
17424                         return 1;
17425                 }
17426         }
17427 #endif
17428
17429 #if DB_VERSION_MAJOR > 2
17430         db_env_create( NULL, 0 );
17431 #elif DB_VERSION_MAJOR > 1
17432         db_appexit( NULL );
17433 #else
17434         (void) dbopen( NULL, 0, 0, 0, NULL);
17435 #endif
17436
17437 ; return 0; }
17438 EOF
17439 if { (eval echo configure:17440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17440   rm -rf conftest*
17441   ol_cv_db_db2=yes
17442 else
17443   echo "configure: failed program was:" >&5
17444   cat conftest.$ac_ext >&5
17445   rm -rf conftest*
17446   ol_cv_db_db2=no
17447 fi
17448 rm -f conftest*
17449
17450         LIBS="$ol_LIBS"
17451
17452 fi
17453
17454 echo "$ac_t""$ol_cv_db_db2" 1>&6
17455
17456         if test $ol_cv_db_db2 = yes ; then
17457                 ol_cv_lib_db=-ldb2
17458         fi
17459 fi
17460
17461 if test $ol_cv_lib_db = no ; then
17462         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17463 echo "configure:17464: checking for Berkeley DB link (-ldb1)" >&5
17464 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17465   echo $ac_n "(cached) $ac_c" 1>&6
17466 else
17467   
17468         ol_DB_LIB=-ldb1
17469         ol_LIBS=$LIBS
17470         LIBS="$ol_DB_LIB $LIBS"
17471
17472         cat > conftest.$ac_ext <<EOF
17473 #line 17474 "configure"
17474 #include "confdefs.h"
17475
17476 #ifdef HAVE_DB_185_H
17477 # include <db_185.h>
17478 #else
17479 # include <db.h>
17480 #endif
17481
17482 #ifndef DB_VERSION_MAJOR
17483 # define DB_VERSION_MAJOR 1
17484 #endif
17485
17486 #ifndef NULL
17487 #define NULL ((void*)0)
17488 #endif
17489
17490 int main() {
17491
17492 #if DB_VERSION_MAJOR > 1
17493         {
17494                 char *version;
17495                 int major, minor, patch;
17496
17497                 version = db_version( &major, &minor, &patch );
17498
17499                 if( major != DB_VERSION_MAJOR ||
17500                         minor < DB_VERSION_MINOR )
17501                 {
17502                         printf("Berkeley DB version mismatch\n"
17503                                 "\texpected: %s\n\tgot: %s\n",
17504                                 DB_VERSION_STRING, version);
17505                         return 1;
17506                 }
17507         }
17508 #endif
17509
17510 #if DB_VERSION_MAJOR > 2
17511         db_env_create( NULL, 0 );
17512 #elif DB_VERSION_MAJOR > 1
17513         db_appexit( NULL );
17514 #else
17515         (void) dbopen( NULL, 0, 0, 0, NULL);
17516 #endif
17517
17518 ; return 0; }
17519 EOF
17520 if { (eval echo configure:17521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17521   rm -rf conftest*
17522   ol_cv_db_db1=yes
17523 else
17524   echo "configure: failed program was:" >&5
17525   cat conftest.$ac_ext >&5
17526   rm -rf conftest*
17527   ol_cv_db_db1=no
17528 fi
17529 rm -f conftest*
17530
17531         LIBS="$ol_LIBS"
17532
17533 fi
17534
17535 echo "$ac_t""$ol_cv_db_db1" 1>&6
17536
17537         if test $ol_cv_db_db1 = yes ; then
17538                 ol_cv_lib_db=-ldb1
17539         fi
17540 fi
17541
17542
17543                 if test "$ol_cv_lib_db" != no ; then
17544                         ol_cv_berkeley_db=yes
17545                 fi
17546         fi
17547 fi
17548
17549         else
17550                 ol_cv_berkeley_db=no
17551 for ac_hdr in db.h
17552 do
17553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17555 echo "configure:17556: checking for $ac_hdr" >&5
17556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17557   echo $ac_n "(cached) $ac_c" 1>&6
17558 else
17559   cat > conftest.$ac_ext <<EOF
17560 #line 17561 "configure"
17561 #include "confdefs.h"
17562 #include <$ac_hdr>
17563 EOF
17564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17565 { (eval echo configure:17566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17567 if test -z "$ac_err"; then
17568   rm -rf conftest*
17569   eval "ac_cv_header_$ac_safe=yes"
17570 else
17571   echo "$ac_err" >&5
17572   echo "configure: failed program was:" >&5
17573   cat conftest.$ac_ext >&5
17574   rm -rf conftest*
17575   eval "ac_cv_header_$ac_safe=no"
17576 fi
17577 rm -f conftest*
17578 fi
17579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17580   echo "$ac_t""yes" 1>&6
17581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17582   cat >> confdefs.h <<EOF
17583 #define $ac_tr_hdr 1
17584 EOF
17585  
17586 else
17587   echo "$ac_t""no" 1>&6
17588 fi
17589 done
17590
17591 if test $ac_cv_header_db_h = yes; then
17592         ol_cv_lib_db=no
17593 if test $ol_cv_lib_db = no ; then
17594         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17595 echo "configure:17596: checking for Berkeley DB link (default)" >&5
17596 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17597   echo $ac_n "(cached) $ac_c" 1>&6
17598 else
17599   
17600         ol_DB_LIB=
17601         ol_LIBS=$LIBS
17602         LIBS="$ol_DB_LIB $LIBS"
17603
17604         cat > conftest.$ac_ext <<EOF
17605 #line 17606 "configure"
17606 #include "confdefs.h"
17607
17608 #ifdef HAVE_DB_185_H
17609 # include <db_185.h>
17610 #else
17611 # include <db.h>
17612 #endif
17613
17614 #ifndef DB_VERSION_MAJOR
17615 # define DB_VERSION_MAJOR 1
17616 #endif
17617
17618 #ifndef NULL
17619 #define NULL ((void*)0)
17620 #endif
17621
17622 int main() {
17623
17624 #if DB_VERSION_MAJOR > 1
17625         {
17626                 char *version;
17627                 int major, minor, patch;
17628
17629                 version = db_version( &major, &minor, &patch );
17630
17631                 if( major != DB_VERSION_MAJOR ||
17632                         minor < DB_VERSION_MINOR )
17633                 {
17634                         printf("Berkeley DB version mismatch\n"
17635                                 "\texpected: %s\n\tgot: %s\n",
17636                                 DB_VERSION_STRING, version);
17637                         return 1;
17638                 }
17639         }
17640 #endif
17641
17642 #if DB_VERSION_MAJOR > 2
17643         db_env_create( NULL, 0 );
17644 #elif DB_VERSION_MAJOR > 1
17645         db_appexit( NULL );
17646 #else
17647         (void) dbopen( NULL, 0, 0, 0, NULL);
17648 #endif
17649
17650 ; return 0; }
17651 EOF
17652 if { (eval echo configure:17653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17653   rm -rf conftest*
17654   ol_cv_db_none=yes
17655 else
17656   echo "configure: failed program was:" >&5
17657   cat conftest.$ac_ext >&5
17658   rm -rf conftest*
17659   ol_cv_db_none=no
17660 fi
17661 rm -f conftest*
17662
17663         LIBS="$ol_LIBS"
17664
17665 fi
17666
17667 echo "$ac_t""$ol_cv_db_none" 1>&6
17668
17669         if test $ol_cv_db_none = yes ; then
17670                 ol_cv_lib_db=yes
17671         fi
17672 fi
17673
17674 if test $ol_cv_lib_db = no ; then
17675         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17676 echo "configure:17677: checking for Berkeley DB link (-ldb)" >&5
17677 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17678   echo $ac_n "(cached) $ac_c" 1>&6
17679 else
17680   
17681         ol_DB_LIB=-ldb
17682         ol_LIBS=$LIBS
17683         LIBS="$ol_DB_LIB $LIBS"
17684
17685         cat > conftest.$ac_ext <<EOF
17686 #line 17687 "configure"
17687 #include "confdefs.h"
17688
17689 #ifdef HAVE_DB_185_H
17690 # include <db_185.h>
17691 #else
17692 # include <db.h>
17693 #endif
17694
17695 #ifndef DB_VERSION_MAJOR
17696 # define DB_VERSION_MAJOR 1
17697 #endif
17698
17699 #ifndef NULL
17700 #define NULL ((void*)0)
17701 #endif
17702
17703 int main() {
17704
17705 #if DB_VERSION_MAJOR > 1
17706         {
17707                 char *version;
17708                 int major, minor, patch;
17709
17710                 version = db_version( &major, &minor, &patch );
17711
17712                 if( major != DB_VERSION_MAJOR ||
17713                         minor < DB_VERSION_MINOR )
17714                 {
17715                         printf("Berkeley DB version mismatch\n"
17716                                 "\texpected: %s\n\tgot: %s\n",
17717                                 DB_VERSION_STRING, version);
17718                         return 1;
17719                 }
17720         }
17721 #endif
17722
17723 #if DB_VERSION_MAJOR > 2
17724         db_env_create( NULL, 0 );
17725 #elif DB_VERSION_MAJOR > 1
17726         db_appexit( NULL );
17727 #else
17728         (void) dbopen( NULL, 0, 0, 0, NULL);
17729 #endif
17730
17731 ; return 0; }
17732 EOF
17733 if { (eval echo configure:17734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17734   rm -rf conftest*
17735   ol_cv_db_db=yes
17736 else
17737   echo "configure: failed program was:" >&5
17738   cat conftest.$ac_ext >&5
17739   rm -rf conftest*
17740   ol_cv_db_db=no
17741 fi
17742 rm -f conftest*
17743
17744         LIBS="$ol_LIBS"
17745
17746 fi
17747
17748 echo "$ac_t""$ol_cv_db_db" 1>&6
17749
17750         if test $ol_cv_db_db = yes ; then
17751                 ol_cv_lib_db=-ldb
17752         fi
17753 fi
17754
17755 if test $ol_cv_lib_db = no ; then
17756         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17757 echo "configure:17758: checking for Berkeley DB link (-ldb4)" >&5
17758 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17759   echo $ac_n "(cached) $ac_c" 1>&6
17760 else
17761   
17762         ol_DB_LIB=-ldb4
17763         ol_LIBS=$LIBS
17764         LIBS="$ol_DB_LIB $LIBS"
17765
17766         cat > conftest.$ac_ext <<EOF
17767 #line 17768 "configure"
17768 #include "confdefs.h"
17769
17770 #ifdef HAVE_DB_185_H
17771 # include <db_185.h>
17772 #else
17773 # include <db.h>
17774 #endif
17775
17776 #ifndef DB_VERSION_MAJOR
17777 # define DB_VERSION_MAJOR 1
17778 #endif
17779
17780 #ifndef NULL
17781 #define NULL ((void*)0)
17782 #endif
17783
17784 int main() {
17785
17786 #if DB_VERSION_MAJOR > 1
17787         {
17788                 char *version;
17789                 int major, minor, patch;
17790
17791                 version = db_version( &major, &minor, &patch );
17792
17793                 if( major != DB_VERSION_MAJOR ||
17794                         minor < DB_VERSION_MINOR )
17795                 {
17796                         printf("Berkeley DB version mismatch\n"
17797                                 "\texpected: %s\n\tgot: %s\n",
17798                                 DB_VERSION_STRING, version);
17799                         return 1;
17800                 }
17801         }
17802 #endif
17803
17804 #if DB_VERSION_MAJOR > 2
17805         db_env_create( NULL, 0 );
17806 #elif DB_VERSION_MAJOR > 1
17807         db_appexit( NULL );
17808 #else
17809         (void) dbopen( NULL, 0, 0, 0, NULL);
17810 #endif
17811
17812 ; return 0; }
17813 EOF
17814 if { (eval echo configure:17815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17815   rm -rf conftest*
17816   ol_cv_db_db4=yes
17817 else
17818   echo "configure: failed program was:" >&5
17819   cat conftest.$ac_ext >&5
17820   rm -rf conftest*
17821   ol_cv_db_db4=no
17822 fi
17823 rm -f conftest*
17824
17825         LIBS="$ol_LIBS"
17826
17827 fi
17828
17829 echo "$ac_t""$ol_cv_db_db4" 1>&6
17830
17831         if test $ol_cv_db_db4 = yes ; then
17832                 ol_cv_lib_db=-ldb4
17833         fi
17834 fi
17835
17836 if test $ol_cv_lib_db = no ; then
17837         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17838 echo "configure:17839: checking for Berkeley DB link (-ldb3)" >&5
17839 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17840   echo $ac_n "(cached) $ac_c" 1>&6
17841 else
17842   
17843         ol_DB_LIB=-ldb3
17844         ol_LIBS=$LIBS
17845         LIBS="$ol_DB_LIB $LIBS"
17846
17847         cat > conftest.$ac_ext <<EOF
17848 #line 17849 "configure"
17849 #include "confdefs.h"
17850
17851 #ifdef HAVE_DB_185_H
17852 # include <db_185.h>
17853 #else
17854 # include <db.h>
17855 #endif
17856
17857 #ifndef DB_VERSION_MAJOR
17858 # define DB_VERSION_MAJOR 1
17859 #endif
17860
17861 #ifndef NULL
17862 #define NULL ((void*)0)
17863 #endif
17864
17865 int main() {
17866
17867 #if DB_VERSION_MAJOR > 1
17868         {
17869                 char *version;
17870                 int major, minor, patch;
17871
17872                 version = db_version( &major, &minor, &patch );
17873
17874                 if( major != DB_VERSION_MAJOR ||
17875                         minor < DB_VERSION_MINOR )
17876                 {
17877                         printf("Berkeley DB version mismatch\n"
17878                                 "\texpected: %s\n\tgot: %s\n",
17879                                 DB_VERSION_STRING, version);
17880                         return 1;
17881                 }
17882         }
17883 #endif
17884
17885 #if DB_VERSION_MAJOR > 2
17886         db_env_create( NULL, 0 );
17887 #elif DB_VERSION_MAJOR > 1
17888         db_appexit( NULL );
17889 #else
17890         (void) dbopen( NULL, 0, 0, 0, NULL);
17891 #endif
17892
17893 ; return 0; }
17894 EOF
17895 if { (eval echo configure:17896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17896   rm -rf conftest*
17897   ol_cv_db_db3=yes
17898 else
17899   echo "configure: failed program was:" >&5
17900   cat conftest.$ac_ext >&5
17901   rm -rf conftest*
17902   ol_cv_db_db3=no
17903 fi
17904 rm -f conftest*
17905
17906         LIBS="$ol_LIBS"
17907
17908 fi
17909
17910 echo "$ac_t""$ol_cv_db_db3" 1>&6
17911
17912         if test $ol_cv_db_db3 = yes ; then
17913                 ol_cv_lib_db=-ldb3
17914         fi
17915 fi
17916
17917 if test $ol_cv_lib_db = no ; then
17918         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17919 echo "configure:17920: checking for Berkeley DB link (-ldb2)" >&5
17920 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17921   echo $ac_n "(cached) $ac_c" 1>&6
17922 else
17923   
17924         ol_DB_LIB=-ldb2
17925         ol_LIBS=$LIBS
17926         LIBS="$ol_DB_LIB $LIBS"
17927
17928         cat > conftest.$ac_ext <<EOF
17929 #line 17930 "configure"
17930 #include "confdefs.h"
17931
17932 #ifdef HAVE_DB_185_H
17933 # include <db_185.h>
17934 #else
17935 # include <db.h>
17936 #endif
17937
17938 #ifndef DB_VERSION_MAJOR
17939 # define DB_VERSION_MAJOR 1
17940 #endif
17941
17942 #ifndef NULL
17943 #define NULL ((void*)0)
17944 #endif
17945
17946 int main() {
17947
17948 #if DB_VERSION_MAJOR > 1
17949         {
17950                 char *version;
17951                 int major, minor, patch;
17952
17953                 version = db_version( &major, &minor, &patch );
17954
17955                 if( major != DB_VERSION_MAJOR ||
17956                         minor < DB_VERSION_MINOR )
17957                 {
17958                         printf("Berkeley DB version mismatch\n"
17959                                 "\texpected: %s\n\tgot: %s\n",
17960                                 DB_VERSION_STRING, version);
17961                         return 1;
17962                 }
17963         }
17964 #endif
17965
17966 #if DB_VERSION_MAJOR > 2
17967         db_env_create( NULL, 0 );
17968 #elif DB_VERSION_MAJOR > 1
17969         db_appexit( NULL );
17970 #else
17971         (void) dbopen( NULL, 0, 0, 0, NULL);
17972 #endif
17973
17974 ; return 0; }
17975 EOF
17976 if { (eval echo configure:17977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17977   rm -rf conftest*
17978   ol_cv_db_db2=yes
17979 else
17980   echo "configure: failed program was:" >&5
17981   cat conftest.$ac_ext >&5
17982   rm -rf conftest*
17983   ol_cv_db_db2=no
17984 fi
17985 rm -f conftest*
17986
17987         LIBS="$ol_LIBS"
17988
17989 fi
17990
17991 echo "$ac_t""$ol_cv_db_db2" 1>&6
17992
17993         if test $ol_cv_db_db2 = yes ; then
17994                 ol_cv_lib_db=-ldb2
17995         fi
17996 fi
17997
17998 if test $ol_cv_lib_db = no ; then
17999         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18000 echo "configure:18001: checking for Berkeley DB link (-ldb1)" >&5
18001 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18002   echo $ac_n "(cached) $ac_c" 1>&6
18003 else
18004   
18005         ol_DB_LIB=-ldb1
18006         ol_LIBS=$LIBS
18007         LIBS="$ol_DB_LIB $LIBS"
18008
18009         cat > conftest.$ac_ext <<EOF
18010 #line 18011 "configure"
18011 #include "confdefs.h"
18012
18013 #ifdef HAVE_DB_185_H
18014 # include <db_185.h>
18015 #else
18016 # include <db.h>
18017 #endif
18018
18019 #ifndef DB_VERSION_MAJOR
18020 # define DB_VERSION_MAJOR 1
18021 #endif
18022
18023 #ifndef NULL
18024 #define NULL ((void*)0)
18025 #endif
18026
18027 int main() {
18028
18029 #if DB_VERSION_MAJOR > 1
18030         {
18031                 char *version;
18032                 int major, minor, patch;
18033
18034                 version = db_version( &major, &minor, &patch );
18035
18036                 if( major != DB_VERSION_MAJOR ||
18037                         minor < DB_VERSION_MINOR )
18038                 {
18039                         printf("Berkeley DB version mismatch\n"
18040                                 "\texpected: %s\n\tgot: %s\n",
18041                                 DB_VERSION_STRING, version);
18042                         return 1;
18043                 }
18044         }
18045 #endif
18046
18047 #if DB_VERSION_MAJOR > 2
18048         db_env_create( NULL, 0 );
18049 #elif DB_VERSION_MAJOR > 1
18050         db_appexit( NULL );
18051 #else
18052         (void) dbopen( NULL, 0, 0, 0, NULL);
18053 #endif
18054
18055 ; return 0; }
18056 EOF
18057 if { (eval echo configure:18058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18058   rm -rf conftest*
18059   ol_cv_db_db1=yes
18060 else
18061   echo "configure: failed program was:" >&5
18062   cat conftest.$ac_ext >&5
18063   rm -rf conftest*
18064   ol_cv_db_db1=no
18065 fi
18066 rm -f conftest*
18067
18068         LIBS="$ol_LIBS"
18069
18070 fi
18071
18072 echo "$ac_t""$ol_cv_db_db1" 1>&6
18073
18074         if test $ol_cv_db_db1 = yes ; then
18075                 ol_cv_lib_db=-ldb1
18076         fi
18077 fi
18078
18079
18080         if test "$ol_cv_lib_db" != no ; then
18081                 ol_cv_berkeley_db=yes
18082                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18083 echo "configure:18084: checking for Berkeley DB thread support" >&5
18084 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18085   echo $ac_n "(cached) $ac_c" 1>&6
18086 else
18087   
18088         ol_LIBS="$LIBS"
18089         if test $ol_cv_lib_db != yes ; then
18090                 LIBS="$ol_cv_lib_db"
18091         fi
18092
18093         if test "$cross_compiling" = yes; then
18094   ol_cv_berkeley_db_thread=cross
18095 else
18096   cat > conftest.$ac_ext <<EOF
18097 #line 18098 "configure"
18098 #include "confdefs.h"
18099
18100 #ifdef HAVE_DB_185_H
18101         choke me;
18102 #else
18103 #include <db.h>
18104 #endif
18105 #ifndef NULL
18106 #define NULL ((void *)0)
18107 #endif
18108 main()
18109 {
18110         int rc;
18111         u_int32_t flags = DB_CREATE |
18112 #ifdef DB_PRIVATE
18113                 DB_PRIVATE |
18114 #endif
18115                 DB_THREAD;
18116
18117 #if DB_VERSION_MAJOR > 2
18118         DB_ENV *env = NULL;
18119
18120         rc = db_env_create( &env, 0 );
18121
18122         flags |= DB_INIT_MPOOL;
18123 #ifdef DB_MPOOL_PRIVATE
18124         flags |= DB_MPOOL_PRIVATE;
18125 #endif
18126
18127         if( rc ) {
18128                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18129                 return rc;
18130         }
18131
18132 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18133         rc = env->open( env, NULL, flags, 0 );
18134 #else
18135         rc = env->open( env, NULL, NULL, flags, 0 );
18136 #endif
18137
18138         if ( rc == 0 ) {
18139                 rc = env->close( env, 0 );
18140         }
18141
18142         if( rc ) {
18143                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18144                 return rc;
18145         }
18146
18147 #else
18148         DB_ENV env;
18149         memset( &env, '\0', sizeof(env) );
18150
18151         rc = db_appinit( NULL, NULL, &env, flags );
18152
18153         if( rc == 0 ) {
18154                 db_appexit( &env );
18155         }
18156
18157         unlink("__db_mpool.share");
18158         unlink("__db_lock.share");
18159 #endif
18160
18161         return rc;
18162 }
18163 EOF
18164 if { (eval echo configure:18165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18165 then
18166   ol_cv_berkeley_db_thread=yes
18167 else
18168   echo "configure: failed program was:" >&5
18169   cat conftest.$ac_ext >&5
18170   rm -fr conftest*
18171   ol_cv_berkeley_db_thread=no
18172 fi
18173 rm -fr conftest*
18174 fi
18175
18176
18177         LIBS="$ol_LIBS"
18178
18179         if test $ol_cv_berkeley_db_thread != no ; then
18180                 cat >> confdefs.h <<\EOF
18181 #define HAVE_BERKELEY_DB_THREAD 1
18182 EOF
18183
18184         fi
18185
18186 fi
18187
18188 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18189         fi
18190 fi
18191
18192         fi
18193
18194         if test $ol_cv_berkeley_db != no ; then
18195                 cat >> confdefs.h <<\EOF
18196 #define HAVE_BERKELEY_DB 1
18197 EOF
18198
18199
18200                 ol_link_ldbm=berkeley
18201                 ol_with_ldbm_api=berkeley
18202
18203                 if test $ol_with_ldbm_type = hash ; then
18204                         cat >> confdefs.h <<\EOF
18205 #define LDBM_USE_DBHASH 1
18206 EOF
18207
18208                 else
18209                         cat >> confdefs.h <<\EOF
18210 #define LDBM_USE_DBBTREE 1
18211 EOF
18212
18213                 fi
18214
18215                                                 if test $ol_cv_lib_db != yes ; then
18216                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18217                 fi
18218         fi
18219 fi
18220
18221 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18222         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18223 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18224         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18225 echo "configure:18226: checking Berkeley DB version for BDB backend" >&5
18226 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18227   echo $ac_n "(cached) $ac_c" 1>&6
18228 else
18229   
18230         cat > conftest.$ac_ext <<EOF
18231 #line 18232 "configure"
18232 #include "confdefs.h"
18233
18234 #include <db.h>
18235
18236  /* this check could be improved */
18237 #ifndef DB_VERSION_MAJOR
18238 #       define DB_VERSION_MAJOR 1
18239 #endif
18240
18241 /* require 4.0 or later */
18242 #if DB_VERSION_MAJOR >= 4 
18243         __db_version_compat
18244 #endif
18245         
18246 EOF
18247 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18248   egrep "__db_version_compat" >/dev/null 2>&1; then
18249   rm -rf conftest*
18250   ol_cv_bdb_compat=yes
18251 else
18252   rm -rf conftest*
18253   ol_cv_bdb_compat=no
18254 fi
18255 rm -f conftest*
18256
18257 fi
18258
18259 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18260
18261
18262         if test $ol_cv_bdb_compat = yes ; then
18263                 ol_enable_bdb=yes
18264         elif test $ol_enable_bdb = yes ; then
18265                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18266         else
18267                 ol_enable_bdb=no
18268         fi
18269 fi
18270
18271 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18272         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18273         ol_with_ldbm_api=none
18274 fi
18275
18276 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18277         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18278 echo "configure:18279: checking for MDBM library" >&5
18279 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18280   echo $ac_n "(cached) $ac_c" 1>&6
18281 else
18282         ol_LIBS="$LIBS"
18283         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18284 echo "configure:18285: checking for mdbm_set_chain" >&5
18285 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18286   echo $ac_n "(cached) $ac_c" 1>&6
18287 else
18288   cat > conftest.$ac_ext <<EOF
18289 #line 18290 "configure"
18290 #include "confdefs.h"
18291 /* System header to define __stub macros and hopefully few prototypes,
18292     which can conflict with char mdbm_set_chain(); below.  */
18293 #include <assert.h>
18294 /* Override any gcc2 internal prototype to avoid an error.  */
18295 /* We use char because int might match the return type of a gcc2
18296     builtin and then its argument prototype would still apply.  */
18297 char mdbm_set_chain();
18298 char (*f)();
18299
18300 int main() {
18301
18302 /* The GNU C library defines this for functions which it implements
18303     to always fail with ENOSYS.  Some functions are actually named
18304     something starting with __ and the normal name is an alias.  */
18305 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18306 choke me
18307 #else
18308 f = mdbm_set_chain;
18309 #endif
18310
18311 ; return 0; }
18312 EOF
18313 if { (eval echo configure:18314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18314   rm -rf conftest*
18315   eval "ac_cv_func_mdbm_set_chain=yes"
18316 else
18317   echo "configure: failed program was:" >&5
18318   cat conftest.$ac_ext >&5
18319   rm -rf conftest*
18320   eval "ac_cv_func_mdbm_set_chain=no"
18321 fi
18322 rm -f conftest*
18323 fi
18324
18325 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18326   echo "$ac_t""yes" 1>&6
18327   ol_cv_lib_mdbm=yes
18328 else
18329   echo "$ac_t""no" 1>&6
18330
18331                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18332 echo "configure:18333: checking for mdbm_set_chain in -lmdbm" >&5
18333 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18335   echo $ac_n "(cached) $ac_c" 1>&6
18336 else
18337   ac_save_LIBS="$LIBS"
18338 LIBS="-lmdbm  $LIBS"
18339 cat > conftest.$ac_ext <<EOF
18340 #line 18341 "configure"
18341 #include "confdefs.h"
18342 /* Override any gcc2 internal prototype to avoid an error.  */
18343 /* We use char because int might match the return type of a gcc2
18344     builtin and then its argument prototype would still apply.  */
18345 char mdbm_set_chain();
18346
18347 int main() {
18348 mdbm_set_chain()
18349 ; return 0; }
18350 EOF
18351 if { (eval echo configure:18352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18352   rm -rf conftest*
18353   eval "ac_cv_lib_$ac_lib_var=yes"
18354 else
18355   echo "configure: failed program was:" >&5
18356   cat conftest.$ac_ext >&5
18357   rm -rf conftest*
18358   eval "ac_cv_lib_$ac_lib_var=no"
18359 fi
18360 rm -f conftest*
18361 LIBS="$ac_save_LIBS"
18362
18363 fi
18364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18365   echo "$ac_t""yes" 1>&6
18366   ol_cv_lib_mdbm=-lmdbm
18367 else
18368   echo "$ac_t""no" 1>&6
18369 ol_cv_lib_mdbm=no
18370 fi
18371
18372         
18373 fi
18374
18375         LIBS="$ol_LIBS"
18376
18377 fi
18378
18379 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18380
18381
18382  for ac_hdr in mdbm.h
18383 do
18384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18386 echo "configure:18387: checking for $ac_hdr" >&5
18387 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18388   echo $ac_n "(cached) $ac_c" 1>&6
18389 else
18390   cat > conftest.$ac_ext <<EOF
18391 #line 18392 "configure"
18392 #include "confdefs.h"
18393 #include <$ac_hdr>
18394 EOF
18395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18396 { (eval echo configure:18397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18398 if test -z "$ac_err"; then
18399   rm -rf conftest*
18400   eval "ac_cv_header_$ac_safe=yes"
18401 else
18402   echo "$ac_err" >&5
18403   echo "configure: failed program was:" >&5
18404   cat conftest.$ac_ext >&5
18405   rm -rf conftest*
18406   eval "ac_cv_header_$ac_safe=no"
18407 fi
18408 rm -f conftest*
18409 fi
18410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18411   echo "$ac_t""yes" 1>&6
18412     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18413   cat >> confdefs.h <<EOF
18414 #define $ac_tr_hdr 1
18415 EOF
18416  
18417 else
18418   echo "$ac_t""no" 1>&6
18419 fi
18420 done
18421
18422  echo $ac_n "checking for db""... $ac_c" 1>&6
18423 echo "configure:18424: checking for db" >&5
18424 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18425   echo $ac_n "(cached) $ac_c" 1>&6
18426 else
18427   
18428         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18429                 ol_cv_mdbm=no
18430         else
18431                 ol_cv_mdbm=yes
18432         fi
18433
18434 fi
18435
18436 echo "$ac_t""$ol_cv_mdbm" 1>&6
18437  if test $ol_cv_mdbm = yes ; then
18438         cat >> confdefs.h <<\EOF
18439 #define HAVE_MDBM 1
18440 EOF
18441
18442  fi
18443
18444
18445         if test $ol_cv_mdbm = yes ; then
18446                 ol_link_ldbm=mdbm
18447                 ol_with_ldbm_api=mdbm
18448                 if test $ol_cv_lib_mdbm != yes ; then
18449                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18450                 fi
18451         fi
18452 fi
18453
18454 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18455         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18456 echo "configure:18457: checking for GDBM library" >&5
18457 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18458   echo $ac_n "(cached) $ac_c" 1>&6
18459 else
18460         ol_LIBS="$LIBS"
18461         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18462 echo "configure:18463: checking for gdbm_open" >&5
18463 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18464   echo $ac_n "(cached) $ac_c" 1>&6
18465 else
18466   cat > conftest.$ac_ext <<EOF
18467 #line 18468 "configure"
18468 #include "confdefs.h"
18469 /* System header to define __stub macros and hopefully few prototypes,
18470     which can conflict with char gdbm_open(); below.  */
18471 #include <assert.h>
18472 /* Override any gcc2 internal prototype to avoid an error.  */
18473 /* We use char because int might match the return type of a gcc2
18474     builtin and then its argument prototype would still apply.  */
18475 char gdbm_open();
18476 char (*f)();
18477
18478 int main() {
18479
18480 /* The GNU C library defines this for functions which it implements
18481     to always fail with ENOSYS.  Some functions are actually named
18482     something starting with __ and the normal name is an alias.  */
18483 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18484 choke me
18485 #else
18486 f = gdbm_open;
18487 #endif
18488
18489 ; return 0; }
18490 EOF
18491 if { (eval echo configure:18492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18492   rm -rf conftest*
18493   eval "ac_cv_func_gdbm_open=yes"
18494 else
18495   echo "configure: failed program was:" >&5
18496   cat conftest.$ac_ext >&5
18497   rm -rf conftest*
18498   eval "ac_cv_func_gdbm_open=no"
18499 fi
18500 rm -f conftest*
18501 fi
18502
18503 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18504   echo "$ac_t""yes" 1>&6
18505   ol_cv_lib_gdbm=yes
18506 else
18507   echo "$ac_t""no" 1>&6
18508
18509                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18510 echo "configure:18511: checking for gdbm_open in -lgdbm" >&5
18511 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18513   echo $ac_n "(cached) $ac_c" 1>&6
18514 else
18515   ac_save_LIBS="$LIBS"
18516 LIBS="-lgdbm  $LIBS"
18517 cat > conftest.$ac_ext <<EOF
18518 #line 18519 "configure"
18519 #include "confdefs.h"
18520 /* Override any gcc2 internal prototype to avoid an error.  */
18521 /* We use char because int might match the return type of a gcc2
18522     builtin and then its argument prototype would still apply.  */
18523 char gdbm_open();
18524
18525 int main() {
18526 gdbm_open()
18527 ; return 0; }
18528 EOF
18529 if { (eval echo configure:18530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18530   rm -rf conftest*
18531   eval "ac_cv_lib_$ac_lib_var=yes"
18532 else
18533   echo "configure: failed program was:" >&5
18534   cat conftest.$ac_ext >&5
18535   rm -rf conftest*
18536   eval "ac_cv_lib_$ac_lib_var=no"
18537 fi
18538 rm -f conftest*
18539 LIBS="$ac_save_LIBS"
18540
18541 fi
18542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18543   echo "$ac_t""yes" 1>&6
18544   ol_cv_lib_gdbm=-lgdbm
18545 else
18546   echo "$ac_t""no" 1>&6
18547 ol_cv_lib_gdbm=no
18548 fi
18549
18550         
18551 fi
18552
18553         LIBS="$ol_LIBS"
18554
18555 fi
18556
18557 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18558
18559
18560  for ac_hdr in gdbm.h
18561 do
18562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18564 echo "configure:18565: checking for $ac_hdr" >&5
18565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18566   echo $ac_n "(cached) $ac_c" 1>&6
18567 else
18568   cat > conftest.$ac_ext <<EOF
18569 #line 18570 "configure"
18570 #include "confdefs.h"
18571 #include <$ac_hdr>
18572 EOF
18573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18574 { (eval echo configure:18575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18576 if test -z "$ac_err"; then
18577   rm -rf conftest*
18578   eval "ac_cv_header_$ac_safe=yes"
18579 else
18580   echo "$ac_err" >&5
18581   echo "configure: failed program was:" >&5
18582   cat conftest.$ac_ext >&5
18583   rm -rf conftest*
18584   eval "ac_cv_header_$ac_safe=no"
18585 fi
18586 rm -f conftest*
18587 fi
18588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18589   echo "$ac_t""yes" 1>&6
18590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18591   cat >> confdefs.h <<EOF
18592 #define $ac_tr_hdr 1
18593 EOF
18594  
18595 else
18596   echo "$ac_t""no" 1>&6
18597 fi
18598 done
18599
18600  echo $ac_n "checking for db""... $ac_c" 1>&6
18601 echo "configure:18602: checking for db" >&5
18602 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18603   echo $ac_n "(cached) $ac_c" 1>&6
18604 else
18605   
18606         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18607                 ol_cv_gdbm=no
18608         else
18609                 ol_cv_gdbm=yes
18610         fi
18611
18612 fi
18613
18614 echo "$ac_t""$ol_cv_gdbm" 1>&6
18615  if test $ol_cv_gdbm = yes ; then
18616         cat >> confdefs.h <<\EOF
18617 #define HAVE_GDBM 1
18618 EOF
18619
18620  fi
18621
18622
18623         if test $ol_cv_gdbm = yes ; then
18624                 ol_link_ldbm=gdbm
18625                 ol_with_ldbm_api=gdbm
18626
18627                 if test $ol_cv_lib_gdbm != yes ; then
18628                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18629                 fi
18630         fi
18631 fi
18632
18633 if test $ol_with_ldbm_api = ndbm ; then
18634         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18635 echo "configure:18636: checking for NDBM library" >&5
18636 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18637   echo $ac_n "(cached) $ac_c" 1>&6
18638 else
18639         ol_LIBS="$LIBS"
18640         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18641 echo "configure:18642: checking for dbm_open" >&5
18642 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18643   echo $ac_n "(cached) $ac_c" 1>&6
18644 else
18645   cat > conftest.$ac_ext <<EOF
18646 #line 18647 "configure"
18647 #include "confdefs.h"
18648 /* System header to define __stub macros and hopefully few prototypes,
18649     which can conflict with char dbm_open(); below.  */
18650 #include <assert.h>
18651 /* Override any gcc2 internal prototype to avoid an error.  */
18652 /* We use char because int might match the return type of a gcc2
18653     builtin and then its argument prototype would still apply.  */
18654 char dbm_open();
18655 char (*f)();
18656
18657 int main() {
18658
18659 /* The GNU C library defines this for functions which it implements
18660     to always fail with ENOSYS.  Some functions are actually named
18661     something starting with __ and the normal name is an alias.  */
18662 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18663 choke me
18664 #else
18665 f = dbm_open;
18666 #endif
18667
18668 ; return 0; }
18669 EOF
18670 if { (eval echo configure:18671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18671   rm -rf conftest*
18672   eval "ac_cv_func_dbm_open=yes"
18673 else
18674   echo "configure: failed program was:" >&5
18675   cat conftest.$ac_ext >&5
18676   rm -rf conftest*
18677   eval "ac_cv_func_dbm_open=no"
18678 fi
18679 rm -f conftest*
18680 fi
18681
18682 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18683   echo "$ac_t""yes" 1>&6
18684   ol_cv_lib_ndbm=yes
18685 else
18686   echo "$ac_t""no" 1>&6
18687
18688                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18689 echo "configure:18690: checking for dbm_open in -lndbm" >&5
18690 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18692   echo $ac_n "(cached) $ac_c" 1>&6
18693 else
18694   ac_save_LIBS="$LIBS"
18695 LIBS="-lndbm  $LIBS"
18696 cat > conftest.$ac_ext <<EOF
18697 #line 18698 "configure"
18698 #include "confdefs.h"
18699 /* Override any gcc2 internal prototype to avoid an error.  */
18700 /* We use char because int might match the return type of a gcc2
18701     builtin and then its argument prototype would still apply.  */
18702 char dbm_open();
18703
18704 int main() {
18705 dbm_open()
18706 ; return 0; }
18707 EOF
18708 if { (eval echo configure:18709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18709   rm -rf conftest*
18710   eval "ac_cv_lib_$ac_lib_var=yes"
18711 else
18712   echo "configure: failed program was:" >&5
18713   cat conftest.$ac_ext >&5
18714   rm -rf conftest*
18715   eval "ac_cv_lib_$ac_lib_var=no"
18716 fi
18717 rm -f conftest*
18718 LIBS="$ac_save_LIBS"
18719
18720 fi
18721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18722   echo "$ac_t""yes" 1>&6
18723   ol_cv_lib_ndbm=-lndbm
18724 else
18725   echo "$ac_t""no" 1>&6
18726
18727                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18728 echo "configure:18729: checking for dbm_open in -ldbm" >&5
18729 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18731   echo $ac_n "(cached) $ac_c" 1>&6
18732 else
18733   ac_save_LIBS="$LIBS"
18734 LIBS="-ldbm  $LIBS"
18735 cat > conftest.$ac_ext <<EOF
18736 #line 18737 "configure"
18737 #include "confdefs.h"
18738 /* Override any gcc2 internal prototype to avoid an error.  */
18739 /* We use char because int might match the return type of a gcc2
18740     builtin and then its argument prototype would still apply.  */
18741 char dbm_open();
18742
18743 int main() {
18744 dbm_open()
18745 ; return 0; }
18746 EOF
18747 if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18748   rm -rf conftest*
18749   eval "ac_cv_lib_$ac_lib_var=yes"
18750 else
18751   echo "configure: failed program was:" >&5
18752   cat conftest.$ac_ext >&5
18753   rm -rf conftest*
18754   eval "ac_cv_lib_$ac_lib_var=no"
18755 fi
18756 rm -f conftest*
18757 LIBS="$ac_save_LIBS"
18758
18759 fi
18760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18761   echo "$ac_t""yes" 1>&6
18762   ol_cv_lib_ndbm=-ldbm
18763 else
18764   echo "$ac_t""no" 1>&6
18765 ol_cv_lib_ndbm=no
18766 fi
18767                 
18768 fi
18769
18770         
18771 fi
18772
18773         LIBS="$ol_LIBS"
18774
18775 fi
18776
18777 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18778
18779
18780  for ac_hdr in ndbm.h
18781 do
18782 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18783 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18784 echo "configure:18785: checking for $ac_hdr" >&5
18785 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18786   echo $ac_n "(cached) $ac_c" 1>&6
18787 else
18788   cat > conftest.$ac_ext <<EOF
18789 #line 18790 "configure"
18790 #include "confdefs.h"
18791 #include <$ac_hdr>
18792 EOF
18793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18794 { (eval echo configure:18795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18796 if test -z "$ac_err"; then
18797   rm -rf conftest*
18798   eval "ac_cv_header_$ac_safe=yes"
18799 else
18800   echo "$ac_err" >&5
18801   echo "configure: failed program was:" >&5
18802   cat conftest.$ac_ext >&5
18803   rm -rf conftest*
18804   eval "ac_cv_header_$ac_safe=no"
18805 fi
18806 rm -f conftest*
18807 fi
18808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18809   echo "$ac_t""yes" 1>&6
18810     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18811   cat >> confdefs.h <<EOF
18812 #define $ac_tr_hdr 1
18813 EOF
18814  
18815 else
18816   echo "$ac_t""no" 1>&6
18817 fi
18818 done
18819
18820  echo $ac_n "checking for db""... $ac_c" 1>&6
18821 echo "configure:18822: checking for db" >&5
18822 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18823   echo $ac_n "(cached) $ac_c" 1>&6
18824 else
18825   
18826         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18827                 ol_cv_ndbm=no
18828         else
18829                 ol_cv_ndbm=yes
18830         fi
18831
18832 fi
18833
18834 echo "$ac_t""$ol_cv_ndbm" 1>&6
18835  if test $ol_cv_ndbm = yes ; then
18836         cat >> confdefs.h <<\EOF
18837 #define HAVE_NDBM 1
18838 EOF
18839
18840  fi
18841
18842
18843         if test $ol_cv_ndbm = yes ; then
18844                 ol_link_ldbm=ndbm
18845                 ol_with_ldbm_api=ndbm
18846
18847                 if test $ol_cv_lib_ndbm != yes ; then
18848                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18849                 fi
18850         fi
18851 fi
18852
18853 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18854         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18855         if test $ol_enable_ldbm = yes ; then
18856                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18857         fi
18858
18859         echo "configure: warning: disabling LDBM" 1>&2
18860         ol_enable_ldbm=no
18861 fi
18862
18863 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18864         BUILD_LIBS_DYNAMIC=shared
18865         cat >> confdefs.h <<\EOF
18866 #define LDAP_LIBS_DYNAMIC 1
18867 EOF
18868
18869 else
18870         BUILD_LIBS_DYNAMIC=static
18871 fi
18872
18873 if test $ol_enable_wrappers != no ; then
18874         for ac_hdr in tcpd.h
18875 do
18876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18878 echo "configure:18879: checking for $ac_hdr" >&5
18879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18880   echo $ac_n "(cached) $ac_c" 1>&6
18881 else
18882   cat > conftest.$ac_ext <<EOF
18883 #line 18884 "configure"
18884 #include "confdefs.h"
18885 #include <$ac_hdr>
18886 EOF
18887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18888 { (eval echo configure:18889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18890 if test -z "$ac_err"; then
18891   rm -rf conftest*
18892   eval "ac_cv_header_$ac_safe=yes"
18893 else
18894   echo "$ac_err" >&5
18895   echo "configure: failed program was:" >&5
18896   cat conftest.$ac_ext >&5
18897   rm -rf conftest*
18898   eval "ac_cv_header_$ac_safe=no"
18899 fi
18900 rm -f conftest*
18901 fi
18902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18903   echo "$ac_t""yes" 1>&6
18904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18905   cat >> confdefs.h <<EOF
18906 #define $ac_tr_hdr 1
18907 EOF
18908  
18909                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18910 echo "configure:18911: checking for TCP wrappers library" >&5
18911                 save_LIBS="$LIBS"
18912                 LIBS="$LIBS -lwrap"
18913                 cat > conftest.$ac_ext <<EOF
18914 #line 18915 "configure"
18915 #include "confdefs.h"
18916
18917 #include <tcpd.h>
18918 int allow_severity = 0;
18919 int deny_severity  = 0;
18920
18921 struct request_info *req;
18922                 
18923 int main() {
18924
18925 hosts_access(req)
18926                 
18927 ; return 0; }
18928 EOF
18929 if { (eval echo configure:18930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18930   rm -rf conftest*
18931   echo "$ac_t""-lwrap" 1>&6
18932                 have_wrappers=yes
18933                 LIBS="$save_LIBS"
18934 else
18935   echo "configure: failed program was:" >&5
18936   cat conftest.$ac_ext >&5
18937   rm -rf conftest*
18938   
18939                                 LIBS="$LIBS -lnsl"
18940                 cat > conftest.$ac_ext <<EOF
18941 #line 18942 "configure"
18942 #include "confdefs.h"
18943
18944 #include <tcpd.h>
18945 int allow_severity = 0;
18946 int deny_severity  = 0;
18947
18948 struct request_info *req;
18949                 
18950 int main() {
18951
18952 hosts_access(req)
18953                 
18954 ; return 0; }
18955 EOF
18956 if { (eval echo configure:18957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18957   rm -rf conftest*
18958   echo "$ac_t""-lwrap -lnsl" 1>&6
18959                 have_wrappers=yes
18960                 LIBS="$save_LIBS -lnsl"
18961 else
18962   echo "configure: failed program was:" >&5
18963   cat conftest.$ac_ext >&5
18964   rm -rf conftest*
18965   
18966                 echo "$ac_t""no" 1>&6
18967                 have_wrappers=no
18968                 LIBS=$save_LIBS
18969 fi
18970 rm -f conftest*
18971 fi
18972 rm -f conftest*
18973 else
18974   echo "$ac_t""no" 1>&6
18975 have_wrappers=no
18976 fi
18977 done
18978
18979
18980         if test $have_wrappers = yes ; then
18981                 cat >> confdefs.h <<\EOF
18982 #define HAVE_TCPD 1
18983 EOF
18984
18985                 WRAP_LIBS="-lwrap"
18986         elif test $ol_enable_wrappers = yes ; then
18987                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18988         else
18989                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18990                 WRAP_LIBS=""
18991         fi
18992 fi
18993
18994 if test $ol_enable_syslog != no ; then
18995         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18996 echo "configure:18997: checking for openlog" >&5
18997 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18998   echo $ac_n "(cached) $ac_c" 1>&6
18999 else
19000   cat > conftest.$ac_ext <<EOF
19001 #line 19002 "configure"
19002 #include "confdefs.h"
19003 /* System header to define __stub macros and hopefully few prototypes,
19004     which can conflict with char openlog(); below.  */
19005 #include <assert.h>
19006 /* Override any gcc2 internal prototype to avoid an error.  */
19007 /* We use char because int might match the return type of a gcc2
19008     builtin and then its argument prototype would still apply.  */
19009 char openlog();
19010 char (*f)();
19011
19012 int main() {
19013
19014 /* The GNU C library defines this for functions which it implements
19015     to always fail with ENOSYS.  Some functions are actually named
19016     something starting with __ and the normal name is an alias.  */
19017 #if defined (__stub_openlog) || defined (__stub___openlog)
19018 choke me
19019 #else
19020 f = openlog;
19021 #endif
19022
19023 ; return 0; }
19024 EOF
19025 if { (eval echo configure:19026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19026   rm -rf conftest*
19027   eval "ac_cv_func_openlog=yes"
19028 else
19029   echo "configure: failed program was:" >&5
19030   cat conftest.$ac_ext >&5
19031   rm -rf conftest*
19032   eval "ac_cv_func_openlog=no"
19033 fi
19034 rm -f conftest*
19035 fi
19036
19037 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19038   echo "$ac_t""yes" 1>&6
19039   :
19040 else
19041   echo "$ac_t""no" 1>&6
19042 fi
19043
19044         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19045                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19046         fi
19047         ol_enable_syslog=$ac_cv_func_openlog
19048 fi
19049
19050
19051 ol_link_sql=no
19052 if test $ol_enable_sql != no ; then
19053         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19054 echo "configure:19055: checking for SQLDriverConnect in -liodbc" >&5
19055 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19057   echo $ac_n "(cached) $ac_c" 1>&6
19058 else
19059   ac_save_LIBS="$LIBS"
19060 LIBS="-liodbc  $LIBS"
19061 cat > conftest.$ac_ext <<EOF
19062 #line 19063 "configure"
19063 #include "confdefs.h"
19064 /* Override any gcc2 internal prototype to avoid an error.  */
19065 /* We use char because int might match the return type of a gcc2
19066     builtin and then its argument prototype would still apply.  */
19067 char SQLDriverConnect();
19068
19069 int main() {
19070 SQLDriverConnect()
19071 ; return 0; }
19072 EOF
19073 if { (eval echo configure:19074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19074   rm -rf conftest*
19075   eval "ac_cv_lib_$ac_lib_var=yes"
19076 else
19077   echo "configure: failed program was:" >&5
19078   cat conftest.$ac_ext >&5
19079   rm -rf conftest*
19080   eval "ac_cv_lib_$ac_lib_var=no"
19081 fi
19082 rm -f conftest*
19083 LIBS="$ac_save_LIBS"
19084
19085 fi
19086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19087   echo "$ac_t""yes" 1>&6
19088   have_iodbc=yes
19089 else
19090   echo "$ac_t""no" 1>&6
19091 have_iodbc=no
19092 fi
19093
19094         if test $have_iodbc = yes ; then
19095                 ol_link_sql="-liodbc"
19096         else
19097                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19098 echo "configure:19099: checking for SQLDriverConnect in -lodbc" >&5
19099 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   ac_save_LIBS="$LIBS"
19104 LIBS="-lodbc  $LIBS"
19105 cat > conftest.$ac_ext <<EOF
19106 #line 19107 "configure"
19107 #include "confdefs.h"
19108 /* Override any gcc2 internal prototype to avoid an error.  */
19109 /* We use char because int might match the return type of a gcc2
19110     builtin and then its argument prototype would still apply.  */
19111 char SQLDriverConnect();
19112
19113 int main() {
19114 SQLDriverConnect()
19115 ; return 0; }
19116 EOF
19117 if { (eval echo configure:19118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19118   rm -rf conftest*
19119   eval "ac_cv_lib_$ac_lib_var=yes"
19120 else
19121   echo "configure: failed program was:" >&5
19122   cat conftest.$ac_ext >&5
19123   rm -rf conftest*
19124   eval "ac_cv_lib_$ac_lib_var=no"
19125 fi
19126 rm -f conftest*
19127 LIBS="$ac_save_LIBS"
19128
19129 fi
19130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19131   echo "$ac_t""yes" 1>&6
19132   have_odbc=yes
19133 else
19134   echo "$ac_t""no" 1>&6
19135 have_odbc=no
19136 fi
19137
19138                 if test $have_odbc = yes ; then
19139                         ol_link_sql="-lodbc"
19140                 fi
19141         fi
19142
19143         if test $ol_link_sql != no ; then
19144                 SLAPD_SQL_LIBS="$ol_link_sql"
19145
19146         elif test $ol_enable_sql != auto ; then
19147                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19148         fi
19149 fi
19150
19151 if test $ol_enable_tcl != no ; then
19152         for ac_hdr in tcl.h
19153 do
19154 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19155 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19156 echo "configure:19157: checking for $ac_hdr" >&5
19157 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19158   echo $ac_n "(cached) $ac_c" 1>&6
19159 else
19160   cat > conftest.$ac_ext <<EOF
19161 #line 19162 "configure"
19162 #include "confdefs.h"
19163 #include <$ac_hdr>
19164 EOF
19165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19166 { (eval echo configure:19167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19168 if test -z "$ac_err"; then
19169   rm -rf conftest*
19170   eval "ac_cv_header_$ac_safe=yes"
19171 else
19172   echo "$ac_err" >&5
19173   echo "configure: failed program was:" >&5
19174   cat conftest.$ac_ext >&5
19175   rm -rf conftest*
19176   eval "ac_cv_header_$ac_safe=no"
19177 fi
19178 rm -f conftest*
19179 fi
19180 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19181   echo "$ac_t""yes" 1>&6
19182     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19183   cat >> confdefs.h <<EOF
19184 #define $ac_tr_hdr 1
19185 EOF
19186  
19187 else
19188   echo "$ac_t""no" 1>&6
19189 fi
19190 done
19191
19192
19193         if test $ac_cv_header_tcl_h != yes ; then
19194                 have_tcl=no
19195         else
19196                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19197                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19198 echo "configure:19199: checking for main in -l$lib" >&5
19199 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19201   echo $ac_n "(cached) $ac_c" 1>&6
19202 else
19203   ac_save_LIBS="$LIBS"
19204 LIBS="-l$lib  $LIBS"
19205 cat > conftest.$ac_ext <<EOF
19206 #line 19207 "configure"
19207 #include "confdefs.h"
19208
19209 int main() {
19210 main()
19211 ; return 0; }
19212 EOF
19213 if { (eval echo configure:19214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19214   rm -rf conftest*
19215   eval "ac_cv_lib_$ac_lib_var=yes"
19216 else
19217   echo "configure: failed program was:" >&5
19218   cat conftest.$ac_ext >&5
19219   rm -rf conftest*
19220   eval "ac_cv_lib_$ac_lib_var=no"
19221 fi
19222 rm -f conftest*
19223 LIBS="$ac_save_LIBS"
19224
19225 fi
19226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19227   echo "$ac_t""yes" 1>&6
19228   have_tcl=yes
19229                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19230                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19231                            else
19232                                         MOD_TCL_LIB="-l${lib}"
19233                            fi;break
19234 else
19235   echo "$ac_t""no" 1>&6
19236 have_tcl=no
19237 fi
19238
19239                 done
19240         fi
19241
19242         if test $have_tcl != yes ; then
19243                 echo "configure: warning: could not find -ltcl" 1>&2
19244                 if test $ol_enable_tcl = yes ; then
19245                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19246                 fi
19247
19248                 ol_enable_tcl=no
19249         fi
19250 fi
19251
19252 ol_link_termcap=no
19253 for ac_hdr in termcap.h ncurses.h
19254 do
19255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19257 echo "configure:19258: checking for $ac_hdr" >&5
19258 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19259   echo $ac_n "(cached) $ac_c" 1>&6
19260 else
19261   cat > conftest.$ac_ext <<EOF
19262 #line 19263 "configure"
19263 #include "confdefs.h"
19264 #include <$ac_hdr>
19265 EOF
19266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19267 { (eval echo configure:19268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19269 if test -z "$ac_err"; then
19270   rm -rf conftest*
19271   eval "ac_cv_header_$ac_safe=yes"
19272 else
19273   echo "$ac_err" >&5
19274   echo "configure: failed program was:" >&5
19275   cat conftest.$ac_ext >&5
19276   rm -rf conftest*
19277   eval "ac_cv_header_$ac_safe=no"
19278 fi
19279 rm -f conftest*
19280 fi
19281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19282   echo "$ac_t""yes" 1>&6
19283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19284   cat >> confdefs.h <<EOF
19285 #define $ac_tr_hdr 1
19286 EOF
19287  
19288 else
19289   echo "$ac_t""no" 1>&6
19290 fi
19291 done
19292
19293
19294 if test $ol_link_termcap = no ; then
19295         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19296 echo "configure:19297: checking for tputs in -ltermcap" >&5
19297 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19299   echo $ac_n "(cached) $ac_c" 1>&6
19300 else
19301   ac_save_LIBS="$LIBS"
19302 LIBS="-ltermcap  $LIBS"
19303 cat > conftest.$ac_ext <<EOF
19304 #line 19305 "configure"
19305 #include "confdefs.h"
19306 /* Override any gcc2 internal prototype to avoid an error.  */
19307 /* We use char because int might match the return type of a gcc2
19308     builtin and then its argument prototype would still apply.  */
19309 char tputs();
19310
19311 int main() {
19312 tputs()
19313 ; return 0; }
19314 EOF
19315 if { (eval echo configure:19316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19316   rm -rf conftest*
19317   eval "ac_cv_lib_$ac_lib_var=yes"
19318 else
19319   echo "configure: failed program was:" >&5
19320   cat conftest.$ac_ext >&5
19321   rm -rf conftest*
19322   eval "ac_cv_lib_$ac_lib_var=no"
19323 fi
19324 rm -f conftest*
19325 LIBS="$ac_save_LIBS"
19326
19327 fi
19328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19329   echo "$ac_t""yes" 1>&6
19330   have_termcap=yes
19331 else
19332   echo "$ac_t""no" 1>&6
19333 have_termcap=no
19334 fi
19335
19336         if test $have_termcap = yes ; then
19337                 cat >> confdefs.h <<\EOF
19338 #define HAVE_TERMCAP 1
19339 EOF
19340
19341                 ol_link_termcap=yes
19342                 TERMCAP_LIBS=-ltermcap
19343         fi
19344 fi
19345
19346 if test $ol_link_termcap = no ; then
19347         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19348 echo "configure:19349: checking for initscr in -lncurses" >&5
19349 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19351   echo $ac_n "(cached) $ac_c" 1>&6
19352 else
19353   ac_save_LIBS="$LIBS"
19354 LIBS="-lncurses  $LIBS"
19355 cat > conftest.$ac_ext <<EOF
19356 #line 19357 "configure"
19357 #include "confdefs.h"
19358 /* Override any gcc2 internal prototype to avoid an error.  */
19359 /* We use char because int might match the return type of a gcc2
19360     builtin and then its argument prototype would still apply.  */
19361 char initscr();
19362
19363 int main() {
19364 initscr()
19365 ; return 0; }
19366 EOF
19367 if { (eval echo configure:19368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19368   rm -rf conftest*
19369   eval "ac_cv_lib_$ac_lib_var=yes"
19370 else
19371   echo "configure: failed program was:" >&5
19372   cat conftest.$ac_ext >&5
19373   rm -rf conftest*
19374   eval "ac_cv_lib_$ac_lib_var=no"
19375 fi
19376 rm -f conftest*
19377 LIBS="$ac_save_LIBS"
19378
19379 fi
19380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19381   echo "$ac_t""yes" 1>&6
19382   have_ncurses=yes
19383 else
19384   echo "$ac_t""no" 1>&6
19385 have_ncurses=no
19386 fi
19387
19388         if test $have_ncurses = yes ; then
19389                 cat >> confdefs.h <<\EOF
19390 #define HAVE_NCURSES 1
19391 EOF
19392
19393                 ol_link_termcap=yes
19394                 TERMCAP_LIBS=-lncurses
19395         fi
19396 fi
19397
19398 if test $ol_link_termcap = no ; then
19399         cat >> confdefs.h <<\EOF
19400 #define NO_TERMCAP 1
19401 EOF
19402
19403         TERMCAP_LIBS=
19404 fi
19405
19406 ol_link_sasl=no
19407 ol_link_spasswd=no
19408 if test $ol_with_cyrus_sasl != no ; then
19409         for ac_hdr in sasl/sasl.h sasl.h
19410 do
19411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19413 echo "configure:19414: checking for $ac_hdr" >&5
19414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19415   echo $ac_n "(cached) $ac_c" 1>&6
19416 else
19417   cat > conftest.$ac_ext <<EOF
19418 #line 19419 "configure"
19419 #include "confdefs.h"
19420 #include <$ac_hdr>
19421 EOF
19422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19423 { (eval echo configure:19424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19425 if test -z "$ac_err"; then
19426   rm -rf conftest*
19427   eval "ac_cv_header_$ac_safe=yes"
19428 else
19429   echo "$ac_err" >&5
19430   echo "configure: failed program was:" >&5
19431   cat conftest.$ac_ext >&5
19432   rm -rf conftest*
19433   eval "ac_cv_header_$ac_safe=no"
19434 fi
19435 rm -f conftest*
19436 fi
19437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19438   echo "$ac_t""yes" 1>&6
19439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19440   cat >> confdefs.h <<EOF
19441 #define $ac_tr_hdr 1
19442 EOF
19443  
19444 else
19445   echo "$ac_t""no" 1>&6
19446 fi
19447 done
19448
19449
19450         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19451                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19452 echo "configure:19453: checking for sasl_client_init in -lsasl2" >&5
19453 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19454 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19455   echo $ac_n "(cached) $ac_c" 1>&6
19456 else
19457   ac_save_LIBS="$LIBS"
19458 LIBS="-lsasl2  $LIBS"
19459 cat > conftest.$ac_ext <<EOF
19460 #line 19461 "configure"
19461 #include "confdefs.h"
19462 /* Override any gcc2 internal prototype to avoid an error.  */
19463 /* We use char because int might match the return type of a gcc2
19464     builtin and then its argument prototype would still apply.  */
19465 char sasl_client_init();
19466
19467 int main() {
19468 sasl_client_init()
19469 ; return 0; }
19470 EOF
19471 if { (eval echo configure:19472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19472   rm -rf conftest*
19473   eval "ac_cv_lib_$ac_lib_var=yes"
19474 else
19475   echo "configure: failed program was:" >&5
19476   cat conftest.$ac_ext >&5
19477   rm -rf conftest*
19478   eval "ac_cv_lib_$ac_lib_var=no"
19479 fi
19480 rm -f conftest*
19481 LIBS="$ac_save_LIBS"
19482
19483 fi
19484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19485   echo "$ac_t""yes" 1>&6
19486   ol_link_sasl="-lsasl2"
19487 else
19488   echo "$ac_t""no" 1>&6
19489 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19490 echo "configure:19491: checking for sasl_client_init in -lsasl" >&5
19491 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19493   echo $ac_n "(cached) $ac_c" 1>&6
19494 else
19495   ac_save_LIBS="$LIBS"
19496 LIBS="-lsasl  $LIBS"
19497 cat > conftest.$ac_ext <<EOF
19498 #line 19499 "configure"
19499 #include "confdefs.h"
19500 /* Override any gcc2 internal prototype to avoid an error.  */
19501 /* We use char because int might match the return type of a gcc2
19502     builtin and then its argument prototype would still apply.  */
19503 char sasl_client_init();
19504
19505 int main() {
19506 sasl_client_init()
19507 ; return 0; }
19508 EOF
19509 if { (eval echo configure:19510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19510   rm -rf conftest*
19511   eval "ac_cv_lib_$ac_lib_var=yes"
19512 else
19513   echo "configure: failed program was:" >&5
19514   cat conftest.$ac_ext >&5
19515   rm -rf conftest*
19516   eval "ac_cv_lib_$ac_lib_var=no"
19517 fi
19518 rm -f conftest*
19519 LIBS="$ac_save_LIBS"
19520
19521 fi
19522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19523   echo "$ac_t""yes" 1>&6
19524   ol_link_sasl="-lsasl"
19525 else
19526   echo "$ac_t""no" 1>&6
19527 fi
19528
19529 fi
19530
19531         fi
19532
19533         if test $ol_link_sasl = no ; then
19534                 if test $ol_with_cyrus_sasl != auto ; then
19535                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19536                 else
19537                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19538                         echo "configure: warning: SASL authentication not supported!" 1>&2
19539                         if test $ol_link_tls = no ; then
19540                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19541                         fi
19542                 fi
19543         else
19544                 cat >> confdefs.h <<\EOF
19545 #define HAVE_CYRUS_SASL 1
19546 EOF
19547
19548                 SASL_LIBS="$ol_link_sasl"
19549                 if test $ol_enable_spasswd != no ; then
19550                         ol_link_spasswd=yes
19551                 fi
19552         fi
19553
19554 else
19555         echo "configure: warning: SASL authentication not supported!" 1>&2
19556         if test $ol_link_tls = no ; then
19557                 echo "configure: warning: Strong authentication not supported!" 1>&2
19558         fi
19559 fi
19560
19561 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19562         dev=no
19563         if test -r /dev/urandom ; then
19564                 dev="/dev/urandom";
19565         elif test -r /idev/urandom ; then
19566                 dev="/idev/urandom";
19567         elif test -r /dev/srandom ; then
19568                 dev="/dev/srandom";
19569         elif test -r /dev/random ; then
19570                 dev="/dev/random";
19571         elif test -r /idev/random ; then
19572                 dev="/idev/random";
19573         fi
19574
19575         if test $dev != no ; then
19576                 cat >> confdefs.h <<EOF
19577 #define URANDOM_DEVICE "$dev"
19578 EOF
19579
19580         fi
19581 fi
19582
19583 ol_link_fetch=no
19584 if test $ol_with_fetch != no ; then
19585         ol_LIBS=$LIBS
19586 LIBS="-lfetch -lcom_err $LIBS"
19587 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19588 echo "configure:19589: checking fetch(3) library" >&5
19589 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19590   echo $ac_n "(cached) $ac_c" 1>&6
19591 else
19592   
19593         cat > conftest.$ac_ext <<EOF
19594 #line 19595 "configure"
19595 #include "confdefs.h"
19596
19597 #include <sys/param.h>
19598 #include <stdio.h>
19599 #include <fetch.h>
19600 int main() {
19601 struct url *u = fetchParseURL("file:///"); 
19602 ; return 0; }
19603 EOF
19604 if { (eval echo configure:19605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19605   rm -rf conftest*
19606   ol_cv_lib_fetch=yes
19607 else
19608   echo "configure: failed program was:" >&5
19609   cat conftest.$ac_ext >&5
19610   rm -rf conftest*
19611   ol_cv_lib_fetch=no
19612 fi
19613 rm -f conftest*
19614 fi
19615
19616 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19617 LIBS=$ol_LIBS
19618 if test $ol_cv_lib_fetch != no ; then
19619         ol_link_fetch="-lfetch -lcom_err"
19620         cat >> confdefs.h <<\EOF
19621 #define HAVE_FETCH 1
19622 EOF
19623
19624 fi
19625
19626
19627         if test $ol_cv_lib_fetch != no ; then
19628                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19629                 ol_link_fetch=freebsd
19630
19631         elif test $ol_with_fetch != auto ; then
19632                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19633         fi 
19634 fi
19635
19636 ol_link_readline=no
19637 if test $ol_with_readline != no ; then
19638         for ac_hdr in readline/readline.h readline/history.h
19639 do
19640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19642 echo "configure:19643: checking for $ac_hdr" >&5
19643 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19644   echo $ac_n "(cached) $ac_c" 1>&6
19645 else
19646   cat > conftest.$ac_ext <<EOF
19647 #line 19648 "configure"
19648 #include "confdefs.h"
19649 #include <$ac_hdr>
19650 EOF
19651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19652 { (eval echo configure:19653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19654 if test -z "$ac_err"; then
19655   rm -rf conftest*
19656   eval "ac_cv_header_$ac_safe=yes"
19657 else
19658   echo "$ac_err" >&5
19659   echo "configure: failed program was:" >&5
19660   cat conftest.$ac_ext >&5
19661   rm -rf conftest*
19662   eval "ac_cv_header_$ac_safe=no"
19663 fi
19664 rm -f conftest*
19665 fi
19666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19667   echo "$ac_t""yes" 1>&6
19668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19669   cat >> confdefs.h <<EOF
19670 #define $ac_tr_hdr 1
19671 EOF
19672  
19673 else
19674   echo "$ac_t""no" 1>&6
19675 fi
19676 done
19677
19678
19679         if test $ac_cv_header_readline_readline_h = yes ; then
19680                 save_LIBS="$LIBS"
19681                 LIBS="$TERMCAP_LIBS $LIBS"
19682                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19683 echo "configure:19684: checking for readline in -lreadline" >&5
19684 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19686   echo $ac_n "(cached) $ac_c" 1>&6
19687 else
19688   ac_save_LIBS="$LIBS"
19689 LIBS="-lreadline  $LIBS"
19690 cat > conftest.$ac_ext <<EOF
19691 #line 19692 "configure"
19692 #include "confdefs.h"
19693 /* Override any gcc2 internal prototype to avoid an error.  */
19694 /* We use char because int might match the return type of a gcc2
19695     builtin and then its argument prototype would still apply.  */
19696 char readline();
19697
19698 int main() {
19699 readline()
19700 ; return 0; }
19701 EOF
19702 if { (eval echo configure:19703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19703   rm -rf conftest*
19704   eval "ac_cv_lib_$ac_lib_var=yes"
19705 else
19706   echo "configure: failed program was:" >&5
19707   cat conftest.$ac_ext >&5
19708   rm -rf conftest*
19709   eval "ac_cv_lib_$ac_lib_var=no"
19710 fi
19711 rm -f conftest*
19712 LIBS="$ac_save_LIBS"
19713
19714 fi
19715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19716   echo "$ac_t""yes" 1>&6
19717   have_readline=yes
19718 else
19719   echo "$ac_t""no" 1>&6
19720 have_readline=no
19721 fi
19722
19723                 LIBS="$save_LIBS"
19724                         
19725                 if test $have_readline = yes ; then
19726                         ol_with_readline=found
19727                         ol_link_readline=yes
19728
19729                         READLINE_LIBS="-lreadline"
19730                 fi
19731         fi
19732 fi
19733
19734 if test $ol_link_readline = yes ; then
19735         cat >> confdefs.h <<\EOF
19736 #define HAVE_READLINE 1
19737 EOF
19738
19739 fi
19740
19741
19742 if test $ol_enable_crypt != no ; then
19743         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19744 echo "configure:19745: checking for crypt" >&5
19745 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19746   echo $ac_n "(cached) $ac_c" 1>&6
19747 else
19748   cat > conftest.$ac_ext <<EOF
19749 #line 19750 "configure"
19750 #include "confdefs.h"
19751 /* System header to define __stub macros and hopefully few prototypes,
19752     which can conflict with char crypt(); below.  */
19753 #include <assert.h>
19754 /* Override any gcc2 internal prototype to avoid an error.  */
19755 /* We use char because int might match the return type of a gcc2
19756     builtin and then its argument prototype would still apply.  */
19757 char crypt();
19758 char (*f)();
19759
19760 int main() {
19761
19762 /* The GNU C library defines this for functions which it implements
19763     to always fail with ENOSYS.  Some functions are actually named
19764     something starting with __ and the normal name is an alias.  */
19765 #if defined (__stub_crypt) || defined (__stub___crypt)
19766 choke me
19767 #else
19768 f = crypt;
19769 #endif
19770
19771 ; return 0; }
19772 EOF
19773 if { (eval echo configure:19774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19774   rm -rf conftest*
19775   eval "ac_cv_func_crypt=yes"
19776 else
19777   echo "configure: failed program was:" >&5
19778   cat conftest.$ac_ext >&5
19779   rm -rf conftest*
19780   eval "ac_cv_func_crypt=no"
19781 fi
19782 rm -f conftest*
19783 fi
19784
19785 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19786   echo "$ac_t""yes" 1>&6
19787   have_crypt=yes
19788 else
19789   echo "$ac_t""no" 1>&6
19790
19791                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19792 echo "configure:19793: checking for crypt in -lcrypt" >&5
19793 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19795   echo $ac_n "(cached) $ac_c" 1>&6
19796 else
19797   ac_save_LIBS="$LIBS"
19798 LIBS="-lcrypt  $LIBS"
19799 cat > conftest.$ac_ext <<EOF
19800 #line 19801 "configure"
19801 #include "confdefs.h"
19802 /* Override any gcc2 internal prototype to avoid an error.  */
19803 /* We use char because int might match the return type of a gcc2
19804     builtin and then its argument prototype would still apply.  */
19805 char crypt();
19806
19807 int main() {
19808 crypt()
19809 ; return 0; }
19810 EOF
19811 if { (eval echo configure:19812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19812   rm -rf conftest*
19813   eval "ac_cv_lib_$ac_lib_var=yes"
19814 else
19815   echo "configure: failed program was:" >&5
19816   cat conftest.$ac_ext >&5
19817   rm -rf conftest*
19818   eval "ac_cv_lib_$ac_lib_var=no"
19819 fi
19820 rm -f conftest*
19821 LIBS="$ac_save_LIBS"
19822
19823 fi
19824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19825   echo "$ac_t""yes" 1>&6
19826   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19827                         have_crypt=yes
19828 else
19829   echo "$ac_t""no" 1>&6
19830 have_crypt=no
19831 fi
19832
19833 fi
19834
19835
19836         if test $have_crypt = yes ; then
19837                 cat >> confdefs.h <<\EOF
19838 #define HAVE_CRYPT 1
19839 EOF
19840
19841         else
19842                 echo "configure: warning: could not find crypt" 1>&2
19843                 if test $ol_enable_crypt = yes ; then
19844                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19845                 fi
19846
19847                 echo "configure: warning: disabling crypt support" 1>&2
19848                 ol_enable_crypt=no
19849         fi
19850 fi
19851
19852 if test $ol_enable_proctitle != no ; then
19853         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19854 echo "configure:19855: checking for setproctitle" >&5
19855 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19856   echo $ac_n "(cached) $ac_c" 1>&6
19857 else
19858   cat > conftest.$ac_ext <<EOF
19859 #line 19860 "configure"
19860 #include "confdefs.h"
19861 /* System header to define __stub macros and hopefully few prototypes,
19862     which can conflict with char setproctitle(); below.  */
19863 #include <assert.h>
19864 /* Override any gcc2 internal prototype to avoid an error.  */
19865 /* We use char because int might match the return type of a gcc2
19866     builtin and then its argument prototype would still apply.  */
19867 char setproctitle();
19868 char (*f)();
19869
19870 int main() {
19871
19872 /* The GNU C library defines this for functions which it implements
19873     to always fail with ENOSYS.  Some functions are actually named
19874     something starting with __ and the normal name is an alias.  */
19875 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19876 choke me
19877 #else
19878 f = setproctitle;
19879 #endif
19880
19881 ; return 0; }
19882 EOF
19883 if { (eval echo configure:19884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19884   rm -rf conftest*
19885   eval "ac_cv_func_setproctitle=yes"
19886 else
19887   echo "configure: failed program was:" >&5
19888   cat conftest.$ac_ext >&5
19889   rm -rf conftest*
19890   eval "ac_cv_func_setproctitle=no"
19891 fi
19892 rm -f conftest*
19893 fi
19894
19895 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19896   echo "$ac_t""yes" 1>&6
19897   have_setproctitle=yes
19898 else
19899   echo "$ac_t""no" 1>&6
19900
19901                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19902 echo "configure:19903: checking for setproctitle in -lutil" >&5
19903 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19905   echo $ac_n "(cached) $ac_c" 1>&6
19906 else
19907   ac_save_LIBS="$LIBS"
19908 LIBS="-lutil  $LIBS"
19909 cat > conftest.$ac_ext <<EOF
19910 #line 19911 "configure"
19911 #include "confdefs.h"
19912 /* Override any gcc2 internal prototype to avoid an error.  */
19913 /* We use char because int might match the return type of a gcc2
19914     builtin and then its argument prototype would still apply.  */
19915 char setproctitle();
19916
19917 int main() {
19918 setproctitle()
19919 ; return 0; }
19920 EOF
19921 if { (eval echo configure:19922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19922   rm -rf conftest*
19923   eval "ac_cv_lib_$ac_lib_var=yes"
19924 else
19925   echo "configure: failed program was:" >&5
19926   cat conftest.$ac_ext >&5
19927   rm -rf conftest*
19928   eval "ac_cv_lib_$ac_lib_var=no"
19929 fi
19930 rm -f conftest*
19931 LIBS="$ac_save_LIBS"
19932
19933 fi
19934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19935   echo "$ac_t""yes" 1>&6
19936   have_setproctitle=yes
19937                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19938 else
19939   echo "$ac_t""no" 1>&6
19940 have_setproctitle=no
19941                         LIBOBJS="$LIBOBJS setproctitle.o"
19942                         LIBSRCS="$LIBSRCS setproctitle.c"
19943 fi
19944
19945 fi
19946
19947
19948         if test $have_setproctitle = yes ; then
19949                 cat >> confdefs.h <<\EOF
19950 #define HAVE_SETPROCTITLE 1
19951 EOF
19952
19953         fi
19954 fi
19955
19956 if test $ol_enable_slp != no ; then
19957         for ac_hdr in slp.h 
19958 do
19959 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19960 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19961 echo "configure:19962: checking for $ac_hdr" >&5
19962 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19963   echo $ac_n "(cached) $ac_c" 1>&6
19964 else
19965   cat > conftest.$ac_ext <<EOF
19966 #line 19967 "configure"
19967 #include "confdefs.h"
19968 #include <$ac_hdr>
19969 EOF
19970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19971 { (eval echo configure:19972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19973 if test -z "$ac_err"; then
19974   rm -rf conftest*
19975   eval "ac_cv_header_$ac_safe=yes"
19976 else
19977   echo "$ac_err" >&5
19978   echo "configure: failed program was:" >&5
19979   cat conftest.$ac_ext >&5
19980   rm -rf conftest*
19981   eval "ac_cv_header_$ac_safe=no"
19982 fi
19983 rm -f conftest*
19984 fi
19985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19986   echo "$ac_t""yes" 1>&6
19987     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19988   cat >> confdefs.h <<EOF
19989 #define $ac_tr_hdr 1
19990 EOF
19991  
19992 else
19993   echo "$ac_t""no" 1>&6
19994 fi
19995 done
19996
19997
19998         if test $ac_cv_header_slp_h = yes ; then
19999                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20000 echo "configure:20001: checking for SLPOpen in -lslp" >&5
20001 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20003   echo $ac_n "(cached) $ac_c" 1>&6
20004 else
20005   ac_save_LIBS="$LIBS"
20006 LIBS="-lslp  $LIBS"
20007 cat > conftest.$ac_ext <<EOF
20008 #line 20009 "configure"
20009 #include "confdefs.h"
20010 /* Override any gcc2 internal prototype to avoid an error.  */
20011 /* We use char because int might match the return type of a gcc2
20012     builtin and then its argument prototype would still apply.  */
20013 char SLPOpen();
20014
20015 int main() {
20016 SLPOpen()
20017 ; return 0; }
20018 EOF
20019 if { (eval echo configure:20020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20020   rm -rf conftest*
20021   eval "ac_cv_lib_$ac_lib_var=yes"
20022 else
20023   echo "configure: failed program was:" >&5
20024   cat conftest.$ac_ext >&5
20025   rm -rf conftest*
20026   eval "ac_cv_lib_$ac_lib_var=no"
20027 fi
20028 rm -f conftest*
20029 LIBS="$ac_save_LIBS"
20030
20031 fi
20032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20033   echo "$ac_t""yes" 1>&6
20034   have_slp=yes
20035 else
20036   echo "$ac_t""no" 1>&6
20037 have_slp=no
20038 fi
20039
20040                 if test $have_slp = yes ; then
20041                         cat >> confdefs.h <<\EOF
20042 #define HAVE_SLP 1
20043 EOF
20044
20045                         SLAPD_SLP_LIBS=-lslp
20046                 fi
20047
20048         elif test $ol_enable_slp = yes ; then
20049                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20050         fi
20051 fi
20052
20053 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20054 echo "configure:20055: checking for ANSI C header files" >&5
20055 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20056   echo $ac_n "(cached) $ac_c" 1>&6
20057 else
20058   cat > conftest.$ac_ext <<EOF
20059 #line 20060 "configure"
20060 #include "confdefs.h"
20061 #include <stdlib.h>
20062 #include <stdarg.h>
20063 #include <string.h>
20064 #include <float.h>
20065 EOF
20066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20067 { (eval echo configure:20068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20069 if test -z "$ac_err"; then
20070   rm -rf conftest*
20071   ac_cv_header_stdc=yes
20072 else
20073   echo "$ac_err" >&5
20074   echo "configure: failed program was:" >&5
20075   cat conftest.$ac_ext >&5
20076   rm -rf conftest*
20077   ac_cv_header_stdc=no
20078 fi
20079 rm -f conftest*
20080
20081 if test $ac_cv_header_stdc = yes; then
20082   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20083 cat > conftest.$ac_ext <<EOF
20084 #line 20085 "configure"
20085 #include "confdefs.h"
20086 #include <string.h>
20087 EOF
20088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20089   egrep "memchr" >/dev/null 2>&1; then
20090   :
20091 else
20092   rm -rf conftest*
20093   ac_cv_header_stdc=no
20094 fi
20095 rm -f conftest*
20096
20097 fi
20098
20099 if test $ac_cv_header_stdc = yes; then
20100   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20101 cat > conftest.$ac_ext <<EOF
20102 #line 20103 "configure"
20103 #include "confdefs.h"
20104 #include <stdlib.h>
20105 EOF
20106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20107   egrep "free" >/dev/null 2>&1; then
20108   :
20109 else
20110   rm -rf conftest*
20111   ac_cv_header_stdc=no
20112 fi
20113 rm -f conftest*
20114
20115 fi
20116
20117 if test $ac_cv_header_stdc = yes; then
20118   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20119 if test "$cross_compiling" = yes; then
20120   :
20121 else
20122   cat > conftest.$ac_ext <<EOF
20123 #line 20124 "configure"
20124 #include "confdefs.h"
20125 #include <ctype.h>
20126 #if ((' ' & 0x0FF) == 0x020)
20127 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20128 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20129 #else
20130 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20131  || ('j' <= (c) && (c) <= 'r') \
20132  || ('s' <= (c) && (c) <= 'z'))
20133 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20134 #endif
20135 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20136 int main () { int i; for (i = 0; i < 256; i++)
20137 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20138 exit (0); }
20139
20140 EOF
20141 if { (eval echo configure:20142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20142 then
20143   :
20144 else
20145   echo "configure: failed program was:" >&5
20146   cat conftest.$ac_ext >&5
20147   rm -fr conftest*
20148   ac_cv_header_stdc=no
20149 fi
20150 rm -fr conftest*
20151 fi
20152
20153 fi
20154 fi
20155
20156 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20157 if test $ac_cv_header_stdc = yes; then
20158   cat >> confdefs.h <<\EOF
20159 #define STDC_HEADERS 1
20160 EOF
20161
20162 fi
20163
20164 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20165 echo "configure:20166: checking for mode_t" >&5
20166 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20167   echo $ac_n "(cached) $ac_c" 1>&6
20168 else
20169   cat > conftest.$ac_ext <<EOF
20170 #line 20171 "configure"
20171 #include "confdefs.h"
20172 #include <sys/types.h>
20173 #if STDC_HEADERS
20174 #include <stdlib.h>
20175 #include <stddef.h>
20176 #endif
20177
20178 EOF
20179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20180   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20181   rm -rf conftest*
20182   eval "ac_cv_type_mode_t=yes"
20183 else
20184   rm -rf conftest*
20185   eval "ac_cv_type_mode_t=no"
20186 fi
20187 rm -f conftest*
20188
20189 fi
20190 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20191   echo "$ac_t""yes" 1>&6
20192 else
20193   echo "$ac_t""no" 1>&6
20194   cat >> confdefs.h <<EOF
20195 #define mode_t int
20196 EOF
20197
20198 fi
20199
20200 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20201 echo "configure:20202: checking for off_t" >&5
20202 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20203   echo $ac_n "(cached) $ac_c" 1>&6
20204 else
20205   cat > conftest.$ac_ext <<EOF
20206 #line 20207 "configure"
20207 #include "confdefs.h"
20208 #include <sys/types.h>
20209 #if STDC_HEADERS
20210 #include <stdlib.h>
20211 #include <stddef.h>
20212 #endif
20213
20214 EOF
20215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20216   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20217   rm -rf conftest*
20218   eval "ac_cv_type_off_t=yes"
20219 else
20220   rm -rf conftest*
20221   eval "ac_cv_type_off_t=no"
20222 fi
20223 rm -f conftest*
20224
20225 fi
20226 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20227   echo "$ac_t""yes" 1>&6
20228 else
20229   echo "$ac_t""no" 1>&6
20230   cat >> confdefs.h <<EOF
20231 #define off_t long
20232 EOF
20233
20234 fi
20235
20236 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20237 echo "configure:20238: checking for pid_t" >&5
20238 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20239   echo $ac_n "(cached) $ac_c" 1>&6
20240 else
20241   cat > conftest.$ac_ext <<EOF
20242 #line 20243 "configure"
20243 #include "confdefs.h"
20244 #include <sys/types.h>
20245 #if STDC_HEADERS
20246 #include <stdlib.h>
20247 #include <stddef.h>
20248 #endif
20249
20250 EOF
20251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20252   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20253   rm -rf conftest*
20254   eval "ac_cv_type_pid_t=yes"
20255 else
20256   rm -rf conftest*
20257   eval "ac_cv_type_pid_t=no"
20258 fi
20259 rm -f conftest*
20260
20261 fi
20262 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20263   echo "$ac_t""yes" 1>&6
20264 else
20265   echo "$ac_t""no" 1>&6
20266   cat >> confdefs.h <<EOF
20267 #define pid_t int
20268 EOF
20269
20270 fi
20271
20272 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20273 echo "configure:20274: checking for ptrdiff_t" >&5
20274 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20275   echo $ac_n "(cached) $ac_c" 1>&6
20276 else
20277   cat > conftest.$ac_ext <<EOF
20278 #line 20279 "configure"
20279 #include "confdefs.h"
20280 #include <stddef.h>
20281 int main() {
20282 ptrdiff_t p
20283 ; return 0; }
20284 EOF
20285 if { (eval echo configure:20286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20286   rm -rf conftest*
20287   am_cv_type_ptrdiff_t=yes
20288 else
20289   echo "configure: failed program was:" >&5
20290   cat conftest.$ac_ext >&5
20291   rm -rf conftest*
20292   am_cv_type_ptrdiff_t=no
20293 fi
20294 rm -f conftest*
20295 fi
20296
20297 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20298    if test $am_cv_type_ptrdiff_t = yes; then
20299      cat >> confdefs.h <<\EOF
20300 #define HAVE_PTRDIFF_T 1
20301 EOF
20302
20303    fi
20304
20305 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20306 echo "configure:20307: checking return type of signal handlers" >&5
20307 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20308   echo $ac_n "(cached) $ac_c" 1>&6
20309 else
20310   cat > conftest.$ac_ext <<EOF
20311 #line 20312 "configure"
20312 #include "confdefs.h"
20313 #include <sys/types.h>
20314 #include <signal.h>
20315 #ifdef signal
20316 #undef signal
20317 #endif
20318 #ifdef __cplusplus
20319 extern "C" void (*signal (int, void (*)(int)))(int);
20320 #else
20321 void (*signal ()) ();
20322 #endif
20323
20324 int main() {
20325 int i;
20326 ; return 0; }
20327 EOF
20328 if { (eval echo configure:20329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20329   rm -rf conftest*
20330   ac_cv_type_signal=void
20331 else
20332   echo "configure: failed program was:" >&5
20333   cat conftest.$ac_ext >&5
20334   rm -rf conftest*
20335   ac_cv_type_signal=int
20336 fi
20337 rm -f conftest*
20338 fi
20339
20340 echo "$ac_t""$ac_cv_type_signal" 1>&6
20341 cat >> confdefs.h <<EOF
20342 #define RETSIGTYPE $ac_cv_type_signal
20343 EOF
20344
20345
20346 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20347 echo "configure:20348: checking for size_t" >&5
20348 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20349   echo $ac_n "(cached) $ac_c" 1>&6
20350 else
20351   cat > conftest.$ac_ext <<EOF
20352 #line 20353 "configure"
20353 #include "confdefs.h"
20354 #include <sys/types.h>
20355 #if STDC_HEADERS
20356 #include <stdlib.h>
20357 #include <stddef.h>
20358 #endif
20359
20360 EOF
20361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20362   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20363   rm -rf conftest*
20364   eval "ac_cv_type_size_t=yes"
20365 else
20366   rm -rf conftest*
20367   eval "ac_cv_type_size_t=no"
20368 fi
20369 rm -f conftest*
20370
20371 fi
20372 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20373   echo "$ac_t""yes" 1>&6
20374 else
20375   echo "$ac_t""no" 1>&6
20376   cat >> confdefs.h <<EOF
20377 #define size_t unsigned
20378 EOF
20379
20380 fi
20381
20382
20383 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20384 echo "configure:20385: checking for ssize_t" >&5
20385 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20386   echo $ac_n "(cached) $ac_c" 1>&6
20387 else
20388   cat > conftest.$ac_ext <<EOF
20389 #line 20390 "configure"
20390 #include "confdefs.h"
20391 #include <sys/types.h>
20392 #if STDC_HEADERS
20393 #include <stdlib.h>
20394 #include <stddef.h>
20395 #endif
20396
20397 EOF
20398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20399   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20400   rm -rf conftest*
20401   eval "ac_cv_type_ssize_t=yes"
20402 else
20403   rm -rf conftest*
20404   eval "ac_cv_type_ssize_t=no"
20405 fi
20406 rm -f conftest*
20407
20408 fi
20409 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20410   echo "$ac_t""yes" 1>&6
20411 else
20412   echo "$ac_t""no" 1>&6
20413   cat >> confdefs.h <<EOF
20414 #define ssize_t signed int
20415 EOF
20416
20417 fi
20418
20419 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20420 echo "configure:20421: checking for caddr_t" >&5
20421 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20422   echo $ac_n "(cached) $ac_c" 1>&6
20423 else
20424   cat > conftest.$ac_ext <<EOF
20425 #line 20426 "configure"
20426 #include "confdefs.h"
20427 #include <sys/types.h>
20428 #if STDC_HEADERS
20429 #include <stdlib.h>
20430 #include <stddef.h>
20431 #endif
20432
20433 EOF
20434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20435   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20436   rm -rf conftest*
20437   eval "ac_cv_type_caddr_t=yes"
20438 else
20439   rm -rf conftest*
20440   eval "ac_cv_type_caddr_t=no"
20441 fi
20442 rm -f conftest*
20443
20444 fi
20445 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20446   echo "$ac_t""yes" 1>&6
20447 else
20448   echo "$ac_t""no" 1>&6
20449   cat >> confdefs.h <<EOF
20450 #define caddr_t char *
20451 EOF
20452
20453 fi
20454
20455
20456 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20457 echo "configure:20458: checking for socklen_t" >&5
20458 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20459   echo $ac_n "(cached) $ac_c" 1>&6
20460 else
20461   cat > conftest.$ac_ext <<EOF
20462 #line 20463 "configure"
20463 #include "confdefs.h"
20464
20465 #ifdef HAVE_SYS_TYPES_H
20466 #include <sys/types.h>
20467 #endif
20468 #ifdef HAVE_SYS_SOCKET_H
20469 #include <sys/socket.h>
20470 #endif
20471
20472 int main() {
20473 socklen_t len;
20474 ; return 0; }
20475 EOF
20476 if { (eval echo configure:20477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20477   rm -rf conftest*
20478   ol_cv_type_socklen_t=yes
20479 else
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   ol_cv_type_socklen_t=no
20484 fi
20485 rm -f conftest*
20486 fi
20487
20488 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20489   if test $ol_cv_type_socklen_t = no; then
20490     cat >> confdefs.h <<\EOF
20491 #define socklen_t int
20492 EOF
20493
20494   fi
20495  
20496 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20497 echo "configure:20498: checking for member st_blksize in aggregate type struct stat" >&5
20498 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20499   echo $ac_n "(cached) $ac_c" 1>&6
20500 else
20501   cat > conftest.$ac_ext <<EOF
20502 #line 20503 "configure"
20503 #include "confdefs.h"
20504 #include <sys/types.h>
20505 #include <sys/stat.h>
20506 int main() {
20507 struct stat foo; foo.st_blksize;
20508 ; return 0; }
20509 EOF
20510 if { (eval echo configure:20511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20511   rm -rf conftest*
20512   ac_cv_c_struct_member_st_blksize=yes
20513 else
20514   echo "configure: failed program was:" >&5
20515   cat conftest.$ac_ext >&5
20516   rm -rf conftest*
20517   ac_cv_c_struct_member_st_blksize=no
20518 fi
20519 rm -f conftest*
20520 fi
20521
20522 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20523 st_blksize="$ac_cv_c_struct_member_st_blksize"
20524 if test $ac_cv_c_struct_member_st_blksize = yes; then
20525   cat >> confdefs.h <<\EOF
20526 #define HAVE_ST_BLKSIZE 1
20527 EOF
20528
20529 fi
20530
20531 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20532 echo "configure:20533: checking whether time.h and sys/time.h may both be included" >&5
20533 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20534   echo $ac_n "(cached) $ac_c" 1>&6
20535 else
20536   cat > conftest.$ac_ext <<EOF
20537 #line 20538 "configure"
20538 #include "confdefs.h"
20539 #include <sys/types.h>
20540 #include <sys/time.h>
20541 #include <time.h>
20542 int main() {
20543 struct tm *tp;
20544 ; return 0; }
20545 EOF
20546 if { (eval echo configure:20547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20547   rm -rf conftest*
20548   ac_cv_header_time=yes
20549 else
20550   echo "configure: failed program was:" >&5
20551   cat conftest.$ac_ext >&5
20552   rm -rf conftest*
20553   ac_cv_header_time=no
20554 fi
20555 rm -f conftest*
20556 fi
20557
20558 echo "$ac_t""$ac_cv_header_time" 1>&6
20559 if test $ac_cv_header_time = yes; then
20560   cat >> confdefs.h <<\EOF
20561 #define TIME_WITH_SYS_TIME 1
20562 EOF
20563
20564 fi
20565
20566 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20567 echo "configure:20568: checking whether struct tm is in sys/time.h or time.h" >&5
20568 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20569   echo $ac_n "(cached) $ac_c" 1>&6
20570 else
20571   cat > conftest.$ac_ext <<EOF
20572 #line 20573 "configure"
20573 #include "confdefs.h"
20574 #include <sys/types.h>
20575 #include <time.h>
20576 int main() {
20577 struct tm *tp; tp->tm_sec;
20578 ; return 0; }
20579 EOF
20580 if { (eval echo configure:20581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20581   rm -rf conftest*
20582   ac_cv_struct_tm=time.h
20583 else
20584   echo "configure: failed program was:" >&5
20585   cat conftest.$ac_ext >&5
20586   rm -rf conftest*
20587   ac_cv_struct_tm=sys/time.h
20588 fi
20589 rm -f conftest*
20590 fi
20591
20592 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20593 if test $ac_cv_struct_tm = sys/time.h; then
20594   cat >> confdefs.h <<\EOF
20595 #define TM_IN_SYS_TIME 1
20596 EOF
20597
20598 fi
20599
20600 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20601 echo "configure:20602: checking for uid_t in sys/types.h" >&5
20602 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20603   echo $ac_n "(cached) $ac_c" 1>&6
20604 else
20605   cat > conftest.$ac_ext <<EOF
20606 #line 20607 "configure"
20607 #include "confdefs.h"
20608 #include <sys/types.h>
20609 EOF
20610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20611   egrep "uid_t" >/dev/null 2>&1; then
20612   rm -rf conftest*
20613   ac_cv_type_uid_t=yes
20614 else
20615   rm -rf conftest*
20616   ac_cv_type_uid_t=no
20617 fi
20618 rm -f conftest*
20619
20620 fi
20621
20622 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20623 if test $ac_cv_type_uid_t = no; then
20624   cat >> confdefs.h <<\EOF
20625 #define uid_t int
20626 EOF
20627
20628   cat >> confdefs.h <<\EOF
20629 #define gid_t int
20630 EOF
20631
20632 fi
20633
20634 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20635 echo "configure:20636: checking for sig_atomic_t" >&5
20636 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20637   echo $ac_n "(cached) $ac_c" 1>&6
20638 else
20639   cat > conftest.$ac_ext <<EOF
20640 #line 20641 "configure"
20641 #include "confdefs.h"
20642 #include <signal.h>
20643 int main() {
20644 sig_atomic_t atomic;
20645 ; return 0; }
20646 EOF
20647 if { (eval echo configure:20648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20648   rm -rf conftest*
20649   ol_cv_type_sig_atomic_t=yes
20650 else
20651   echo "configure: failed program was:" >&5
20652   cat conftest.$ac_ext >&5
20653   rm -rf conftest*
20654   ol_cv_type_sig_atomic_t=no
20655 fi
20656 rm -f conftest*
20657 fi
20658
20659 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20660   if test $ol_cv_type_sig_atomic_t = no; then
20661     cat >> confdefs.h <<\EOF
20662 #define sig_atomic_t int
20663 EOF
20664
20665   fi
20666  
20667
20668
20669 # test for pw_gecos in struct passwd
20670 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20671 echo "configure:20672: checking struct passwd for pw_gecos" >&5
20672 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20673   echo $ac_n "(cached) $ac_c" 1>&6
20674 else
20675   
20676         cat > conftest.$ac_ext <<EOF
20677 #line 20678 "configure"
20678 #include "confdefs.h"
20679 #include <pwd.h>
20680 int main() {
20681
20682         struct passwd pwd;
20683         pwd.pw_gecos = pwd.pw_name;
20684
20685 ; return 0; }
20686 EOF
20687 if { (eval echo configure:20688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20688   rm -rf conftest*
20689   ol_cv_struct_passwd_pw_gecos=yes
20690 else
20691   echo "configure: failed program was:" >&5
20692   cat conftest.$ac_ext >&5
20693   rm -rf conftest*
20694   ol_cv_struct_passwd_pw_gecos=no
20695 fi
20696 rm -f conftest*
20697 fi
20698
20699 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20700 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20701         cat >> confdefs.h <<\EOF
20702 #define HAVE_PW_GECOS 1
20703 EOF
20704
20705 fi
20706
20707 # test for pw_passwd in struct passwd
20708 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20709 echo "configure:20710: checking struct passwd for pw_passwd" >&5
20710 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20711   echo $ac_n "(cached) $ac_c" 1>&6
20712 else
20713   
20714         cat > conftest.$ac_ext <<EOF
20715 #line 20716 "configure"
20716 #include "confdefs.h"
20717 #include <pwd.h>
20718 int main() {
20719
20720         struct passwd pwd;
20721         pwd.pw_passwd = pwd.pw_name;
20722
20723 ; return 0; }
20724 EOF
20725 if { (eval echo configure:20726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20726   rm -rf conftest*
20727   ol_cv_struct_passwd_pw_passwd=yes
20728 else
20729   echo "configure: failed program was:" >&5
20730   cat conftest.$ac_ext >&5
20731   rm -rf conftest*
20732   ol_cv_struct_passwd_pw_passwd=no
20733 fi
20734 rm -f conftest*
20735 fi
20736
20737 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20738 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20739         cat >> confdefs.h <<\EOF
20740 #define HAVE_PW_PASSWD 1
20741 EOF
20742
20743 fi
20744
20745
20746 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20747 echo "configure:20748: checking if toupper() requires islower()" >&5
20748 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20749   echo $ac_n "(cached) $ac_c" 1>&6
20750 else
20751   
20752         if test "$cross_compiling" = yes; then
20753   ol_cv_c_upper_lower=safe
20754 else
20755   cat > conftest.$ac_ext <<EOF
20756 #line 20757 "configure"
20757 #include "confdefs.h"
20758
20759 #include <ctype.h>
20760 main()
20761 {
20762         if ('C' == toupper('C'))
20763                 exit(0);
20764         else
20765                 exit(1);
20766 }
20767 EOF
20768 if { (eval echo configure:20769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20769 then
20770   ol_cv_c_upper_lower=no
20771 else
20772   echo "configure: failed program was:" >&5
20773   cat conftest.$ac_ext >&5
20774   rm -fr conftest*
20775   ol_cv_c_upper_lower=yes
20776 fi
20777 rm -fr conftest*
20778 fi
20779
20780 fi
20781
20782 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20783 if test $ol_cv_c_upper_lower != no ; then
20784         cat >> confdefs.h <<\EOF
20785 #define C_UPPER_LOWER 1
20786 EOF
20787
20788 fi
20789
20790 echo $ac_n "checking for working const""... $ac_c" 1>&6
20791 echo "configure:20792: checking for working const" >&5
20792 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20793   echo $ac_n "(cached) $ac_c" 1>&6
20794 else
20795   cat > conftest.$ac_ext <<EOF
20796 #line 20797 "configure"
20797 #include "confdefs.h"
20798
20799 int main() {
20800
20801 /* Ultrix mips cc rejects this.  */
20802 typedef int charset[2]; const charset x;
20803 /* SunOS 4.1.1 cc rejects this.  */
20804 char const *const *ccp;
20805 char **p;
20806 /* NEC SVR4.0.2 mips cc rejects this.  */
20807 struct point {int x, y;};
20808 static struct point const zero = {0,0};
20809 /* AIX XL C 1.02.0.0 rejects this.
20810    It does not let you subtract one const X* pointer from another in an arm
20811    of an if-expression whose if-part is not a constant expression */
20812 const char *g = "string";
20813 ccp = &g + (g ? g-g : 0);
20814 /* HPUX 7.0 cc rejects these. */
20815 ++ccp;
20816 p = (char**) ccp;
20817 ccp = (char const *const *) p;
20818 { /* SCO 3.2v4 cc rejects this.  */
20819   char *t;
20820   char const *s = 0 ? (char *) 0 : (char const *) 0;
20821
20822   *t++ = 0;
20823 }
20824 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20825   int x[] = {25, 17};
20826   const int *foo = &x[0];
20827   ++foo;
20828 }
20829 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20830   typedef const int *iptr;
20831   iptr p = 0;
20832   ++p;
20833 }
20834 { /* AIX XL C 1.02.0.0 rejects this saying
20835      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20836   struct s { int j; const int *ap[3]; };
20837   struct s *b; b->j = 5;
20838 }
20839 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20840   const int foo = 10;
20841 }
20842
20843 ; return 0; }
20844 EOF
20845 if { (eval echo configure:20846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20846   rm -rf conftest*
20847   ac_cv_c_const=yes
20848 else
20849   echo "configure: failed program was:" >&5
20850   cat conftest.$ac_ext >&5
20851   rm -rf conftest*
20852   ac_cv_c_const=no
20853 fi
20854 rm -f conftest*
20855 fi
20856
20857 echo "$ac_t""$ac_cv_c_const" 1>&6
20858 if test $ac_cv_c_const = no; then
20859   cat >> confdefs.h <<\EOF
20860 #define const 
20861 EOF
20862
20863 fi
20864
20865 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20866 echo "configure:20867: checking if compiler understands volatile" >&5
20867 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20868   echo $ac_n "(cached) $ac_c" 1>&6
20869 else
20870   cat > conftest.$ac_ext <<EOF
20871 #line 20872 "configure"
20872 #include "confdefs.h"
20873 int x, y, z;
20874 int main() {
20875 volatile int a; int * volatile b = x ? &y : &z;
20876       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20877       *b = 0;
20878 ; return 0; }
20879 EOF
20880 if { (eval echo configure:20881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20881   rm -rf conftest*
20882   ol_cv_c_volatile=yes
20883 else
20884   echo "configure: failed program was:" >&5
20885   cat conftest.$ac_ext >&5
20886   rm -rf conftest*
20887   ol_cv_c_volatile=no
20888 fi
20889 rm -f conftest*
20890 fi
20891
20892 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20893   if test $ol_cv_c_volatile = yes; then
20894     : 
20895   else
20896     cat >> confdefs.h <<\EOF
20897 #define volatile 
20898 EOF
20899
20900   fi
20901  
20902
20903 if test $cross_compiling = yes ; then
20904         cat >> confdefs.h <<\EOF
20905 #define CROSS_COMPILING 1
20906 EOF
20907
20908 else
20909         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20910 echo "configure:20911: checking whether byte ordering is bigendian" >&5
20911 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20912   echo $ac_n "(cached) $ac_c" 1>&6
20913 else
20914   ac_cv_c_bigendian=unknown
20915 # See if sys/param.h defines the BYTE_ORDER macro.
20916 cat > conftest.$ac_ext <<EOF
20917 #line 20918 "configure"
20918 #include "confdefs.h"
20919 #include <sys/types.h>
20920 #include <sys/param.h>
20921 int main() {
20922
20923 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20924  bogus endian macros
20925 #endif
20926 ; return 0; }
20927 EOF
20928 if { (eval echo configure:20929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20929   rm -rf conftest*
20930   # It does; now see whether it defined to BIG_ENDIAN or not.
20931 cat > conftest.$ac_ext <<EOF
20932 #line 20933 "configure"
20933 #include "confdefs.h"
20934 #include <sys/types.h>
20935 #include <sys/param.h>
20936 int main() {
20937
20938 #if BYTE_ORDER != BIG_ENDIAN
20939  not big endian
20940 #endif
20941 ; return 0; }
20942 EOF
20943 if { (eval echo configure:20944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20944   rm -rf conftest*
20945   ac_cv_c_bigendian=yes
20946 else
20947   echo "configure: failed program was:" >&5
20948   cat conftest.$ac_ext >&5
20949   rm -rf conftest*
20950   ac_cv_c_bigendian=no
20951 fi
20952 rm -f conftest*
20953 else
20954   echo "configure: failed program was:" >&5
20955   cat conftest.$ac_ext >&5
20956 fi
20957 rm -f conftest*
20958 if test $ac_cv_c_bigendian = unknown; then
20959 if test "$cross_compiling" = yes; then
20960     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20961 else
20962   cat > conftest.$ac_ext <<EOF
20963 #line 20964 "configure"
20964 #include "confdefs.h"
20965 main () {
20966   /* Are we little or big endian?  From Harbison&Steele.  */
20967   union
20968   {
20969     long l;
20970     char c[sizeof (long)];
20971   } u;
20972   u.l = 1;
20973   exit (u.c[sizeof (long) - 1] == 1);
20974 }
20975 EOF
20976 if { (eval echo configure:20977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20977 then
20978   ac_cv_c_bigendian=no
20979 else
20980   echo "configure: failed program was:" >&5
20981   cat conftest.$ac_ext >&5
20982   rm -fr conftest*
20983   ac_cv_c_bigendian=yes
20984 fi
20985 rm -fr conftest*
20986 fi
20987
20988 fi
20989 fi
20990
20991 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20992 if test $ac_cv_c_bigendian = yes; then
20993   cat >> confdefs.h <<\EOF
20994 #define WORDS_BIGENDIAN 1
20995 EOF
20996
20997 fi
20998
20999 fi
21000
21001 echo $ac_n "checking size of short""... $ac_c" 1>&6
21002 echo "configure:21003: checking size of short" >&5 
21003 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21004   echo $ac_n "(cached) $ac_c" 1>&6
21005 else
21006   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21007   cat > conftest.$ac_ext <<EOF
21008 #line 21009 "configure"
21009 #include "confdefs.h"
21010 #include "confdefs.h" 
21011 #include <sys/types.h> 
21012  
21013
21014 int main() {
21015 switch (0) case 0: case (sizeof (short) == $ac_size):;
21016 ; return 0; }
21017 EOF
21018 if { (eval echo configure:21019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21019   rm -rf conftest*
21020   ac_cv_sizeof_short=$ac_size
21021 else
21022   echo "configure: failed program was:" >&5
21023   cat conftest.$ac_ext >&5
21024 fi
21025 rm -f conftest* 
21026   if test x$ac_cv_sizeof_short != x ; then break; fi 
21027 done 
21028
21029 fi
21030  
21031 if test x$ac_cv_sizeof_short = x ; then 
21032   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21033 fi 
21034 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21035 cat >> confdefs.h <<EOF
21036 #define SIZEOF_SHORT $ac_cv_sizeof_short
21037 EOF
21038  
21039  
21040 echo $ac_n "checking size of int""... $ac_c" 1>&6
21041 echo "configure:21042: checking size of int" >&5 
21042 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21043   echo $ac_n "(cached) $ac_c" 1>&6
21044 else
21045   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21046   cat > conftest.$ac_ext <<EOF
21047 #line 21048 "configure"
21048 #include "confdefs.h"
21049 #include "confdefs.h" 
21050 #include <sys/types.h> 
21051  
21052
21053 int main() {
21054 switch (0) case 0: case (sizeof (int) == $ac_size):;
21055 ; return 0; }
21056 EOF
21057 if { (eval echo configure:21058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21058   rm -rf conftest*
21059   ac_cv_sizeof_int=$ac_size
21060 else
21061   echo "configure: failed program was:" >&5
21062   cat conftest.$ac_ext >&5
21063 fi
21064 rm -f conftest* 
21065   if test x$ac_cv_sizeof_int != x ; then break; fi 
21066 done 
21067
21068 fi
21069  
21070 if test x$ac_cv_sizeof_int = x ; then 
21071   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21072 fi 
21073 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21074 cat >> confdefs.h <<EOF
21075 #define SIZEOF_INT $ac_cv_sizeof_int
21076 EOF
21077  
21078  
21079 echo $ac_n "checking size of long""... $ac_c" 1>&6
21080 echo "configure:21081: checking size of long" >&5 
21081 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21082   echo $ac_n "(cached) $ac_c" 1>&6
21083 else
21084   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21085   cat > conftest.$ac_ext <<EOF
21086 #line 21087 "configure"
21087 #include "confdefs.h"
21088 #include "confdefs.h" 
21089 #include <sys/types.h> 
21090  
21091
21092 int main() {
21093 switch (0) case 0: case (sizeof (long) == $ac_size):;
21094 ; return 0; }
21095 EOF
21096 if { (eval echo configure:21097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21097   rm -rf conftest*
21098   ac_cv_sizeof_long=$ac_size
21099 else
21100   echo "configure: failed program was:" >&5
21101   cat conftest.$ac_ext >&5
21102 fi
21103 rm -f conftest* 
21104   if test x$ac_cv_sizeof_long != x ; then break; fi 
21105 done 
21106
21107 fi
21108  
21109 if test x$ac_cv_sizeof_long = x ; then 
21110   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21111 fi 
21112 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21113 cat >> confdefs.h <<EOF
21114 #define SIZEOF_LONG $ac_cv_sizeof_long
21115 EOF
21116  
21117
21118
21119 if test "$ac_cv_sizeof_int" -lt 4 ; then
21120         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21121
21122         cat >> confdefs.h <<\EOF
21123 #define LBER_INT_T long
21124 EOF
21125
21126 else
21127         cat >> confdefs.h <<\EOF
21128 #define LBER_INT_T int
21129 EOF
21130
21131 fi
21132
21133 cat >> confdefs.h <<\EOF
21134 #define LBER_LEN_T long
21135 EOF
21136
21137 cat >> confdefs.h <<\EOF
21138 #define LBER_SOCKET_T int
21139 EOF
21140
21141 cat >> confdefs.h <<\EOF
21142 #define LBER_TAG_T long
21143 EOF
21144
21145
21146 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21147 echo "configure:21148: checking for 8-bit clean memcmp" >&5
21148 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21149   echo $ac_n "(cached) $ac_c" 1>&6
21150 else
21151   if test "$cross_compiling" = yes; then
21152   ac_cv_func_memcmp_clean=no
21153 else
21154   cat > conftest.$ac_ext <<EOF
21155 #line 21156 "configure"
21156 #include "confdefs.h"
21157
21158 main()
21159 {
21160   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21161   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21162 }
21163
21164 EOF
21165 if { (eval echo configure:21166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21166 then
21167   ac_cv_func_memcmp_clean=yes
21168 else
21169   echo "configure: failed program was:" >&5
21170   cat conftest.$ac_ext >&5
21171   rm -fr conftest*
21172   ac_cv_func_memcmp_clean=no
21173 fi
21174 rm -fr conftest*
21175 fi
21176
21177 fi
21178
21179 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21180 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21181
21182 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21183 echo "configure:21184: checking for strftime" >&5
21184 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21185   echo $ac_n "(cached) $ac_c" 1>&6
21186 else
21187   cat > conftest.$ac_ext <<EOF
21188 #line 21189 "configure"
21189 #include "confdefs.h"
21190 /* System header to define __stub macros and hopefully few prototypes,
21191     which can conflict with char strftime(); below.  */
21192 #include <assert.h>
21193 /* Override any gcc2 internal prototype to avoid an error.  */
21194 /* We use char because int might match the return type of a gcc2
21195     builtin and then its argument prototype would still apply.  */
21196 char strftime();
21197 char (*f)();
21198
21199 int main() {
21200
21201 /* The GNU C library defines this for functions which it implements
21202     to always fail with ENOSYS.  Some functions are actually named
21203     something starting with __ and the normal name is an alias.  */
21204 #if defined (__stub_strftime) || defined (__stub___strftime)
21205 choke me
21206 #else
21207 f = strftime;
21208 #endif
21209
21210 ; return 0; }
21211 EOF
21212 if { (eval echo configure:21213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21213   rm -rf conftest*
21214   eval "ac_cv_func_strftime=yes"
21215 else
21216   echo "configure: failed program was:" >&5
21217   cat conftest.$ac_ext >&5
21218   rm -rf conftest*
21219   eval "ac_cv_func_strftime=no"
21220 fi
21221 rm -f conftest*
21222 fi
21223
21224 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21225   echo "$ac_t""yes" 1>&6
21226   cat >> confdefs.h <<\EOF
21227 #define HAVE_STRFTIME 1
21228 EOF
21229
21230 else
21231   echo "$ac_t""no" 1>&6
21232 # strftime is in -lintl on SCO UNIX.
21233 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21234 echo "configure:21235: checking for strftime in -lintl" >&5
21235 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21237   echo $ac_n "(cached) $ac_c" 1>&6
21238 else
21239   ac_save_LIBS="$LIBS"
21240 LIBS="-lintl  $LIBS"
21241 cat > conftest.$ac_ext <<EOF
21242 #line 21243 "configure"
21243 #include "confdefs.h"
21244 /* Override any gcc2 internal prototype to avoid an error.  */
21245 /* We use char because int might match the return type of a gcc2
21246     builtin and then its argument prototype would still apply.  */
21247 char strftime();
21248
21249 int main() {
21250 strftime()
21251 ; return 0; }
21252 EOF
21253 if { (eval echo configure:21254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21254   rm -rf conftest*
21255   eval "ac_cv_lib_$ac_lib_var=yes"
21256 else
21257   echo "configure: failed program was:" >&5
21258   cat conftest.$ac_ext >&5
21259   rm -rf conftest*
21260   eval "ac_cv_lib_$ac_lib_var=no"
21261 fi
21262 rm -f conftest*
21263 LIBS="$ac_save_LIBS"
21264
21265 fi
21266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21267   echo "$ac_t""yes" 1>&6
21268   cat >> confdefs.h <<\EOF
21269 #define HAVE_STRFTIME 1
21270 EOF
21271
21272 LIBS="-lintl $LIBS"
21273 else
21274   echo "$ac_t""no" 1>&6
21275 fi
21276
21277 fi
21278
21279
21280 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21281 echo "configure:21282: checking for inet_aton()" >&5
21282 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21283   echo $ac_n "(cached) $ac_c" 1>&6
21284 else
21285   cat > conftest.$ac_ext <<EOF
21286 #line 21287 "configure"
21287 #include "confdefs.h"
21288
21289 #ifdef HAVE_SYS_TYPES_H
21290 #       include <sys/types.h>
21291 #endif
21292 #ifdef HAVE_SYS_SOCKET_H
21293 #       include <sys/socket.h>
21294 #       ifdef HAVE_SYS_SELECT_H
21295 #               include <sys/select.h>
21296 #       endif
21297 #       include <netinet/in.h>
21298 #       ifdef HAVE_ARPA_INET_H
21299 #               include <arpa/inet.h>
21300 #       endif
21301 #endif
21302
21303 int main() {
21304 struct in_addr in;
21305 int rc = inet_aton( "255.255.255.255", &in );
21306 ; return 0; }
21307 EOF
21308 if { (eval echo configure:21309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21309   rm -rf conftest*
21310   ol_cv_func_inet_aton=yes
21311 else
21312   echo "configure: failed program was:" >&5
21313   cat conftest.$ac_ext >&5
21314   rm -rf conftest*
21315   ol_cv_func_inet_aton=no
21316 fi
21317 rm -f conftest*
21318 fi
21319
21320 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21321   if test $ol_cv_func_inet_aton != no; then
21322     cat >> confdefs.h <<\EOF
21323 #define HAVE_INET_ATON 1
21324 EOF
21325
21326   fi
21327  
21328
21329 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21330 echo "configure:21331: checking for _spawnlp" >&5
21331 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21332   echo $ac_n "(cached) $ac_c" 1>&6
21333 else
21334   cat > conftest.$ac_ext <<EOF
21335 #line 21336 "configure"
21336 #include "confdefs.h"
21337 /* System header to define __stub macros and hopefully few prototypes,
21338     which can conflict with char _spawnlp(); below.  */
21339 #include <assert.h>
21340 /* Override any gcc2 internal prototype to avoid an error.  */
21341 /* We use char because int might match the return type of a gcc2
21342     builtin and then its argument prototype would still apply.  */
21343 char _spawnlp();
21344 char (*f)();
21345
21346 int main() {
21347
21348 /* The GNU C library defines this for functions which it implements
21349     to always fail with ENOSYS.  Some functions are actually named
21350     something starting with __ and the normal name is an alias.  */
21351 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21352 choke me
21353 #else
21354 f = _spawnlp;
21355 #endif
21356
21357 ; return 0; }
21358 EOF
21359 if { (eval echo configure:21360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21360   rm -rf conftest*
21361   eval "ac_cv_func__spawnlp=yes"
21362 else
21363   echo "configure: failed program was:" >&5
21364   cat conftest.$ac_ext >&5
21365   rm -rf conftest*
21366   eval "ac_cv_func__spawnlp=no"
21367 fi
21368 rm -f conftest*
21369 fi
21370
21371 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21372   echo "$ac_t""yes" 1>&6
21373   cat >> confdefs.h <<\EOF
21374 #define HAVE_SPAWNLP 1
21375 EOF
21376
21377 else
21378   echo "$ac_t""no" 1>&6
21379 fi
21380
21381
21382 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21383 echo "configure:21384: checking for _snprintf" >&5
21384 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21385   echo $ac_n "(cached) $ac_c" 1>&6
21386 else
21387   cat > conftest.$ac_ext <<EOF
21388 #line 21389 "configure"
21389 #include "confdefs.h"
21390 /* System header to define __stub macros and hopefully few prototypes,
21391     which can conflict with char _snprintf(); below.  */
21392 #include <assert.h>
21393 /* Override any gcc2 internal prototype to avoid an error.  */
21394 /* We use char because int might match the return type of a gcc2
21395     builtin and then its argument prototype would still apply.  */
21396 char _snprintf();
21397 char (*f)();
21398
21399 int main() {
21400
21401 /* The GNU C library defines this for functions which it implements
21402     to always fail with ENOSYS.  Some functions are actually named
21403     something starting with __ and the normal name is an alias.  */
21404 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21405 choke me
21406 #else
21407 f = _snprintf;
21408 #endif
21409
21410 ; return 0; }
21411 EOF
21412 if { (eval echo configure:21413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21413   rm -rf conftest*
21414   eval "ac_cv_func__snprintf=yes"
21415 else
21416   echo "configure: failed program was:" >&5
21417   cat conftest.$ac_ext >&5
21418   rm -rf conftest*
21419   eval "ac_cv_func__snprintf=no"
21420 fi
21421 rm -f conftest*
21422 fi
21423
21424 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21425   echo "$ac_t""yes" 1>&6
21426   ac_cv_func_snprintf=yes
21427         cat >> confdefs.h <<\EOF
21428 #define snprintf _snprintf
21429 EOF
21430
21431
21432 else
21433   echo "$ac_t""no" 1>&6
21434 fi
21435
21436
21437 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21438 echo "configure:21439: checking for _vsnprintf" >&5
21439 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21440   echo $ac_n "(cached) $ac_c" 1>&6
21441 else
21442   cat > conftest.$ac_ext <<EOF
21443 #line 21444 "configure"
21444 #include "confdefs.h"
21445 /* System header to define __stub macros and hopefully few prototypes,
21446     which can conflict with char _vsnprintf(); below.  */
21447 #include <assert.h>
21448 /* Override any gcc2 internal prototype to avoid an error.  */
21449 /* We use char because int might match the return type of a gcc2
21450     builtin and then its argument prototype would still apply.  */
21451 char _vsnprintf();
21452 char (*f)();
21453
21454 int main() {
21455
21456 /* The GNU C library defines this for functions which it implements
21457     to always fail with ENOSYS.  Some functions are actually named
21458     something starting with __ and the normal name is an alias.  */
21459 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21460 choke me
21461 #else
21462 f = _vsnprintf;
21463 #endif
21464
21465 ; return 0; }
21466 EOF
21467 if { (eval echo configure:21468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21468   rm -rf conftest*
21469   eval "ac_cv_func__vsnprintf=yes"
21470 else
21471   echo "configure: failed program was:" >&5
21472   cat conftest.$ac_ext >&5
21473   rm -rf conftest*
21474   eval "ac_cv_func__vsnprintf=no"
21475 fi
21476 rm -f conftest*
21477 fi
21478
21479 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21480   echo "$ac_t""yes" 1>&6
21481   ac_cv_func_vsnprintf=yes
21482         cat >> confdefs.h <<\EOF
21483 #define vsnprintf _vsnprintf
21484 EOF
21485
21486
21487 else
21488   echo "$ac_t""no" 1>&6
21489 fi
21490
21491
21492 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21493 echo "configure:21494: checking for vprintf" >&5
21494 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21495   echo $ac_n "(cached) $ac_c" 1>&6
21496 else
21497   cat > conftest.$ac_ext <<EOF
21498 #line 21499 "configure"
21499 #include "confdefs.h"
21500 /* System header to define __stub macros and hopefully few prototypes,
21501     which can conflict with char vprintf(); below.  */
21502 #include <assert.h>
21503 /* Override any gcc2 internal prototype to avoid an error.  */
21504 /* We use char because int might match the return type of a gcc2
21505     builtin and then its argument prototype would still apply.  */
21506 char vprintf();
21507 char (*f)();
21508
21509 int main() {
21510
21511 /* The GNU C library defines this for functions which it implements
21512     to always fail with ENOSYS.  Some functions are actually named
21513     something starting with __ and the normal name is an alias.  */
21514 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21515 choke me
21516 #else
21517 f = vprintf;
21518 #endif
21519
21520 ; return 0; }
21521 EOF
21522 if { (eval echo configure:21523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21523   rm -rf conftest*
21524   eval "ac_cv_func_vprintf=yes"
21525 else
21526   echo "configure: failed program was:" >&5
21527   cat conftest.$ac_ext >&5
21528   rm -rf conftest*
21529   eval "ac_cv_func_vprintf=no"
21530 fi
21531 rm -f conftest*
21532 fi
21533
21534 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21535   echo "$ac_t""yes" 1>&6
21536   cat >> confdefs.h <<\EOF
21537 #define HAVE_VPRINTF 1
21538 EOF
21539
21540 else
21541   echo "$ac_t""no" 1>&6
21542 fi
21543
21544 if test "$ac_cv_func_vprintf" != yes; then
21545 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21546 echo "configure:21547: checking for _doprnt" >&5
21547 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21548   echo $ac_n "(cached) $ac_c" 1>&6
21549 else
21550   cat > conftest.$ac_ext <<EOF
21551 #line 21552 "configure"
21552 #include "confdefs.h"
21553 /* System header to define __stub macros and hopefully few prototypes,
21554     which can conflict with char _doprnt(); below.  */
21555 #include <assert.h>
21556 /* Override any gcc2 internal prototype to avoid an error.  */
21557 /* We use char because int might match the return type of a gcc2
21558     builtin and then its argument prototype would still apply.  */
21559 char _doprnt();
21560 char (*f)();
21561
21562 int main() {
21563
21564 /* The GNU C library defines this for functions which it implements
21565     to always fail with ENOSYS.  Some functions are actually named
21566     something starting with __ and the normal name is an alias.  */
21567 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21568 choke me
21569 #else
21570 f = _doprnt;
21571 #endif
21572
21573 ; return 0; }
21574 EOF
21575 if { (eval echo configure:21576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21576   rm -rf conftest*
21577   eval "ac_cv_func__doprnt=yes"
21578 else
21579   echo "configure: failed program was:" >&5
21580   cat conftest.$ac_ext >&5
21581   rm -rf conftest*
21582   eval "ac_cv_func__doprnt=no"
21583 fi
21584 rm -f conftest*
21585 fi
21586
21587 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21588   echo "$ac_t""yes" 1>&6
21589   cat >> confdefs.h <<\EOF
21590 #define HAVE_DOPRNT 1
21591 EOF
21592
21593 else
21594   echo "$ac_t""no" 1>&6
21595 fi
21596
21597 fi
21598
21599
21600 if test $ac_cv_func_vprintf = yes ; then
21601                 for ac_func in vsnprintf vsprintf
21602 do
21603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21604 echo "configure:21605: checking for $ac_func" >&5
21605 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21606   echo $ac_n "(cached) $ac_c" 1>&6
21607 else
21608   cat > conftest.$ac_ext <<EOF
21609 #line 21610 "configure"
21610 #include "confdefs.h"
21611 /* System header to define __stub macros and hopefully few prototypes,
21612     which can conflict with char $ac_func(); below.  */
21613 #include <assert.h>
21614 /* Override any gcc2 internal prototype to avoid an error.  */
21615 /* We use char because int might match the return type of a gcc2
21616     builtin and then its argument prototype would still apply.  */
21617 char $ac_func();
21618 char (*f)();
21619
21620 int main() {
21621
21622 /* The GNU C library defines this for functions which it implements
21623     to always fail with ENOSYS.  Some functions are actually named
21624     something starting with __ and the normal name is an alias.  */
21625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21626 choke me
21627 #else
21628 f = $ac_func;
21629 #endif
21630
21631 ; return 0; }
21632 EOF
21633 if { (eval echo configure:21634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21634   rm -rf conftest*
21635   eval "ac_cv_func_$ac_func=yes"
21636 else
21637   echo "configure: failed program was:" >&5
21638   cat conftest.$ac_ext >&5
21639   rm -rf conftest*
21640   eval "ac_cv_func_$ac_func=no"
21641 fi
21642 rm -f conftest*
21643 fi
21644
21645 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21646   echo "$ac_t""yes" 1>&6
21647     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21648   cat >> confdefs.h <<EOF
21649 #define $ac_tr_func 1
21650 EOF
21651  
21652 else
21653   echo "$ac_t""no" 1>&6
21654 fi
21655 done
21656
21657 fi
21658
21659 for ac_func in \
21660         bcopy                   \
21661         closesocket             \
21662         chroot                  \
21663         endgrent                \
21664         endpwent                \
21665         fcntl                   \
21666         flock                   \
21667         getdtablesize   \
21668         getgrgid                \
21669         gethostname             \
21670         getpass                 \
21671         getpassphrase   \
21672         getpwuid                \
21673         getpwnam                \
21674         getspnam                \
21675         gettimeofday    \
21676         initgroups              \
21677         lockf                   \
21678         memcpy                  \
21679         memmove                 \
21680         mkstemp                 \
21681         mktemp                  \
21682         pipe                    \
21683         read                    \
21684         recv                    \
21685         recvfrom                \
21686         setpwfile               \
21687         setgid                  \
21688         setegid                 \
21689         setsid                  \
21690         setuid                  \
21691         seteuid                 \
21692         sigaction               \
21693         signal                  \
21694         sigset                  \
21695         strdup                  \
21696         strerror                \
21697         strpbrk                 \
21698         strrchr                 \
21699         strsep                  \
21700         strstr                  \
21701         strtol                  \
21702         strtoul                 \
21703         strspn                  \
21704         sysconf                 \
21705         usleep                  \
21706         waitpid                 \
21707         wait4                   \
21708         write                   \
21709         send                    \
21710         sendto                  \
21711
21712 do
21713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21714 echo "configure:21715: checking for $ac_func" >&5
21715 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21716   echo $ac_n "(cached) $ac_c" 1>&6
21717 else
21718   cat > conftest.$ac_ext <<EOF
21719 #line 21720 "configure"
21720 #include "confdefs.h"
21721 /* System header to define __stub macros and hopefully few prototypes,
21722     which can conflict with char $ac_func(); below.  */
21723 #include <assert.h>
21724 /* Override any gcc2 internal prototype to avoid an error.  */
21725 /* We use char because int might match the return type of a gcc2
21726     builtin and then its argument prototype would still apply.  */
21727 char $ac_func();
21728 char (*f)();
21729
21730 int main() {
21731
21732 /* The GNU C library defines this for functions which it implements
21733     to always fail with ENOSYS.  Some functions are actually named
21734     something starting with __ and the normal name is an alias.  */
21735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21736 choke me
21737 #else
21738 f = $ac_func;
21739 #endif
21740
21741 ; return 0; }
21742 EOF
21743 if { (eval echo configure:21744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21744   rm -rf conftest*
21745   eval "ac_cv_func_$ac_func=yes"
21746 else
21747   echo "configure: failed program was:" >&5
21748   cat conftest.$ac_ext >&5
21749   rm -rf conftest*
21750   eval "ac_cv_func_$ac_func=no"
21751 fi
21752 rm -f conftest*
21753 fi
21754
21755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21756   echo "$ac_t""yes" 1>&6
21757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21758   cat >> confdefs.h <<EOF
21759 #define $ac_tr_func 1
21760 EOF
21761  
21762 else
21763   echo "$ac_t""no" 1>&6
21764 fi
21765 done
21766
21767
21768 for ac_func in getopt
21769 do
21770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21771 echo "configure:21772: checking for $ac_func" >&5
21772 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21773   echo $ac_n "(cached) $ac_c" 1>&6
21774 else
21775   cat > conftest.$ac_ext <<EOF
21776 #line 21777 "configure"
21777 #include "confdefs.h"
21778 /* System header to define __stub macros and hopefully few prototypes,
21779     which can conflict with char $ac_func(); below.  */
21780 #include <assert.h>
21781 /* Override any gcc2 internal prototype to avoid an error.  */
21782 /* We use char because int might match the return type of a gcc2
21783     builtin and then its argument prototype would still apply.  */
21784 char $ac_func();
21785 char (*f)();
21786
21787 int main() {
21788
21789 /* The GNU C library defines this for functions which it implements
21790     to always fail with ENOSYS.  Some functions are actually named
21791     something starting with __ and the normal name is an alias.  */
21792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21793 choke me
21794 #else
21795 f = $ac_func;
21796 #endif
21797
21798 ; return 0; }
21799 EOF
21800 if { (eval echo configure:21801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21801   rm -rf conftest*
21802   eval "ac_cv_func_$ac_func=yes"
21803 else
21804   echo "configure: failed program was:" >&5
21805   cat conftest.$ac_ext >&5
21806   rm -rf conftest*
21807   eval "ac_cv_func_$ac_func=no"
21808 fi
21809 rm -f conftest*
21810 fi
21811
21812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21813   echo "$ac_t""yes" 1>&6
21814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21815   cat >> confdefs.h <<EOF
21816 #define $ac_tr_func 1
21817 EOF
21818  
21819 else
21820   echo "$ac_t""no" 1>&6
21821 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21822 fi
21823 done
21824
21825
21826
21827 if test "$ac_cv_func_getopt" != yes; then
21828         LIBSRCS="$LIBSRCS getopt.c"
21829 fi
21830
21831 # Check Configuration
21832 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21833 echo "configure:21834: checking declaration of sys_errlist" >&5
21834 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21835   echo $ac_n "(cached) $ac_c" 1>&6
21836 else
21837   
21838         cat > conftest.$ac_ext <<EOF
21839 #line 21840 "configure"
21840 #include "confdefs.h"
21841
21842 #include <stdio.h>
21843 #include <sys/types.h>
21844 #include <errno.h>
21845 #ifdef WINNT
21846 #include <stdlib.h>
21847 #endif 
21848 int main() {
21849 char *c = (char *) *sys_errlist
21850 ; return 0; }
21851 EOF
21852 if { (eval echo configure:21853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21853   rm -rf conftest*
21854   ol_cv_dcl_sys_errlist=yes
21855         ol_cv_have_sys_errlist=yes
21856 else
21857   echo "configure: failed program was:" >&5
21858   cat conftest.$ac_ext >&5
21859   rm -rf conftest*
21860   ol_cv_dcl_sys_errlist=no
21861 fi
21862 rm -f conftest*
21863 fi
21864
21865 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21866 #
21867 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21868 if test $ol_cv_dcl_sys_errlist = no ; then
21869         cat >> confdefs.h <<\EOF
21870 #define DECL_SYS_ERRLIST 1
21871 EOF
21872
21873
21874         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21875 echo "configure:21876: checking existence of sys_errlist" >&5
21876 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21877   echo $ac_n "(cached) $ac_c" 1>&6
21878 else
21879   
21880                 cat > conftest.$ac_ext <<EOF
21881 #line 21882 "configure"
21882 #include "confdefs.h"
21883 #include <errno.h>
21884 int main() {
21885 char *c = (char *) *sys_errlist
21886 ; return 0; }
21887 EOF
21888 if { (eval echo configure:21889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21889   rm -rf conftest*
21890   ol_cv_have_sys_errlist=yes
21891 else
21892   echo "configure: failed program was:" >&5
21893   cat conftest.$ac_ext >&5
21894   rm -rf conftest*
21895   ol_cv_have_sys_errlist=no
21896 fi
21897 rm -f conftest*
21898 fi
21899
21900 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21901 fi
21902 if test $ol_cv_have_sys_errlist = yes ; then
21903         cat >> confdefs.h <<\EOF
21904 #define HAVE_SYS_ERRLIST 1
21905 EOF
21906
21907 fi
21908
21909
21910
21911 if test "$ol_enable_debug" != no ; then
21912         cat >> confdefs.h <<\EOF
21913 #define LDAP_DEBUG 1
21914 EOF
21915
21916 fi
21917 if test "$ol_enable_syslog" = yes ; then
21918         cat >> confdefs.h <<\EOF
21919 #define LDAP_SYSLOG 1
21920 EOF
21921
21922 fi
21923 if test "$ol_enable_cache" = no ; then
21924         cat >> confdefs.h <<\EOF
21925 #define LDAP_NOCACHE 1
21926 EOF
21927
21928 fi
21929 if test "$ol_link_kbind" != no ; then
21930         cat >> confdefs.h <<\EOF
21931 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21932 EOF
21933
21934 fi
21935 if test "$ol_enable_proctitle" != no ; then
21936         cat >> confdefs.h <<\EOF
21937 #define LDAP_PROCTITLE 1
21938 EOF
21939
21940 fi
21941 if test "$ol_enable_referrals" != no ; then
21942         cat >> confdefs.h <<\EOF
21943 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21944 EOF
21945
21946 fi
21947 if test "$ol_enable_local" != no; then
21948         cat >> confdefs.h <<\EOF
21949 #define LDAP_PF_LOCAL 1
21950 EOF
21951
21952 fi
21953 if test "$ol_link_ipv6" != no; then
21954         cat >> confdefs.h <<\EOF
21955 #define LDAP_PF_INET6 1
21956 EOF
21957
21958 fi
21959 if test "$ol_enable_cleartext" != no ; then
21960         cat >> confdefs.h <<\EOF
21961 #define SLAPD_CLEARTEXT 1
21962 EOF
21963
21964 fi
21965 if test "$ol_enable_crypt" != no ; then
21966         cat >> confdefs.h <<\EOF
21967 #define SLAPD_CRYPT 1
21968 EOF
21969
21970 fi
21971 if test "$ol_link_kpasswd" != no ; then
21972         cat >> confdefs.h <<\EOF
21973 #define SLAPD_KPASSWD 1
21974 EOF
21975
21976 fi
21977 if test "$ol_link_spasswd" != no ; then
21978         cat >> confdefs.h <<\EOF
21979 #define SLAPD_SPASSWD 1
21980 EOF
21981
21982 fi
21983 if test "$ol_enable_phonetic" != no ; then
21984         cat >> confdefs.h <<\EOF
21985 #define SLAPD_PHONETIC 1
21986 EOF
21987
21988 fi
21989 if test "$ol_enable_rlookups" != no ; then
21990         cat >> confdefs.h <<\EOF
21991 #define SLAPD_RLOOKUPS 1
21992 EOF
21993
21994 fi
21995 if test "$ol_enable_aci" != no ; then
21996         cat >> confdefs.h <<\EOF
21997 #define SLAPD_ACI_ENABLED 1
21998 EOF
21999
22000 fi
22001
22002 if test "$ol_link_modules" != no ; then
22003         cat >> confdefs.h <<\EOF
22004 #define SLAPD_MODULES 1
22005 EOF
22006
22007         BUILD_SLAPD=yes
22008         SLAPD_MODULES_LDFLAGS="-dlopen self"
22009 fi
22010
22011 if test "$ol_enable_bdb" != no ; then
22012         cat >> confdefs.h <<\EOF
22013 #define SLAPD_BDB 1
22014 EOF
22015
22016         BUILD_SLAPD=yes
22017         BUILD_BDB=yes
22018         if test "$ol_with_bdb_module" != static ; then
22019                 cat >> confdefs.h <<\EOF
22020 #define SLAPD_BDB_DYNAMIC 1
22021 EOF
22022
22023                 BUILD_BDB=mod
22024                 BUILD_BDB_DYNAMIC=shared
22025                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
22026                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22027         else
22028                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22029         fi
22030 fi
22031
22032 if test "$ol_link_dnssrv" != no ; then
22033         cat >> confdefs.h <<\EOF
22034 #define SLAPD_DNSSRV 1
22035 EOF
22036
22037         BUILD_SLAPD=yes
22038         BUILD_DNSSRV=yes
22039         if test "$ol_with_dnssrv_module" != static ; then
22040                 cat >> confdefs.h <<\EOF
22041 #define SLAPD_DNSSRV_DYNAMIC 1
22042 EOF
22043
22044                 BUILD_DNSSRV=mod
22045                 BUILD_DNSSRV_DYNAMIC=shared
22046                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
22047                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22048         else
22049                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22050         fi
22051 fi
22052
22053 if test "$ol_enable_ldap" != no ; then
22054         cat >> confdefs.h <<\EOF
22055 #define SLAPD_LDAP 1
22056 EOF
22057
22058         BUILD_SLAPD=yes
22059         BUILD_LDAP=yes
22060         if test "$ol_with_ldap_module" != static ; then
22061                 cat >> confdefs.h <<\EOF
22062 #define SLAPD_LDAP_DYNAMIC 1
22063 EOF
22064
22065                 BUILD_LDAP=mod
22066                 BUILD_LDAP_DYNAMIC=shared
22067                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
22068                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22069         else
22070                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22071         fi
22072 fi
22073
22074 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22075         cat >> confdefs.h <<\EOF
22076 #define SLAPD_LDBM 1
22077 EOF
22078
22079         BUILD_SLAPD=yes
22080         BUILD_LDBM=yes
22081         LDBM_LIB="-lldbm"
22082         if test "$ol_with_ldbm_module" != static ; then
22083                 cat >> confdefs.h <<\EOF
22084 #define SLAPD_LDBM_DYNAMIC 1
22085 EOF
22086
22087                 BUILD_LDBM=mod
22088                 BUILD_LDBM_DYNAMIC=shared
22089                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
22090                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22091         else
22092                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22093         fi
22094 fi
22095
22096 if test "$ol_enable_meta" != no ; then
22097         if test "$ol_enable_ldap" = no ; then
22098                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22099         fi
22100         if test "$ol_enable_rewrite" = no ; then
22101                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22102         fi
22103         cat >> confdefs.h <<\EOF
22104 #define SLAPD_META 1
22105 EOF
22106
22107         BUILD_SLAPD=yes
22108         BUILD_META=yes
22109         if test "$ol_with_meta_module" != static ; then
22110                 cat >> confdefs.h <<\EOF
22111 #define SLAPD_META_DYNAMIC 1
22112 EOF
22113
22114                 BUILD_META=mod
22115                 BUILD_META_DYNAMIC=shared
22116                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
22117                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22118         else
22119                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22120         fi
22121 fi
22122
22123 if test "$ol_enable_monitor" != no ; then
22124         cat >> confdefs.h <<\EOF
22125 #define SLAPD_MONITOR 1
22126 EOF
22127
22128         BUILD_SLAPD=yes
22129         BUILD_MONITOR=yes
22130         if test "$ol_with_monitor_module" != static ; then
22131                 cat >> confdefs.h <<\EOF
22132 #define SLAPD_MONITOR_DYNAMIC 1
22133 EOF
22134
22135                 BUILD_MONITOR=mod
22136                 BUILD_MONITOR_DYNAMIC=shared
22137                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22138                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22139         else
22140                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22141         fi
22142 fi
22143
22144 if test "$ol_enable_passwd" != no ; then
22145         cat >> confdefs.h <<\EOF
22146 #define SLAPD_PASSWD 1
22147 EOF
22148
22149         BUILD_SLAPD=yes
22150         BUILD_PASSWD=yes
22151         if test "$ol_with_passwd_module" != static ; then
22152                 cat >> confdefs.h <<\EOF
22153 #define SLAPD_PASSWD_DYNAMIC 1
22154 EOF
22155
22156                 BUILD_PASSWD=mod
22157                 BUILD_PASSWD_DYNAMIC=shared
22158                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22159                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22160         else
22161                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22162         fi
22163 fi
22164
22165 if test "$ol_link_perl" != no ; then
22166         cat >> confdefs.h <<\EOF
22167 #define SLAPD_PERL 1
22168 EOF
22169
22170         BUILD_SLAPD=yes
22171         BUILD_PERL=yes
22172         if test "$ol_with_perl_module" != static ; then
22173                 cat >> confdefs.h <<\EOF
22174 #define SLAPD_PERL_DYNAMIC 1
22175 EOF
22176
22177                 BUILD_PERL=mod
22178                 BUILD_PERL_DYNAMIC=shared
22179                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22180                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22181         else
22182                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22183         fi
22184 fi
22185
22186 if test "$ol_enable_shell" != no ; then
22187         cat >> confdefs.h <<\EOF
22188 #define SLAPD_SHELL 1
22189 EOF
22190
22191         BUILD_SLAPD=yes
22192         BUILD_SHELL=yes
22193         if test "$ol_with_shell_module" != static ; then
22194                 cat >> confdefs.h <<\EOF
22195 #define SLAPD_SHELL_DYNAMIC 1
22196 EOF
22197
22198                 BUILD_SHELL=mod
22199                 BUILD_SHELL_DYNAMIC=shared
22200                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22201                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22202         else
22203                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22204         fi
22205 fi
22206
22207 if test "$ol_enable_tcl" != no ; then
22208         cat >> confdefs.h <<\EOF
22209 #define SLAPD_TCL 1
22210 EOF
22211
22212         BUILD_SLAPD=yes
22213         BUILD_TCL=yes
22214         if test "$ol_with_tcl_module" != static; then
22215                 cat >> confdefs.h <<\EOF
22216 #define SLAPD_TCL_DYNAMIC 1
22217 EOF
22218
22219                 BUILD_TCL=mod
22220                 BUILD_TCL_DYNAMIC=shared
22221                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22222                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22223         else
22224                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22225         fi
22226 fi
22227
22228 if test "$ol_link_sql" != no ; then
22229         cat >> confdefs.h <<\EOF
22230 #define SLAPD_SQL 1
22231 EOF
22232
22233         BUILD_SLAPD=yes
22234         BUILD_SQL=yes
22235         if test "$ol_with_sql_module" != static; then
22236                 cat >> confdefs.h <<\EOF
22237 #define SLAPD_SQL_DYNAMIC 1
22238 EOF
22239
22240                 BUILD_SQL=mod
22241                 BUILD_SQL_DYNAMIC=shared
22242                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22243                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22244         else
22245                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22246         fi
22247 fi
22248
22249 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22250         $BUILD_SLAPD = yes ; then
22251         BUILD_SLURPD=yes
22252 fi
22253
22254 if test "$ol_enable_rewrite" != no ; then
22255         cat >> confdefs.h <<\EOF
22256 #define ENABLE_REWRITE 1
22257 EOF
22258
22259         BUILD_REWRITE=yes
22260 fi
22261
22262
22263
22264 if test "$ac_cv_mingw32" = yes ; then
22265         PLAT=NT
22266         SLAPD_MODULES_LDFLAGS=
22267         SLAPD_MODULES_LIST=
22268 else
22269         PLAT=UNIX
22270 fi
22271
22272
22273
22274
22275
22276
22277   
22278   
22279   
22280   
22281   
22282   
22283   
22284   
22285   
22286   
22287   
22288   
22289   
22290   
22291   
22292   
22293   
22294   
22295   
22296   
22297   
22298   
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339 # Check whether --with-xxinstall or --without-xxinstall was given.
22340 if test "${with_xxinstall+set}" = set; then
22341   withval="$with_xxinstall"
22342   :
22343 fi
22344
22345
22346
22347 trap '' 1 2 15
22348
22349 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22350
22351 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22352 # Let make expand exec_prefix.
22353 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22354
22355 # Any assignment to VPATH causes Sun make to only execute
22356 # the first set of double-colon rules, so remove it if not needed.
22357 # If there is a colon in the path, we need to keep it.
22358 if test "x$srcdir" = x.; then
22359   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22360 fi
22361
22362 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22363
22364 DEFS=-DHAVE_CONFIG_H
22365
22366 # Without the "./", some shells look in PATH for config.status.
22367 : ${CONFIG_STATUS=./config.status}
22368
22369 echo creating $CONFIG_STATUS
22370 rm -f $CONFIG_STATUS
22371 cat > $CONFIG_STATUS <<EOF
22372 #! /bin/sh
22373 # Generated automatically by configure.
22374 # Run this file to recreate the current configuration.
22375 # This directory was configured as follows,
22376 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22377 #
22378 # $0 $ac_configure_args
22379 #
22380 # Compiler output produced by configure, useful for debugging
22381 # configure, is in ./config.log if it exists.
22382
22383 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22384 for ac_option
22385 do
22386   case "\$ac_option" in
22387   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22388     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22389     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22390   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22391     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22392     exit 0 ;;
22393   -help | --help | --hel | --he | --h)
22394     echo "\$ac_cs_usage"; exit 0 ;;
22395   *) echo "\$ac_cs_usage"; exit 1 ;;
22396   esac
22397 done
22398
22399 ac_given_srcdir=$srcdir
22400 ac_given_INSTALL="$INSTALL"
22401
22402 trap 'rm -fr `echo "\
22403 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22404 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22405 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22406 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22407 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22408 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22409 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22410 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22411 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22412 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22413 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22414 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22415 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22416 include/Makefile:build/top.mk:include/Makefile.in \
22417 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22418 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22419 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22420 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22421 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22422 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22423 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22424 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22425 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22426 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22427 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22428 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22429 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22430 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22431 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22432 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22433 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22434 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22435 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22436 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22437 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22438 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22439 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22440 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22441 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22442 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22443 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22444 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22445  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22446 EOF
22447 cat >> $CONFIG_STATUS <<EOF
22448
22449 # Protect against being on the right side of a sed subst in config.status.
22450 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22451  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22452 $ac_vpsub
22453 $extrasub
22454 s%@SHELL@%$SHELL%g
22455 s%@CFLAGS@%$CFLAGS%g
22456 s%@CPPFLAGS@%$CPPFLAGS%g
22457 s%@CXXFLAGS@%$CXXFLAGS%g
22458 s%@FFLAGS@%$FFLAGS%g
22459 s%@DEFS@%$DEFS%g
22460 s%@LDFLAGS@%$LDFLAGS%g
22461 s%@LIBS@%$LIBS%g
22462 s%@exec_prefix@%$exec_prefix%g
22463 s%@prefix@%$prefix%g
22464 s%@program_transform_name@%$program_transform_name%g
22465 s%@bindir@%$bindir%g
22466 s%@sbindir@%$sbindir%g
22467 s%@libexecdir@%$libexecdir%g
22468 s%@datadir@%$datadir%g
22469 s%@sysconfdir@%$sysconfdir%g
22470 s%@sharedstatedir@%$sharedstatedir%g
22471 s%@localstatedir@%$localstatedir%g
22472 s%@libdir@%$libdir%g
22473 s%@includedir@%$includedir%g
22474 s%@oldincludedir@%$oldincludedir%g
22475 s%@infodir@%$infodir%g
22476 s%@mandir@%$mandir%g
22477 s%@host@%$host%g
22478 s%@host_alias@%$host_alias%g
22479 s%@host_cpu@%$host_cpu%g
22480 s%@host_vendor@%$host_vendor%g
22481 s%@host_os@%$host_os%g
22482 s%@target@%$target%g
22483 s%@target_alias@%$target_alias%g
22484 s%@target_cpu@%$target_cpu%g
22485 s%@target_vendor@%$target_vendor%g
22486 s%@target_os@%$target_os%g
22487 s%@build@%$build%g
22488 s%@build_alias@%$build_alias%g
22489 s%@build_cpu@%$build_cpu%g
22490 s%@build_vendor@%$build_vendor%g
22491 s%@build_os@%$build_os%g
22492 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22493 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22494 s%@INSTALL_DATA@%$INSTALL_DATA%g
22495 s%@PACKAGE@%$PACKAGE%g
22496 s%@VERSION@%$VERSION%g
22497 s%@ACLOCAL@%$ACLOCAL%g
22498 s%@AUTOCONF@%$AUTOCONF%g
22499 s%@AUTOMAKE@%$AUTOMAKE%g
22500 s%@AUTOHEADER@%$AUTOHEADER%g
22501 s%@MAKEINFO@%$MAKEINFO%g
22502 s%@install_sh@%$install_sh%g
22503 s%@AMTAR@%$AMTAR%g
22504 s%@AWK@%$AWK%g
22505 s%@AMTARFLAGS@%$AMTARFLAGS%g
22506 s%@SET_MAKE@%$SET_MAKE%g
22507 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22508 s%@top_builddir@%$top_builddir%g
22509 s%@ldap_subdir@%$ldap_subdir%g
22510 s%@CC@%$CC%g
22511 s%@AR@%$AR%g
22512 s%@LN_S@%$LN_S%g
22513 s%@OBJEXT@%$OBJEXT%g
22514 s%@EXEEXT@%$EXEEXT%g
22515 s%@ECHO@%$ECHO%g
22516 s%@RANLIB@%$RANLIB%g
22517 s%@STRIP@%$STRIP%g
22518 s%@DLLTOOL@%$DLLTOOL%g
22519 s%@AS@%$AS%g
22520 s%@OBJDUMP@%$OBJDUMP%g
22521 s%@CPP@%$CPP%g
22522 s%@LIBTOOL@%$LIBTOOL%g
22523 s%@LN_H@%$LN_H%g
22524 s%@SENDMAIL@%$SENDMAIL%g
22525 s%@EDITOR@%$EDITOR%g
22526 s%@FINGER@%$FINGER%g
22527 s%@PERLBIN@%$PERLBIN%g
22528 s%@OL_MKDEP@%$OL_MKDEP%g
22529 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22530 s%@LIBOBJS@%$LIBOBJS%g
22531 s%@LIBSRCS@%$LIBSRCS%g
22532 s%@PLAT@%$PLAT%g
22533 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22534 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22535 s%@BUILD_BDB@%$BUILD_BDB%g
22536 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22537 s%@BUILD_LDAP@%$BUILD_LDAP%g
22538 s%@BUILD_LDBM@%$BUILD_LDBM%g
22539 s%@BUILD_META@%$BUILD_META%g
22540 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22541 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22542 s%@BUILD_PERL@%$BUILD_PERL%g
22543 s%@BUILD_SHELL@%$BUILD_SHELL%g
22544 s%@BUILD_SQL@%$BUILD_SQL%g
22545 s%@BUILD_TCL@%$BUILD_TCL%g
22546 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22547 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22548 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22549 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22550 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22551 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22552 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22553 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22554 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22555 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22556 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22557 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22558 s%@LDBM_LIB@%$LDBM_LIB%g
22559 s%@LDAP_LIBS@%$LDAP_LIBS%g
22560 s%@LDIF_LIBS@%$LDIF_LIBS%g
22561 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22562 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22563 s%@LDBM_LIBS@%$LDBM_LIBS%g
22564 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22565 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22566 s%@WRAP_LIBS@%$WRAP_LIBS%g
22567 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22568 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22569 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22570 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22571 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22572 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22573 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22574 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22575 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22576 s%@KRB4_LIBS@%$KRB4_LIBS%g
22577 s%@KRB5_LIBS@%$KRB5_LIBS%g
22578 s%@READLINE_LIBS@%$READLINE_LIBS%g
22579 s%@SASL_LIBS@%$SASL_LIBS%g
22580 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22581 s%@TLS_LIBS@%$TLS_LIBS%g
22582 s%@MODULES_LIBS@%$MODULES_LIBS%g
22583 s%@AUTH_LIBS@%$AUTH_LIBS%g
22584 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22585 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22586 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22587 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22588
22589 CEOF
22590 EOF
22591
22592 cat >> $CONFIG_STATUS <<\EOF
22593
22594 # Split the substitutions into bite-sized pieces for seds with
22595 # small command number limits, like on Digital OSF/1 and HP-UX.
22596 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22597 ac_file=1 # Number of current file.
22598 ac_beg=1 # First line for current file.
22599 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22600 ac_more_lines=:
22601 ac_sed_cmds=""
22602 while $ac_more_lines; do
22603   if test $ac_beg -gt 1; then
22604     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22605   else
22606     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22607   fi
22608   if test ! -s conftest.s$ac_file; then
22609     ac_more_lines=false
22610     rm -f conftest.s$ac_file
22611   else
22612     if test -z "$ac_sed_cmds"; then
22613       ac_sed_cmds="sed -f conftest.s$ac_file"
22614     else
22615       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22616     fi
22617     ac_file=`expr $ac_file + 1`
22618     ac_beg=$ac_end
22619     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22620   fi
22621 done
22622 if test -z "$ac_sed_cmds"; then
22623   ac_sed_cmds=cat
22624 fi
22625 EOF
22626
22627 cat >> $CONFIG_STATUS <<EOF
22628
22629 CONFIG_FILES=\${CONFIG_FILES-"\
22630 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22631 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22632 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22633 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22634 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22635 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22636 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22637 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22638 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22639 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22640 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22641 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22642 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22643 include/Makefile:build/top.mk:include/Makefile.in \
22644 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22645 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22646 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22647 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22648 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22649 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22650 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22651 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22652 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22653 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22654 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22655 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22656 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22657 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22658 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22659 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22660 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22661 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22662 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22663 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22664 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22665 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22666 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22667 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22668 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22669 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22670 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22671 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22672 "}
22673 EOF
22674 cat >> $CONFIG_STATUS <<\EOF
22675 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22676   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22677   case "$ac_file" in
22678   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22679        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22680   *) ac_file_in="${ac_file}.in" ;;
22681   esac
22682
22683   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22684
22685   # Remove last slash and all that follows it.  Not all systems have dirname.
22686   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22687   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22688     # The file is in a subdirectory.
22689     test ! -d "$ac_dir" && mkdir "$ac_dir"
22690     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22691     # A "../" for each directory in $ac_dir_suffix.
22692     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22693   else
22694     ac_dir_suffix= ac_dots=
22695   fi
22696
22697   case "$ac_given_srcdir" in
22698   .)  srcdir=.
22699       if test -z "$ac_dots"; then top_srcdir=.
22700       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22701   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22702   *) # Relative path.
22703     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22704     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22705   esac
22706
22707   case "$ac_given_INSTALL" in
22708   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22709   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22710   esac
22711
22712   echo creating "$ac_file"
22713   rm -f "$ac_file"
22714   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22715   case "$ac_file" in
22716   *[Mm]akefile*) ac_comsub="1i\\
22717 # $configure_input" ;;
22718   *) ac_comsub= ;;
22719   esac
22720
22721   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22722   sed -e "$ac_comsub
22723 s%@configure_input@%$configure_input%g
22724 s%@srcdir@%$srcdir%g
22725 s%@top_srcdir@%$top_srcdir%g
22726 s%@INSTALL@%$INSTALL%g
22727 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22728 fi; done
22729 rm -f conftest.s*
22730
22731 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22732 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22733 #
22734 # ac_d sets the value in "#define NAME VALUE" lines.
22735 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22736 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22737 ac_dC='\3'
22738 ac_dD='%g'
22739 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22740 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22741 ac_uB='\([      ]\)%\1#\2define\3'
22742 ac_uC=' '
22743 ac_uD='\4%g'
22744 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22745 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22746 ac_eB='$%\1#\2define\3'
22747 ac_eC=' '
22748 ac_eD='%g'
22749
22750 if test "${CONFIG_HEADERS+set}" != set; then
22751 EOF
22752 cat >> $CONFIG_STATUS <<EOF
22753   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22754 EOF
22755 cat >> $CONFIG_STATUS <<\EOF
22756 fi
22757 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22758   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22759   case "$ac_file" in
22760   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22761        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22762   *) ac_file_in="${ac_file}.in" ;;
22763   esac
22764
22765   echo creating $ac_file
22766
22767   rm -f conftest.frag conftest.in conftest.out
22768   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22769   cat $ac_file_inputs > conftest.in
22770
22771 EOF
22772
22773 # Transform confdefs.h into a sed script conftest.vals that substitutes
22774 # the proper values into config.h.in to produce config.h.  And first:
22775 # Protect against being on the right side of a sed subst in config.status.
22776 # Protect against being in an unquoted here document in config.status.
22777 rm -f conftest.vals
22778 cat > conftest.hdr <<\EOF
22779 s/[\\&%]/\\&/g
22780 s%[\\$`]%\\&%g
22781 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22782 s%ac_d%ac_u%gp
22783 s%ac_u%ac_e%gp
22784 EOF
22785 sed -n -f conftest.hdr confdefs.h > conftest.vals
22786 rm -f conftest.hdr
22787
22788 # This sed command replaces #undef with comments.  This is necessary, for
22789 # example, in the case of _POSIX_SOURCE, which is predefined and required
22790 # on some systems where configure will not decide to define it.
22791 cat >> conftest.vals <<\EOF
22792 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22793 EOF
22794
22795 # Break up conftest.vals because some shells have a limit on
22796 # the size of here documents, and old seds have small limits too.
22797
22798 rm -f conftest.tail
22799 while :
22800 do
22801   ac_lines=`grep -c . conftest.vals`
22802   # grep -c gives empty output for an empty file on some AIX systems.
22803   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22804   # Write a limited-size here document to conftest.frag.
22805   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22806   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22807   echo 'CEOF
22808   sed -f conftest.frag conftest.in > conftest.out
22809   rm -f conftest.in
22810   mv conftest.out conftest.in
22811 ' >> $CONFIG_STATUS
22812   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22813   rm -f conftest.vals
22814   mv conftest.tail conftest.vals
22815 done
22816 rm -f conftest.vals
22817
22818 cat >> $CONFIG_STATUS <<\EOF
22819   rm -f conftest.frag conftest.h
22820   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22821   cat conftest.in >> conftest.h
22822   rm -f conftest.in
22823   if cmp -s $ac_file conftest.h 2>/dev/null; then
22824     echo "$ac_file is unchanged"
22825     rm -f conftest.h
22826   else
22827     # Remove last slash and all that follows it.  Not all systems have dirname.
22828       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22829       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22830       # The file is in a subdirectory.
22831       test ! -d "$ac_dir" && mkdir "$ac_dir"
22832     fi
22833     rm -f $ac_file
22834     mv conftest.h $ac_file
22835   fi
22836 fi; done
22837
22838 EOF
22839 cat >> $CONFIG_STATUS <<EOF
22840
22841 EOF
22842 cat >> $CONFIG_STATUS <<\EOF
22843
22844 date > stamp-h
22845 echo Please run \"make depend\" to build dependencies
22846
22847 exit 0
22848 EOF
22849 chmod +x $CONFIG_STATUS
22850 rm -fr confdefs* $ac_clean_files
22851 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22852