]> git.sur5r.net Git - openldap/blob - configure
Resync with HEAD
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.4 2002/04/15 16:06:32 kurt Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd          enable building slapd [yes]"
69 ac_help="$ac_help
70     --enable-aci          enable per-object ACIs (experimental) [no]"
71 ac_help="$ac_help
72     --enable-cleartext    enable cleartext passwords [yes]"
73 ac_help="$ac_help
74     --enable-crypt        enable crypt(3) passwords [no]"
75 ac_help="$ac_help
76     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
77 ac_help="$ac_help
78     --enable-kpasswd      enable Kerberos password verification [no]"
79 ac_help="$ac_help
80     --enable-lmpasswd     enable LAN Manager passwords [no]"
81 ac_help="$ac_help
82     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
83 ac_help="$ac_help
84     --enable-modules      enable dynamic module support [no]"
85 ac_help="$ac_help
86     --enable-phonetic     enable phonetic/soundex [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups [no]"
89 ac_help="$ac_help
90     --enable-slp          enable SLPv2 support [no]"
91 ac_help="$ac_help
92     --enable-wrappers     enable tcp wrapper support [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type [static]"
141 ac_help="$ac_help
142
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-null
2297         # Check whether --enable-null or --disable-null was given.
2298 if test "${enable_null+set}" = set; then
2299   enableval="$enable_null"
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-null" 1>&2; exit 1; }
2309         fi
2310         ol_enable_null="$ol_arg"
2311
2312 else
2313         ol_enable_null="no"
2314 fi
2315 # end --enable-null
2316 # OpenLDAP --with-null_module
2317         # Check whether --with-null_module or --without-null_module was given.
2318 if test "${with_null_module+set}" = set; then
2319   withval="$with_null_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-null_module" 1>&2; exit 1; }
2329         fi
2330         ol_with_null_module="$ol_arg"
2331
2332 else
2333         ol_with_null_module="static"
2334 fi
2335 # end --with-null_module
2336
2337 # OpenLDAP --enable-passwd
2338         # Check whether --enable-passwd or --disable-passwd was given.
2339 if test "${enable_passwd+set}" = set; then
2340   enableval="$enable_passwd"
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-passwd" 1>&2; exit 1; }
2350         fi
2351         ol_enable_passwd="$ol_arg"
2352
2353 else
2354         ol_enable_passwd="no"
2355 fi
2356 # end --enable-passwd
2357 # OpenLDAP --with-passwd_module
2358         # Check whether --with-passwd_module or --without-passwd_module was given.
2359 if test "${with_passwd_module+set}" = set; then
2360   withval="$with_passwd_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-passwd_module" 1>&2; exit 1; }
2370         fi
2371         ol_with_passwd_module="$ol_arg"
2372
2373 else
2374         ol_with_passwd_module="static"
2375 fi
2376 # end --with-passwd_module
2377
2378 # OpenLDAP --enable-perl
2379         # Check whether --enable-perl or --disable-perl was given.
2380 if test "${enable_perl+set}" = set; then
2381   enableval="$enable_perl"
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-perl" 1>&2; exit 1; }
2391         fi
2392         ol_enable_perl="$ol_arg"
2393
2394 else
2395         ol_enable_perl="no"
2396 fi
2397 # end --enable-perl
2398 # OpenLDAP --with-perl_module
2399         # Check whether --with-perl_module or --without-perl_module was given.
2400 if test "${with_perl_module+set}" = set; then
2401   withval="$with_perl_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-perl_module" 1>&2; exit 1; }
2411         fi
2412         ol_with_perl_module="$ol_arg"
2413
2414 else
2415         ol_with_perl_module="static"
2416 fi
2417 # end --with-perl_module
2418
2419 # OpenLDAP --enable-shell
2420         # Check whether --enable-shell or --disable-shell was given.
2421 if test "${enable_shell+set}" = set; then
2422   enableval="$enable_shell"
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-shell" 1>&2; exit 1; }
2432         fi
2433         ol_enable_shell="$ol_arg"
2434
2435 else
2436         ol_enable_shell="no"
2437 fi
2438 # end --enable-shell
2439 # OpenLDAP --with-shell_module
2440         # Check whether --with-shell_module or --without-shell_module was given.
2441 if test "${with_shell_module+set}" = set; then
2442   withval="$with_shell_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-shell_module" 1>&2; exit 1; }
2452         fi
2453         ol_with_shell_module="$ol_arg"
2454
2455 else
2456         ol_with_shell_module="static"
2457 fi
2458 # end --with-shell_module
2459
2460 # OpenLDAP --enable-sql
2461         # Check whether --enable-sql or --disable-sql was given.
2462 if test "${enable_sql+set}" = set; then
2463   enableval="$enable_sql"
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-sql" 1>&2; exit 1; }
2473         fi
2474         ol_enable_sql="$ol_arg"
2475
2476 else
2477         ol_enable_sql="no"
2478 fi
2479 # end --enable-sql
2480 # OpenLDAP --with-sql_module
2481         # Check whether --with-sql_module or --without-sql_module was given.
2482 if test "${with_sql_module+set}" = set; then
2483   withval="$with_sql_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-sql_module" 1>&2; exit 1; }
2493         fi
2494         ol_with_sql_module="$ol_arg"
2495
2496 else
2497         ol_with_sql_module="static"
2498 fi
2499 # end --with-sql_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_null = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2605         fi
2606         if test $ol_enable_passwd = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2608         fi
2609         if test $ol_enable_perl = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2611         fi
2612         if test $ol_enable_shell = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-shell 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_null_module != static ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2659         fi
2660         if test $ol_with_passwd_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2662         fi
2663         if test $ol_with_perl_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2665         fi
2666         if test $ol_with_shell_module != static ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-shell-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_null=no
2687         ol_enable_passwd=no
2688         ol_enable_perl=no
2689         ol_enable_shell=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_null_module=static
2709         ol_with_passwd_module=static
2710         ol_with_perl_module=static
2711         ol_with_shell_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_null = no -a \
2739                 $ol_enable_passwd = no -a \
2740                 $ol_enable_perl = no -a \
2741                 $ol_enable_shell = no -a \
2742                 $ol_enable_sql = 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_NULL=no
2849 BUILD_PASSWD=no
2850 BUILD_PERL=no
2851 BUILD_SHELL=no
2852 BUILD_SQL=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_NULL_DYNAMIC=static
2861 BUILD_PASSWD_DYNAMIC=static
2862 BUILD_PERL_DYNAMIC=static
2863 BUILD_SHELL_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 KRB4_LIBS=
2882 KRB5_LIBS=
2883 READLINE_LIBS=
2884 SASL_LIBS=
2885 TERMCAP_LIBS=
2886 TLS_LIBS=
2887 MODULES_LIBS=
2888 AUTH_LIBS=
2889
2890 SLAPD_SLP_LIBS=
2891
2892
2893 # Find a good install program.  We prefer a C program (faster),
2894 # so one script is as good as another.  But avoid the broken or
2895 # incompatible versions:
2896 # SysV /etc/install, /usr/sbin/install
2897 # SunOS /usr/etc/install
2898 # IRIX /sbin/install
2899 # AIX /bin/install
2900 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2901 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2902 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2903 # ./install, which can be erroneously created by make from ./install.sh.
2904 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2905 echo "configure:2906: checking for a BSD compatible install" >&5
2906 if test -z "$INSTALL"; then
2907 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2911   for ac_dir in $PATH; do
2912     # Account for people who put trailing slashes in PATH elements.
2913     case "$ac_dir/" in
2914     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2915     *)
2916       # OSF1 and SCO ODT 3.0 have their own names for install.
2917       # Don't use installbsd from OSF since it installs stuff as root
2918       # by default.
2919       for ac_prog in ginstall scoinst install; do
2920         if test -f $ac_dir/$ac_prog; then
2921           if test $ac_prog = install &&
2922             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2923             # AIX install.  It has an incompatible calling convention.
2924             :
2925           elif test $ac_prog = install &&
2926             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2927             # program-specific install script used by HP pwplus--don't use.
2928             :
2929           else
2930             ac_cv_path_install="$ac_dir/$ac_prog -c"
2931             break 2
2932           fi
2933         fi
2934       done
2935       ;;
2936     esac
2937   done
2938   IFS="$ac_save_IFS"
2939
2940 fi
2941   if test "${ac_cv_path_install+set}" = set; then
2942     INSTALL="$ac_cv_path_install"
2943   else
2944     # As a last resort, use the slow shell script.  We don't cache a
2945     # path for INSTALL within a source directory, because that will
2946     # break other packages using the cache if that directory is
2947     # removed, or if the path is relative.
2948     INSTALL="$ac_install_sh"
2949   fi
2950 fi
2951 echo "$ac_t""$INSTALL" 1>&6
2952
2953 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2954 # It thinks the first close brace ends the variable substitution.
2955 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2956
2957 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2958
2959 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2960
2961
2962 cat >> confdefs.h <<\EOF
2963 #define HAVE_MKVERSION 1
2964 EOF
2965
2966
2967
2968
2969 ol_aix_threads=no
2970 case "$target" in
2971 *-*-aix*)       if test -z "$CC" ; then
2972                 case "$ol_with_threads" in
2973                 auto | yes |  posix) ol_aix_threads=yes ;;
2974                 esac
2975         fi
2976 ;;
2977 esac
2978
2979 if test $ol_aix_threads = yes ; then
2980         if test -z "${CC}" ; then
2981                 for ac_prog in cc_r xlc_r cc
2982 do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984 set dummy $ac_prog; ac_word=$2
2985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2986 echo "configure:2987: checking for $ac_word" >&5
2987 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   if test -n "$CC"; then
2991   ac_cv_prog_CC="$CC" # Let the user override the test.
2992 else
2993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2994   ac_dummy="$PATH"
2995   for ac_dir in $ac_dummy; do
2996     test -z "$ac_dir" && ac_dir=.
2997     if test -f $ac_dir/$ac_word; then
2998       ac_cv_prog_CC="$ac_prog"
2999       break
3000     fi
3001   done
3002   IFS="$ac_save_ifs"
3003 fi
3004 fi
3005 CC="$ac_cv_prog_CC"
3006 if test -n "$CC"; then
3007   echo "$ac_t""$CC" 1>&6
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012 test -n "$CC" && break
3013 done
3014
3015
3016                 if test "$CC" = cc ; then
3017                                                 if test $ol_with_threads != auto ; then
3018                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3019                         else
3020                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3021                         fi
3022                         ol_with_threads=no
3023                 fi
3024         fi
3025
3026         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3027                 ol_with_threads=posix
3028                 ol_cv_pthread_create=yes
3029         fi
3030 fi
3031
3032 if test -z "${CC}"; then
3033         for ac_prog in cc
3034 do
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3038 echo "configure:3039: checking for $ac_word" >&5
3039 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   if test -n "$CC"; then
3043   ac_cv_prog_CC="$CC" # Let the user override the test.
3044 else
3045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3046   ac_dummy="$PATH"
3047   for ac_dir in $ac_dummy; do
3048     test -z "$ac_dir" && ac_dir=.
3049     if test -f $ac_dir/$ac_word; then
3050       ac_cv_prog_CC="$ac_prog"
3051       break
3052     fi
3053   done
3054   IFS="$ac_save_ifs"
3055 fi
3056 fi
3057 CC="$ac_cv_prog_CC"
3058 if test -n "$CC"; then
3059   echo "$ac_t""$CC" 1>&6
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063
3064 test -n "$CC" && break
3065 done
3066
3067 fi
3068
3069
3070 for ac_prog in ar gar
3071 do
3072 # Extract the first word of "$ac_prog", so it can be a program name with args.
3073 set dummy $ac_prog; ac_word=$2
3074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3075 echo "configure:3076: checking for $ac_word" >&5
3076 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079   if test -n "$AR"; then
3080   ac_cv_prog_AR="$AR" # Let the user override the test.
3081 else
3082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3083   ac_dummy="$PATH"
3084   for ac_dir in $ac_dummy; do
3085     test -z "$ac_dir" && ac_dir=.
3086     if test -f $ac_dir/$ac_word; then
3087       ac_cv_prog_AR="$ac_prog"
3088       break
3089     fi
3090   done
3091   IFS="$ac_save_ifs"
3092 fi
3093 fi
3094 AR="$ac_cv_prog_AR"
3095 if test -n "$AR"; then
3096   echo "$ac_t""$AR" 1>&6
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100
3101 test -n "$AR" && break
3102 done
3103 test -n "$AR" || AR="ar"
3104
3105
3106
3107
3108 # Find the correct PATH separator.  Usually this is `:', but
3109 # DJGPP uses `;' like DOS.
3110 if test "X${PATH_SEPARATOR+set}" != Xset; then
3111   UNAME=${UNAME-`uname 2>/dev/null`}
3112   case X$UNAME in
3113     *-DOS) lt_cv_sys_path_separator=';' ;;
3114     *)     lt_cv_sys_path_separator=':' ;;
3115   esac
3116   PATH_SEPARATOR=$lt_cv_sys_path_separator
3117 fi
3118
3119 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3120 echo "configure:3121: checking for Cygwin environment" >&5
3121 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3122   echo $ac_n "(cached) $ac_c" 1>&6
3123 else
3124   cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127
3128 int main() {
3129
3130 #ifndef __CYGWIN__
3131 #define __CYGWIN__ __CYGWIN32__
3132 #endif
3133 return __CYGWIN__;
3134 ; return 0; }
3135 EOF
3136 if { (eval echo configure:3137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3137   rm -rf conftest*
3138   ac_cv_cygwin=yes
3139 else
3140   echo "configure: failed program was:" >&5
3141   cat conftest.$ac_ext >&5
3142   rm -rf conftest*
3143   ac_cv_cygwin=no
3144 fi
3145 rm -f conftest*
3146 fi
3147
3148 echo "$ac_t""$ac_cv_cygwin" 1>&6
3149 CYGWIN=
3150 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3151 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3152 echo "configure:3153: checking for mingw32 environment" >&5
3153 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3154   echo $ac_n "(cached) $ac_c" 1>&6
3155 else
3156   cat > conftest.$ac_ext <<EOF
3157 #line 3158 "configure"
3158 #include "confdefs.h"
3159
3160 int main() {
3161 return __MINGW32__;
3162 ; return 0; }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3165   rm -rf conftest*
3166   ac_cv_mingw32=yes
3167 else
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   ac_cv_mingw32=no
3172 fi
3173 rm -f conftest*
3174 fi
3175
3176 echo "$ac_t""$ac_cv_mingw32" 1>&6
3177 MINGW32=
3178 test "$ac_cv_mingw32" = yes && MINGW32=yes
3179 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3180 echo "configure:3181: checking for EMX OS/2 environment" >&5
3181 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3182   echo $ac_n "(cached) $ac_c" 1>&6
3183 else
3184   cat > conftest.$ac_ext <<EOF
3185 #line 3186 "configure"
3186 #include "confdefs.h"
3187
3188 int main() {
3189 return __EMX__;
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_emxos2=yes
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198   rm -rf conftest*
3199   ac_cv_emxos2=no
3200 fi
3201 rm -f conftest*
3202 fi
3203
3204 echo "$ac_t""$ac_cv_emxos2" 1>&6
3205 EMXOS2=
3206 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3207 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3208 echo "configure:3209: checking how to run the C preprocessor" >&5
3209 # On Suns, sometimes $CPP names a directory.
3210 if test -n "$CPP" && test -d "$CPP"; then
3211   CPP=
3212 fi
3213 if test -z "$CPP"; then
3214 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3215   echo $ac_n "(cached) $ac_c" 1>&6
3216 else
3217     # This must be in double quotes, not single quotes, because CPP may get
3218   # substituted into the Makefile and "${CC-cc}" will confuse make.
3219   CPP="${CC-cc} -E"
3220   # On the NeXT, cc -E runs the code through the compiler's parser,
3221   # not just through cpp.
3222   cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <assert.h>
3226 Syntax Error
3227 EOF
3228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3229 { (eval echo configure:3230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3231 if test -z "$ac_err"; then
3232   :
3233 else
3234   echo "$ac_err" >&5
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   CPP="${CC-cc} -E -traditional-cpp"
3239   cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 #include <assert.h>
3243 Syntax Error
3244 EOF
3245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3246 { (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3248 if test -z "$ac_err"; then
3249   :
3250 else
3251   echo "$ac_err" >&5
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   CPP="${CC-cc} -nologo -E"
3256   cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 #include <assert.h>
3260 Syntax Error
3261 EOF
3262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3263 { (eval echo configure:3264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3265 if test -z "$ac_err"; then
3266   :
3267 else
3268   echo "$ac_err" >&5
3269   echo "configure: failed program was:" >&5
3270   cat conftest.$ac_ext >&5
3271   rm -rf conftest*
3272   CPP=/lib/cpp
3273 fi
3274 rm -f conftest*
3275 fi
3276 rm -f conftest*
3277 fi
3278 rm -f conftest*
3279   ac_cv_prog_CPP="$CPP"
3280 fi
3281   CPP="$ac_cv_prog_CPP"
3282 else
3283   ac_cv_prog_CPP="$CPP"
3284 fi
3285 echo "$ac_t""$CPP" 1>&6
3286
3287 # Check whether --enable-fast-install or --disable-fast-install was given.
3288 if test "${enable_fast_install+set}" = set; then
3289   enableval="$enable_fast_install"
3290   p=${PACKAGE-default}
3291 case $enableval in
3292 yes) enable_fast_install=yes ;;
3293 no) enable_fast_install=no ;;
3294 *)
3295   enable_fast_install=no
3296   # Look at the argument we got.  We use all the common list separators.
3297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3298   for pkg in $enableval; do
3299     if test "X$pkg" = "X$p"; then
3300       enable_fast_install=yes
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304   ;;
3305 esac
3306 else
3307   enable_fast_install=yes
3308 fi
3309
3310 # Extract the first word of "gcc", so it can be a program name with args.
3311 set dummy gcc; ac_word=$2
3312 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_word" >&5
3314 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3315   echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317   if test -n "$CC"; then
3318   ac_cv_prog_CC="$CC" # Let the user override the test.
3319 else
3320   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3321   ac_dummy="$PATH"
3322   for ac_dir in $ac_dummy; do
3323     test -z "$ac_dir" && ac_dir=.
3324     if test -f $ac_dir/$ac_word; then
3325       ac_cv_prog_CC="gcc"
3326       break
3327     fi
3328   done
3329   IFS="$ac_save_ifs"
3330 fi
3331 fi
3332 CC="$ac_cv_prog_CC"
3333 if test -n "$CC"; then
3334   echo "$ac_t""$CC" 1>&6
3335 else
3336   echo "$ac_t""no" 1>&6
3337 fi
3338
3339 if test -z "$CC"; then
3340   # Extract the first word of "cc", so it can be a program name with args.
3341 set dummy cc; ac_word=$2
3342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3343 echo "configure:3344: checking for $ac_word" >&5
3344 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3345   echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347   if test -n "$CC"; then
3348   ac_cv_prog_CC="$CC" # Let the user override the test.
3349 else
3350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3351   ac_prog_rejected=no
3352   ac_dummy="$PATH"
3353   for ac_dir in $ac_dummy; do
3354     test -z "$ac_dir" && ac_dir=.
3355     if test -f $ac_dir/$ac_word; then
3356       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3357         ac_prog_rejected=yes
3358         continue
3359       fi
3360       ac_cv_prog_CC="cc"
3361       break
3362     fi
3363   done
3364   IFS="$ac_save_ifs"
3365 if test $ac_prog_rejected = yes; then
3366   # We found a bogon in the path, so make sure we never use it.
3367   set dummy $ac_cv_prog_CC
3368   shift
3369   if test $# -gt 0; then
3370     # We chose a different compiler from the bogus one.
3371     # However, it has the same basename, so the bogon will be chosen
3372     # first if we set CC to just the basename; use the full file name.
3373     shift
3374     set dummy "$ac_dir/$ac_word" "$@"
3375     shift
3376     ac_cv_prog_CC="$@"
3377   fi
3378 fi
3379 fi
3380 fi
3381 CC="$ac_cv_prog_CC"
3382 if test -n "$CC"; then
3383   echo "$ac_t""$CC" 1>&6
3384 else
3385   echo "$ac_t""no" 1>&6
3386 fi
3387
3388   if test -z "$CC"; then
3389     case "`uname -s`" in
3390     *win32* | *WIN32* | *CYGWIN*)
3391       # Extract the first word of "cl", so it can be a program name with args.
3392 set dummy cl; ac_word=$2
3393 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3394 echo "configure:3395: checking for $ac_word" >&5
3395 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3396   echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398   if test -n "$CC"; then
3399   ac_cv_prog_CC="$CC" # Let the user override the test.
3400 else
3401   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3402   ac_dummy="$PATH"
3403   for ac_dir in $ac_dummy; do
3404     test -z "$ac_dir" && ac_dir=.
3405     if test -f $ac_dir/$ac_word; then
3406       ac_cv_prog_CC="cl"
3407       break
3408     fi
3409   done
3410   IFS="$ac_save_ifs"
3411 fi
3412 fi
3413 CC="$ac_cv_prog_CC"
3414 if test -n "$CC"; then
3415   echo "$ac_t""$CC" 1>&6
3416 else
3417   echo "$ac_t""no" 1>&6
3418 fi
3419  ;;
3420     esac
3421   fi
3422   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3423 fi
3424
3425 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3426 echo "configure:3427: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3427
3428 ac_ext=c
3429 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3430 ac_cpp='$CPP $CPPFLAGS'
3431 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3432 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3433 cross_compiling=$ac_cv_prog_cc_cross
3434
3435 cat > conftest.$ac_ext << EOF
3436
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439
3440 main(){return(0);}
3441 EOF
3442 if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3443   ac_cv_prog_cc_works=yes
3444   # If we can't run a trivial program, we are probably using a cross compiler.
3445   if (./conftest; exit) 2>/dev/null; then
3446     ac_cv_prog_cc_cross=no
3447   else
3448     ac_cv_prog_cc_cross=yes
3449   fi
3450 else
3451   echo "configure: failed program was:" >&5
3452   cat conftest.$ac_ext >&5
3453   ac_cv_prog_cc_works=no
3454 fi
3455 rm -fr conftest*
3456 ac_ext=c
3457 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3458 ac_cpp='$CPP $CPPFLAGS'
3459 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3460 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3461 cross_compiling=$ac_cv_prog_cc_cross
3462
3463 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3464 if test $ac_cv_prog_cc_works = no; then
3465   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3466 fi
3467 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3468 echo "configure:3469: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3469 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3470 cross_compiling=$ac_cv_prog_cc_cross
3471
3472 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3473 echo "configure:3474: checking whether we are using GNU C" >&5
3474 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3475   echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477   cat > conftest.c <<EOF
3478 #ifdef __GNUC__
3479   yes;
3480 #endif
3481 EOF
3482 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3483   ac_cv_prog_gcc=yes
3484 else
3485   ac_cv_prog_gcc=no
3486 fi
3487 fi
3488
3489 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3490
3491 if test $ac_cv_prog_gcc = yes; then
3492   GCC=yes
3493 else
3494   GCC=
3495 fi
3496
3497 ac_test_CFLAGS="${CFLAGS+set}"
3498 ac_save_CFLAGS="$CFLAGS"
3499 CFLAGS=
3500 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3501 echo "configure:3502: checking whether ${CC-cc} accepts -g" >&5
3502 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3503   echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505   echo 'void f(){}' > conftest.c
3506 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3507   ac_cv_prog_cc_g=yes
3508 else
3509   ac_cv_prog_cc_g=no
3510 fi
3511 rm -f conftest*
3512
3513 fi
3514
3515 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3516 if test "$ac_test_CFLAGS" = set; then
3517   CFLAGS="$ac_save_CFLAGS"
3518 elif test $ac_cv_prog_cc_g = yes; then
3519   if test "$GCC" = yes; then
3520     CFLAGS="-g -O2"
3521   else
3522     CFLAGS="-g"
3523   fi
3524 else
3525   if test "$GCC" = yes; then
3526     CFLAGS="-O2"
3527   else
3528     CFLAGS=
3529   fi
3530 fi
3531
3532 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3533 if test "${with_gnu_ld+set}" = set; then
3534   withval="$with_gnu_ld"
3535   test "$withval" = no || with_gnu_ld=yes
3536 else
3537   with_gnu_ld=no
3538 fi
3539
3540 ac_prog=ld
3541 if test "$GCC" = yes; then
3542   # Check if gcc -print-prog-name=ld gives a path.
3543   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3544 echo "configure:3545: checking for ld used by GCC" >&5
3545   case $host in
3546   *-*-mingw*)
3547     # gcc leaves a trailing carriage return which upsets mingw
3548     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3549   *)
3550     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3551   esac
3552   case $ac_prog in
3553     # Accept absolute paths.
3554     [\\/]* | [A-Za-z]:[\\/]*)
3555       re_direlt='/[^/][^/]*/\.\./'
3556       # Canonicalize the path of ld
3557       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3558       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3559         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3560       done
3561       test -z "$LD" && LD="$ac_prog"
3562       ;;
3563   "")
3564     # If it fails, then pretend we aren't using GCC.
3565     ac_prog=ld
3566     ;;
3567   *)
3568     # If it is relative, then search for the first ld in PATH.
3569     with_gnu_ld=unknown
3570     ;;
3571   esac
3572 elif test "$with_gnu_ld" = yes; then
3573   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3574 echo "configure:3575: checking for GNU ld" >&5
3575 else
3576   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3577 echo "configure:3578: checking for non-GNU ld" >&5
3578 fi
3579 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   if test -z "$LD"; then
3583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3584   for ac_dir in $PATH; do
3585     test -z "$ac_dir" && ac_dir=.
3586     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3587       lt_cv_path_LD="$ac_dir/$ac_prog"
3588       # Check to see if the program is GNU ld.  I'd rather use --version,
3589       # but apparently some GNU ld's only accept -v.
3590       # Break only if it was the GNU/non-GNU ld that we prefer.
3591       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3592         test "$with_gnu_ld" != no && break
3593       else
3594         test "$with_gnu_ld" != yes && break
3595       fi
3596     fi
3597   done
3598   IFS="$ac_save_ifs"
3599 else
3600   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3601 fi
3602 fi
3603
3604 LD="$lt_cv_path_LD"
3605 if test -n "$LD"; then
3606   echo "$ac_t""$LD" 1>&6
3607 else
3608   echo "$ac_t""no" 1>&6
3609 fi
3610 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3611 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3612 echo "configure:3613: checking if the linker ($LD) is GNU ld" >&5
3613 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3614   echo $ac_n "(cached) $ac_c" 1>&6
3615 else
3616   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3617 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3618   lt_cv_prog_gnu_ld=yes
3619 else
3620   lt_cv_prog_gnu_ld=no
3621 fi
3622 fi
3623
3624 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3625 with_gnu_ld=$lt_cv_prog_gnu_ld
3626
3627
3628 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3629 echo "configure:3630: checking for $LD option to reload object files" >&5
3630 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   lt_cv_ld_reload_flag='-r'
3634 fi
3635
3636 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3637 reload_flag=$lt_cv_ld_reload_flag
3638 test -n "$reload_flag" && reload_flag=" $reload_flag"
3639
3640 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3641 echo "configure:3642: checking for BSD-compatible nm" >&5
3642 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   if test -n "$NM"; then
3646   # Let the user override the test.
3647   lt_cv_path_NM="$NM"
3648 else
3649   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3650   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3651     test -z "$ac_dir" && ac_dir=.
3652     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3653     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3654       # Check to see if the nm accepts a BSD-compat flag.
3655       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3656       #   nm: unknown option "B" ignored
3657       # Tru64's nm complains that /dev/null is an invalid object file
3658       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3659         lt_cv_path_NM="$tmp_nm -B"
3660         break
3661       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3662         lt_cv_path_NM="$tmp_nm -p"
3663         break
3664       else
3665         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3666         continue # so that we can try to find one that supports BSD flags
3667       fi
3668     fi
3669   done
3670   IFS="$ac_save_ifs"
3671   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3672 fi
3673 fi
3674
3675 NM="$lt_cv_path_NM"
3676 echo "$ac_t""$NM" 1>&6
3677
3678 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3679 echo "configure:3680: checking whether ln -s works" >&5
3680 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3681   echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683   rm -f conftestdata
3684 if ln -s X conftestdata 2>/dev/null
3685 then
3686   rm -f conftestdata
3687   ac_cv_prog_LN_S="ln -s"
3688 else
3689   ac_cv_prog_LN_S=ln
3690 fi
3691 fi
3692 LN_S="$ac_cv_prog_LN_S"
3693 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3694   echo "$ac_t""yes" 1>&6
3695 else
3696   echo "$ac_t""no" 1>&6
3697 fi
3698
3699 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3700 echo "configure:3701: checking how to recognise dependant libraries" >&5
3701 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   lt_cv_file_magic_cmd='$MAGIC_CMD'
3705 lt_cv_file_magic_test_file=
3706 lt_cv_deplibs_check_method='unknown'
3707 # Need to set the preceding variable on all platforms that support
3708 # interlibrary dependencies.
3709 # 'none' -- dependencies not supported.
3710 # `unknown' -- same as none, but documents that we really don't know.
3711 # 'pass_all' -- all dependencies passed with no checks.
3712 # 'test_compile' -- check by making test program.
3713 # 'file_magic [[regex]]' -- check by looking for files in library path
3714 # which responds to the $file_magic_cmd with a given egrep regex.
3715 # If you have `file' or equivalent on your system and you're not sure
3716 # whether `pass_all' will *always* work, you probably want this one.
3717
3718 case $host_os in
3719 aix4* | aix5*)
3720   lt_cv_deplibs_check_method=pass_all
3721   ;;
3722
3723 beos*)
3724   lt_cv_deplibs_check_method=pass_all
3725   ;;
3726
3727 bsdi4*)
3728   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3729   lt_cv_file_magic_cmd='/usr/bin/file -L'
3730   lt_cv_file_magic_test_file=/shlib/libc.so
3731   ;;
3732
3733 cygwin* | mingw* | pw32*)
3734   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3735   lt_cv_file_magic_cmd='$OBJDUMP -f'
3736   ;;
3737
3738 darwin* | rhapsody*)
3739   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3740   lt_cv_file_magic_cmd='/usr/bin/file -L'
3741   case "$host_os" in
3742   rhapsody* | darwin1.[012])
3743     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3744     ;;
3745   *) # Darwin 1.3 on
3746     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3747     ;;
3748   esac
3749   ;;
3750
3751 freebsd*)
3752   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3753     case $host_cpu in
3754     i*86 )
3755       # Not sure whether the presence of OpenBSD here was a mistake.
3756       # Let's accept both of them until this is cleared up.
3757       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3758       lt_cv_file_magic_cmd=/usr/bin/file
3759       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3760       ;;
3761     esac
3762   else
3763     lt_cv_deplibs_check_method=pass_all
3764   fi
3765   ;;
3766
3767 gnu*)
3768   lt_cv_deplibs_check_method=pass_all
3769   ;;
3770
3771 hpux10.20*|hpux11*)
3772   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3773   lt_cv_file_magic_cmd=/usr/bin/file
3774   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3775   ;;
3776
3777 irix5* | irix6*)
3778   case $host_os in
3779   irix5*)
3780     # this will be overridden with pass_all, but let us keep it just in case
3781     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3782     ;;
3783   *)
3784     case $LD in
3785     *-32|*"-32 ") libmagic=32-bit;;
3786     *-n32|*"-n32 ") libmagic=N32;;
3787     *-64|*"-64 ") libmagic=64-bit;;
3788     *) libmagic=never-match;;
3789     esac
3790     # this will be overridden with pass_all, but let us keep it just in case
3791     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3792     ;;
3793   esac
3794   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3795   lt_cv_deplibs_check_method=pass_all
3796   ;;
3797
3798 # This must be Linux ELF.
3799 linux-gnu*)
3800   case $host_cpu in
3801   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3802     lt_cv_deplibs_check_method=pass_all ;;
3803   *)
3804     # glibc up to 2.1.1 does not perform some relocations on ARM
3805     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3806   esac
3807   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3808   ;;
3809
3810 netbsd*)
3811   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3812     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3813   else
3814     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3815   fi
3816   ;;
3817
3818 newos6*)
3819   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3820   lt_cv_file_magic_cmd=/usr/bin/file
3821   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3822   ;;
3823
3824 openbsd*)
3825   lt_cv_file_magic_cmd=/usr/bin/file
3826   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3827   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3828     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3829   else
3830     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3831   fi
3832   ;;
3833
3834 osf3* | osf4* | osf5*)
3835   # this will be overridden with pass_all, but let us keep it just in case
3836   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3837   lt_cv_file_magic_test_file=/shlib/libc.so
3838   lt_cv_deplibs_check_method=pass_all
3839   ;;
3840
3841 sco3.2v5*)
3842   lt_cv_deplibs_check_method=pass_all
3843   ;;
3844
3845 solaris*)
3846   lt_cv_deplibs_check_method=pass_all
3847   lt_cv_file_magic_test_file=/lib/libc.so
3848   ;;
3849
3850 sysv5uw[78]* | sysv4*uw2*)
3851   lt_cv_deplibs_check_method=pass_all
3852   ;;
3853
3854 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3855   case $host_vendor in
3856   motorola)
3857     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]'
3858     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3859     ;;
3860   ncr)
3861     lt_cv_deplibs_check_method=pass_all
3862     ;;
3863   sequent)
3864     lt_cv_file_magic_cmd='/bin/file'
3865     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3866     ;;
3867   sni)
3868     lt_cv_file_magic_cmd='/bin/file'
3869     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3870     lt_cv_file_magic_test_file=/lib/libc.so
3871     ;;
3872   esac
3873   ;;
3874 esac
3875
3876 fi
3877
3878 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3879 file_magic_cmd=$lt_cv_file_magic_cmd
3880 deplibs_check_method=$lt_cv_deplibs_check_method
3881
3882 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3883 echo "configure:3884: checking for object suffix" >&5
3884 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3885   echo $ac_n "(cached) $ac_c" 1>&6
3886 else
3887   rm -f conftest*
3888 echo 'int i = 1;' > conftest.$ac_ext
3889 if { (eval echo configure:3890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3890   for ac_file in conftest.*; do
3891     case $ac_file in
3892     *.c) ;;
3893     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3894     esac
3895   done
3896 else
3897   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3898 fi
3899 rm -f conftest*
3900 fi
3901
3902 echo "$ac_t""$ac_cv_objext" 1>&6
3903 OBJEXT=$ac_cv_objext
3904 ac_objext=$ac_cv_objext
3905
3906
3907
3908
3909 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3910 echo "configure:3911: checking for executable suffix" >&5
3911 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3915   ac_cv_exeext=.exe
3916 else
3917   rm -f conftest*
3918   echo 'int main () { return 0; }' > conftest.$ac_ext
3919   ac_cv_exeext=
3920   if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3921     for file in conftest.*; do
3922       case $file in
3923       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3924       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3925       esac
3926     done
3927   else
3928     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3929   fi
3930   rm -f conftest*
3931   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3932 fi
3933 fi
3934
3935 EXEEXT=""
3936 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3937 echo "$ac_t""${ac_cv_exeext}" 1>&6
3938 ac_exeext=$EXEEXT
3939
3940 if test $host != $build; then
3941   ac_tool_prefix=${host_alias}-
3942 else
3943   ac_tool_prefix=
3944 fi
3945
3946
3947
3948
3949 # Check for command to grab the raw symbol name followed by C symbol from nm.
3950 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3951 echo "configure:3952: checking command to parse $NM output" >&5
3952 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   
3956 # These are sane defaults that work on at least a few old systems.
3957 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3958
3959 # Character class describing NM global symbol codes.
3960 symcode='[BCDEGRST]'
3961
3962 # Regexp to match symbols that can be accessed directly from C.
3963 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3964
3965 # Transform the above into a raw symbol and a C symbol.
3966 symxfrm='\1 \2\3 \3'
3967
3968 # Transform an extracted symbol line into a proper C declaration
3969 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3970
3971 # Transform an extracted symbol line into symbol name and symbol address
3972 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'"
3973
3974 # Define system-specific variables.
3975 case $host_os in
3976 aix*)
3977   symcode='[BCDT]'
3978   ;;
3979 cygwin* | mingw* | pw32*)
3980   symcode='[ABCDGISTW]'
3981   ;;
3982 hpux*) # Its linker distinguishes data from code symbols
3983   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3984   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'"
3985   ;;
3986 irix*)
3987   symcode='[BCDEGRST]'
3988   ;;
3989 solaris* | sysv5*)
3990   symcode='[BDT]'
3991   ;;
3992 sysv4)
3993   symcode='[DFNSTU]'
3994   ;;
3995 esac
3996
3997 # Handle CRLF in mingw tool chain
3998 opt_cr=
3999 case $host_os in
4000 mingw*)
4001   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4002   ;;
4003 esac
4004
4005 # If we're using GNU nm, then use its standard symbol codes.
4006 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4007   symcode='[ABCDGISTW]'
4008 fi
4009
4010 # Try without a prefix undercore, then with it.
4011 for ac_symprfx in "" "_"; do
4012
4013   # Write the raw and C identifiers.
4014 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4015
4016   # Check to see that the pipe works correctly.
4017   pipe_works=no
4018   rm -f conftest*
4019   cat > conftest.$ac_ext <<EOF
4020 #ifdef __cplusplus
4021 extern "C" {
4022 #endif
4023 char nm_test_var;
4024 void nm_test_func(){}
4025 #ifdef __cplusplus
4026 }
4027 #endif
4028 int main(){nm_test_var='a';nm_test_func();return(0);}
4029 EOF
4030
4031   if { (eval echo configure:4032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4032     # Now try to grab the symbols.
4033     nlist=conftest.nm
4034     if { (eval echo configure:4035: \"$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
4035       # Try sorting and uniquifying the output.
4036       if sort "$nlist" | uniq > "$nlist"T; then
4037         mv -f "$nlist"T "$nlist"
4038       else
4039         rm -f "$nlist"T
4040       fi
4041
4042       # Make sure that we snagged all the symbols we need.
4043       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4044         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4045           cat <<EOF > conftest.$ac_ext
4046 #ifdef __cplusplus
4047 extern "C" {
4048 #endif
4049
4050 EOF
4051           # Now generate the symbol file.
4052           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4053
4054           cat <<EOF >> conftest.$ac_ext
4055 #if defined (__STDC__) && __STDC__
4056 # define lt_ptr void *
4057 #else
4058 # define lt_ptr char *
4059 # define const
4060 #endif
4061
4062 /* The mapping between symbol names and symbols. */
4063 const struct {
4064   const char *name;
4065   lt_ptr address;
4066 }
4067 lt_preloaded_symbols[] =
4068 {
4069 EOF
4070           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4071           cat <<\EOF >> conftest.$ac_ext
4072   {0, (lt_ptr) 0}
4073 };
4074
4075 #ifdef __cplusplus
4076 }
4077 #endif
4078 EOF
4079           # Now try linking the two files.
4080           mv conftest.$ac_objext conftstm.$ac_objext
4081           save_LIBS="$LIBS"
4082           save_CFLAGS="$CFLAGS"
4083           LIBS="conftstm.$ac_objext"
4084           CFLAGS="$CFLAGS$no_builtin_flag"
4085           if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4086             pipe_works=yes
4087           fi
4088           LIBS="$save_LIBS"
4089           CFLAGS="$save_CFLAGS"
4090         else
4091           echo "cannot find nm_test_func in $nlist" >&5
4092         fi
4093       else
4094         echo "cannot find nm_test_var in $nlist" >&5
4095       fi
4096     else
4097       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4098     fi
4099   else
4100     echo "$progname: failed program was:" >&5
4101     cat conftest.$ac_ext >&5
4102   fi
4103   rm -f conftest* conftst*
4104
4105   # Do not use the global_symbol_pipe unless it works.
4106   if test "$pipe_works" = yes; then
4107     break
4108   else
4109     lt_cv_sys_global_symbol_pipe=
4110   fi
4111 done
4112
4113 fi
4114
4115 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4116 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4117   global_symbol_to_cdecl=
4118   global_symbol_to_c_name_address=
4119 else
4120   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4121   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4122 fi
4123 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4124 then
4125   echo "$ac_t""failed" 1>&6
4126 else
4127   echo "$ac_t""ok" 1>&6
4128 fi
4129
4130 for ac_hdr in dlfcn.h
4131 do
4132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_hdr" >&5
4135 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <$ac_hdr>
4142 EOF
4143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4144 { (eval echo configure:4145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4146 if test -z "$ac_err"; then
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=yes"
4149 else
4150   echo "$ac_err" >&5
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   eval "ac_cv_header_$ac_safe=no"
4155 fi
4156 rm -f conftest*
4157 fi
4158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4159   echo "$ac_t""yes" 1>&6
4160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4161   cat >> confdefs.h <<EOF
4162 #define $ac_tr_hdr 1
4163 EOF
4164  
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168 done
4169
4170
4171
4172
4173
4174 # Only perform the check for file, if the check method requires it
4175 case $deplibs_check_method in
4176 file_magic*)
4177   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4178     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4179 echo "configure:4180: checking for ${ac_tool_prefix}file" >&5
4180 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4181   echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183   case $MAGIC_CMD in
4184   /*)
4185   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4186   ;;
4187   ?:/*)
4188   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4189   ;;
4190   *)
4191   ac_save_MAGIC_CMD="$MAGIC_CMD"
4192   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4193   ac_dummy="/usr/bin:$PATH"
4194   for ac_dir in $ac_dummy; do
4195     test -z "$ac_dir" && ac_dir=.
4196     if test -f $ac_dir/${ac_tool_prefix}file; then
4197       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4198       if test -n "$file_magic_test_file"; then
4199         case $deplibs_check_method in
4200         "file_magic "*)
4201           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4202           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4203           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4204             egrep "$file_magic_regex" > /dev/null; then
4205             :
4206           else
4207             cat <<EOF 1>&2
4208
4209 *** Warning: the command libtool uses to detect shared libraries,
4210 *** $file_magic_cmd, produces output that libtool cannot recognize.
4211 *** The result is that libtool may fail to recognize shared libraries
4212 *** as such.  This will affect the creation of libtool libraries that
4213 *** depend on shared libraries, but programs linked with such libtool
4214 *** libraries will work regardless of this problem.  Nevertheless, you
4215 *** may want to report the problem to your system manager and/or to
4216 *** bug-libtool@gnu.org
4217
4218 EOF
4219           fi ;;
4220         esac
4221       fi
4222       break
4223     fi
4224   done
4225   IFS="$ac_save_ifs"
4226   MAGIC_CMD="$ac_save_MAGIC_CMD"
4227   ;;
4228 esac
4229 fi
4230
4231 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4232 if test -n "$MAGIC_CMD"; then
4233   echo "$ac_t""$MAGIC_CMD" 1>&6
4234 else
4235   echo "$ac_t""no" 1>&6
4236 fi
4237
4238 if test -z "$lt_cv_path_MAGIC_CMD"; then
4239   if test -n "$ac_tool_prefix"; then
4240     echo $ac_n "checking for file""... $ac_c" 1>&6
4241 echo "configure:4242: checking for file" >&5
4242 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4243   echo $ac_n "(cached) $ac_c" 1>&6
4244 else
4245   case $MAGIC_CMD in
4246   /*)
4247   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4248   ;;
4249   ?:/*)
4250   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4251   ;;
4252   *)
4253   ac_save_MAGIC_CMD="$MAGIC_CMD"
4254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4255   ac_dummy="/usr/bin:$PATH"
4256   for ac_dir in $ac_dummy; do
4257     test -z "$ac_dir" && ac_dir=.
4258     if test -f $ac_dir/file; then
4259       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4260       if test -n "$file_magic_test_file"; then
4261         case $deplibs_check_method in
4262         "file_magic "*)
4263           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4264           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4265           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4266             egrep "$file_magic_regex" > /dev/null; then
4267             :
4268           else
4269             cat <<EOF 1>&2
4270
4271 *** Warning: the command libtool uses to detect shared libraries,
4272 *** $file_magic_cmd, produces output that libtool cannot recognize.
4273 *** The result is that libtool may fail to recognize shared libraries
4274 *** as such.  This will affect the creation of libtool libraries that
4275 *** depend on shared libraries, but programs linked with such libtool
4276 *** libraries will work regardless of this problem.  Nevertheless, you
4277 *** may want to report the problem to your system manager and/or to
4278 *** bug-libtool@gnu.org
4279
4280 EOF
4281           fi ;;
4282         esac
4283       fi
4284       break
4285     fi
4286   done
4287   IFS="$ac_save_ifs"
4288   MAGIC_CMD="$ac_save_MAGIC_CMD"
4289   ;;
4290 esac
4291 fi
4292
4293 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4294 if test -n "$MAGIC_CMD"; then
4295   echo "$ac_t""$MAGIC_CMD" 1>&6
4296 else
4297   echo "$ac_t""no" 1>&6
4298 fi
4299
4300   else
4301     MAGIC_CMD=:
4302   fi
4303 fi
4304
4305   fi
4306   ;;
4307 esac
4308
4309 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4310 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4312 echo "configure:4313: checking for $ac_word" >&5
4313 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4314   echo $ac_n "(cached) $ac_c" 1>&6
4315 else
4316   if test -n "$RANLIB"; then
4317   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4318 else
4319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4320   ac_dummy="$PATH"
4321   for ac_dir in $ac_dummy; do
4322     test -z "$ac_dir" && ac_dir=.
4323     if test -f $ac_dir/$ac_word; then
4324       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4325       break
4326     fi
4327   done
4328   IFS="$ac_save_ifs"
4329 fi
4330 fi
4331 RANLIB="$ac_cv_prog_RANLIB"
4332 if test -n "$RANLIB"; then
4333   echo "$ac_t""$RANLIB" 1>&6
4334 else
4335   echo "$ac_t""no" 1>&6
4336 fi
4337
4338
4339 if test -z "$ac_cv_prog_RANLIB"; then
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "ranlib", so it can be a program name with args.
4342 set dummy ranlib; ac_word=$2
4343 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4344 echo "configure:4345: checking for $ac_word" >&5
4345 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4346   echo $ac_n "(cached) $ac_c" 1>&6
4347 else
4348   if test -n "$RANLIB"; then
4349   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4350 else
4351   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4352   ac_dummy="$PATH"
4353   for ac_dir in $ac_dummy; do
4354     test -z "$ac_dir" && ac_dir=.
4355     if test -f $ac_dir/$ac_word; then
4356       ac_cv_prog_RANLIB="ranlib"
4357       break
4358     fi
4359   done
4360   IFS="$ac_save_ifs"
4361   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4362 fi
4363 fi
4364 RANLIB="$ac_cv_prog_RANLIB"
4365 if test -n "$RANLIB"; then
4366   echo "$ac_t""$RANLIB" 1>&6
4367 else
4368   echo "$ac_t""no" 1>&6
4369 fi
4370
4371 else
4372   RANLIB=":"
4373 fi
4374 fi
4375
4376 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4377 set dummy ${ac_tool_prefix}strip; ac_word=$2
4378 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4379 echo "configure:4380: checking for $ac_word" >&5
4380 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4381   echo $ac_n "(cached) $ac_c" 1>&6
4382 else
4383   if test -n "$STRIP"; then
4384   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4385 else
4386   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4387   ac_dummy="$PATH"
4388   for ac_dir in $ac_dummy; do
4389     test -z "$ac_dir" && ac_dir=.
4390     if test -f $ac_dir/$ac_word; then
4391       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4392       break
4393     fi
4394   done
4395   IFS="$ac_save_ifs"
4396 fi
4397 fi
4398 STRIP="$ac_cv_prog_STRIP"
4399 if test -n "$STRIP"; then
4400   echo "$ac_t""$STRIP" 1>&6
4401 else
4402   echo "$ac_t""no" 1>&6
4403 fi
4404
4405
4406 if test -z "$ac_cv_prog_STRIP"; then
4407 if test -n "$ac_tool_prefix"; then
4408   # Extract the first word of "strip", so it can be a program name with args.
4409 set dummy strip; ac_word=$2
4410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4411 echo "configure:4412: checking for $ac_word" >&5
4412 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   if test -n "$STRIP"; then
4416   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4417 else
4418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4419   ac_dummy="$PATH"
4420   for ac_dir in $ac_dummy; do
4421     test -z "$ac_dir" && ac_dir=.
4422     if test -f $ac_dir/$ac_word; then
4423       ac_cv_prog_STRIP="strip"
4424       break
4425     fi
4426   done
4427   IFS="$ac_save_ifs"
4428   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4429 fi
4430 fi
4431 STRIP="$ac_cv_prog_STRIP"
4432 if test -n "$STRIP"; then
4433   echo "$ac_t""$STRIP" 1>&6
4434 else
4435   echo "$ac_t""no" 1>&6
4436 fi
4437
4438 else
4439   STRIP=":"
4440 fi
4441 fi
4442
4443
4444 enable_dlopen=yes
4445 enable_win32_dll=yes
4446
4447 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4448 if test "${enable_libtool_lock+set}" = set; then
4449   enableval="$enable_libtool_lock"
4450   :
4451 fi
4452
4453 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4454
4455 # Some flags need to be propagated to the compiler or linker for good
4456 # libtool support.
4457 case $host in
4458 *-*-irix6*)
4459   # Find out which ABI we are using.
4460   echo '#line 4461 "configure"' > conftest.$ac_ext
4461   if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4462     case `/usr/bin/file conftest.$ac_objext` in
4463     *32-bit*)
4464       LD="${LD-ld} -32"
4465       ;;
4466     *N32*)
4467       LD="${LD-ld} -n32"
4468       ;;
4469     *64-bit*)
4470       LD="${LD-ld} -64"
4471       ;;
4472     esac
4473   fi
4474   rm -rf conftest*
4475   ;;
4476
4477 *-*-sco3.2v5*)
4478   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4479   SAVE_CFLAGS="$CFLAGS"
4480   CFLAGS="$CFLAGS -belf"
4481   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4482 echo "configure:4483: checking whether the C compiler needs -belf" >&5
4483 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4484   echo $ac_n "(cached) $ac_c" 1>&6
4485 else
4486   
4487      ac_ext=c
4488 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4489 ac_cpp='$CPP $CPPFLAGS'
4490 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4491 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4492 cross_compiling=$ac_cv_prog_cc_cross
4493
4494      cat > conftest.$ac_ext <<EOF
4495 #line 4496 "configure"
4496 #include "confdefs.h"
4497
4498 int main() {
4499
4500 ; return 0; }
4501 EOF
4502 if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4503   rm -rf conftest*
4504   lt_cv_cc_needs_belf=yes
4505 else
4506   echo "configure: failed program was:" >&5
4507   cat conftest.$ac_ext >&5
4508   rm -rf conftest*
4509   lt_cv_cc_needs_belf=no
4510 fi
4511 rm -f conftest*
4512      ac_ext=c
4513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4514 ac_cpp='$CPP $CPPFLAGS'
4515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4517 cross_compiling=$ac_cv_prog_cc_cross
4518
4519 fi
4520
4521 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4522   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4523     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4524     CFLAGS="$SAVE_CFLAGS"
4525   fi
4526   ;;
4527
4528 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4529   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4530 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4532 echo "configure:4533: checking for $ac_word" >&5
4533 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4534   echo $ac_n "(cached) $ac_c" 1>&6
4535 else
4536   if test -n "$DLLTOOL"; then
4537   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4538 else
4539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4540   ac_dummy="$PATH"
4541   for ac_dir in $ac_dummy; do
4542     test -z "$ac_dir" && ac_dir=.
4543     if test -f $ac_dir/$ac_word; then
4544       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4545       break
4546     fi
4547   done
4548   IFS="$ac_save_ifs"
4549 fi
4550 fi
4551 DLLTOOL="$ac_cv_prog_DLLTOOL"
4552 if test -n "$DLLTOOL"; then
4553   echo "$ac_t""$DLLTOOL" 1>&6
4554 else
4555   echo "$ac_t""no" 1>&6
4556 fi
4557
4558
4559 if test -z "$ac_cv_prog_DLLTOOL"; then
4560 if test -n "$ac_tool_prefix"; then
4561   # Extract the first word of "dlltool", so it can be a program name with args.
4562 set dummy dlltool; ac_word=$2
4563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4564 echo "configure:4565: checking for $ac_word" >&5
4565 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4566   echo $ac_n "(cached) $ac_c" 1>&6
4567 else
4568   if test -n "$DLLTOOL"; then
4569   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4570 else
4571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4572   ac_dummy="$PATH"
4573   for ac_dir in $ac_dummy; do
4574     test -z "$ac_dir" && ac_dir=.
4575     if test -f $ac_dir/$ac_word; then
4576       ac_cv_prog_DLLTOOL="dlltool"
4577       break
4578     fi
4579   done
4580   IFS="$ac_save_ifs"
4581   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4582 fi
4583 fi
4584 DLLTOOL="$ac_cv_prog_DLLTOOL"
4585 if test -n "$DLLTOOL"; then
4586   echo "$ac_t""$DLLTOOL" 1>&6
4587 else
4588   echo "$ac_t""no" 1>&6
4589 fi
4590
4591 else
4592   DLLTOOL="false"
4593 fi
4594 fi
4595
4596   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4597 set dummy ${ac_tool_prefix}as; ac_word=$2
4598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4599 echo "configure:4600: checking for $ac_word" >&5
4600 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4601   echo $ac_n "(cached) $ac_c" 1>&6
4602 else
4603   if test -n "$AS"; then
4604   ac_cv_prog_AS="$AS" # Let the user override the test.
4605 else
4606   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4607   ac_dummy="$PATH"
4608   for ac_dir in $ac_dummy; do
4609     test -z "$ac_dir" && ac_dir=.
4610     if test -f $ac_dir/$ac_word; then
4611       ac_cv_prog_AS="${ac_tool_prefix}as"
4612       break
4613     fi
4614   done
4615   IFS="$ac_save_ifs"
4616 fi
4617 fi
4618 AS="$ac_cv_prog_AS"
4619 if test -n "$AS"; then
4620   echo "$ac_t""$AS" 1>&6
4621 else
4622   echo "$ac_t""no" 1>&6
4623 fi
4624
4625
4626 if test -z "$ac_cv_prog_AS"; then
4627 if test -n "$ac_tool_prefix"; then
4628   # Extract the first word of "as", so it can be a program name with args.
4629 set dummy as; ac_word=$2
4630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4631 echo "configure:4632: checking for $ac_word" >&5
4632 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4633   echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635   if test -n "$AS"; then
4636   ac_cv_prog_AS="$AS" # Let the user override the test.
4637 else
4638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4639   ac_dummy="$PATH"
4640   for ac_dir in $ac_dummy; do
4641     test -z "$ac_dir" && ac_dir=.
4642     if test -f $ac_dir/$ac_word; then
4643       ac_cv_prog_AS="as"
4644       break
4645     fi
4646   done
4647   IFS="$ac_save_ifs"
4648   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4649 fi
4650 fi
4651 AS="$ac_cv_prog_AS"
4652 if test -n "$AS"; then
4653   echo "$ac_t""$AS" 1>&6
4654 else
4655   echo "$ac_t""no" 1>&6
4656 fi
4657
4658 else
4659   AS="false"
4660 fi
4661 fi
4662
4663   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4664 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4665 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4666 echo "configure:4667: checking for $ac_word" >&5
4667 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4668   echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670   if test -n "$OBJDUMP"; then
4671   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4672 else
4673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4674   ac_dummy="$PATH"
4675   for ac_dir in $ac_dummy; do
4676     test -z "$ac_dir" && ac_dir=.
4677     if test -f $ac_dir/$ac_word; then
4678       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4679       break
4680     fi
4681   done
4682   IFS="$ac_save_ifs"
4683 fi
4684 fi
4685 OBJDUMP="$ac_cv_prog_OBJDUMP"
4686 if test -n "$OBJDUMP"; then
4687   echo "$ac_t""$OBJDUMP" 1>&6
4688 else
4689   echo "$ac_t""no" 1>&6
4690 fi
4691
4692
4693 if test -z "$ac_cv_prog_OBJDUMP"; then
4694 if test -n "$ac_tool_prefix"; then
4695   # Extract the first word of "objdump", so it can be a program name with args.
4696 set dummy objdump; ac_word=$2
4697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4698 echo "configure:4699: checking for $ac_word" >&5
4699 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4700   echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702   if test -n "$OBJDUMP"; then
4703   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4704 else
4705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4706   ac_dummy="$PATH"
4707   for ac_dir in $ac_dummy; do
4708     test -z "$ac_dir" && ac_dir=.
4709     if test -f $ac_dir/$ac_word; then
4710       ac_cv_prog_OBJDUMP="objdump"
4711       break
4712     fi
4713   done
4714   IFS="$ac_save_ifs"
4715   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4716 fi
4717 fi
4718 OBJDUMP="$ac_cv_prog_OBJDUMP"
4719 if test -n "$OBJDUMP"; then
4720   echo "$ac_t""$OBJDUMP" 1>&6
4721 else
4722   echo "$ac_t""no" 1>&6
4723 fi
4724
4725 else
4726   OBJDUMP="false"
4727 fi
4728 fi
4729
4730
4731   # recent cygwin and mingw systems supply a stub DllMain which the user
4732   # can override, but on older systems we have to supply one
4733   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4734 echo "configure:4735: checking if libtool should supply DllMain function" >&5
4735 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741
4742 int main() {
4743 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4744       DllMain (0, 0, 0);
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748   rm -rf conftest*
4749   lt_cv_need_dllmain=no
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   lt_cv_need_dllmain=yes
4755 fi
4756 rm -f conftest*
4757 fi
4758
4759 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4760
4761   case $host/$CC in
4762   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4763     # old mingw systems require "-dll" to link a DLL, while more recent ones
4764     # require "-mdll"
4765     SAVE_CFLAGS="$CFLAGS"
4766     CFLAGS="$CFLAGS -mdll"
4767     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4768 echo "configure:4769: checking how to link DLLs" >&5
4769 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4770   echo $ac_n "(cached) $ac_c" 1>&6
4771 else
4772   cat > conftest.$ac_ext <<EOF
4773 #line 4774 "configure"
4774 #include "confdefs.h"
4775
4776 int main() {
4777
4778 ; return 0; }
4779 EOF
4780 if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4781   rm -rf conftest*
4782   lt_cv_cc_dll_switch=-mdll
4783 else
4784   echo "configure: failed program was:" >&5
4785   cat conftest.$ac_ext >&5
4786   rm -rf conftest*
4787   lt_cv_cc_dll_switch=-dll
4788 fi
4789 rm -f conftest*
4790 fi
4791
4792 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4793     CFLAGS="$SAVE_CFLAGS" ;;
4794   *-*-cygwin* | *-*-pw32*)
4795     # cygwin systems need to pass --dll to the linker, and not link
4796     # crt.o which will require a WinMain@16 definition.
4797     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4798   esac
4799   ;;
4800   
4801 esac
4802
4803 # Sed substitution that helps us do robust quoting.  It backslashifies
4804 # metacharacters that are still active within double-quoted strings.
4805 Xsed='sed -e s/^X//'
4806 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4807
4808 # Same as above, but do not quote variable references.
4809 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4810
4811 # Sed substitution to delay expansion of an escaped shell variable in a
4812 # double_quote_subst'ed string.
4813 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4814
4815 # Constants:
4816 rm="rm -f"
4817
4818 # Global variables:
4819 default_ofile=libtool
4820 can_build_shared=yes
4821
4822 # All known linkers require a `.a' archive for static linking (except M$VC,
4823 # which needs '.lib').
4824 libext=a
4825 ltmain="$ac_aux_dir/ltmain.sh"
4826 ofile="$default_ofile"
4827 with_gnu_ld="$lt_cv_prog_gnu_ld"
4828 need_locks="$enable_libtool_lock"
4829
4830 old_CC="$CC"
4831 old_CFLAGS="$CFLAGS"
4832
4833 # Set sane defaults for various variables
4834 test -z "$AR" && AR=ar
4835 test -z "$AR_FLAGS" && AR_FLAGS=cru
4836 test -z "$AS" && AS=as
4837 test -z "$CC" && CC=cc
4838 test -z "$DLLTOOL" && DLLTOOL=dlltool
4839 test -z "$LD" && LD=ld
4840 test -z "$LN_S" && LN_S="ln -s"
4841 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4842 test -z "$NM" && NM=nm
4843 test -z "$OBJDUMP" && OBJDUMP=objdump
4844 test -z "$RANLIB" && RANLIB=:
4845 test -z "$STRIP" && STRIP=:
4846 test -z "$ac_objext" && ac_objext=o
4847
4848 if test x"$host" != x"$build"; then
4849   ac_tool_prefix=${host_alias}-
4850 else
4851   ac_tool_prefix=
4852 fi
4853
4854 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4855 case $host_os in
4856 linux-gnu*) ;;
4857 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4858 esac
4859
4860 case $host_os in
4861 aix3*)
4862   # AIX sometimes has problems with the GCC collect2 program.  For some
4863   # reason, if we set the COLLECT_NAMES environment variable, the problems
4864   # vanish in a puff of smoke.
4865   if test "X${COLLECT_NAMES+set}" != Xset; then
4866     COLLECT_NAMES=
4867     export COLLECT_NAMES
4868   fi
4869   ;;
4870 esac
4871
4872 # Determine commands to create old-style static archives.
4873 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4874 old_postinstall_cmds='chmod 644 $oldlib'
4875 old_postuninstall_cmds=
4876
4877 if test -n "$RANLIB"; then
4878   case $host_os in
4879   openbsd*)
4880     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4881     ;;
4882   *)
4883     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4884     ;;
4885   esac
4886   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4887 fi
4888
4889 # Allow CC to be a program name with arguments.
4890 set dummy $CC
4891 compiler="$2"
4892
4893 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4894 echo "configure:4895: checking for objdir" >&5
4895 rm -f .libs 2>/dev/null
4896 mkdir .libs 2>/dev/null
4897 if test -d .libs; then
4898   objdir=.libs
4899 else
4900   # MS-DOS does not allow filenames that begin with a dot.
4901   objdir=_libs
4902 fi
4903 rmdir .libs 2>/dev/null
4904 echo "$ac_t""$objdir" 1>&6
4905
4906
4907 # Check whether --with-pic or --without-pic was given.
4908 if test "${with_pic+set}" = set; then
4909   withval="$with_pic"
4910   pic_mode="$withval"
4911 else
4912   pic_mode=default
4913 fi
4914
4915 test -z "$pic_mode" && pic_mode=default
4916
4917 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4918 # in isolation, and that seeing it set (from the cache) indicates that
4919 # the associated values are set (in the cache) correctly too.
4920 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4921 echo "configure:4922: checking for $compiler option to produce PIC" >&5
4922 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4923   echo $ac_n "(cached) $ac_c" 1>&6
4924 else
4925    lt_cv_prog_cc_pic=
4926   lt_cv_prog_cc_shlib=
4927   lt_cv_prog_cc_wl=
4928   lt_cv_prog_cc_static=
4929   lt_cv_prog_cc_no_builtin=
4930   lt_cv_prog_cc_can_build_shared=$can_build_shared
4931
4932   if test "$GCC" = yes; then
4933     lt_cv_prog_cc_wl='-Wl,'
4934     lt_cv_prog_cc_static='-static'
4935
4936     case $host_os in
4937     aix*)
4938       # Below there is a dirty hack to force normal static linking with -ldl
4939       # The problem is because libdl dynamically linked with both libc and
4940       # libC (AIX C++ library), which obviously doesn't included in libraries
4941       # list by gcc. This cause undefined symbols with -static flags.
4942       # This hack allows C programs to be linked with "-static -ldl", but
4943       # not sure about C++ programs.
4944       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4945       ;;
4946     amigaos*)
4947       # FIXME: we need at least 68020 code to build shared libraries, but
4948       # adding the `-m68020' flag to GCC prevents building anything better,
4949       # like `-m68040'.
4950       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4951       ;;
4952     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4953       # PIC is the default for these OSes.
4954       ;;
4955     darwin* | rhapsody*)
4956       # PIC is the default on this platform
4957       # Common symbols not allowed in MH_DYLIB files
4958       lt_cv_prog_cc_pic='-fno-common'
4959       ;;
4960     cygwin* | mingw* | pw32* | os2*)
4961       # This hack is so that the source file can tell whether it is being
4962       # built for inclusion in a dll (and should export symbols for example).
4963       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4964       ;;
4965     sysv4*MP*)
4966       if test -d /usr/nec; then
4967          lt_cv_prog_cc_pic=-Kconform_pic
4968       fi
4969       ;;
4970     *)
4971       lt_cv_prog_cc_pic='-fPIC'
4972       ;;
4973     esac
4974   else
4975     # PORTME Check for PIC flags for the system compiler.
4976     case $host_os in
4977     aix3* | aix4* | aix5*)
4978       lt_cv_prog_cc_wl='-Wl,'
4979       # All AIX code is PIC.
4980       if test "$host_cpu" = ia64; then
4981         # AIX 5 now supports IA64 processor
4982         lt_cv_prog_cc_static='-Bstatic'
4983       else
4984         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4985       fi
4986       ;;
4987
4988     hpux9* | hpux10* | hpux11*)
4989       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4992       lt_cv_prog_cc_pic='+Z'
4993       ;;
4994
4995     irix5* | irix6*)
4996       lt_cv_prog_cc_wl='-Wl,'
4997       lt_cv_prog_cc_static='-non_shared'
4998       # PIC (with -KPIC) is the default.
4999       ;;
5000
5001     cygwin* | mingw* | pw32* | os2*)
5002       # This hack is so that the source file can tell whether it is being
5003       # built for inclusion in a dll (and should export symbols for example).
5004       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5005       ;;
5006
5007     newsos6)
5008       lt_cv_prog_cc_pic='-KPIC'
5009       lt_cv_prog_cc_static='-Bstatic'
5010       ;;
5011
5012     osf3* | osf4* | osf5*)
5013       # All OSF/1 code is PIC.
5014       lt_cv_prog_cc_wl='-Wl,'
5015       lt_cv_prog_cc_static='-non_shared'
5016       ;;
5017
5018     sco3.2v5*)
5019       lt_cv_prog_cc_pic='-Kpic'
5020       lt_cv_prog_cc_static='-dn'
5021       lt_cv_prog_cc_shlib='-belf'
5022       ;;
5023
5024     solaris*)
5025       lt_cv_prog_cc_pic='-KPIC'
5026       lt_cv_prog_cc_static='-Bstatic'
5027       lt_cv_prog_cc_wl='-Wl,'
5028       ;;
5029
5030     sunos4*)
5031       lt_cv_prog_cc_pic='-PIC'
5032       lt_cv_prog_cc_static='-Bstatic'
5033       lt_cv_prog_cc_wl='-Qoption ld '
5034       ;;
5035
5036     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5037       lt_cv_prog_cc_pic='-KPIC'
5038       lt_cv_prog_cc_static='-Bstatic'
5039       if test "x$host_vendor" = xsni; then
5040         lt_cv_prog_cc_wl='-LD'
5041       else
5042         lt_cv_prog_cc_wl='-Wl,'
5043       fi
5044       ;;
5045
5046     uts4*)
5047       lt_cv_prog_cc_pic='-pic'
5048       lt_cv_prog_cc_static='-Bstatic'
5049       ;;
5050
5051     sysv4*MP*)
5052       if test -d /usr/nec ;then
5053         lt_cv_prog_cc_pic='-Kconform_pic'
5054         lt_cv_prog_cc_static='-Bstatic'
5055       fi
5056       ;;
5057
5058     *)
5059       lt_cv_prog_cc_can_build_shared=no
5060       ;;
5061     esac
5062   fi
5063
5064 fi
5065
5066 if test -z "$lt_cv_prog_cc_pic"; then
5067   echo "$ac_t""none" 1>&6
5068 else
5069   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5070
5071   # Check to make sure the pic_flag actually works.
5072   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5073 echo "configure:5074: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5074   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5075   echo $ac_n "(cached) $ac_c" 1>&6
5076 else
5077       save_CFLAGS="$CFLAGS"
5078     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5079     cat > conftest.$ac_ext <<EOF
5080 #line 5081 "configure"
5081 #include "confdefs.h"
5082
5083 int main() {
5084
5085 ; return 0; }
5086 EOF
5087 if { (eval echo configure:5088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5088   rm -rf conftest*
5089         case $host_os in
5090       hpux9* | hpux10* | hpux11*)
5091         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5092         # they create non-PIC objects.  So, if there were any warnings, we
5093         # assume that PIC is not supported.
5094         if test -s conftest.err; then
5095           lt_cv_prog_cc_pic_works=no
5096         else
5097           lt_cv_prog_cc_pic_works=yes
5098         fi
5099         ;;
5100       *)
5101         lt_cv_prog_cc_pic_works=yes
5102         ;;
5103       esac
5104     
5105 else
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109         lt_cv_prog_cc_pic_works=no
5110     
5111 fi
5112 rm -f conftest*
5113     CFLAGS="$save_CFLAGS"
5114   
5115 fi
5116
5117
5118   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5119     lt_cv_prog_cc_pic=
5120     lt_cv_prog_cc_can_build_shared=no
5121   else
5122     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5123   fi
5124
5125   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5126 fi
5127
5128 # Check for any special shared library compilation flags.
5129 if test -n "$lt_cv_prog_cc_shlib"; then
5130   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5131   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5132   else
5133    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5134     lt_cv_prog_cc_can_build_shared=no
5135   fi
5136 fi
5137
5138 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5139 echo "configure:5140: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5140 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5141   echo $ac_n "(cached) $ac_c" 1>&6
5142 else
5143     lt_cv_prog_cc_static_works=no
5144   save_LDFLAGS="$LDFLAGS"
5145   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5146   cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149
5150 int main() {
5151
5152 ; return 0; }
5153 EOF
5154 if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155   rm -rf conftest*
5156   lt_cv_prog_cc_static_works=yes
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160 fi
5161 rm -f conftest*
5162   LDFLAGS="$save_LDFLAGS"
5163
5164 fi
5165
5166
5167 # Belt *and* braces to stop my trousers falling down:
5168 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5169 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5170
5171 pic_flag="$lt_cv_prog_cc_pic"
5172 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5173 wl="$lt_cv_prog_cc_wl"
5174 link_static_flag="$lt_cv_prog_cc_static"
5175 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5176 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5177
5178
5179 # Check to see if options -o and -c are simultaneously supported by compiler
5180 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5181 echo "configure:5182: checking if $compiler supports -c -o file.$ac_objext" >&5
5182 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5183   echo $ac_n "(cached) $ac_c" 1>&6
5184 else
5185   
5186 $rm -r conftest 2>/dev/null
5187 mkdir conftest
5188 cd conftest
5189 echo "int some_variable = 0;" > conftest.$ac_ext
5190 mkdir out
5191 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5192 # that will create temporary files in the current directory regardless of
5193 # the output directory.  Thus, making CWD read-only will cause this test
5194 # to fail, enabling locking or at least warning the user not to do parallel
5195 # builds.
5196 chmod -w .
5197 save_CFLAGS="$CFLAGS"
5198 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5199 compiler_c_o=no
5200 if { (eval echo configure:5201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5201   # The compiler can only warn and ignore the option if not recognized
5202   # So say no if there are warnings
5203   if test -s out/conftest.err; then
5204     lt_cv_compiler_c_o=no
5205   else
5206     lt_cv_compiler_c_o=yes
5207   fi
5208 else
5209   # Append any errors to the config.log.
5210   cat out/conftest.err 1>&5
5211   lt_cv_compiler_c_o=no
5212 fi
5213 CFLAGS="$save_CFLAGS"
5214 chmod u+w .
5215 $rm conftest* out/*
5216 rmdir out
5217 cd ..
5218 rmdir conftest
5219 $rm -r conftest 2>/dev/null
5220
5221 fi
5222
5223 compiler_c_o=$lt_cv_compiler_c_o
5224 echo "$ac_t""$compiler_c_o" 1>&6
5225
5226 if test x"$compiler_c_o" = x"yes"; then
5227   # Check to see if we can write to a .lo
5228   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5229 echo "configure:5230: checking if $compiler supports -c -o file.lo" >&5
5230   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233   
5234   lt_cv_compiler_o_lo=no
5235   save_CFLAGS="$CFLAGS"
5236   CFLAGS="$CFLAGS -c -o conftest.lo"
5237   save_objext="$ac_objext"
5238   ac_objext=lo
5239   cat > conftest.$ac_ext <<EOF
5240 #line 5241 "configure"
5241 #include "confdefs.h"
5242
5243 int main() {
5244 int some_variable = 0;
5245 ; return 0; }
5246 EOF
5247 if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5248   rm -rf conftest*
5249       # The compiler can only warn and ignore the option if not recognized
5250     # So say no if there are warnings
5251     if test -s conftest.err; then
5252       lt_cv_compiler_o_lo=no
5253     else
5254       lt_cv_compiler_o_lo=yes
5255     fi
5256   
5257 else
5258   echo "configure: failed program was:" >&5
5259   cat conftest.$ac_ext >&5
5260 fi
5261 rm -f conftest*
5262   ac_objext="$save_objext"
5263   CFLAGS="$save_CFLAGS"
5264   
5265 fi
5266
5267   compiler_o_lo=$lt_cv_compiler_o_lo
5268   echo "$ac_t""$compiler_o_lo" 1>&6
5269 else
5270   compiler_o_lo=no
5271 fi
5272
5273 # Check to see if we can do hard links to lock some files if needed
5274 hard_links="nottested"
5275 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5276   # do not overwrite the value of need_locks provided by the user
5277   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5278 echo "configure:5279: checking if we can lock with hard links" >&5
5279   hard_links=yes
5280   $rm conftest*
5281   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5282   touch conftest.a
5283   ln conftest.a conftest.b 2>&5 || hard_links=no
5284   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5285   echo "$ac_t""$hard_links" 1>&6
5286   if test "$hard_links" = no; then
5287     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5288     need_locks=warn
5289   fi
5290 else
5291   need_locks=no
5292 fi
5293
5294 if test "$GCC" = yes; then
5295   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5296   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5297 echo "configure:5298: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5298   echo "int some_variable = 0;" > conftest.$ac_ext
5299   save_CFLAGS="$CFLAGS"
5300   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5301   compiler_rtti_exceptions=no
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305
5306 int main() {
5307 int some_variable = 0;
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5311   rm -rf conftest*
5312       # The compiler can only warn and ignore the option if not recognized
5313     # So say no if there are warnings
5314     if test -s conftest.err; then
5315       compiler_rtti_exceptions=no
5316     else
5317       compiler_rtti_exceptions=yes
5318     fi
5319   
5320 else
5321   echo "configure: failed program was:" >&5
5322   cat conftest.$ac_ext >&5
5323 fi
5324 rm -f conftest*
5325   CFLAGS="$save_CFLAGS"
5326   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5327
5328   if test "$compiler_rtti_exceptions" = "yes"; then
5329     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5330   else
5331     no_builtin_flag=' -fno-builtin'
5332   fi
5333 fi
5334
5335 # See if the linker supports building shared libraries.
5336 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5337 echo "configure:5338: checking whether the linker ($LD) supports shared libraries" >&5
5338
5339 allow_undefined_flag=
5340 no_undefined_flag=
5341 need_lib_prefix=unknown
5342 need_version=unknown
5343 # when you set need_version to no, make sure it does not cause -set_version
5344 # flags to be left without arguments
5345 archive_cmds=
5346 archive_expsym_cmds=
5347 old_archive_from_new_cmds=
5348 old_archive_from_expsyms_cmds=
5349 export_dynamic_flag_spec=
5350 whole_archive_flag_spec=
5351 thread_safe_flag_spec=
5352 hardcode_into_libs=no
5353 hardcode_libdir_flag_spec=
5354 hardcode_libdir_separator=
5355 hardcode_direct=no
5356 hardcode_minus_L=no
5357 hardcode_shlibpath_var=unsupported
5358 runpath_var=
5359 link_all_deplibs=unknown
5360 always_export_symbols=no
5361 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5362 # include_expsyms should be a list of space-separated symbols to be *always*
5363 # included in the symbol list
5364 include_expsyms=
5365 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5366 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5367 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5368 # as well as any symbol that contains `d'.
5369 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5370 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5371 # platforms (ab)use it in PIC code, but their linkers get confused if
5372 # the symbol is explicitly referenced.  Since portable code cannot
5373 # rely on this symbol name, it's probably fine to never include it in
5374 # preloaded symbol tables.
5375 extract_expsyms_cmds=
5376
5377 case $host_os in
5378 cygwin* | mingw* | pw32*)
5379   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5380   # When not using gcc, we currently assume that we are using
5381   # Microsoft Visual C++.
5382   if test "$GCC" != yes; then
5383     with_gnu_ld=no
5384   fi
5385   ;;
5386 openbsd*)
5387   with_gnu_ld=no
5388   ;;
5389 esac
5390
5391 ld_shlibs=yes
5392 if test "$with_gnu_ld" = yes; then
5393   # If archive_cmds runs LD, not CC, wlarc should be empty
5394   wlarc='${wl}'
5395
5396   # See if GNU ld supports shared libraries.
5397   case $host_os in
5398   aix3* | aix4* | aix5*)
5399     # On AIX, the GNU linker is very broken
5400     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5401     ld_shlibs=no
5402     cat <<EOF 1>&2
5403
5404 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5405 *** to be unable to reliably create shared libraries on AIX.
5406 *** Therefore, libtool is disabling shared libraries support.  If you
5407 *** really care for shared libraries, you may want to modify your PATH
5408 *** so that a non-GNU linker is found, and then restart.
5409
5410 EOF
5411     ;;
5412
5413   amigaos*)
5414     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)'
5415     hardcode_libdir_flag_spec='-L$libdir'
5416     hardcode_minus_L=yes
5417
5418     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5419     # that the semantics of dynamic libraries on AmigaOS, at least up
5420     # to version 4, is to share data among multiple programs linked
5421     # with the same dynamic library.  Since this doesn't match the
5422     # behavior of shared libraries on other platforms, we can use
5423     # them.
5424     ld_shlibs=no
5425     ;;
5426
5427   beos*)
5428     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5429       allow_undefined_flag=unsupported
5430       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5431       # support --undefined.  This deserves some investigation.  FIXME
5432       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5433     else
5434       ld_shlibs=no
5435     fi
5436     ;;
5437
5438   cygwin* | mingw* | pw32*)
5439     # hardcode_libdir_flag_spec is actually meaningless, as there is
5440     # no search path for DLLs.
5441     hardcode_libdir_flag_spec='-L$libdir'
5442     allow_undefined_flag=unsupported
5443     always_export_symbols=yes
5444
5445     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5446       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5447       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5448       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5449       else $CC -o impgen impgen.c ; fi)~
5450       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5451
5452     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5453
5454     # cygwin and mingw dlls have different entry points and sets of symbols
5455     # to exclude.
5456     # FIXME: what about values for MSVC?
5457     dll_entry=__cygwin_dll_entry@12
5458     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5459     case $host_os in
5460     mingw*)
5461       # mingw values
5462       dll_entry=_DllMainCRTStartup@12
5463       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5464       ;;
5465     esac
5466
5467     # mingw and cygwin differ, and it's simplest to just exclude the union
5468     # of the two symbol sets.
5469     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5470
5471     # recent cygwin and mingw systems supply a stub DllMain which the user
5472     # can override, but on older systems we have to supply one (in ltdll.c)
5473     if test "x$lt_cv_need_dllmain" = "xyes"; then
5474       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5475       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~
5476         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5477     else
5478       ltdll_obj=
5479       ltdll_cmds=
5480     fi
5481
5482     # Extract the symbol export list from an `--export-all' def file,
5483     # then regenerate the def file from the symbol export list, so that
5484     # the compiled dll only exports the symbol export list.
5485     # Be careful not to strip the DATA tag left be newer dlltools.
5486     export_symbols_cmds="$ltdll_cmds"'
5487       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5488       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5489
5490     # If the export-symbols file already is a .def file (1st line
5491     # is EXPORTS), use it as is.
5492     # If DATA tags from a recent dlltool are present, honour them!
5493     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5494         cp $export_symbols $output_objdir/$soname-def;
5495       else
5496         echo EXPORTS > $output_objdir/$soname-def;
5497         _lt_hint=1;
5498         cat $export_symbols | while read symbol; do
5499          set dummy \$symbol;
5500          case \$# in
5501            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5502            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5503          esac;
5504          _lt_hint=`expr 1 + \$_lt_hint`;
5505         done;
5506       fi~
5507       '"$ltdll_cmds"'
5508       $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~
5509       $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~
5510       $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~
5511       $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~
5512       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5513     ;;
5514
5515   netbsd*)
5516     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5517       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5518       wlarc=
5519     else
5520       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5521       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5522     fi
5523     ;;
5524
5525   solaris* | sysv5*)
5526     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5527       ld_shlibs=no
5528       cat <<EOF 1>&2
5529
5530 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5531 *** create shared libraries on Solaris systems.  Therefore, libtool
5532 *** is disabling shared libraries support.  We urge you to upgrade GNU
5533 *** binutils to release 2.9.1 or newer.  Another option is to modify
5534 *** your PATH or compiler configuration so that the native linker is
5535 *** used, and then restart.
5536
5537 EOF
5538     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5539       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5540       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5541     else
5542       ld_shlibs=no
5543     fi
5544     ;;
5545
5546   sunos4*)
5547     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5548     wlarc=
5549     hardcode_direct=yes
5550     hardcode_shlibpath_var=no
5551     ;;
5552
5553   *)
5554     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5555       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5556       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5557     else
5558       ld_shlibs=no
5559     fi
5560     ;;
5561   esac
5562
5563   if test "$ld_shlibs" = yes; then
5564     runpath_var=LD_RUN_PATH
5565     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5566     export_dynamic_flag_spec='${wl}--export-dynamic'
5567     case $host_os in
5568     cygwin* | mingw* | pw32*)
5569       # dlltool doesn't understand --whole-archive et. al.
5570       whole_archive_flag_spec=
5571       ;;
5572     *)
5573       # ancient GNU ld didn't support --whole-archive et. al.
5574       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5575         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5576       else
5577         whole_archive_flag_spec=
5578       fi
5579       ;;
5580     esac
5581   fi
5582 else
5583   # PORTME fill in a description of your system's linker (not GNU ld)
5584   case $host_os in
5585   aix3*)
5586     allow_undefined_flag=unsupported
5587     always_export_symbols=yes
5588     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'
5589     # Note: this linker hardcodes the directories in LIBPATH if there
5590     # are no directories specified by -L.
5591     hardcode_minus_L=yes
5592     if test "$GCC" = yes && test -z "$link_static_flag"; then
5593       # Neither direct hardcoding nor static linking is supported with a
5594       # broken collect2.
5595       hardcode_direct=unsupported
5596     fi
5597     ;;
5598
5599   aix4* | aix5*)
5600     if test "$host_cpu" = ia64; then
5601       # On IA64, the linker does run time linking by default, so we don't
5602       # have to do anything special.
5603       aix_use_runtimelinking=no
5604       exp_sym_flag='-Bexport'
5605       no_entry_flag=""
5606     else
5607       aix_use_runtimelinking=no
5608
5609       # Test if we are trying to use run time linking or normal
5610       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5611       # need to do runtime linking.
5612       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5613         for ld_flag in $LDFLAGS; do
5614           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5615             aix_use_runtimelinking=yes
5616             break
5617           fi
5618         done
5619       esac
5620
5621       exp_sym_flag='-bexport'
5622       no_entry_flag='-bnoentry'
5623     fi
5624
5625     # When large executables or shared objects are built, AIX ld can
5626     # have problems creating the table of contents.  If linking a library
5627     # or program results in "error TOC overflow" add -mminimal-toc to
5628     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5629     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5630
5631     hardcode_direct=yes
5632     archive_cmds=''
5633     hardcode_libdir_separator=':'
5634     if test "$GCC" = yes; then
5635       case $host_os in aix4.[012]|aix4.[012].*)
5636         collect2name=`${CC} -print-prog-name=collect2`
5637         if test -f "$collect2name" && \
5638           strings "$collect2name" | grep resolve_lib_name >/dev/null
5639         then
5640           # We have reworked collect2
5641           hardcode_direct=yes
5642         else
5643           # We have old collect2
5644           hardcode_direct=unsupported
5645           # It fails to find uninstalled libraries when the uninstalled
5646           # path is not listed in the libpath.  Setting hardcode_minus_L
5647           # to unsupported forces relinking
5648           hardcode_minus_L=yes
5649           hardcode_libdir_flag_spec='-L$libdir'
5650           hardcode_libdir_separator=
5651         fi
5652       esac
5653
5654       shared_flag='-shared'
5655     else
5656       # not using gcc
5657       if test "$host_cpu" = ia64; then
5658         shared_flag='${wl}-G'
5659       else
5660         if test "$aix_use_runtimelinking" = yes; then
5661           shared_flag='${wl}-G'
5662         else
5663           shared_flag='${wl}-bM:SRE'
5664         fi
5665       fi
5666     fi
5667
5668     # It seems that -bexpall can do strange things, so it is better to
5669     # generate a list of symbols to export.
5670     always_export_symbols=yes
5671     if test "$aix_use_runtimelinking" = yes; then
5672       # Warning - without using the other runtime loading flags (-brtl),
5673       # -berok will link without error, but may produce a broken library.
5674       allow_undefined_flag='-berok'
5675       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5676       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"
5677     else
5678       if test "$host_cpu" = ia64; then
5679         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5680         allow_undefined_flag="-z nodefs"
5681         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"
5682       else
5683         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5684         # Warning - without using the other run time loading flags,
5685         # -berok will link without error, but may produce a broken library.
5686         allow_undefined_flag='${wl}-berok'
5687         # This is a bit strange, but is similar to how AIX traditionally builds
5688         # it's shared libraries.
5689         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'
5690       fi
5691     fi
5692     ;;
5693
5694   amigaos*)
5695     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)'
5696     hardcode_libdir_flag_spec='-L$libdir'
5697     hardcode_minus_L=yes
5698     # see comment about different semantics on the GNU ld section
5699     ld_shlibs=no
5700     ;;
5701
5702   cygwin* | mingw* | pw32*)
5703     # When not using gcc, we currently assume that we are using
5704     # Microsoft Visual C++.
5705     # hardcode_libdir_flag_spec is actually meaningless, as there is
5706     # no search path for DLLs.
5707     hardcode_libdir_flag_spec=' '
5708     allow_undefined_flag=unsupported
5709     # Tell ltmain to make .lib files, not .a files.
5710     libext=lib
5711     # FIXME: Setting linknames here is a bad hack.
5712     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5713     # The linker will automatically build a .lib file if we build a DLL.
5714     old_archive_from_new_cmds='true'
5715     # FIXME: Should let the user specify the lib program.
5716     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5717     fix_srcfile_path='`cygpath -w "$srcfile"`'
5718     ;;
5719
5720   darwin* | rhapsody*)
5721     case "$host_os" in
5722     rhapsody* | darwin1.[012])
5723       allow_undefined_flag='-undefined suppress'
5724       ;;
5725     *) # Darwin 1.3 on
5726       allow_undefined_flag='-flat_namespace -undefined suppress'
5727       ;;
5728     esac
5729     # FIXME: Relying on posixy $() will cause problems for
5730     #        cross-compilation, but unfortunately the echo tests do not
5731     #        yet detect zsh echo's removal of \ escapes.
5732     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'
5733     # We need to add '_' to the symbols in $export_symbols first
5734     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5735     hardcode_direct=yes
5736     hardcode_shlibpath_var=no
5737     whole_archive_flag_spec='-all_load $convenience'
5738     ;;
5739
5740   freebsd1*)
5741     ld_shlibs=no
5742     ;;
5743
5744   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5745   # support.  Future versions do this automatically, but an explicit c++rt0.o
5746   # does not break anything, and helps significantly (at the cost of a little
5747   # extra space).
5748   freebsd2.2*)
5749     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5750     hardcode_libdir_flag_spec='-R$libdir'
5751     hardcode_direct=yes
5752     hardcode_shlibpath_var=no
5753     ;;
5754
5755   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5756   freebsd2*)
5757     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5758     hardcode_direct=yes
5759     hardcode_minus_L=yes
5760     hardcode_shlibpath_var=no
5761     ;;
5762
5763   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5764   freebsd*)
5765     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5766     hardcode_libdir_flag_spec='-R$libdir'
5767     hardcode_direct=yes
5768     hardcode_shlibpath_var=no
5769     ;;
5770
5771   hpux9* | hpux10* | hpux11*)
5772     case $host_os in
5773     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' ;;
5774     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5775     esac
5776     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5777     hardcode_libdir_separator=:
5778     hardcode_direct=yes
5779     hardcode_minus_L=yes # Not in the search PATH, but as the default
5780                          # location of the library.
5781     export_dynamic_flag_spec='${wl}-E'
5782     ;;
5783
5784   irix5* | irix6*)
5785     if test "$GCC" = yes; then
5786       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'
5787     else
5788       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'
5789     fi
5790     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5791     hardcode_libdir_separator=:
5792     link_all_deplibs=yes
5793     ;;
5794
5795   netbsd*)
5796     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5797       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5798     else
5799       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5800     fi
5801     hardcode_libdir_flag_spec='-R$libdir'
5802     hardcode_direct=yes
5803     hardcode_shlibpath_var=no
5804     ;;
5805
5806   newsos6)
5807     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5808     hardcode_direct=yes
5809     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5810     hardcode_libdir_separator=:
5811     hardcode_shlibpath_var=no
5812     ;;
5813
5814   openbsd*)
5815     hardcode_direct=yes
5816     hardcode_shlibpath_var=no
5817     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5818       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5819       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5820       export_dynamic_flag_spec='${wl}-E'
5821     else
5822       case "$host_os" in
5823       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5824         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5825         hardcode_libdir_flag_spec='-R$libdir'
5826         ;;
5827       *)
5828         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5829         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5830         ;;
5831       esac
5832     fi
5833     ;;
5834
5835   os2*)
5836     hardcode_libdir_flag_spec='-L$libdir'
5837     hardcode_minus_L=yes
5838     allow_undefined_flag=unsupported
5839     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'
5840     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5841     ;;
5842
5843   osf3*)
5844     if test "$GCC" = yes; then
5845       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5846       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'
5847     else
5848       allow_undefined_flag=' -expect_unresolved \*'
5849       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'
5850     fi
5851     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5852     hardcode_libdir_separator=:
5853     ;;
5854
5855   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5856     if test "$GCC" = yes; then
5857       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5858       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'
5859       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5860     else
5861       allow_undefined_flag=' -expect_unresolved \*'
5862       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'
5863       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5864       $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'
5865
5866       #Both c and cxx compiler support -rpath directly
5867       hardcode_libdir_flag_spec='-rpath $libdir'
5868     fi
5869     hardcode_libdir_separator=:
5870     ;;
5871
5872   sco3.2v5*)
5873     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5874     hardcode_shlibpath_var=no
5875     runpath_var=LD_RUN_PATH
5876     hardcode_runpath_var=yes
5877     export_dynamic_flag_spec='${wl}-Bexport'
5878     ;;
5879
5880   solaris*)
5881     # gcc --version < 3.0 without binutils cannot create self contained
5882     # shared libraries reliably, requiring libgcc.a to resolve some of
5883     # the object symbols generated in some cases.  Libraries that use
5884     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5885     # a copy of libgcc.a into every shared library to guarantee resolving
5886     # such symbols causes other problems:  According to Tim Van Holder
5887     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5888     # (to the application) exception stack for one thing.
5889     no_undefined_flag=' -z defs'
5890     if test "$GCC" = yes; then
5891       case `$CC --version 2>/dev/null` in
5892       [12].*)
5893         cat <<EOF 1>&2
5894
5895 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5896 *** create self contained shared libraries on Solaris systems, without
5897 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5898 *** -no-undefined support, which will at least allow you to build shared
5899 *** libraries.  However, you may find that when you link such libraries
5900 *** into an application without using GCC, you have to manually add
5901 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5902 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5903 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5904
5905 EOF
5906         no_undefined_flag=
5907         ;;
5908       esac
5909     fi
5910     # $CC -shared without GNU ld will not create a library from C++
5911     # object files and a static libstdc++, better avoid it by now
5912     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5913     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5914                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5915     hardcode_libdir_flag_spec='-R$libdir'
5916     hardcode_shlibpath_var=no
5917     case $host_os in
5918     solaris2.[0-5] | solaris2.[0-5].*) ;;
5919     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5920       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5921     esac
5922     link_all_deplibs=yes
5923     ;;
5924
5925   sunos4*)
5926     if test "x$host_vendor" = xsequent; then
5927       # Use $CC to link under sequent, because it throws in some extra .o
5928       # files that make .init and .fini sections work.
5929       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5930     else
5931       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5932     fi
5933     hardcode_libdir_flag_spec='-L$libdir'
5934     hardcode_direct=yes
5935     hardcode_minus_L=yes
5936     hardcode_shlibpath_var=no
5937     ;;
5938
5939   sysv4)
5940     if test "x$host_vendor" = xsno; then
5941       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5942       hardcode_direct=yes # is this really true???
5943     else
5944       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5945       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5946     fi
5947     runpath_var='LD_RUN_PATH'
5948     hardcode_shlibpath_var=no
5949     ;;
5950
5951   sysv4.3*)
5952     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953     hardcode_shlibpath_var=no
5954     export_dynamic_flag_spec='-Bexport'
5955     ;;
5956
5957   sysv5*)
5958     no_undefined_flag=' -z text'
5959     # $CC -shared without GNU ld will not create a library from C++
5960     # object files and a static libstdc++, better avoid it by now
5961     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5962     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5963                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5964     hardcode_libdir_flag_spec=
5965     hardcode_shlibpath_var=no
5966     runpath_var='LD_RUN_PATH'
5967     ;;
5968
5969   uts4*)
5970     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5971     hardcode_libdir_flag_spec='-L$libdir'
5972     hardcode_shlibpath_var=no
5973     ;;
5974
5975   dgux*)
5976     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977     hardcode_libdir_flag_spec='-L$libdir'
5978     hardcode_shlibpath_var=no
5979     ;;
5980
5981   sysv4*MP*)
5982     if test -d /usr/nec; then
5983       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5984       hardcode_shlibpath_var=no
5985       runpath_var=LD_RUN_PATH
5986       hardcode_runpath_var=yes
5987       ld_shlibs=yes
5988     fi
5989     ;;
5990
5991   sysv4.2uw2*)
5992     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5993     hardcode_direct=yes
5994     hardcode_minus_L=no
5995     hardcode_shlibpath_var=no
5996     hardcode_runpath_var=yes
5997     runpath_var=LD_RUN_PATH
5998     ;;
5999
6000   sysv5uw7* | unixware7*)
6001     no_undefined_flag='${wl}-z ${wl}text'
6002     if test "$GCC" = yes; then
6003       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6004     else
6005       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6006     fi
6007     runpath_var='LD_RUN_PATH'
6008     hardcode_shlibpath_var=no
6009     ;;
6010
6011   *)
6012     ld_shlibs=no
6013     ;;
6014   esac
6015 fi
6016 echo "$ac_t""$ld_shlibs" 1>&6
6017 test "$ld_shlibs" = no && can_build_shared=no
6018
6019 # Check hardcoding attributes.
6020 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6021 echo "configure:6022: checking how to hardcode library paths into programs" >&5
6022 hardcode_action=
6023 if test -n "$hardcode_libdir_flag_spec" || \
6024    test -n "$runpath_var"; then
6025
6026   # We can hardcode non-existant directories.
6027   if test "$hardcode_direct" != no &&
6028      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6029      # have to relink, otherwise we might link with an installed library
6030      # when we should be linking with a yet-to-be-installed one
6031      ## test "$hardcode_shlibpath_var" != no &&
6032      test "$hardcode_minus_L" != no; then
6033     # Linking always hardcodes the temporary library directory.
6034     hardcode_action=relink
6035   else
6036     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6037     hardcode_action=immediate
6038   fi
6039 else
6040   # We cannot hardcode anything, or else we can only hardcode existing
6041   # directories.
6042   hardcode_action=unsupported
6043 fi
6044 echo "$ac_t""$hardcode_action" 1>&6
6045
6046 striplib=
6047 old_striplib=
6048 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6049 echo "configure:6050: checking whether stripping libraries is possible" >&5
6050 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6051   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6052   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6053   echo "$ac_t""yes" 1>&6
6054 else
6055   echo "$ac_t""no" 1>&6
6056 fi
6057
6058 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6059 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6060
6061 # PORTME Fill in your ld.so characteristics
6062 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6063 echo "configure:6064: checking dynamic linker characteristics" >&5
6064 library_names_spec=
6065 libname_spec='lib$name'
6066 soname_spec=
6067 postinstall_cmds=
6068 postuninstall_cmds=
6069 finish_cmds=
6070 finish_eval=
6071 shlibpath_var=
6072 shlibpath_overrides_runpath=unknown
6073 version_type=none
6074 dynamic_linker="$host_os ld.so"
6075 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6076 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6077
6078 case $host_os in
6079 aix3*)
6080   version_type=linux
6081   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6082   shlibpath_var=LIBPATH
6083
6084   # AIX has no versioning support, so we append a major version to the name.
6085   soname_spec='${libname}${release}.so$major'
6086   ;;
6087
6088 aix4* | aix5*)
6089   version_type=linux
6090   if test "$host_cpu" = ia64; then
6091     # AIX 5 supports IA64
6092     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6093     shlibpath_var=LD_LIBRARY_PATH
6094   else
6095     # With GCC up to 2.95.x, collect2 would create an import file
6096     # for dependence libraries.  The import file would start with
6097     # the line `#! .'.  This would cause the generated library to
6098     # depend on `.', always an invalid library.  This was fixed in
6099     # development snapshots of GCC prior to 3.0.
6100     case $host_os in
6101       aix4 | aix4.[01] | aix4.[01].*)
6102         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6103              echo ' yes '
6104              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6105           :
6106         else
6107           can_build_shared=no
6108         fi
6109         ;;
6110     esac
6111     # AIX (on Power*) has no versioning support, so currently we can
6112     # not hardcode correct soname into executable. Probably we can
6113     # add versioning support to collect2, so additional links can
6114     # be useful in future.
6115     if test "$aix_use_runtimelinking" = yes; then
6116       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6117       # instead of lib<name>.a to let people know that these are not
6118       # typical AIX shared libraries.
6119       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6120     else
6121       # We preserve .a as extension for shared libraries through AIX4.2
6122       # and later when we are not doing run time linking.
6123       library_names_spec='${libname}${release}.a $libname.a'
6124       soname_spec='${libname}${release}.so$major'
6125     fi
6126     shlibpath_var=LIBPATH
6127   fi
6128   ;;
6129
6130 amigaos*)
6131   library_names_spec='$libname.ixlibrary $libname.a'
6132   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6133   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'
6134   ;;
6135
6136 beos*)
6137   library_names_spec='${libname}.so'
6138   dynamic_linker="$host_os ld.so"
6139   shlibpath_var=LIBRARY_PATH
6140   ;;
6141
6142 bsdi4*)
6143   version_type=linux
6144   need_version=no
6145   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6146   soname_spec='${libname}${release}.so$major'
6147   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6148   shlibpath_var=LD_LIBRARY_PATH
6149   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6150   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6151   export_dynamic_flag_spec=-rdynamic
6152   # the default ld.so.conf also contains /usr/contrib/lib and
6153   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6154   # libtool to hard-code these into programs
6155   ;;
6156
6157 cygwin* | mingw* | pw32*)
6158   version_type=windows
6159   need_version=no
6160   need_lib_prefix=no
6161   case $GCC,$host_os in
6162   yes,cygwin*)
6163     library_names_spec='$libname.dll.a'
6164     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6165     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6166       dldir=$destdir/`dirname \$dlpath`~
6167       test -d \$dldir || mkdir -p \$dldir~
6168       $install_prog .libs/$dlname \$dldir/$dlname'
6169     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6170       dlpath=$dir/\$dldll~
6171        $rm \$dlpath'
6172     ;;
6173   yes,mingw*)
6174     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6175     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6176     ;;
6177   yes,pw32*)
6178     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6179     ;;
6180   *)
6181     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6182     ;;
6183   esac
6184   dynamic_linker='Win32 ld.exe'
6185   # FIXME: first we should search . and the directory the executable is in
6186   shlibpath_var=PATH
6187   ;;
6188
6189 darwin* | rhapsody*)
6190   dynamic_linker="$host_os dyld"
6191   version_type=darwin
6192   need_lib_prefix=no
6193   need_version=no
6194   # FIXME: Relying on posixy $() will cause problems for
6195   #        cross-compilation, but unfortunately the echo tests do not
6196   #        yet detect zsh echo's removal of \ escapes.
6197   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)'
6198   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6199   shlibpath_overrides_runpath=yes
6200   shlibpath_var=DYLD_LIBRARY_PATH
6201   ;;
6202
6203 freebsd1*)
6204   dynamic_linker=no
6205   ;;
6206
6207 freebsd*)
6208   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6209   version_type=freebsd-$objformat
6210   case $version_type in
6211     freebsd-elf*)
6212       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6213       need_version=no
6214       need_lib_prefix=no
6215       ;;
6216     freebsd-*)
6217       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6218       need_version=yes
6219       ;;
6220   esac
6221   shlibpath_var=LD_LIBRARY_PATH
6222   case $host_os in
6223   freebsd2*)
6224     shlibpath_overrides_runpath=yes
6225     ;;
6226   *)
6227     shlibpath_overrides_runpath=no
6228     hardcode_into_libs=yes
6229     ;;
6230   esac
6231   ;;
6232
6233 gnu*)
6234   version_type=linux
6235   need_lib_prefix=no
6236   need_version=no
6237   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6238   soname_spec='${libname}${release}.so$major'
6239   shlibpath_var=LD_LIBRARY_PATH
6240   hardcode_into_libs=yes
6241   ;;
6242
6243 hpux9* | hpux10* | hpux11*)
6244   # Give a soname corresponding to the major version so that dld.sl refuses to
6245   # link against other versions.
6246   dynamic_linker="$host_os dld.sl"
6247   version_type=sunos
6248   need_lib_prefix=no
6249   need_version=no
6250   shlibpath_var=SHLIB_PATH
6251   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6252   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6253   soname_spec='${libname}${release}.sl$major'
6254   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6255   postinstall_cmds='chmod 555 $lib'
6256   ;;
6257
6258 irix5* | irix6*)
6259   version_type=irix
6260   need_lib_prefix=no
6261   need_version=no
6262   soname_spec='${libname}${release}.so$major'
6263   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6264   case $host_os in
6265   irix5*)
6266     libsuff= shlibsuff=
6267     ;;
6268   *)
6269     case $LD in # libtool.m4 will add one of these switches to LD
6270     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6271     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6272     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6273     *) libsuff= shlibsuff= libmagic=never-match;;
6274     esac
6275     ;;
6276   esac
6277   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6278   shlibpath_overrides_runpath=no
6279   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6280   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6281   ;;
6282
6283 # No shared lib support for Linux oldld, aout, or coff.
6284 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6285   dynamic_linker=no
6286   ;;
6287
6288 # This must be Linux ELF.
6289 linux-gnu*)
6290   version_type=linux
6291   need_lib_prefix=no
6292   need_version=no
6293   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6294   soname_spec='${libname}${release}.so$major'
6295   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   shlibpath_overrides_runpath=no
6298   # This implies no fast_install, which is unacceptable.
6299   # Some rework will be needed to allow for fast_install
6300   # before this can be enabled.
6301   hardcode_into_libs=yes
6302
6303   # We used to test for /lib/ld.so.1 and disable shared libraries on
6304   # powerpc, because MkLinux only supported shared libraries with the
6305   # GNU dynamic linker.  Since this was broken with cross compilers,
6306   # most powerpc-linux boxes support dynamic linking these days and
6307   # people can always --disable-shared, the test was removed, and we
6308   # assume the GNU/Linux dynamic linker is in use.
6309   dynamic_linker='GNU/Linux ld.so'
6310   ;;
6311
6312 netbsd*)
6313   version_type=sunos
6314   need_lib_prefix=no
6315   need_version=no
6316   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6317     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6318     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6319     dynamic_linker='NetBSD (a.out) ld.so'
6320   else
6321     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6322     soname_spec='${libname}${release}.so$major'
6323     dynamic_linker='NetBSD ld.elf_so'
6324   fi
6325   shlibpath_var=LD_LIBRARY_PATH
6326   shlibpath_overrides_runpath=yes
6327   hardcode_into_libs=yes
6328   ;;
6329
6330 newsos6)
6331   version_type=linux
6332   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6333   shlibpath_var=LD_LIBRARY_PATH
6334   shlibpath_overrides_runpath=yes
6335   ;;
6336
6337 openbsd*)
6338   version_type=sunos
6339   need_lib_prefix=no
6340   need_version=no
6341   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6342     case "$host_os" in
6343     openbsd2.[89] | openbsd2.[89].*)
6344       shlibpath_overrides_runpath=no
6345       ;;
6346     *)
6347       shlibpath_overrides_runpath=yes
6348       ;;
6349     esac
6350   else
6351     shlibpath_overrides_runpath=yes
6352   fi
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6354   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   ;;
6357
6358 os2*)
6359   libname_spec='$name'
6360   need_lib_prefix=no
6361   library_names_spec='$libname.dll $libname.a'
6362   dynamic_linker='OS/2 ld.exe'
6363   shlibpath_var=LIBPATH
6364   ;;
6365
6366 osf3* | osf4* | osf5*)
6367   version_type=osf
6368   need_version=no
6369   soname_spec='${libname}${release}.so'
6370   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6371   shlibpath_var=LD_LIBRARY_PATH
6372   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6373   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6374   ;;
6375
6376 sco3.2v5*)
6377   version_type=osf
6378   soname_spec='${libname}${release}.so$major'
6379   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6380   shlibpath_var=LD_LIBRARY_PATH
6381   ;;
6382
6383 solaris*)
6384   version_type=linux
6385   need_lib_prefix=no
6386   need_version=no
6387   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6388   soname_spec='${libname}${release}.so$major'
6389   shlibpath_var=LD_LIBRARY_PATH
6390   shlibpath_overrides_runpath=yes
6391   hardcode_into_libs=yes
6392   # ldd complains unless libraries are executable
6393   postinstall_cmds='chmod +x $lib'
6394   ;;
6395
6396 sunos4*)
6397   version_type=sunos
6398   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6399   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6400   shlibpath_var=LD_LIBRARY_PATH
6401   shlibpath_overrides_runpath=yes
6402   if test "$with_gnu_ld" = yes; then
6403     need_lib_prefix=no
6404   fi
6405   need_version=yes
6406   ;;
6407
6408 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6409   version_type=linux
6410   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6411   soname_spec='${libname}${release}.so$major'
6412   shlibpath_var=LD_LIBRARY_PATH
6413   case $host_vendor in
6414     sni)
6415       shlibpath_overrides_runpath=no
6416       ;;
6417     motorola)
6418       need_lib_prefix=no
6419       need_version=no
6420       shlibpath_overrides_runpath=no
6421       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6422       ;;
6423   esac
6424   ;;
6425
6426 uts4*)
6427   version_type=linux
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6429   soname_spec='${libname}${release}.so$major'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   ;;
6432
6433 dgux*)
6434   version_type=linux
6435   need_lib_prefix=no
6436   need_version=no
6437   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6438   soname_spec='${libname}${release}.so$major'
6439   shlibpath_var=LD_LIBRARY_PATH
6440   ;;
6441
6442 sysv4*MP*)
6443   if test -d /usr/nec ;then
6444     version_type=linux
6445     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6446     soname_spec='$libname.so.$major'
6447     shlibpath_var=LD_LIBRARY_PATH
6448   fi
6449   ;;
6450
6451 *)
6452   dynamic_linker=no
6453   ;;
6454 esac
6455 echo "$ac_t""$dynamic_linker" 1>&6
6456 test "$dynamic_linker" = no && can_build_shared=no
6457
6458 # Report the final consequences.
6459 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6460 echo "configure:6461: checking if libtool supports shared libraries" >&5
6461 echo "$ac_t""$can_build_shared" 1>&6
6462
6463 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6464 echo "configure:6465: checking whether to build shared libraries" >&5
6465 test "$can_build_shared" = "no" && enable_shared=no
6466
6467 # On AIX, shared libraries and static libraries use the same namespace, and
6468 # are all built from PIC.
6469 case "$host_os" in
6470 aix3*)
6471   test "$enable_shared" = yes && enable_static=no
6472   if test -n "$RANLIB"; then
6473     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6474     postinstall_cmds='$RANLIB $lib'
6475   fi
6476   ;;
6477
6478 aix4*)
6479   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6480     test "$enable_shared" = yes && enable_static=no
6481   fi
6482   ;;
6483 esac
6484 echo "$ac_t""$enable_shared" 1>&6
6485
6486 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6487 echo "configure:6488: checking whether to build static libraries" >&5
6488 # Make sure either enable_shared or enable_static is yes.
6489 test "$enable_shared" = yes || enable_static=yes
6490 echo "$ac_t""$enable_static" 1>&6
6491
6492 if test "$hardcode_action" = relink; then
6493   # Fast installation is not supported
6494   enable_fast_install=no
6495 elif test "$shlibpath_overrides_runpath" = yes ||
6496      test "$enable_shared" = no; then
6497   # Fast installation is not necessary
6498   enable_fast_install=needless
6499 fi
6500
6501 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6502 if test "$GCC" = yes; then
6503   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6504 fi
6505
6506 if test "x$enable_dlopen" != xyes; then
6507   enable_dlopen=unknown
6508   enable_dlopen_self=unknown
6509   enable_dlopen_self_static=unknown
6510 else
6511   lt_cv_dlopen=no
6512   lt_cv_dlopen_libs=
6513
6514   case $host_os in
6515   beos*)
6516     lt_cv_dlopen="load_add_on"
6517     lt_cv_dlopen_libs=
6518     lt_cv_dlopen_self=yes
6519     ;;
6520
6521   cygwin* | mingw* | pw32*)
6522     lt_cv_dlopen="LoadLibrary"
6523     lt_cv_dlopen_libs=
6524    ;;
6525
6526   *)
6527     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6528 echo "configure:6529: checking for shl_load" >&5
6529 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 /* System header to define __stub macros and hopefully few prototypes,
6536     which can conflict with char shl_load(); below.  */
6537 #include <assert.h>
6538 /* Override any gcc2 internal prototype to avoid an error.  */
6539 /* We use char because int might match the return type of a gcc2
6540     builtin and then its argument prototype would still apply.  */
6541 char shl_load();
6542 char (*f)();
6543
6544 int main() {
6545
6546 /* The GNU C library defines this for functions which it implements
6547     to always fail with ENOSYS.  Some functions are actually named
6548     something starting with __ and the normal name is an alias.  */
6549 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6550 choke me
6551 #else
6552 f = shl_load;
6553 #endif
6554
6555 ; return 0; }
6556 EOF
6557 if { (eval echo configure:6558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6558   rm -rf conftest*
6559   eval "ac_cv_func_shl_load=yes"
6560 else
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   eval "ac_cv_func_shl_load=no"
6565 fi
6566 rm -f conftest*
6567 fi
6568
6569 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6570   echo "$ac_t""yes" 1>&6
6571   lt_cv_dlopen="shl_load"
6572 else
6573   echo "$ac_t""no" 1>&6
6574 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6575 echo "configure:6576: checking for shl_load in -ldld" >&5
6576 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6577 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   ac_save_LIBS="$LIBS"
6581 LIBS="-ldld  $LIBS"
6582 cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* Override any gcc2 internal prototype to avoid an error.  */
6586 /* We use char because int might match the return type of a gcc2
6587     builtin and then its argument prototype would still apply.  */
6588 char shl_load();
6589
6590 int main() {
6591 shl_load()
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_lib_$ac_lib_var=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=no"
6602 fi
6603 rm -f conftest*
6604 LIBS="$ac_save_LIBS"
6605
6606 fi
6607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6608   echo "$ac_t""yes" 1>&6
6609   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6610 else
6611   echo "$ac_t""no" 1>&6
6612 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6613 echo "configure:6614: checking for dlopen" >&5
6614 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6615   echo $ac_n "(cached) $ac_c" 1>&6
6616 else
6617   cat > conftest.$ac_ext <<EOF
6618 #line 6619 "configure"
6619 #include "confdefs.h"
6620 /* System header to define __stub macros and hopefully few prototypes,
6621     which can conflict with char dlopen(); below.  */
6622 #include <assert.h>
6623 /* Override any gcc2 internal prototype to avoid an error.  */
6624 /* We use char because int might match the return type of a gcc2
6625     builtin and then its argument prototype would still apply.  */
6626 char dlopen();
6627 char (*f)();
6628
6629 int main() {
6630
6631 /* The GNU C library defines this for functions which it implements
6632     to always fail with ENOSYS.  Some functions are actually named
6633     something starting with __ and the normal name is an alias.  */
6634 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6635 choke me
6636 #else
6637 f = dlopen;
6638 #endif
6639
6640 ; return 0; }
6641 EOF
6642 if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6643   rm -rf conftest*
6644   eval "ac_cv_func_dlopen=yes"
6645 else
6646   echo "configure: failed program was:" >&5
6647   cat conftest.$ac_ext >&5
6648   rm -rf conftest*
6649   eval "ac_cv_func_dlopen=no"
6650 fi
6651 rm -f conftest*
6652 fi
6653
6654 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6655   echo "$ac_t""yes" 1>&6
6656   lt_cv_dlopen="dlopen"
6657 else
6658   echo "$ac_t""no" 1>&6
6659 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6660 echo "configure:6661: checking for dlopen in -ldl" >&5
6661 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6662 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   ac_save_LIBS="$LIBS"
6666 LIBS="-ldl  $LIBS"
6667 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 /* Override any gcc2 internal prototype to avoid an error.  */
6671 /* We use char because int might match the return type of a gcc2
6672     builtin and then its argument prototype would still apply.  */
6673 char dlopen();
6674
6675 int main() {
6676 dlopen()
6677 ; return 0; }
6678 EOF
6679 if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6680   rm -rf conftest*
6681   eval "ac_cv_lib_$ac_lib_var=yes"
6682 else
6683   echo "configure: failed program was:" >&5
6684   cat conftest.$ac_ext >&5
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=no"
6687 fi
6688 rm -f conftest*
6689 LIBS="$ac_save_LIBS"
6690
6691 fi
6692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6693   echo "$ac_t""yes" 1>&6
6694   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6695 else
6696   echo "$ac_t""no" 1>&6
6697 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6698 echo "configure:6699: checking for dlopen in -lsvld" >&5
6699 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6701   echo $ac_n "(cached) $ac_c" 1>&6
6702 else
6703   ac_save_LIBS="$LIBS"
6704 LIBS="-lsvld  $LIBS"
6705 cat > conftest.$ac_ext <<EOF
6706 #line 6707 "configure"
6707 #include "confdefs.h"
6708 /* Override any gcc2 internal prototype to avoid an error.  */
6709 /* We use char because int might match the return type of a gcc2
6710     builtin and then its argument prototype would still apply.  */
6711 char dlopen();
6712
6713 int main() {
6714 dlopen()
6715 ; return 0; }
6716 EOF
6717 if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6718   rm -rf conftest*
6719   eval "ac_cv_lib_$ac_lib_var=yes"
6720 else
6721   echo "configure: failed program was:" >&5
6722   cat conftest.$ac_ext >&5
6723   rm -rf conftest*
6724   eval "ac_cv_lib_$ac_lib_var=no"
6725 fi
6726 rm -f conftest*
6727 LIBS="$ac_save_LIBS"
6728
6729 fi
6730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6731   echo "$ac_t""yes" 1>&6
6732   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6733 else
6734   echo "$ac_t""no" 1>&6
6735 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6736 echo "configure:6737: checking for dld_link in -ldld" >&5
6737 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   ac_save_LIBS="$LIBS"
6742 LIBS="-ldld  $LIBS"
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* Override any gcc2 internal prototype to avoid an error.  */
6747 /* We use char because int might match the return type of a gcc2
6748     builtin and then its argument prototype would still apply.  */
6749 char dld_link();
6750
6751 int main() {
6752 dld_link()
6753 ; return 0; }
6754 EOF
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6756   rm -rf conftest*
6757   eval "ac_cv_lib_$ac_lib_var=yes"
6758 else
6759   echo "configure: failed program was:" >&5
6760   cat conftest.$ac_ext >&5
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=no"
6763 fi
6764 rm -f conftest*
6765 LIBS="$ac_save_LIBS"
6766
6767 fi
6768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6771 else
6772   echo "$ac_t""no" 1>&6
6773 fi
6774
6775               
6776 fi
6777
6778             
6779 fi
6780
6781           
6782 fi
6783
6784         
6785 fi
6786
6787       
6788 fi
6789
6790     ;;
6791   esac
6792
6793   if test "x$lt_cv_dlopen" != xno; then
6794     enable_dlopen=yes
6795   else
6796     enable_dlopen=no
6797   fi
6798
6799   case $lt_cv_dlopen in
6800   dlopen)
6801     save_CPPFLAGS="$CPPFLAGS"
6802         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6803
6804     save_LDFLAGS="$LDFLAGS"
6805     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6806
6807     save_LIBS="$LIBS"
6808     LIBS="$lt_cv_dlopen_libs $LIBS"
6809
6810     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6811 echo "configure:6812: checking whether a program can dlopen itself" >&5
6812 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6813   echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815           if test "$cross_compiling" = yes; then :
6816   lt_cv_dlopen_self=cross
6817 else
6818     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6819   lt_status=$lt_dlunknown
6820   cat > conftest.$ac_ext <<EOF
6821 #line 6822 "configure"
6822 #include "confdefs.h"
6823
6824 #if HAVE_DLFCN_H
6825 #include <dlfcn.h>
6826 #endif
6827
6828 #include <stdio.h>
6829
6830 #ifdef RTLD_GLOBAL
6831 #  define LT_DLGLOBAL           RTLD_GLOBAL
6832 #else
6833 #  ifdef DL_GLOBAL
6834 #    define LT_DLGLOBAL         DL_GLOBAL
6835 #  else
6836 #    define LT_DLGLOBAL         0
6837 #  endif
6838 #endif
6839
6840 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6841    find out it does not work in some platform. */
6842 #ifndef LT_DLLAZY_OR_NOW
6843 #  ifdef RTLD_LAZY
6844 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6845 #  else
6846 #    ifdef DL_LAZY
6847 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6848 #    else
6849 #      ifdef RTLD_NOW
6850 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6851 #      else
6852 #        ifdef DL_NOW
6853 #          define LT_DLLAZY_OR_NOW      DL_NOW
6854 #        else
6855 #          define LT_DLLAZY_OR_NOW      0
6856 #        endif
6857 #      endif
6858 #    endif
6859 #  endif
6860 #endif
6861
6862 #ifdef __cplusplus
6863 extern "C" void exit (int);
6864 #endif
6865
6866 void fnord() { int i=42;}
6867 int main ()
6868 {
6869   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6870   int status = $lt_dlunknown;
6871
6872   if (self)
6873     {
6874       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6875       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6876       /* dlclose (self); */
6877     }
6878
6879     exit (status);
6880 }
6881 EOF
6882   if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6883     (./conftest; exit; ) 2>/dev/null
6884     lt_status=$?
6885     case x$lt_status in
6886       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6887       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6888       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6889     esac
6890   else :
6891     # compilation failed
6892     lt_cv_dlopen_self=no
6893   fi
6894 fi
6895 rm -fr conftest*
6896
6897     
6898 fi
6899
6900 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6901
6902     if test "x$lt_cv_dlopen_self" = xyes; then
6903       LDFLAGS="$LDFLAGS $link_static_flag"
6904       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6905 echo "configure:6906: checking whether a statically linked program can dlopen itself" >&5
6906 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909           if test "$cross_compiling" = yes; then :
6910   lt_cv_dlopen_self_static=cross
6911 else
6912     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6913   lt_status=$lt_dlunknown
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917
6918 #if HAVE_DLFCN_H
6919 #include <dlfcn.h>
6920 #endif
6921
6922 #include <stdio.h>
6923
6924 #ifdef RTLD_GLOBAL
6925 #  define LT_DLGLOBAL           RTLD_GLOBAL
6926 #else
6927 #  ifdef DL_GLOBAL
6928 #    define LT_DLGLOBAL         DL_GLOBAL
6929 #  else
6930 #    define LT_DLGLOBAL         0
6931 #  endif
6932 #endif
6933
6934 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6935    find out it does not work in some platform. */
6936 #ifndef LT_DLLAZY_OR_NOW
6937 #  ifdef RTLD_LAZY
6938 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6939 #  else
6940 #    ifdef DL_LAZY
6941 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6942 #    else
6943 #      ifdef RTLD_NOW
6944 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6945 #      else
6946 #        ifdef DL_NOW
6947 #          define LT_DLLAZY_OR_NOW      DL_NOW
6948 #        else
6949 #          define LT_DLLAZY_OR_NOW      0
6950 #        endif
6951 #      endif
6952 #    endif
6953 #  endif
6954 #endif
6955
6956 #ifdef __cplusplus
6957 extern "C" void exit (int);
6958 #endif
6959
6960 void fnord() { int i=42;}
6961 int main ()
6962 {
6963   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6964   int status = $lt_dlunknown;
6965
6966   if (self)
6967     {
6968       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6969       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6970       /* dlclose (self); */
6971     }
6972
6973     exit (status);
6974 }
6975 EOF
6976   if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6977     (./conftest; exit; ) 2>/dev/null
6978     lt_status=$?
6979     case x$lt_status in
6980       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6981       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6982       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6983     esac
6984   else :
6985     # compilation failed
6986     lt_cv_dlopen_self_static=no
6987   fi
6988 fi
6989 rm -fr conftest*
6990
6991       
6992 fi
6993
6994 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6995     fi
6996
6997     CPPFLAGS="$save_CPPFLAGS"
6998     LDFLAGS="$save_LDFLAGS"
6999     LIBS="$save_LIBS"
7000     ;;
7001   esac
7002
7003   case $lt_cv_dlopen_self in
7004   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7005   *) enable_dlopen_self=unknown ;;
7006   esac
7007
7008   case $lt_cv_dlopen_self_static in
7009   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7010   *) enable_dlopen_self_static=unknown ;;
7011   esac
7012 fi
7013
7014
7015 if test "$enable_shared" = yes && test "$GCC" = yes; then
7016   case $archive_cmds in
7017   *'~'*)
7018     # FIXME: we may have to deal with multi-command sequences.
7019     ;;
7020   '$CC '*)
7021     # Test whether the compiler implicitly links with -lc since on some
7022     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7023     # to ld, don't add -lc before -lgcc.
7024     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7025 echo "configure:7026: checking whether -lc should be explicitly linked in" >&5
7026     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029   $rm conftest*
7030     echo 'static int dummy;' > conftest.$ac_ext
7031
7032     if { (eval echo configure:7033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7033       soname=conftest
7034       lib=conftest
7035       libobjs=conftest.$ac_objext
7036       deplibs=
7037       wl=$lt_cv_prog_cc_wl
7038       compiler_flags=-v
7039       linker_flags=-v
7040       verstring=
7041       output_objdir=.
7042       libname=conftest
7043       save_allow_undefined_flag=$allow_undefined_flag
7044       allow_undefined_flag=
7045       if { (eval echo configure:7046: \"$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; }
7046       then
7047         lt_cv_archive_cmds_need_lc=no
7048       else
7049         lt_cv_archive_cmds_need_lc=yes
7050       fi
7051       allow_undefined_flag=$save_allow_undefined_flag
7052     else
7053       cat conftest.err 1>&5
7054     fi
7055 fi
7056
7057     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7058     ;;
7059   esac
7060 fi
7061 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7062
7063 # The second clause should only fire when bootstrapping the
7064 # libtool distribution, otherwise you forgot to ship ltmain.sh
7065 # with your package, and you will get complaints that there are
7066 # no rules to generate ltmain.sh.
7067 if test -f "$ltmain"; then
7068   :
7069 else
7070   # If there is no Makefile yet, we rely on a make rule to execute
7071   # `config.status --recheck' to rerun these tests and create the
7072   # libtool script then.
7073   test -f Makefile && make "$ltmain"
7074 fi
7075
7076 if test -f "$ltmain"; then
7077   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7078   $rm -f "${ofile}T"
7079
7080   echo creating $ofile
7081
7082   # Now quote all the things that may contain metacharacters while being
7083   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7084   # variables and quote the copies for generation of the libtool script.
7085   for var in echo old_CC old_CFLAGS \
7086     AR AR_FLAGS CC LD LN_S NM SHELL \
7087     reload_flag reload_cmds wl \
7088     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7089     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7090     library_names_spec soname_spec \
7091     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7092     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7093     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7094     old_striplib striplib file_magic_cmd export_symbols_cmds \
7095     deplibs_check_method allow_undefined_flag no_undefined_flag \
7096     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7097     global_symbol_to_c_name_address \
7098     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7099     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7100     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7101
7102     case $var in
7103     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7104     old_postinstall_cmds | old_postuninstall_cmds | \
7105     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7106     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7107     postinstall_cmds | postuninstall_cmds | \
7108     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7109       # Double-quote double-evaled strings.
7110       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7111       ;;
7112     *)
7113       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7114       ;;
7115     esac
7116   done
7117
7118   cat <<__EOF__ > "${ofile}T"
7119 #! $SHELL
7120
7121 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7122 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7123 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7124 #
7125 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7126 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7127 #
7128 # This program is free software; you can redistribute it and/or modify
7129 # it under the terms of the GNU General Public License as published by
7130 # the Free Software Foundation; either version 2 of the License, or
7131 # (at your option) any later version.
7132 #
7133 # This program is distributed in the hope that it will be useful, but
7134 # WITHOUT ANY WARRANTY; without even the implied warranty of
7135 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7136 # General Public License for more details.
7137 #
7138 # You should have received a copy of the GNU General Public License
7139 # along with this program; if not, write to the Free Software
7140 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7141 #
7142 # As a special exception to the GNU General Public License, if you
7143 # distribute this file as part of a program that contains a
7144 # configuration script generated by Autoconf, you may include it under
7145 # the same distribution terms that you use for the rest of that program.
7146
7147 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7148 Xsed="sed -e s/^X//"
7149
7150 # The HP-UX ksh and POSIX shell print the target directory to stdout
7151 # if CDPATH is set.
7152 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7153
7154 # ### BEGIN LIBTOOL CONFIG
7155
7156 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7157
7158 # Shell to use when invoking shell scripts.
7159 SHELL=$lt_SHELL
7160
7161 # Whether or not to build shared libraries.
7162 build_libtool_libs=$enable_shared
7163
7164 # Whether or not to build static libraries.
7165 build_old_libs=$enable_static
7166
7167 # Whether or not to add -lc for building shared libraries.
7168 build_libtool_need_lc=$need_lc
7169
7170 # Whether or not to optimize for fast installation.
7171 fast_install=$enable_fast_install
7172
7173 # The host system.
7174 host_alias=$host_alias
7175 host=$host
7176
7177 # An echo program that does not interpret backslashes.
7178 echo=$lt_echo
7179
7180 # The archiver.
7181 AR=$lt_AR
7182 AR_FLAGS=$lt_AR_FLAGS
7183
7184 # The default C compiler.
7185 CC=$lt_CC
7186
7187 # Is the compiler the GNU C compiler?
7188 with_gcc=$GCC
7189
7190 # The linker used to build libraries.
7191 LD=$lt_LD
7192
7193 # Whether we need hard or soft links.
7194 LN_S=$lt_LN_S
7195
7196 # A BSD-compatible nm program.
7197 NM=$lt_NM
7198
7199 # A symbol stripping program
7200 STRIP=$STRIP
7201
7202 # Used to examine libraries when file_magic_cmd begins "file"
7203 MAGIC_CMD=$MAGIC_CMD
7204
7205 # Used on cygwin: DLL creation program.
7206 DLLTOOL="$DLLTOOL"
7207
7208 # Used on cygwin: object dumper.
7209 OBJDUMP="$OBJDUMP"
7210
7211 # Used on cygwin: assembler.
7212 AS="$AS"
7213
7214 # The name of the directory that contains temporary libtool files.
7215 objdir=$objdir
7216
7217 # How to create reloadable object files.
7218 reload_flag=$lt_reload_flag
7219 reload_cmds=$lt_reload_cmds
7220
7221 # How to pass a linker flag through the compiler.
7222 wl=$lt_wl
7223
7224 # Object file suffix (normally "o").
7225 objext="$ac_objext"
7226
7227 # Old archive suffix (normally "a").
7228 libext="$libext"
7229
7230 # Executable file suffix (normally "").
7231 exeext="$exeext"
7232
7233 # Additional compiler flags for building library objects.
7234 pic_flag=$lt_pic_flag
7235 pic_mode=$pic_mode
7236
7237 # Does compiler simultaneously support -c and -o options?
7238 compiler_c_o=$lt_compiler_c_o
7239
7240 # Can we write directly to a .lo ?
7241 compiler_o_lo=$lt_compiler_o_lo
7242
7243 # Must we lock files when doing compilation ?
7244 need_locks=$lt_need_locks
7245
7246 # Do we need the lib prefix for modules?
7247 need_lib_prefix=$need_lib_prefix
7248
7249 # Do we need a version for libraries?
7250 need_version=$need_version
7251
7252 # Whether dlopen is supported.
7253 dlopen_support=$enable_dlopen
7254
7255 # Whether dlopen of programs is supported.
7256 dlopen_self=$enable_dlopen_self
7257
7258 # Whether dlopen of statically linked programs is supported.
7259 dlopen_self_static=$enable_dlopen_self_static
7260
7261 # Compiler flag to prevent dynamic linking.
7262 link_static_flag=$lt_link_static_flag
7263
7264 # Compiler flag to turn off builtin functions.
7265 no_builtin_flag=$lt_no_builtin_flag
7266
7267 # Compiler flag to allow reflexive dlopens.
7268 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7269
7270 # Compiler flag to generate shared objects directly from archives.
7271 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7272
7273 # Compiler flag to generate thread-safe objects.
7274 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7275
7276 # Library versioning type.
7277 version_type=$version_type
7278
7279 # Format of library name prefix.
7280 libname_spec=$lt_libname_spec
7281
7282 # List of archive names.  First name is the real one, the rest are links.
7283 # The last name is the one that the linker finds with -lNAME.
7284 library_names_spec=$lt_library_names_spec
7285
7286 # The coded name of the library, if different from the real name.
7287 soname_spec=$lt_soname_spec
7288
7289 # Commands used to build and install an old-style archive.
7290 RANLIB=$lt_RANLIB
7291 old_archive_cmds=$lt_old_archive_cmds
7292 old_postinstall_cmds=$lt_old_postinstall_cmds
7293 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7294
7295 # Create an old-style archive from a shared archive.
7296 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7297
7298 # Create a temporary old-style archive to link instead of a shared archive.
7299 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7300
7301 # Commands used to build and install a shared archive.
7302 archive_cmds=$lt_archive_cmds
7303 archive_expsym_cmds=$lt_archive_expsym_cmds
7304 postinstall_cmds=$lt_postinstall_cmds
7305 postuninstall_cmds=$lt_postuninstall_cmds
7306
7307 # Commands to strip libraries.
7308 old_striplib=$lt_old_striplib
7309 striplib=$lt_striplib
7310
7311 # Method to check whether dependent libraries are shared objects.
7312 deplibs_check_method=$lt_deplibs_check_method
7313
7314 # Command to use when deplibs_check_method == file_magic.
7315 file_magic_cmd=$lt_file_magic_cmd
7316
7317 # Flag that allows shared libraries with undefined symbols to be built.
7318 allow_undefined_flag=$lt_allow_undefined_flag
7319
7320 # Flag that forces no undefined symbols.
7321 no_undefined_flag=$lt_no_undefined_flag
7322
7323 # Commands used to finish a libtool library installation in a directory.
7324 finish_cmds=$lt_finish_cmds
7325
7326 # Same as above, but a single script fragment to be evaled but not shown.
7327 finish_eval=$lt_finish_eval
7328
7329 # Take the output of nm and produce a listing of raw symbols and C names.
7330 global_symbol_pipe=$lt_global_symbol_pipe
7331
7332 # Transform the output of nm in a proper C declaration
7333 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7334
7335 # Transform the output of nm in a C name address pair
7336 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7337
7338 # This is the shared library runtime path variable.
7339 runpath_var=$runpath_var
7340
7341 # This is the shared library path variable.
7342 shlibpath_var=$shlibpath_var
7343
7344 # Is shlibpath searched before the hard-coded library search path?
7345 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7346
7347 # How to hardcode a shared library path into an executable.
7348 hardcode_action=$hardcode_action
7349
7350 # Whether we should hardcode library paths into libraries.
7351 hardcode_into_libs=$hardcode_into_libs
7352
7353 # Flag to hardcode \$libdir into a binary during linking.
7354 # This must work even if \$libdir does not exist.
7355 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7356
7357 # Whether we need a single -rpath flag with a separated argument.
7358 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7359
7360 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7361 # resulting binary.
7362 hardcode_direct=$hardcode_direct
7363
7364 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7365 # resulting binary.
7366 hardcode_minus_L=$hardcode_minus_L
7367
7368 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7369 # the resulting binary.
7370 hardcode_shlibpath_var=$hardcode_shlibpath_var
7371
7372 # Variables whose values should be saved in libtool wrapper scripts and
7373 # restored at relink time.
7374 variables_saved_for_relink="$variables_saved_for_relink"
7375
7376 # Whether libtool must link a program against all its dependency libraries.
7377 link_all_deplibs=$link_all_deplibs
7378
7379 # Compile-time system search path for libraries
7380 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7381
7382 # Run-time system search path for libraries
7383 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7384
7385 # Fix the shell variable \$srcfile for the compiler.
7386 fix_srcfile_path="$fix_srcfile_path"
7387
7388 # Set to yes if exported symbols are required.
7389 always_export_symbols=$always_export_symbols
7390
7391 # The commands to list exported symbols.
7392 export_symbols_cmds=$lt_export_symbols_cmds
7393
7394 # The commands to extract the exported symbol list from a shared archive.
7395 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7396
7397 # Symbols that should not be listed in the preloaded symbols.
7398 exclude_expsyms=$lt_exclude_expsyms
7399
7400 # Symbols that must always be exported.
7401 include_expsyms=$lt_include_expsyms
7402
7403 # ### END LIBTOOL CONFIG
7404
7405 __EOF__
7406
7407   case $host_os in
7408   aix3*)
7409     cat <<\EOF >> "${ofile}T"
7410
7411 # AIX sometimes has problems with the GCC collect2 program.  For some
7412 # reason, if we set the COLLECT_NAMES environment variable, the problems
7413 # vanish in a puff of smoke.
7414 if test "X${COLLECT_NAMES+set}" != Xset; then
7415   COLLECT_NAMES=
7416   export COLLECT_NAMES
7417 fi
7418 EOF
7419     ;;
7420   esac
7421
7422   case $host_os in
7423   cygwin* | mingw* | pw32* | os2*)
7424     cat <<'EOF' >> "${ofile}T"
7425       # This is a source program that is used to create dlls on Windows
7426       # Don't remove nor modify the starting and closing comments
7427 # /* ltdll.c starts here */
7428 # #define WIN32_LEAN_AND_MEAN
7429 # #include <windows.h>
7430 # #undef WIN32_LEAN_AND_MEAN
7431 # #include <stdio.h>
7432 #
7433 # #ifndef __CYGWIN__
7434 # #  ifdef __CYGWIN32__
7435 # #    define __CYGWIN__ __CYGWIN32__
7436 # #  endif
7437 # #endif
7438 #
7439 # #ifdef __cplusplus
7440 # extern "C" {
7441 # #endif
7442 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7443 # #ifdef __cplusplus
7444 # }
7445 # #endif
7446 #
7447 # #ifdef __CYGWIN__
7448 # #include <cygwin/cygwin_dll.h>
7449 # DECLARE_CYGWIN_DLL( DllMain );
7450 # #endif
7451 # HINSTANCE __hDllInstance_base;
7452 #
7453 # BOOL APIENTRY
7454 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7455 # {
7456 #   __hDllInstance_base = hInst;
7457 #   return TRUE;
7458 # }
7459 # /* ltdll.c ends here */
7460         # This is a source program that is used to create import libraries
7461         # on Windows for dlls which lack them. Don't remove nor modify the
7462         # starting and closing comments
7463 # /* impgen.c starts here */
7464 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7465 #
7466 #  This file is part of GNU libtool.
7467 #
7468 #  This program is free software; you can redistribute it and/or modify
7469 #  it under the terms of the GNU General Public License as published by
7470 #  the Free Software Foundation; either version 2 of the License, or
7471 #  (at your option) any later version.
7472 #
7473 #  This program is distributed in the hope that it will be useful,
7474 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7475 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7476 #  GNU General Public License for more details.
7477 #
7478 #  You should have received a copy of the GNU General Public License
7479 #  along with this program; if not, write to the Free Software
7480 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7481 #  */
7482 #
7483 # #include <stdio.h>            /* for printf() */
7484 # #include <unistd.h>           /* for open(), lseek(), read() */
7485 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7486 # #include <string.h>           /* for strdup() */
7487 #
7488 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7489 # #ifndef O_BINARY
7490 # #define O_BINARY 0
7491 # #endif
7492 #
7493 # static unsigned int
7494 # pe_get16 (fd, offset)
7495 #      int fd;
7496 #      int offset;
7497 # {
7498 #   unsigned char b[2];
7499 #   lseek (fd, offset, SEEK_SET);
7500 #   read (fd, b, 2);
7501 #   return b[0] + (b[1]<<8);
7502 # }
7503 #
7504 # static unsigned int
7505 # pe_get32 (fd, offset)
7506 #     int fd;
7507 #     int offset;
7508 # {
7509 #   unsigned char b[4];
7510 #   lseek (fd, offset, SEEK_SET);
7511 #   read (fd, b, 4);
7512 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7513 # }
7514 #
7515 # static unsigned int
7516 # pe_as32 (ptr)
7517 #      void *ptr;
7518 # {
7519 #   unsigned char *b = ptr;
7520 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7521 # }
7522 #
7523 # int
7524 # main (argc, argv)
7525 #     int argc;
7526 #     char *argv[];
7527 # {
7528 #     int dll;
7529 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7530 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7531 #     unsigned long name_rvas, nexp;
7532 #     unsigned char *expdata, *erva;
7533 #     char *filename, *dll_name;
7534 #
7535 #     filename = argv[1];
7536 #
7537 #     dll = open(filename, O_RDONLY|O_BINARY);
7538 #     if (dll < 1)
7539 #       return 1;
7540 #
7541 #     dll_name = filename;
7542 #
7543 #     for (i=0; filename[i]; i++)
7544 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7545 #           dll_name = filename + i +1;
7546 #
7547 #     pe_header_offset = pe_get32 (dll, 0x3c);
7548 #     opthdr_ofs = pe_header_offset + 4 + 20;
7549 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7550 #
7551 #     if (num_entries < 1) /* no exports */
7552 #       return 1;
7553 #
7554 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7555 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7556 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7557 #     secptr = (pe_header_offset + 4 + 20 +
7558 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7559 #
7560 #     expptr = 0;
7561 #     for (i = 0; i < nsections; i++)
7562 #     {
7563 #       char sname[8];
7564 #       unsigned long secptr1 = secptr + 40 * i;
7565 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7566 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7567 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7568 #       lseek(dll, secptr1, SEEK_SET);
7569 #       read(dll, sname, 8);
7570 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7571 #       {
7572 #           expptr = fptr + (export_rva - vaddr);
7573 #           if (export_rva + export_size > vaddr + vsize)
7574 #               export_size = vsize - (export_rva - vaddr);
7575 #           break;
7576 #       }
7577 #     }
7578 #
7579 #     expdata = (unsigned char*)malloc(export_size);
7580 #     lseek (dll, expptr, SEEK_SET);
7581 #     read (dll, expdata, export_size);
7582 #     erva = expdata - export_rva;
7583 #
7584 #     nexp = pe_as32 (expdata+24);
7585 #     name_rvas = pe_as32 (expdata+32);
7586 #
7587 #     printf ("EXPORTS\n");
7588 #     for (i = 0; i<nexp; i++)
7589 #     {
7590 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7591 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7592 #     }
7593 #
7594 #     return 0;
7595 # }
7596 # /* impgen.c ends here */
7597
7598 EOF
7599     ;;
7600   esac
7601
7602   # We use sed instead of cat because bash on DJGPP gets confused if
7603   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7604   # text mode, it properly converts lines to CR/LF.  This bash problem
7605   # is reportedly fixed, but why not run on old versions too?
7606   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7607
7608   mv -f "${ofile}T" "$ofile" || \
7609     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7610   chmod +x "$ofile"
7611 fi
7612
7613
7614
7615
7616
7617 # This can be used to rebuild libtool when needed
7618 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7619
7620 # Always use our own libtool.
7621 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7622
7623 # Prevent multiple expansion
7624
7625
7626
7627 for ac_prog in mawk gawk nawk awk
7628 do
7629 # Extract the first word of "$ac_prog", so it can be a program name with args.
7630 set dummy $ac_prog; ac_word=$2
7631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7632 echo "configure:7633: checking for $ac_word" >&5
7633 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7634   echo $ac_n "(cached) $ac_c" 1>&6
7635 else
7636   if test -n "$AWK"; then
7637   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7638 else
7639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7640   ac_dummy="$PATH"
7641   for ac_dir in $ac_dummy; do
7642     test -z "$ac_dir" && ac_dir=.
7643     if test -f $ac_dir/$ac_word; then
7644       ac_cv_prog_AWK="$ac_prog"
7645       break
7646     fi
7647   done
7648   IFS="$ac_save_ifs"
7649 fi
7650 fi
7651 AWK="$ac_cv_prog_AWK"
7652 if test -n "$AWK"; then
7653   echo "$ac_t""$AWK" 1>&6
7654 else
7655   echo "$ac_t""no" 1>&6
7656 fi
7657
7658 test -n "$AWK" && break
7659 done
7660
7661 # test for ln hardlink support
7662 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7663 echo "configure:7664: checking whether ln works" >&5
7664 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7665   echo $ac_n "(cached) $ac_c" 1>&6
7666 else
7667   rm -f conftest.src conftest.dst
7668 echo "conftest" > conftest.src
7669 if ln conftest.src conftest.dst 2>/dev/null
7670 then
7671   ol_cv_prog_LN_H="ln"
7672 else
7673   ol_cv_prog_LN_H="cp"
7674 fi
7675 rm -f conftest.src conftest.dst
7676
7677 fi
7678 LN_H="$ol_cv_prog_LN_H"
7679 if test "$ol_cv_prog_LN_H" = "ln"; then
7680         echo "$ac_t""yes" 1>&6
7681 else
7682         echo "$ac_t""no" 1>&6
7683 fi
7684
7685 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7686 echo "configure:7687: checking whether ln -s works" >&5
7687 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7688   echo $ac_n "(cached) $ac_c" 1>&6
7689 else
7690   rm -f conftestdata
7691 if ln -s X conftestdata 2>/dev/null
7692 then
7693   rm -f conftestdata
7694   ac_cv_prog_LN_S="ln -s"
7695 else
7696   ac_cv_prog_LN_S=ln
7697 fi
7698 fi
7699 LN_S="$ac_cv_prog_LN_S"
7700 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7701   echo "$ac_t""yes" 1>&6
7702 else
7703   echo "$ac_t""no" 1>&6
7704 fi
7705
7706
7707 # Extract the first word of "sendmail", so it can be a program name with args.
7708 set dummy sendmail; ac_word=$2
7709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7710 echo "configure:7711: checking for $ac_word" >&5
7711 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7712   echo $ac_n "(cached) $ac_c" 1>&6
7713 else
7714   case "$SENDMAIL" in
7715   /*)
7716   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7717   ;;
7718   ?:/*)
7719   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7720   ;;
7721   *)
7722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7723   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7724   for ac_dir in $ac_dummy; do 
7725     test -z "$ac_dir" && ac_dir=.
7726     if test -f $ac_dir/$ac_word; then
7727       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7728       break
7729     fi
7730   done
7731   IFS="$ac_save_ifs"
7732   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7733   ;;
7734 esac
7735 fi
7736 SENDMAIL="$ac_cv_path_SENDMAIL"
7737 if test -n "$SENDMAIL"; then
7738   echo "$ac_t""$SENDMAIL" 1>&6
7739 else
7740   echo "$ac_t""no" 1>&6
7741 fi
7742
7743 # Extract the first word of "vi", so it can be a program name with args.
7744 set dummy vi; ac_word=$2
7745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7746 echo "configure:7747: checking for $ac_word" >&5
7747 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7748   echo $ac_n "(cached) $ac_c" 1>&6
7749 else
7750   case "$EDITOR" in
7751   /*)
7752   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7753   ;;
7754   ?:/*)
7755   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7756   ;;
7757   *)
7758   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7759   ac_dummy="$PATH:/usr/ucb"
7760   for ac_dir in $ac_dummy; do 
7761     test -z "$ac_dir" && ac_dir=.
7762     if test -f $ac_dir/$ac_word; then
7763       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7764       break
7765     fi
7766   done
7767   IFS="$ac_save_ifs"
7768   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7769   ;;
7770 esac
7771 fi
7772 EDITOR="$ac_cv_path_EDITOR"
7773 if test -n "$EDITOR"; then
7774   echo "$ac_t""$EDITOR" 1>&6
7775 else
7776   echo "$ac_t""no" 1>&6
7777 fi
7778
7779
7780 ol_link_perl=no
7781 if test $ol_enable_perl != no ; then
7782         # Extract the first word of "perl", so it can be a program name with args.
7783 set dummy perl; ac_word=$2
7784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7785 echo "configure:7786: checking for $ac_word" >&5
7786 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789   case "$PERLBIN" in
7790   /*)
7791   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7792   ;;
7793   ?:/*)
7794   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7795   ;;
7796   *)
7797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7798   ac_dummy="$PATH"
7799   for ac_dir in $ac_dummy; do 
7800     test -z "$ac_dir" && ac_dir=.
7801     if test -f $ac_dir/$ac_word; then
7802       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7803       break
7804     fi
7805   done
7806   IFS="$ac_save_ifs"
7807   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7808   ;;
7809 esac
7810 fi
7811 PERLBIN="$ac_cv_path_PERLBIN"
7812 if test -n "$PERLBIN"; then
7813   echo "$ac_t""$PERLBIN" 1>&6
7814 else
7815   echo "$ac_t""no" 1>&6
7816 fi
7817
7818
7819         if test "no$PERLBIN" = "no" ; then
7820                 if test $ol_enable_perl = yes ; then
7821                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7822                 fi
7823
7824         else
7825                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7826                 if test x"$ol_with_perl_module" = "xstatic" ; then
7827                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7828                 else
7829                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7830                 fi
7831                                 ol_link_perl=yes
7832         fi
7833 fi
7834
7835 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7836 echo "configure:7837: checking how to run the C preprocessor" >&5
7837 # On Suns, sometimes $CPP names a directory.
7838 if test -n "$CPP" && test -d "$CPP"; then
7839   CPP=
7840 fi
7841 if test -z "$CPP"; then
7842 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7843   echo $ac_n "(cached) $ac_c" 1>&6
7844 else
7845     # This must be in double quotes, not single quotes, because CPP may get
7846   # substituted into the Makefile and "${CC-cc}" will confuse make.
7847   CPP="${CC-cc} -E"
7848   # On the NeXT, cc -E runs the code through the compiler's parser,
7849   # not just through cpp.
7850   cat > conftest.$ac_ext <<EOF
7851 #line 7852 "configure"
7852 #include "confdefs.h"
7853 #include <assert.h>
7854 Syntax Error
7855 EOF
7856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7857 { (eval echo configure:7858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7859 if test -z "$ac_err"; then
7860   :
7861 else
7862   echo "$ac_err" >&5
7863   echo "configure: failed program was:" >&5
7864   cat conftest.$ac_ext >&5
7865   rm -rf conftest*
7866   CPP="${CC-cc} -E -traditional-cpp"
7867   cat > conftest.$ac_ext <<EOF
7868 #line 7869 "configure"
7869 #include "confdefs.h"
7870 #include <assert.h>
7871 Syntax Error
7872 EOF
7873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7874 { (eval echo configure:7875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7876 if test -z "$ac_err"; then
7877   :
7878 else
7879   echo "$ac_err" >&5
7880   echo "configure: failed program was:" >&5
7881   cat conftest.$ac_ext >&5
7882   rm -rf conftest*
7883   CPP="${CC-cc} -nologo -E"
7884   cat > conftest.$ac_ext <<EOF
7885 #line 7886 "configure"
7886 #include "confdefs.h"
7887 #include <assert.h>
7888 Syntax Error
7889 EOF
7890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7891 { (eval echo configure:7892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7893 if test -z "$ac_err"; then
7894   :
7895 else
7896   echo "$ac_err" >&5
7897   echo "configure: failed program was:" >&5
7898   cat conftest.$ac_ext >&5
7899   rm -rf conftest*
7900   CPP=/lib/cpp
7901 fi
7902 rm -f conftest*
7903 fi
7904 rm -f conftest*
7905 fi
7906 rm -f conftest*
7907   ac_cv_prog_CPP="$CPP"
7908 fi
7909   CPP="$ac_cv_prog_CPP"
7910 else
7911   ac_cv_prog_CPP="$CPP"
7912 fi
7913 echo "$ac_t""$CPP" 1>&6
7914
7915
7916 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7917         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7918
7919 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7920         echo "configure: warning: programs compiled here do run here..." 1>&2
7921         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7922
7923 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7924         echo "configure: warning: programs compiled here do not run here..." 1>&2
7925         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7926 fi
7927
7928
7929 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7930 echo "configure:7931: checking for Cygwin environment" >&5
7931 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7932   echo $ac_n "(cached) $ac_c" 1>&6
7933 else
7934   cat > conftest.$ac_ext <<EOF
7935 #line 7936 "configure"
7936 #include "confdefs.h"
7937
7938 int main() {
7939
7940 #ifndef __CYGWIN__
7941 #define __CYGWIN__ __CYGWIN32__
7942 #endif
7943 return __CYGWIN__;
7944 ; return 0; }
7945 EOF
7946 if { (eval echo configure:7947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7947   rm -rf conftest*
7948   ac_cv_cygwin=yes
7949 else
7950   echo "configure: failed program was:" >&5
7951   cat conftest.$ac_ext >&5
7952   rm -rf conftest*
7953   ac_cv_cygwin=no
7954 fi
7955 rm -f conftest*
7956 fi
7957
7958 echo "$ac_t""$ac_cv_cygwin" 1>&6
7959 CYGWIN=
7960 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7961 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7962 echo "configure:7963: checking for mingw32 environment" >&5
7963 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7964   echo $ac_n "(cached) $ac_c" 1>&6
7965 else
7966   cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969
7970 int main() {
7971 return __MINGW32__;
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   rm -rf conftest*
7976   ac_cv_mingw32=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   ac_cv_mingw32=no
7982 fi
7983 rm -f conftest*
7984 fi
7985
7986 echo "$ac_t""$ac_cv_mingw32" 1>&6
7987 MINGW32=
7988 test "$ac_cv_mingw32" = yes && MINGW32=yes
7989
7990
7991
7992 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7993 echo "configure:7994: checking for executable suffix" >&5
7994 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7995   echo $ac_n "(cached) $ac_c" 1>&6
7996 else
7997   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7998   ac_cv_exeext=.exe
7999 else
8000   rm -f conftest*
8001   echo 'int main () { return 0; }' > conftest.$ac_ext
8002   ac_cv_exeext=
8003   if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8004     for file in conftest.*; do
8005       case $file in
8006       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8007       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8008       esac
8009     done
8010   else
8011     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8012   fi
8013   rm -f conftest*
8014   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8015 fi
8016 fi
8017
8018 EXEEXT=""
8019 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8020 echo "$ac_t""${ac_cv_exeext}" 1>&6
8021 ac_exeext=$EXEEXT
8022
8023 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8024 echo "configure:8025: checking for object suffix" >&5
8025 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8026   echo $ac_n "(cached) $ac_c" 1>&6
8027 else
8028   rm -f conftest*
8029 echo 'int i = 1;' > conftest.$ac_ext
8030 if { (eval echo configure:8031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8031   for ac_file in conftest.*; do
8032     case $ac_file in
8033     *.c) ;;
8034     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8035     esac
8036   done
8037 else
8038   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8039 fi
8040 rm -f conftest*
8041 fi
8042
8043 echo "$ac_t""$ac_cv_objext" 1>&6
8044 OBJEXT=$ac_cv_objext
8045 ac_objext=$ac_cv_objext
8046
8047
8048 cat >> confdefs.h <<EOF
8049 #define EXEEXT "${EXEEXT}"
8050 EOF
8051
8052
8053 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8054 echo "configure:8055: checking for be_app in -lbe" >&5
8055 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   ac_save_LIBS="$LIBS"
8060 LIBS="-lbe -lroot -lnet $LIBS"
8061 cat > conftest.$ac_ext <<EOF
8062 #line 8063 "configure"
8063 #include "confdefs.h"
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char be_app();
8068
8069 int main() {
8070 be_app()
8071 ; return 0; }
8072 EOF
8073 if { (eval echo configure:8074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8074   rm -rf conftest*
8075   eval "ac_cv_lib_$ac_lib_var=yes"
8076 else
8077   echo "configure: failed program was:" >&5
8078   cat conftest.$ac_ext >&5
8079   rm -rf conftest*
8080   eval "ac_cv_lib_$ac_lib_var=no"
8081 fi
8082 rm -f conftest*
8083 LIBS="$ac_save_LIBS"
8084
8085 fi
8086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8087   echo "$ac_t""yes" 1>&6
8088   LIBS="$LIBS -lbe -lroot -lnet"
8089 else
8090   echo "$ac_t""no" 1>&6
8091 :
8092 fi
8093
8094
8095
8096
8097
8098 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8099 echo "configure:8100: checking for ${CC-cc} option to accept ANSI C" >&5
8100 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8101   echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103   am_cv_prog_cc_stdc=no
8104 ac_save_CC="$CC"
8105 # Don't try gcc -ansi; that turns off useful extensions and
8106 # breaks some systems' header files.
8107 # AIX                   -qlanglvl=ansi
8108 # Ultrix and OSF/1      -std1
8109 # HP-UX 10.20 and later -Ae
8110 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8111 # SVR4                  -Xc -D__EXTENSIONS__
8112 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8113 do
8114   CC="$ac_save_CC $ac_arg"
8115   cat > conftest.$ac_ext <<EOF
8116 #line 8117 "configure"
8117 #include "confdefs.h"
8118 #include <stdarg.h>
8119 #include <stdio.h>
8120 #include <sys/types.h>
8121 #include <sys/stat.h>
8122 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8123 struct buf { int x; };
8124 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8125 static char *e (p, i)
8126      char **p;
8127      int i;
8128 {
8129   return p[i];
8130 }
8131 static char *f (char * (*g) (char **, int), char **p, ...)
8132 {
8133   char *s;
8134   va_list v;
8135   va_start (v,p);
8136   s = g (p, va_arg (v,int));
8137   va_end (v);
8138   return s;
8139 }
8140 int test (int i, double x);
8141 struct s1 {int (*f) (int a);};
8142 struct s2 {int (*f) (double a);};
8143 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8144 int argc;
8145 char **argv;
8146
8147 int main() {
8148
8149 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8150
8151 ; return 0; }
8152 EOF
8153 if { (eval echo configure:8154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8154   rm -rf conftest*
8155   am_cv_prog_cc_stdc="$ac_arg"; break
8156 else
8157   echo "configure: failed program was:" >&5
8158   cat conftest.$ac_ext >&5
8159 fi
8160 rm -f conftest*
8161 done
8162 CC="$ac_save_CC"
8163
8164 fi
8165
8166 if test -z "$am_cv_prog_cc_stdc"; then
8167   echo "$ac_t""none needed" 1>&6
8168 else
8169   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8170 fi
8171 case "x$am_cv_prog_cc_stdc" in
8172   x|xno) ;;
8173   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8174 esac
8175
8176 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8177         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8178 fi
8179
8180 # test for make depend flag
8181 OL_MKDEP=
8182 OL_MKDEP_FLAGS=
8183 if test -z "${MKDEP}"; then
8184         OL_MKDEP="${CC-cc}"
8185         if test -z "${MKDEP_FLAGS}"; then
8186                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8187 echo "configure:8188: checking for ${OL_MKDEP} depend flag" >&5
8188 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8189   echo $ac_n "(cached) $ac_c" 1>&6
8190 else
8191   
8192                         ol_cv_mkdep=no
8193                         for flag in "-M" "-xM"; do
8194                                 cat > conftest.c <<EOF
8195  noCode;
8196 EOF
8197                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8198                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8199                                 then
8200                                         if test ! -f conftest."${ac_object}" ; then
8201                                                 ol_cv_mkdep=$flag
8202                                                 OL_MKDEP_FLAGS="$flag"
8203                                                 break
8204                                         fi
8205                                 fi
8206                         done
8207                         rm -f conftest*
8208                 
8209 fi
8210
8211 echo "$ac_t""$ol_cv_mkdep" 1>&6
8212         else
8213                 cc_cv_mkdep=yes
8214                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8215         fi
8216 else
8217         cc_cv_mkdep=yes
8218         OL_MKDEP="${MKDEP}"
8219         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8220 fi
8221
8222
8223
8224 if test "${ol_cv_mkdep}" = no ; then
8225         # this will soon become an error
8226         echo "configure: warning: do not know how to generate dependencies" 1>&2
8227 fi
8228
8229 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8230 echo "configure:8231: checking for afopen in -ls" >&5
8231 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8233   echo $ac_n "(cached) $ac_c" 1>&6
8234 else
8235   ac_save_LIBS="$LIBS"
8236 LIBS="-ls  $LIBS"
8237 cat > conftest.$ac_ext <<EOF
8238 #line 8239 "configure"
8239 #include "confdefs.h"
8240 /* Override any gcc2 internal prototype to avoid an error.  */
8241 /* We use char because int might match the return type of a gcc2
8242     builtin and then its argument prototype would still apply.  */
8243 char afopen();
8244
8245 int main() {
8246 afopen()
8247 ; return 0; }
8248 EOF
8249 if { (eval echo configure:8250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8250   rm -rf conftest*
8251   eval "ac_cv_lib_$ac_lib_var=yes"
8252 else
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -rf conftest*
8256   eval "ac_cv_lib_$ac_lib_var=no"
8257 fi
8258 rm -f conftest*
8259 LIBS="$ac_save_LIBS"
8260
8261 fi
8262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8263   echo "$ac_t""yes" 1>&6
8264   
8265         AUTH_LIBS=-ls
8266         cat >> confdefs.h <<\EOF
8267 #define HAVE_AIX_SECURITY 1
8268 EOF
8269
8270
8271 else
8272   echo "$ac_t""no" 1>&6
8273 fi
8274
8275
8276
8277 ol_link_modules=no
8278 if test $ol_enable_modules != no ; then
8279         for ac_hdr in ltdl.h
8280 do
8281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8283 echo "configure:8284: checking for $ac_hdr" >&5
8284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   cat > conftest.$ac_ext <<EOF
8288 #line 8289 "configure"
8289 #include "confdefs.h"
8290 #include <$ac_hdr>
8291 EOF
8292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8293 { (eval echo configure:8294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8295 if test -z "$ac_err"; then
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=yes"
8298 else
8299   echo "$ac_err" >&5
8300   echo "configure: failed program was:" >&5
8301   cat conftest.$ac_ext >&5
8302   rm -rf conftest*
8303   eval "ac_cv_header_$ac_safe=no"
8304 fi
8305 rm -f conftest*
8306 fi
8307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8308   echo "$ac_t""yes" 1>&6
8309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8310   cat >> confdefs.h <<EOF
8311 #define $ac_tr_hdr 1
8312 EOF
8313  
8314 else
8315   echo "$ac_t""no" 1>&6
8316 fi
8317 done
8318
8319
8320         if test $ac_cv_header_ltdl_h = no ; then
8321                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8322         fi
8323
8324         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8325 echo "configure:8326: checking for lt_dlinit in -lltdl" >&5
8326 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   ac_save_LIBS="$LIBS"
8331 LIBS="-lltdl  $LIBS"
8332 cat > conftest.$ac_ext <<EOF
8333 #line 8334 "configure"
8334 #include "confdefs.h"
8335 /* Override any gcc2 internal prototype to avoid an error.  */
8336 /* We use char because int might match the return type of a gcc2
8337     builtin and then its argument prototype would still apply.  */
8338 char lt_dlinit();
8339
8340 int main() {
8341 lt_dlinit()
8342 ; return 0; }
8343 EOF
8344 if { (eval echo configure:8345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8345   rm -rf conftest*
8346   eval "ac_cv_lib_$ac_lib_var=yes"
8347 else
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_lib_$ac_lib_var=no"
8352 fi
8353 rm -f conftest*
8354 LIBS="$ac_save_LIBS"
8355
8356 fi
8357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8358   echo "$ac_t""yes" 1>&6
8359   
8360                 MODULES_LIBS=-lltdl
8361                 cat >> confdefs.h <<\EOF
8362 #define HAVE_LIBLTDL 1
8363 EOF
8364
8365         
8366 else
8367   echo "$ac_t""no" 1>&6
8368 fi
8369
8370
8371         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8372                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8373         fi
8374         ol_link_modules=yes
8375 else
8376         ol_with_bdb_module=static
8377         ol_with_dnssrv_module=static
8378         ol_with_ldap_module=static
8379         ol_with_ldbm_module=static
8380         ol_with_meta_module=static
8381         ol_with_monitor_module=static
8382         ol_with_null_module=static
8383         ol_with_passwd_module=static
8384         ol_with_perl_module=static
8385         ol_with_shell_module=static
8386         ol_with_sql_module=static
8387 fi
8388
8389 # test for EBCDIC
8390 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8391 echo "configure:8392: checking for EBCDIC" >&5
8392 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8393   echo $ac_n "(cached) $ac_c" 1>&6
8394 else
8395   
8396         cat > conftest.$ac_ext <<EOF
8397 #line 8398 "configure"
8398 #include "confdefs.h"
8399
8400 #if !('M' == 0xd4)
8401 #include <__ASCII__/generate_error.h>
8402 #endif
8403
8404 EOF
8405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8406 { (eval echo configure:8407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8408 if test -z "$ac_err"; then
8409   rm -rf conftest*
8410   ol_cv_cpp_ebcdic=yes
8411 else
8412   echo "$ac_err" >&5
8413   echo "configure: failed program was:" >&5
8414   cat conftest.$ac_ext >&5
8415   rm -rf conftest*
8416   ol_cv_cpp_ebcdic=no
8417 fi
8418 rm -f conftest*
8419 fi
8420
8421 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8422 if test $ol_cv_cpp_ebcdic = yes ; then
8423         cat >> confdefs.h <<\EOF
8424 #define HAVE_EBCDIC 1
8425 EOF
8426
8427 fi
8428
8429 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8430 echo "configure:8431: checking for ANSI C header files" >&5
8431 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8432   echo $ac_n "(cached) $ac_c" 1>&6
8433 else
8434   cat > conftest.$ac_ext <<EOF
8435 #line 8436 "configure"
8436 #include "confdefs.h"
8437 #include <stdlib.h>
8438 #include <stdarg.h>
8439 #include <string.h>
8440 #include <float.h>
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_header_stdc=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_header_stdc=no
8454 fi
8455 rm -f conftest*
8456
8457 if test $ol_cv_header_stdc = yes; then
8458   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8459 cat > conftest.$ac_ext <<EOF
8460 #line 8461 "configure"
8461 #include "confdefs.h"
8462 #include <string.h>
8463 EOF
8464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8465   egrep "memchr" >/dev/null 2>&1; then
8466   :
8467 else
8468   rm -rf conftest*
8469   ol_cv_header_stdc=no
8470 fi
8471 rm -f conftest*
8472
8473 fi
8474
8475 if test $ol_cv_header_stdc = yes; then
8476   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8477 cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <stdlib.h>
8481 EOF
8482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8483   egrep "free" >/dev/null 2>&1; then
8484   :
8485 else
8486   rm -rf conftest*
8487   ol_cv_header_stdc=no
8488 fi
8489 rm -f conftest*
8490
8491 fi
8492
8493 if test $ol_cv_header_stdc = yes; then
8494   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8495 if test "$cross_compiling" = yes; then
8496   :
8497 else
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 #include <ctype.h>
8502 #ifndef HAVE_EBCDIC
8503 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8504 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8505 #else
8506 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8507                 || ('j' <= (c) && (c) <= 'r') \
8508                 || ('s' <= (c) && (c) <= 'z'))
8509 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8510 #endif
8511 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8512 int main () { int i; for (i = 0; i < 256; i++)
8513 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8514 exit (0); }
8515
8516 EOF
8517 if { (eval echo configure:8518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8518 then
8519   :
8520 else
8521   echo "configure: failed program was:" >&5
8522   cat conftest.$ac_ext >&5
8523   rm -fr conftest*
8524   ol_cv_header_stdc=no
8525 fi
8526 rm -fr conftest*
8527 fi
8528
8529 fi
8530 fi
8531
8532 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8533 if test $ol_cv_header_stdc = yes; then
8534   cat >> confdefs.h <<\EOF
8535 #define STDC_HEADERS 1
8536 EOF
8537
8538 fi
8539 ac_cv_header_stdc=disable
8540
8541
8542 if test $ol_cv_header_stdc != yes; then
8543         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8544 fi
8545
8546 ac_header_dirent=no
8547 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8548 do
8549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8550 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8551 echo "configure:8552: checking for $ac_hdr that defines DIR" >&5
8552 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8553   echo $ac_n "(cached) $ac_c" 1>&6
8554 else
8555   cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 #include <sys/types.h>
8559 #include <$ac_hdr>
8560 int main() {
8561 DIR *dirp = 0;
8562 ; return 0; }
8563 EOF
8564 if { (eval echo configure:8565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8565   rm -rf conftest*
8566   eval "ac_cv_header_dirent_$ac_safe=yes"
8567 else
8568   echo "configure: failed program was:" >&5
8569   cat conftest.$ac_ext >&5
8570   rm -rf conftest*
8571   eval "ac_cv_header_dirent_$ac_safe=no"
8572 fi
8573 rm -f conftest*
8574 fi
8575 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8576   echo "$ac_t""yes" 1>&6
8577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8578   cat >> confdefs.h <<EOF
8579 #define $ac_tr_hdr 1
8580 EOF
8581  ac_header_dirent=$ac_hdr; break
8582 else
8583   echo "$ac_t""no" 1>&6
8584 fi
8585 done
8586 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8587 if test $ac_header_dirent = dirent.h; then
8588 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8589 echo "configure:8590: checking for opendir in -ldir" >&5
8590 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   ac_save_LIBS="$LIBS"
8595 LIBS="-ldir  $LIBS"
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 /* Override any gcc2 internal prototype to avoid an error.  */
8600 /* We use char because int might match the return type of a gcc2
8601     builtin and then its argument prototype would still apply.  */
8602 char opendir();
8603
8604 int main() {
8605 opendir()
8606 ; return 0; }
8607 EOF
8608 if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=yes"
8611 else
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=no"
8616 fi
8617 rm -f conftest*
8618 LIBS="$ac_save_LIBS"
8619
8620 fi
8621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8622   echo "$ac_t""yes" 1>&6
8623   LIBS="$LIBS -ldir"
8624 else
8625   echo "$ac_t""no" 1>&6
8626 fi
8627
8628 else
8629 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8630 echo "configure:8631: checking for opendir in -lx" >&5
8631 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8632 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   ac_save_LIBS="$LIBS"
8636 LIBS="-lx  $LIBS"
8637 cat > conftest.$ac_ext <<EOF
8638 #line 8639 "configure"
8639 #include "confdefs.h"
8640 /* Override any gcc2 internal prototype to avoid an error.  */
8641 /* We use char because int might match the return type of a gcc2
8642     builtin and then its argument prototype would still apply.  */
8643 char opendir();
8644
8645 int main() {
8646 opendir()
8647 ; return 0; }
8648 EOF
8649 if { (eval echo configure:8650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=yes"
8652 else
8653   echo "configure: failed program was:" >&5
8654   cat conftest.$ac_ext >&5
8655   rm -rf conftest*
8656   eval "ac_cv_lib_$ac_lib_var=no"
8657 fi
8658 rm -f conftest*
8659 LIBS="$ac_save_LIBS"
8660
8661 fi
8662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8663   echo "$ac_t""yes" 1>&6
8664   LIBS="$LIBS -lx"
8665 else
8666   echo "$ac_t""no" 1>&6
8667 fi
8668
8669 fi
8670
8671 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8672 echo "configure:8673: checking for sys/wait.h that is POSIX.1 compatible" >&5
8673 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8674   echo $ac_n "(cached) $ac_c" 1>&6
8675 else
8676   cat > conftest.$ac_ext <<EOF
8677 #line 8678 "configure"
8678 #include "confdefs.h"
8679 #include <sys/types.h>
8680 #include <sys/wait.h>
8681 #ifndef WEXITSTATUS
8682 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8683 #endif
8684 #ifndef WIFEXITED
8685 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8686 #endif
8687 int main() {
8688 int s;
8689 wait (&s);
8690 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8691 ; return 0; }
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8694   rm -rf conftest*
8695   ac_cv_header_sys_wait_h=yes
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   ac_cv_header_sys_wait_h=no
8701 fi
8702 rm -f conftest*
8703 fi
8704
8705 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8706 if test $ac_cv_header_sys_wait_h = yes; then
8707   cat >> confdefs.h <<\EOF
8708 #define HAVE_SYS_WAIT_H 1
8709 EOF
8710
8711 fi
8712
8713 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8714 echo "configure:8715: checking POSIX termios" >&5
8715 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8716   echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718   cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 #include <sys/types.h>
8722 #include <unistd.h>
8723 #include <termios.h>
8724 int main() {
8725 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8726    tcgetattr(0, 0);
8727 ; return 0; }
8728 EOF
8729 if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8730   rm -rf conftest*
8731   am_cv_sys_posix_termios=yes
8732 else
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   am_cv_sys_posix_termios=no
8737 fi
8738 rm -f conftest*
8739 fi
8740
8741 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8742
8743
8744  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8745 echo "configure:8746: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8746 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8747   echo $ac_n "(cached) $ac_c" 1>&6
8748 else
8749   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8750
8751   gwinsz_in_termios_h=no
8752   if test $am_cv_sys_posix_termios = yes; then
8753     cat > conftest.$ac_ext <<EOF
8754 #line 8755 "configure"
8755 #include "confdefs.h"
8756 #include <sys/types.h>
8757 #     include <termios.h>
8758 #     ifdef TIOCGWINSZ
8759         yes
8760 #     endif
8761     
8762 EOF
8763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8764   egrep "yes" >/dev/null 2>&1; then
8765   rm -rf conftest*
8766   gwinsz_in_termios_h=yes
8767 fi
8768 rm -f conftest*
8769
8770   fi
8771
8772   if test $gwinsz_in_termios_h = no; then
8773     cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 #include <sys/types.h>
8777 #     include <sys/ioctl.h>
8778 #     ifdef TIOCGWINSZ
8779         yes
8780 #     endif
8781     
8782 EOF
8783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8784   egrep "yes" >/dev/null 2>&1; then
8785   rm -rf conftest*
8786   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8787 fi
8788 rm -f conftest*
8789
8790   fi
8791   
8792 fi
8793
8794 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8795   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8796     cat >> confdefs.h <<\EOF
8797 #define GWINSZ_IN_SYS_IOCTL 1
8798 EOF
8799
8800   fi
8801
8802 if test $am_cv_sys_posix_termios = yes ; then
8803         cat >> confdefs.h <<\EOF
8804 #define HAVE_POSIX_TERMIOS 1
8805 EOF
8806
8807 fi
8808
8809 for ac_hdr in \
8810         arpa/inet.h             \
8811         arpa/nameser.h  \
8812         assert.h                \
8813         conio.h                 \
8814         crypt.h                 \
8815         direct.h                \
8816         errno.h                 \
8817         fcntl.h                 \
8818         filio.h                 \
8819         getopt.h                \
8820         grp.h                   \
8821         io.h                    \
8822         libutil.h               \
8823         limits.h                \
8824         locale.h                \
8825         netinet/tcp.h   \
8826         malloc.h                \
8827         memory.h                \
8828         psap.h                  \
8829         pwd.h                   \
8830         process.h               \
8831         resolv.h                \
8832         sgtty.h                 \
8833         shadow.h                \
8834         stddef.h                \
8835         string.h                \
8836         strings.h               \
8837         sysexits.h              \
8838         sys/file.h              \
8839         sys/filio.h             \
8840         sys/errno.h             \
8841         sys/ioctl.h             \
8842         sys/param.h             \
8843         sys/resource.h  \
8844         sys/select.h    \
8845         sys/socket.h    \
8846         sys/syslog.h    \
8847         sys/time.h              \
8848         sys/types.h             \
8849         syslog.h                \
8850         termios.h               \
8851         unistd.h                \
8852         winsock.h               \
8853         winsock2.h              \
8854
8855 do
8856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8858 echo "configure:8859: checking for $ac_hdr" >&5
8859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8860   echo $ac_n "(cached) $ac_c" 1>&6
8861 else
8862   cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8865 #include <$ac_hdr>
8866 EOF
8867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8868 { (eval echo configure:8869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8870 if test -z "$ac_err"; then
8871   rm -rf conftest*
8872   eval "ac_cv_header_$ac_safe=yes"
8873 else
8874   echo "$ac_err" >&5
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -rf conftest*
8878   eval "ac_cv_header_$ac_safe=no"
8879 fi
8880 rm -f conftest*
8881 fi
8882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8883   echo "$ac_t""yes" 1>&6
8884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8885   cat >> confdefs.h <<EOF
8886 #define $ac_tr_hdr 1
8887 EOF
8888  
8889 else
8890   echo "$ac_t""no" 1>&6
8891 fi
8892 done
8893
8894
8895
8896
8897 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8898 echo "configure:8899: checking for dlopen" >&5
8899 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* System header to define __stub macros and hopefully few prototypes,
8906     which can conflict with char dlopen(); below.  */
8907 #include <assert.h>
8908 /* Override any gcc2 internal prototype to avoid an error.  */
8909 /* We use char because int might match the return type of a gcc2
8910     builtin and then its argument prototype would still apply.  */
8911 char dlopen();
8912 char (*f)();
8913
8914 int main() {
8915
8916 /* The GNU C library defines this for functions which it implements
8917     to always fail with ENOSYS.  Some functions are actually named
8918     something starting with __ and the normal name is an alias.  */
8919 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8920 choke me
8921 #else
8922 f = dlopen;
8923 #endif
8924
8925 ; return 0; }
8926 EOF
8927 if { (eval echo configure:8928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8928   rm -rf conftest*
8929   eval "ac_cv_func_dlopen=yes"
8930 else
8931   echo "configure: failed program was:" >&5
8932   cat conftest.$ac_ext >&5
8933   rm -rf conftest*
8934   eval "ac_cv_func_dlopen=no"
8935 fi
8936 rm -f conftest*
8937 fi
8938
8939 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8940   echo "$ac_t""yes" 1>&6
8941   :
8942 else
8943   echo "$ac_t""no" 1>&6
8944 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8945 echo "configure:8946: checking for dlopen in -ldl" >&5
8946 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8948   echo $ac_n "(cached) $ac_c" 1>&6
8949 else
8950   ac_save_LIBS="$LIBS"
8951 LIBS="-ldl  $LIBS"
8952 cat > conftest.$ac_ext <<EOF
8953 #line 8954 "configure"
8954 #include "confdefs.h"
8955 /* Override any gcc2 internal prototype to avoid an error.  */
8956 /* We use char because int might match the return type of a gcc2
8957     builtin and then its argument prototype would still apply.  */
8958 char dlopen();
8959
8960 int main() {
8961 dlopen()
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_lib_$ac_lib_var=yes"
8967 else
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   eval "ac_cv_lib_$ac_lib_var=no"
8972 fi
8973 rm -f conftest*
8974 LIBS="$ac_save_LIBS"
8975
8976 fi
8977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8978   echo "$ac_t""yes" 1>&6
8979     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8980     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8981   cat >> confdefs.h <<EOF
8982 #define $ac_tr_lib 1
8983 EOF
8984
8985   LIBS="-ldl $LIBS"
8986
8987 else
8988   echo "$ac_t""no" 1>&6
8989 fi
8990
8991 fi
8992
8993
8994 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8995 echo "configure:8996: checking for sigset in -lV3" >&5
8996 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8997 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8998   echo $ac_n "(cached) $ac_c" 1>&6
8999 else
9000   ac_save_LIBS="$LIBS"
9001 LIBS="-lV3  $LIBS"
9002 cat > conftest.$ac_ext <<EOF
9003 #line 9004 "configure"
9004 #include "confdefs.h"
9005 /* Override any gcc2 internal prototype to avoid an error.  */
9006 /* We use char because int might match the return type of a gcc2
9007     builtin and then its argument prototype would still apply.  */
9008 char sigset();
9009
9010 int main() {
9011 sigset()
9012 ; return 0; }
9013 EOF
9014 if { (eval echo configure:9015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9015   rm -rf conftest*
9016   eval "ac_cv_lib_$ac_lib_var=yes"
9017 else
9018   echo "configure: failed program was:" >&5
9019   cat conftest.$ac_ext >&5
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=no"
9022 fi
9023 rm -f conftest*
9024 LIBS="$ac_save_LIBS"
9025
9026 fi
9027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9028   echo "$ac_t""yes" 1>&6
9029     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9030     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9031   cat >> confdefs.h <<EOF
9032 #define $ac_tr_lib 1
9033 EOF
9034
9035   LIBS="-lV3 $LIBS"
9036
9037 else
9038   echo "$ac_t""no" 1>&6
9039 fi
9040
9041
9042 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9043 echo "configure:9044: checking for winsock" >&5
9044 save_LIBS="$LIBS"
9045 for curlib in ws2_32 wsock32; do
9046         LIBS="$LIBS -l$curlib"
9047         cat > conftest.$ac_ext <<EOF
9048 #line 9049 "configure"
9049 #include "confdefs.h"
9050
9051                         char socket@12();
9052                         char select@20();
9053                         char closesocket@4();
9054                         char gethostname@8();
9055                         
9056 int main() {
9057
9058                         socket@12();
9059                         select@20();
9060                         closesocket@4();
9061                         gethostname@8();
9062                         
9063 ; return 0; }
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9066   rm -rf conftest*
9067   have_winsock=yes
9068 else
9069   echo "configure: failed program was:" >&5
9070   cat conftest.$ac_ext >&5
9071   rm -rf conftest*
9072   have_winsock=no
9073 fi
9074 rm -f conftest*
9075
9076         if test $have_winsock = yes; then
9077                 cat >> confdefs.h <<\EOF
9078 #define HAVE_WINSOCK 1
9079 EOF
9080
9081                 ac_cv_func_socket=yes
9082                 ac_cv_func_select=yes
9083                 ac_cv_func_closesocket=yes
9084                 ac_cv_func_gethostname=yes
9085                 if test $curlib = ws2_32; then
9086                         have_winsock=winsock2
9087                         cat >> confdefs.h <<\EOF
9088 #define HAVE_WINSOCK2 1
9089 EOF
9090
9091                 fi
9092                 break
9093         fi
9094         LIBS="$save_LIBS"
9095 done
9096 echo "$ac_t""$have_winsock" 1>&6
9097
9098
9099 echo $ac_n "checking for socket""... $ac_c" 1>&6
9100 echo "configure:9101: checking for socket" >&5
9101 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9102   echo $ac_n "(cached) $ac_c" 1>&6
9103 else
9104   cat > conftest.$ac_ext <<EOF
9105 #line 9106 "configure"
9106 #include "confdefs.h"
9107 /* System header to define __stub macros and hopefully few prototypes,
9108     which can conflict with char socket(); below.  */
9109 #include <assert.h>
9110 /* Override any gcc2 internal prototype to avoid an error.  */
9111 /* We use char because int might match the return type of a gcc2
9112     builtin and then its argument prototype would still apply.  */
9113 char socket();
9114 char (*f)();
9115
9116 int main() {
9117
9118 /* The GNU C library defines this for functions which it implements
9119     to always fail with ENOSYS.  Some functions are actually named
9120     something starting with __ and the normal name is an alias.  */
9121 #if defined (__stub_socket) || defined (__stub___socket)
9122 choke me
9123 #else
9124 f = socket;
9125 #endif
9126
9127 ; return 0; }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9130   rm -rf conftest*
9131   eval "ac_cv_func_socket=yes"
9132 else
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   eval "ac_cv_func_socket=no"
9137 fi
9138 rm -f conftest*
9139 fi
9140
9141 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   :
9144 else
9145   echo "$ac_t""no" 1>&6
9146         
9147         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9148 echo "configure:9149: checking for main in -lsocket" >&5
9149 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9151   echo $ac_n "(cached) $ac_c" 1>&6
9152 else
9153   ac_save_LIBS="$LIBS"
9154 LIBS="-lsocket  $LIBS"
9155 cat > conftest.$ac_ext <<EOF
9156 #line 9157 "configure"
9157 #include "confdefs.h"
9158
9159 int main() {
9160 main()
9161 ; return 0; }
9162 EOF
9163 if { (eval echo configure:9164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9164   rm -rf conftest*
9165   eval "ac_cv_lib_$ac_lib_var=yes"
9166 else
9167   echo "configure: failed program was:" >&5
9168   cat conftest.$ac_ext >&5
9169   rm -rf conftest*
9170   eval "ac_cv_lib_$ac_lib_var=no"
9171 fi
9172 rm -f conftest*
9173 LIBS="$ac_save_LIBS"
9174
9175 fi
9176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9177   echo "$ac_t""yes" 1>&6
9178     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9179     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9180   cat >> confdefs.h <<EOF
9181 #define $ac_tr_lib 1
9182 EOF
9183
9184   LIBS="-lsocket $LIBS"
9185
9186 else
9187   echo "$ac_t""no" 1>&6
9188 fi
9189
9190         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9191 echo "configure:9192: checking for main in -lnet" >&5
9192 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   ac_save_LIBS="$LIBS"
9197 LIBS="-lnet  $LIBS"
9198 cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201
9202 int main() {
9203 main()
9204 ; return 0; }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=yes"
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=no"
9214 fi
9215 rm -f conftest*
9216 LIBS="$ac_save_LIBS"
9217
9218 fi
9219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9220   echo "$ac_t""yes" 1>&6
9221     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9222     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9223   cat >> confdefs.h <<EOF
9224 #define $ac_tr_lib 1
9225 EOF
9226
9227   LIBS="-lnet $LIBS"
9228
9229 else
9230   echo "$ac_t""no" 1>&6
9231 fi
9232
9233         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9234 echo "configure:9235: checking for main in -lnsl_s" >&5
9235 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   ac_save_LIBS="$LIBS"
9240 LIBS="-lnsl_s  $LIBS"
9241 cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244
9245 int main() {
9246 main()
9247 ; return 0; }
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=yes"
9252 else
9253   echo "configure: failed program was:" >&5
9254   cat conftest.$ac_ext >&5
9255   rm -rf conftest*
9256   eval "ac_cv_lib_$ac_lib_var=no"
9257 fi
9258 rm -f conftest*
9259 LIBS="$ac_save_LIBS"
9260
9261 fi
9262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9263   echo "$ac_t""yes" 1>&6
9264     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9266   cat >> confdefs.h <<EOF
9267 #define $ac_tr_lib 1
9268 EOF
9269
9270   LIBS="-lnsl_s $LIBS"
9271
9272 else
9273   echo "$ac_t""no" 1>&6
9274 fi
9275
9276         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9277 echo "configure:9278: checking for main in -lnsl" >&5
9278 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   ac_save_LIBS="$LIBS"
9283 LIBS="-lnsl  $LIBS"
9284 cat > conftest.$ac_ext <<EOF
9285 #line 9286 "configure"
9286 #include "confdefs.h"
9287
9288 int main() {
9289 main()
9290 ; return 0; }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=yes"
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=no"
9300 fi
9301 rm -f conftest*
9302 LIBS="$ac_save_LIBS"
9303
9304 fi
9305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9306   echo "$ac_t""yes" 1>&6
9307     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9308     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9309   cat >> confdefs.h <<EOF
9310 #define $ac_tr_lib 1
9311 EOF
9312
9313   LIBS="-lnsl $LIBS"
9314
9315 else
9316   echo "$ac_t""no" 1>&6
9317 fi
9318
9319         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9320 echo "configure:9321: checking for socket in -linet" >&5
9321 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   ac_save_LIBS="$LIBS"
9326 LIBS="-linet  $LIBS"
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 /* Override any gcc2 internal prototype to avoid an error.  */
9331 /* We use char because int might match the return type of a gcc2
9332     builtin and then its argument prototype would still apply.  */
9333 char socket();
9334
9335 int main() {
9336 socket()
9337 ; return 0; }
9338 EOF
9339 if { (eval echo configure:9340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=yes"
9342 else
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   eval "ac_cv_lib_$ac_lib_var=no"
9347 fi
9348 rm -f conftest*
9349 LIBS="$ac_save_LIBS"
9350
9351 fi
9352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9353   echo "$ac_t""yes" 1>&6
9354     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9355     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9356   cat >> confdefs.h <<EOF
9357 #define $ac_tr_lib 1
9358 EOF
9359
9360   LIBS="-linet $LIBS"
9361
9362 else
9363   echo "$ac_t""no" 1>&6
9364 fi
9365
9366         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9367 echo "configure:9368: checking for main in -lgen" >&5
9368 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9369 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   ac_save_LIBS="$LIBS"
9373 LIBS="-lgen  $LIBS"
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377
9378 int main() {
9379 main()
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_lib_$ac_lib_var=no"
9390 fi
9391 rm -f conftest*
9392 LIBS="$ac_save_LIBS"
9393
9394 fi
9395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9398     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9399   cat >> confdefs.h <<EOF
9400 #define $ac_tr_lib 1
9401 EOF
9402
9403   LIBS="-lgen $LIBS"
9404
9405 else
9406   echo "$ac_t""no" 1>&6
9407 fi
9408
9409
9410 fi
9411
9412
9413 echo $ac_n "checking for select""... $ac_c" 1>&6
9414 echo "configure:9415: checking for select" >&5
9415 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9416   echo $ac_n "(cached) $ac_c" 1>&6
9417 else
9418   cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 /* System header to define __stub macros and hopefully few prototypes,
9422     which can conflict with char select(); below.  */
9423 #include <assert.h>
9424 /* Override any gcc2 internal prototype to avoid an error.  */
9425 /* We use char because int might match the return type of a gcc2
9426     builtin and then its argument prototype would still apply.  */
9427 char select();
9428 char (*f)();
9429
9430 int main() {
9431
9432 /* The GNU C library defines this for functions which it implements
9433     to always fail with ENOSYS.  Some functions are actually named
9434     something starting with __ and the normal name is an alias.  */
9435 #if defined (__stub_select) || defined (__stub___select)
9436 choke me
9437 #else
9438 f = select;
9439 #endif
9440
9441 ; return 0; }
9442 EOF
9443 if { (eval echo configure:9444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9444   rm -rf conftest*
9445   eval "ac_cv_func_select=yes"
9446 else
9447   echo "configure: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   rm -rf conftest*
9450   eval "ac_cv_func_select=no"
9451 fi
9452 rm -f conftest*
9453 fi
9454
9455 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9456   echo "$ac_t""yes" 1>&6
9457   :
9458 else
9459   echo "$ac_t""no" 1>&6
9460 { echo "configure: error: select() required." 1>&2; exit 1; }
9461 fi
9462
9463
9464 if test "${ac_cv_header_winsock_h}" != yes; then
9465                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9466 echo "configure:9467: checking types of arguments for select()" >&5
9467  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9468   echo $ac_n "(cached) $ac_c" 1>&6
9469 else
9470    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9474   echo $ac_n "(cached) $ac_c" 1>&6
9475 else
9476      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9477      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9478       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9479        cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 #ifdef HAVE_SYS_TYPES_H
9483 #include <sys/types.h>
9484 #endif
9485 #ifdef HAVE_SYS_TIME_H
9486 #include <sys/time.h>
9487 #endif
9488 #ifdef HAVE_SYS_SELECT_H
9489 #include <sys/select.h>
9490 #endif
9491 #ifdef HAVE_SYS_SOCKET_H
9492 #include <sys/socket.h>
9493 #endif
9494 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);
9495 int main() {
9496
9497 ; return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9500   rm -rf conftest*
9501           ac_not_found=no ; break 3
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   ac_not_found=yes
9507 fi
9508 rm -f conftest*
9509       done
9510      done
9511     done
9512    
9513 fi
9514   
9515 fi
9516  
9517 fi
9518  if test "$ac_not_found" = yes; then
9519   ac_cv_func_select_arg1=int 
9520   ac_cv_func_select_arg234='int *' 
9521   ac_cv_func_select_arg5='struct timeval *'
9522  fi
9523  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9524  cat >> confdefs.h <<EOF
9525 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9526 EOF
9527
9528  cat >> confdefs.h <<EOF
9529 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9530 EOF
9531
9532  cat >> confdefs.h <<EOF
9533 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9534 EOF
9535
9536
9537 fi
9538
9539
9540 for ac_hdr in regex.h 
9541 do
9542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9543 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9544 echo "configure:9545: checking for $ac_hdr" >&5
9545 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9546   echo $ac_n "(cached) $ac_c" 1>&6
9547 else
9548   cat > conftest.$ac_ext <<EOF
9549 #line 9550 "configure"
9550 #include "confdefs.h"
9551 #include <$ac_hdr>
9552 EOF
9553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9554 { (eval echo configure:9555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9556 if test -z "$ac_err"; then
9557   rm -rf conftest*
9558   eval "ac_cv_header_$ac_safe=yes"
9559 else
9560   echo "$ac_err" >&5
9561   echo "configure: failed program was:" >&5
9562   cat conftest.$ac_ext >&5
9563   rm -rf conftest*
9564   eval "ac_cv_header_$ac_safe=no"
9565 fi
9566 rm -f conftest*
9567 fi
9568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9569   echo "$ac_t""yes" 1>&6
9570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9571   cat >> confdefs.h <<EOF
9572 #define $ac_tr_hdr 1
9573 EOF
9574  
9575 else
9576   echo "$ac_t""no" 1>&6
9577 fi
9578 done
9579
9580 if test "$ac_cv_header_regex_h" != yes ; then
9581         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9582 fi
9583
9584 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9585 echo "configure:9586: checking for library containing regfree" >&5
9586 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9587   echo $ac_n "(cached) $ac_c" 1>&6
9588 else
9589   ac_func_search_save_LIBS="$LIBS"
9590 ac_cv_search_regfree="no"
9591 cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 /* Override any gcc2 internal prototype to avoid an error.  */
9595 /* We use char because int might match the return type of a gcc2
9596     builtin and then its argument prototype would still apply.  */
9597 char regfree();
9598
9599 int main() {
9600 regfree()
9601 ; return 0; }
9602 EOF
9603 if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9604   rm -rf conftest*
9605   ac_cv_search_regfree="none required"
9606 else
9607   echo "configure: failed program was:" >&5
9608   cat conftest.$ac_ext >&5
9609 fi
9610 rm -f conftest*
9611 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9612 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9613 cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 /* Override any gcc2 internal prototype to avoid an error.  */
9617 /* We use char because int might match the return type of a gcc2
9618     builtin and then its argument prototype would still apply.  */
9619 char regfree();
9620
9621 int main() {
9622 regfree()
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9626   rm -rf conftest*
9627   ac_cv_search_regfree="-l$ac_lib"
9628 break
9629 else
9630   echo "configure: failed program was:" >&5
9631   cat conftest.$ac_ext >&5
9632 fi
9633 rm -f conftest*
9634 done
9635 LIBS="$ac_func_search_save_LIBS"
9636 fi
9637
9638 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9639 if test "$ac_cv_search_regfree" != "no"; then
9640   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9641   :
9642 else :
9643   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9644 fi
9645
9646
9647 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9648 echo "configure:9649: checking for compatible POSIX regex" >&5
9649 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9650   echo $ac_n "(cached) $ac_c" 1>&6
9651 else
9652   
9653         if test "$cross_compiling" = yes; then
9654   ol_cv_c_posix_regex=cross
9655 else
9656   cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659
9660 #include <sys/types.h>
9661 #include <regex.h>
9662 static char *pattern, *string;
9663 main()
9664 {
9665         int rc;
9666         regex_t re;
9667
9668         pattern = "^A";
9669
9670         if(regcomp(&re, pattern, 0)) {
9671                 return -1;
9672         }
9673         
9674         string = "ALL MATCH";
9675         
9676         rc = regexec(&re, string, 0, (void*)0, 0);
9677
9678         regfree(&re);
9679
9680         return rc;
9681 }
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9684 then
9685   ol_cv_c_posix_regex=yes
9686 else
9687   echo "configure: failed program was:" >&5
9688   cat conftest.$ac_ext >&5
9689   rm -fr conftest*
9690   ol_cv_c_posix_regex=no
9691 fi
9692 rm -fr conftest*
9693 fi
9694
9695 fi
9696
9697 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9698
9699 if test "$ol_cv_c_posix_regex" = no ; then
9700         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9701 fi
9702
9703
9704 have_uuid=no
9705 for ac_hdr in sys/uuid.h
9706 do
9707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9709 echo "configure:9710: checking for $ac_hdr" >&5
9710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9711   echo $ac_n "(cached) $ac_c" 1>&6
9712 else
9713   cat > conftest.$ac_ext <<EOF
9714 #line 9715 "configure"
9715 #include "confdefs.h"
9716 #include <$ac_hdr>
9717 EOF
9718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9719 { (eval echo configure:9720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9721 if test -z "$ac_err"; then
9722   rm -rf conftest*
9723   eval "ac_cv_header_$ac_safe=yes"
9724 else
9725   echo "$ac_err" >&5
9726   echo "configure: failed program was:" >&5
9727   cat conftest.$ac_ext >&5
9728   rm -rf conftest*
9729   eval "ac_cv_header_$ac_safe=no"
9730 fi
9731 rm -f conftest*
9732 fi
9733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9734   echo "$ac_t""yes" 1>&6
9735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9736   cat >> confdefs.h <<EOF
9737 #define $ac_tr_hdr 1
9738 EOF
9739  
9740 else
9741   echo "$ac_t""no" 1>&6
9742 fi
9743 done
9744
9745 if test $ac_cv_header_sys_uuid_h = yes ; then
9746         save_LIBS="$LIBS"
9747         
9748 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9749 echo "configure:9750: checking for library containing uuid_to_str" >&5
9750 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9751   echo $ac_n "(cached) $ac_c" 1>&6
9752 else
9753   ac_func_search_save_LIBS="$LIBS"
9754 ac_cv_search_uuid_to_str="no"
9755 cat > conftest.$ac_ext <<EOF
9756 #line 9757 "configure"
9757 #include "confdefs.h"
9758 /* Override any gcc2 internal prototype to avoid an error.  */
9759 /* We use char because int might match the return type of a gcc2
9760     builtin and then its argument prototype would still apply.  */
9761 char uuid_to_str();
9762
9763 int main() {
9764 uuid_to_str()
9765 ; return 0; }
9766 EOF
9767 if { (eval echo configure:9768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9768   rm -rf conftest*
9769   ac_cv_search_uuid_to_str="none required"
9770 else
9771   echo "configure: failed program was:" >&5
9772   cat conftest.$ac_ext >&5
9773 fi
9774 rm -f conftest*
9775 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9776 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9777 cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 /* Override any gcc2 internal prototype to avoid an error.  */
9781 /* We use char because int might match the return type of a gcc2
9782     builtin and then its argument prototype would still apply.  */
9783 char uuid_to_str();
9784
9785 int main() {
9786 uuid_to_str()
9787 ; return 0; }
9788 EOF
9789 if { (eval echo configure:9790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9790   rm -rf conftest*
9791   ac_cv_search_uuid_to_str="-l$ac_lib"
9792 break
9793 else
9794   echo "configure: failed program was:" >&5
9795   cat conftest.$ac_ext >&5
9796 fi
9797 rm -f conftest*
9798 done
9799 LIBS="$ac_func_search_save_LIBS"
9800 fi
9801
9802 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9803 if test "$ac_cv_search_uuid_to_str" != "no"; then
9804   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9805   have_uuid=yes
9806 else :
9807   :
9808 fi
9809         LIBS="$save_LIBS"
9810
9811         if test have_uuid = yes ; then
9812                 cat >> confdefs.h <<\EOF
9813 #define HAVE_UUID_TO_STR 1
9814 EOF
9815
9816
9817                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9818                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9819         fi
9820 fi
9821
9822 if test $have_uuid = no ; then
9823         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9824 echo "configure:9825: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9825         save_LIBS="$LIBS"
9826         LIBS="$LIBS -lrpcrt4"
9827         cat > conftest.$ac_ext <<EOF
9828 #line 9829 "configure"
9829 #include "confdefs.h"
9830
9831                 char UuidCreate@4();
9832                 char UuidToStringA@8();
9833                 
9834 int main() {
9835
9836                 UuidCreate@4();
9837                 UuidToStringA@8();
9838                 
9839 ; return 0; }
9840 EOF
9841 if { (eval echo configure:9842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9842   rm -rf conftest*
9843   need_rpcrt=yes
9844 else
9845   echo "configure: failed program was:" >&5
9846   cat conftest.$ac_ext >&5
9847   rm -rf conftest*
9848   need_rpcrt=no
9849 fi
9850 rm -f conftest*
9851         if test $need_rpcrt = yes; then
9852                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9853         fi
9854         LIBS="$save_LIBS"
9855         echo "$ac_t""$need_rpcrt" 1>&6
9856 fi
9857
9858 ol_link_dnssrv=no
9859 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9860 echo "configure:9861: checking for res_query" >&5
9861 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9862   echo $ac_n "(cached) $ac_c" 1>&6
9863 else
9864   cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 /* System header to define __stub macros and hopefully few prototypes,
9868     which can conflict with char res_query(); below.  */
9869 #include <assert.h>
9870 /* Override any gcc2 internal prototype to avoid an error.  */
9871 /* We use char because int might match the return type of a gcc2
9872     builtin and then its argument prototype would still apply.  */
9873 char res_query();
9874 char (*f)();
9875
9876 int main() {
9877
9878 /* The GNU C library defines this for functions which it implements
9879     to always fail with ENOSYS.  Some functions are actually named
9880     something starting with __ and the normal name is an alias.  */
9881 #if defined (__stub_res_query) || defined (__stub___res_query)
9882 choke me
9883 #else
9884 f = res_query;
9885 #endif
9886
9887 ; return 0; }
9888 EOF
9889 if { (eval echo configure:9890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9890   rm -rf conftest*
9891   eval "ac_cv_func_res_query=yes"
9892 else
9893   echo "configure: failed program was:" >&5
9894   cat conftest.$ac_ext >&5
9895   rm -rf conftest*
9896   eval "ac_cv_func_res_query=no"
9897 fi
9898 rm -f conftest*
9899 fi
9900
9901 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9902   echo "$ac_t""yes" 1>&6
9903   :
9904 else
9905   echo "$ac_t""no" 1>&6
9906 fi
9907
9908 if test $ac_cv_func_res_query = no ; then 
9909         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9910 echo "configure:9911: checking for __res_query" >&5
9911 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9912   echo $ac_n "(cached) $ac_c" 1>&6
9913 else
9914   cat > conftest.$ac_ext <<EOF
9915 #line 9916 "configure"
9916 #include "confdefs.h"
9917 /* System header to define __stub macros and hopefully few prototypes,
9918     which can conflict with char __res_query(); below.  */
9919 #include <assert.h>
9920 /* Override any gcc2 internal prototype to avoid an error.  */
9921 /* We use char because int might match the return type of a gcc2
9922     builtin and then its argument prototype would still apply.  */
9923 char __res_query();
9924 char (*f)();
9925
9926 int main() {
9927
9928 /* The GNU C library defines this for functions which it implements
9929     to always fail with ENOSYS.  Some functions are actually named
9930     something starting with __ and the normal name is an alias.  */
9931 #if defined (__stub___res_query) || defined (__stub_____res_query)
9932 choke me
9933 #else
9934 f = __res_query;
9935 #endif
9936
9937 ; return 0; }
9938 EOF
9939 if { (eval echo configure:9940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9940   rm -rf conftest*
9941   eval "ac_cv_func___res_query=yes"
9942 else
9943   echo "configure: failed program was:" >&5
9944   cat conftest.$ac_ext >&5
9945   rm -rf conftest*
9946   eval "ac_cv_func___res_query=no"
9947 fi
9948 rm -f conftest*
9949 fi
9950
9951 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9952   echo "$ac_t""yes" 1>&6
9953   :
9954 else
9955   echo "$ac_t""no" 1>&6
9956 fi
9957
9958         ac_cv_func_res_query=$ac_cv_func___res_query
9959 fi
9960
9961 if test $ac_cv_func_res_query = no ; then 
9962         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9963 echo "configure:9964: checking for res_query in -lbind" >&5
9964 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9965 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9966   echo $ac_n "(cached) $ac_c" 1>&6
9967 else
9968   ac_save_LIBS="$LIBS"
9969 LIBS="-lbind  $LIBS"
9970 cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* Override any gcc2 internal prototype to avoid an error.  */
9974 /* We use char because int might match the return type of a gcc2
9975     builtin and then its argument prototype would still apply.  */
9976 char res_query();
9977
9978 int main() {
9979 res_query()
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   eval "ac_cv_lib_$ac_lib_var=yes"
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=no"
9990 fi
9991 rm -f conftest*
9992 LIBS="$ac_save_LIBS"
9993
9994 fi
9995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9996   echo "$ac_t""yes" 1>&6
9997     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9998     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9999   cat >> confdefs.h <<EOF
10000 #define $ac_tr_lib 1
10001 EOF
10002
10003   LIBS="-lbind $LIBS"
10004
10005 else
10006   echo "$ac_t""no" 1>&6
10007 fi
10008
10009         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10010 fi
10011
10012 if test $ac_cv_func_res_query = no ; then 
10013         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10014 echo "configure:10015: checking for __res_query in -lbind" >&5
10015 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10016 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10017   echo $ac_n "(cached) $ac_c" 1>&6
10018 else
10019   ac_save_LIBS="$LIBS"
10020 LIBS="-lbind  $LIBS"
10021 cat > conftest.$ac_ext <<EOF
10022 #line 10023 "configure"
10023 #include "confdefs.h"
10024 /* Override any gcc2 internal prototype to avoid an error.  */
10025 /* We use char because int might match the return type of a gcc2
10026     builtin and then its argument prototype would still apply.  */
10027 char __res_query();
10028
10029 int main() {
10030 __res_query()
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10034   rm -rf conftest*
10035   eval "ac_cv_lib_$ac_lib_var=yes"
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   eval "ac_cv_lib_$ac_lib_var=no"
10041 fi
10042 rm -f conftest*
10043 LIBS="$ac_save_LIBS"
10044
10045 fi
10046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10047   echo "$ac_t""yes" 1>&6
10048     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10049     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10050   cat >> confdefs.h <<EOF
10051 #define $ac_tr_lib 1
10052 EOF
10053
10054   LIBS="-lbind $LIBS"
10055
10056 else
10057   echo "$ac_t""no" 1>&6
10058 fi
10059
10060         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10061 fi
10062
10063 if test $ac_cv_func_res_query = no ; then 
10064         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10065 echo "configure:10066: checking for res_query in -lresolv" >&5
10066 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10068   echo $ac_n "(cached) $ac_c" 1>&6
10069 else
10070   ac_save_LIBS="$LIBS"
10071 LIBS="-lresolv  $LIBS"
10072 cat > conftest.$ac_ext <<EOF
10073 #line 10074 "configure"
10074 #include "confdefs.h"
10075 /* Override any gcc2 internal prototype to avoid an error.  */
10076 /* We use char because int might match the return type of a gcc2
10077     builtin and then its argument prototype would still apply.  */
10078 char res_query();
10079
10080 int main() {
10081 res_query()
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10085   rm -rf conftest*
10086   eval "ac_cv_lib_$ac_lib_var=yes"
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_lib_$ac_lib_var=no"
10092 fi
10093 rm -f conftest*
10094 LIBS="$ac_save_LIBS"
10095
10096 fi
10097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10098   echo "$ac_t""yes" 1>&6
10099     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10100     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10101   cat >> confdefs.h <<EOF
10102 #define $ac_tr_lib 1
10103 EOF
10104
10105   LIBS="-lresolv $LIBS"
10106
10107 else
10108   echo "$ac_t""no" 1>&6
10109 fi
10110
10111         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10112 fi
10113
10114 if test $ac_cv_func_res_query = no ; then 
10115         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10116 echo "configure:10117: checking for __res_query in -lresolv" >&5
10117 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10118 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   ac_save_LIBS="$LIBS"
10122 LIBS="-lresolv  $LIBS"
10123 cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 /* Override any gcc2 internal prototype to avoid an error.  */
10127 /* We use char because int might match the return type of a gcc2
10128     builtin and then its argument prototype would still apply.  */
10129 char __res_query();
10130
10131 int main() {
10132 __res_query()
10133 ; return 0; }
10134 EOF
10135 if { (eval echo configure:10136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10136   rm -rf conftest*
10137   eval "ac_cv_lib_$ac_lib_var=yes"
10138 else
10139   echo "configure: failed program was:" >&5
10140   cat conftest.$ac_ext >&5
10141   rm -rf conftest*
10142   eval "ac_cv_lib_$ac_lib_var=no"
10143 fi
10144 rm -f conftest*
10145 LIBS="$ac_save_LIBS"
10146
10147 fi
10148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10149   echo "$ac_t""yes" 1>&6
10150     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10151     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10152   cat >> confdefs.h <<EOF
10153 #define $ac_tr_lib 1
10154 EOF
10155
10156   LIBS="-lresolv $LIBS"
10157
10158 else
10159   echo "$ac_t""no" 1>&6
10160 fi
10161
10162         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10163 fi
10164
10165 if test "$ac_cv_func_res_query" = yes ; then
10166         cat >> confdefs.h <<\EOF
10167 #define HAVE_RES_QUERY 1
10168 EOF
10169
10170
10171         if test $ol_enable_dnssrv != no ; then
10172                 ol_link_dnssrv=yes
10173         fi
10174 fi
10175
10176 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10177         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10178 fi
10179
10180 for ac_func in getaddrinfo gai_strerror inet_ntop 
10181 do
10182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10183 echo "configure:10184: checking for $ac_func" >&5
10184 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10185   echo $ac_n "(cached) $ac_c" 1>&6
10186 else
10187   cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 /* System header to define __stub macros and hopefully few prototypes,
10191     which can conflict with char $ac_func(); below.  */
10192 #include <assert.h>
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 /* We use char because int might match the return type of a gcc2
10195     builtin and then its argument prototype would still apply.  */
10196 char $ac_func();
10197 char (*f)();
10198
10199 int main() {
10200
10201 /* The GNU C library defines this for functions which it implements
10202     to always fail with ENOSYS.  Some functions are actually named
10203     something starting with __ and the normal name is an alias.  */
10204 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10205 choke me
10206 #else
10207 f = $ac_func;
10208 #endif
10209
10210 ; return 0; }
10211 EOF
10212 if { (eval echo configure:10213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10213   rm -rf conftest*
10214   eval "ac_cv_func_$ac_func=yes"
10215 else
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=no"
10220 fi
10221 rm -f conftest*
10222 fi
10223
10224 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10225   echo "$ac_t""yes" 1>&6
10226     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10227   cat >> confdefs.h <<EOF
10228 #define $ac_tr_func 1
10229 EOF
10230  
10231 else
10232   echo "$ac_t""no" 1>&6
10233 fi
10234 done
10235
10236
10237 ol_link_ipv6=no
10238 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10239         if test $ol_enable_ipv6 = yes ; then
10240                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10241         fi
10242 elif test $ol_enable_ipv6 != no ; then
10243         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10244 echo "configure:10245: checking INET6_ADDRSTRLEN" >&5
10245 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10246   echo $ac_n "(cached) $ac_c" 1>&6
10247 else
10248   
10249                 cat > conftest.$ac_ext <<EOF
10250 #line 10251 "configure"
10251 #include "confdefs.h"
10252
10253 #                       include <netinet/in.h>
10254 #                       ifdef INET6_ADDRSTRLEN
10255                                 __has_inet6_addrstrlen__;
10256 #                       endif
10257                 
10258 EOF
10259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10260   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10261   rm -rf conftest*
10262   ol_cv_inet6_addrstrlen=yes
10263 else
10264   rm -rf conftest*
10265   ol_cv_inet6_addrstrlen=no
10266 fi
10267 rm -f conftest*
10268
10269 fi
10270
10271 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10272
10273         if test $ol_cv_inet6_addrstrlen = yes ; then
10274                 ol_link_ipv6=yes
10275         elif test $ol_enable_ipv6 = yes ; then
10276                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10277         fi
10278 fi
10279
10280 if test $ol_enable_local != no ; then
10281         for ac_hdr in sys/un.h 
10282 do
10283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10285 echo "configure:10286: checking for $ac_hdr" >&5
10286 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10287   echo $ac_n "(cached) $ac_c" 1>&6
10288 else
10289   cat > conftest.$ac_ext <<EOF
10290 #line 10291 "configure"
10291 #include "confdefs.h"
10292 #include <$ac_hdr>
10293 EOF
10294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10295 { (eval echo configure:10296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10297 if test -z "$ac_err"; then
10298   rm -rf conftest*
10299   eval "ac_cv_header_$ac_safe=yes"
10300 else
10301   echo "$ac_err" >&5
10302   echo "configure: failed program was:" >&5
10303   cat conftest.$ac_ext >&5
10304   rm -rf conftest*
10305   eval "ac_cv_header_$ac_safe=no"
10306 fi
10307 rm -f conftest*
10308 fi
10309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10310   echo "$ac_t""yes" 1>&6
10311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10312   cat >> confdefs.h <<EOF
10313 #define $ac_tr_hdr 1
10314 EOF
10315  
10316 else
10317   echo "$ac_t""no" 1>&6
10318 fi
10319 done
10320
10321
10322         if test $ol_enable_local = auto ; then
10323                 ol_enable_local=$ac_cv_header_sys_un_h
10324         elif test $ac_cv_header_sys_un_h = no ; then
10325                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10326         fi
10327 fi
10328
10329 ol_link_kbind=no
10330 ol_link_kpasswd=no
10331 ol_link_krb5=no
10332 ol_link_krb4=no
10333
10334 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10335         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10336         -o $ol_with_kerberos = k425 ; then
10337
10338         for ac_hdr in krb5.h
10339 do
10340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10342 echo "configure:10343: checking for $ac_hdr" >&5
10343 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10344   echo $ac_n "(cached) $ac_c" 1>&6
10345 else
10346   cat > conftest.$ac_ext <<EOF
10347 #line 10348 "configure"
10348 #include "confdefs.h"
10349 #include <$ac_hdr>
10350 EOF
10351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10352 { (eval echo configure:10353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10354 if test -z "$ac_err"; then
10355   rm -rf conftest*
10356   eval "ac_cv_header_$ac_safe=yes"
10357 else
10358   echo "$ac_err" >&5
10359   echo "configure: failed program was:" >&5
10360   cat conftest.$ac_ext >&5
10361   rm -rf conftest*
10362   eval "ac_cv_header_$ac_safe=no"
10363 fi
10364 rm -f conftest*
10365 fi
10366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10367   echo "$ac_t""yes" 1>&6
10368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10369   cat >> confdefs.h <<EOF
10370 #define $ac_tr_hdr 1
10371 EOF
10372  
10373 else
10374   echo "$ac_t""no" 1>&6
10375 fi
10376 done
10377
10378
10379         if test $ac_cv_header_krb5_h = yes ; then
10380                                 for ac_hdr in heim_err.h
10381 do
10382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10384 echo "configure:10385: checking for $ac_hdr" >&5
10385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 #include <$ac_hdr>
10392 EOF
10393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10394 { (eval echo configure:10395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10396 if test -z "$ac_err"; then
10397   rm -rf conftest*
10398   eval "ac_cv_header_$ac_safe=yes"
10399 else
10400   echo "$ac_err" >&5
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   eval "ac_cv_header_$ac_safe=no"
10405 fi
10406 rm -f conftest*
10407 fi
10408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_hdr 1
10413 EOF
10414  
10415 else
10416   echo "$ac_t""no" 1>&6
10417 fi
10418 done
10419
10420                 if test $ac_cv_header_heim_err_h = yes ; then
10421                         krb5_impl=heimdal
10422                 else
10423                         krb5_impl=mit
10424                 fi
10425
10426                 if test $krb5_impl = mit; then
10427                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10428 echo "configure:10429: checking for main in -lk5crypto" >&5
10429 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10430 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10431   echo $ac_n "(cached) $ac_c" 1>&6
10432 else
10433   ac_save_LIBS="$LIBS"
10434 LIBS="-lk5crypto  $LIBS"
10435 cat > conftest.$ac_ext <<EOF
10436 #line 10437 "configure"
10437 #include "confdefs.h"
10438
10439 int main() {
10440 main()
10441 ; return 0; }
10442 EOF
10443 if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=yes"
10446 else
10447   echo "configure: failed program was:" >&5
10448   cat conftest.$ac_ext >&5
10449   rm -rf conftest*
10450   eval "ac_cv_lib_$ac_lib_var=no"
10451 fi
10452 rm -f conftest*
10453 LIBS="$ac_save_LIBS"
10454
10455 fi
10456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10457   echo "$ac_t""yes" 1>&6
10458   krb5crypto=k5crypto
10459 else
10460   echo "$ac_t""no" 1>&6
10461 krb5crypto=crypto
10462 fi
10463
10464
10465                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10466 echo "configure:10467: checking for main in -lkrb5" >&5
10467 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10468 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10469   echo $ac_n "(cached) $ac_c" 1>&6
10470 else
10471   ac_save_LIBS="$LIBS"
10472 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10473 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476
10477 int main() {
10478 main()
10479 ; return 0; }
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=yes"
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -rf conftest*
10488   eval "ac_cv_lib_$ac_lib_var=no"
10489 fi
10490 rm -f conftest*
10491 LIBS="$ac_save_LIBS"
10492
10493 fi
10494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10495   echo "$ac_t""yes" 1>&6
10496   have_krb5=yes
10497                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10498 else
10499   echo "$ac_t""no" 1>&6
10500 have_krb5=no
10501 fi
10502
10503
10504                 elif test $krb5_impl = heimdal; then
10505                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10506 echo "configure:10507: checking for main in -ldes" >&5
10507 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10509   echo $ac_n "(cached) $ac_c" 1>&6
10510 else
10511   ac_save_LIBS="$LIBS"
10512 LIBS="-ldes  $LIBS"
10513 cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516
10517 int main() {
10518 main()
10519 ; return 0; }
10520 EOF
10521 if { (eval echo configure:10522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10522   rm -rf conftest*
10523   eval "ac_cv_lib_$ac_lib_var=yes"
10524 else
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_lib_$ac_lib_var=no"
10529 fi
10530 rm -f conftest*
10531 LIBS="$ac_save_LIBS"
10532
10533 fi
10534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10535   echo "$ac_t""yes" 1>&6
10536   krb5crypto=des
10537 else
10538   echo "$ac_t""no" 1>&6
10539 krb5crypto=crypto
10540 fi
10541
10542
10543                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10544 echo "configure:10545: checking for main in -lkrb5" >&5
10545 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   ac_save_LIBS="$LIBS"
10550 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10551 cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554
10555 int main() {
10556 main()
10557 ; return 0; }
10558 EOF
10559 if { (eval echo configure:10560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=yes"
10562 else
10563   echo "configure: failed program was:" >&5
10564   cat conftest.$ac_ext >&5
10565   rm -rf conftest*
10566   eval "ac_cv_lib_$ac_lib_var=no"
10567 fi
10568 rm -f conftest*
10569 LIBS="$ac_save_LIBS"
10570
10571 fi
10572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10573   echo "$ac_t""yes" 1>&6
10574   have_krb5=yes
10575                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10576 else
10577   echo "$ac_t""no" 1>&6
10578 have_krb5=no
10579 fi
10580
10581
10582                         cat >> confdefs.h <<\EOF
10583 #define HAVE_HEIMDAL_KERBEROS 1
10584 EOF
10585
10586
10587                 else
10588                         have_krb5=no
10589                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10590                 fi
10591
10592                 if test $have_krb5 = yes ; then
10593                         ol_link_krb5=yes
10594
10595                         cat >> confdefs.h <<\EOF
10596 #define HAVE_KRB5 1
10597 EOF
10598
10599
10600                         if test $ol_enable_kpasswd != no ; then
10601                                 ol_link_kpasswd=yes;
10602                         fi
10603
10604                         if test $ol_with_kerberos = k5only ; then
10605                                 ol_with_kerberos=found
10606                         fi
10607
10608                 elif test $ol_with_kerberos != auto ; then
10609                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10610                 fi
10611
10612         fi
10613 fi
10614
10615 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10616         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10617
10618         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10619 do
10620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10622 echo "configure:10623: checking for $ac_hdr" >&5
10623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629 #include <$ac_hdr>
10630 EOF
10631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10632 { (eval echo configure:10633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10634 if test -z "$ac_err"; then
10635   rm -rf conftest*
10636   eval "ac_cv_header_$ac_safe=yes"
10637 else
10638   echo "$ac_err" >&5
10639   echo "configure: failed program was:" >&5
10640   cat conftest.$ac_ext >&5
10641   rm -rf conftest*
10642   eval "ac_cv_header_$ac_safe=no"
10643 fi
10644 rm -f conftest*
10645 fi
10646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10647   echo "$ac_t""yes" 1>&6
10648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10649   cat >> confdefs.h <<EOF
10650 #define $ac_tr_hdr 1
10651 EOF
10652  
10653 else
10654   echo "$ac_t""no" 1>&6
10655 fi
10656 done
10657
10658
10659         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10660                 if test $krb5_impl = mit; then
10661                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10662 echo "configure:10663: checking for main in -lkrb4" >&5
10663 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10665   echo $ac_n "(cached) $ac_c" 1>&6
10666 else
10667   ac_save_LIBS="$LIBS"
10668 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10669 cat > conftest.$ac_ext <<EOF
10670 #line 10671 "configure"
10671 #include "confdefs.h"
10672
10673 int main() {
10674 main()
10675 ; return 0; }
10676 EOF
10677 if { (eval echo configure:10678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10678   rm -rf conftest*
10679   eval "ac_cv_lib_$ac_lib_var=yes"
10680 else
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=no"
10685 fi
10686 rm -f conftest*
10687 LIBS="$ac_save_LIBS"
10688
10689 fi
10690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692   have_k425=yes
10693                                 KRB4_LIBS="-lkrb4 -ldes425"
10694 else
10695   echo "$ac_t""no" 1>&6
10696 have_k425=no
10697 fi
10698
10699
10700                 elif test $krb5_impl = heimdal; then
10701                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10702 echo "configure:10703: checking for main in -lkrb4" >&5
10703 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   ac_save_LIBS="$LIBS"
10708 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10709 cat > conftest.$ac_ext <<EOF
10710 #line 10711 "configure"
10711 #include "confdefs.h"
10712
10713 int main() {
10714 main()
10715 ; return 0; }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=yes"
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   eval "ac_cv_lib_$ac_lib_var=no"
10725 fi
10726 rm -f conftest*
10727 LIBS="$ac_save_LIBS"
10728
10729 fi
10730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10731   echo "$ac_t""yes" 1>&6
10732   have_k425=yes
10733                                 KRB4_LIBS="-lkrb4"
10734 else
10735   echo "$ac_t""no" 1>&6
10736 have_k425=no
10737 fi
10738
10739
10740                 else
10741                         have_425=no
10742                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10743                 fi
10744
10745                 if test $have_k425 = yes ; then
10746                         ol_with_kerberos=found
10747                         ol_link_krb4=yes
10748
10749                         cat >> confdefs.h <<\EOF
10750 #define HAVE_KRB425 1
10751 EOF
10752
10753                         cat >> confdefs.h <<\EOF
10754 #define HAVE_KRB4 1
10755 EOF
10756
10757
10758                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10759 echo "configure:10760: checking for des_debug in Kerberos libraries" >&5
10760 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10761   echo $ac_n "(cached) $ac_c" 1>&6
10762 else
10763   
10764                                                                 save_LIBS="$LIBS"
10765                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10766                                 cat > conftest.$ac_ext <<EOF
10767 #line 10768 "configure"
10768 #include "confdefs.h"
10769
10770 #include <kerberosIV/krb.h>
10771 #include <kerberosIV/des.h>
10772 extern int des_debug;
10773
10774 int main() {
10775
10776 des_debug = 1;
10777
10778 ; return 0; }
10779 EOF
10780 if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10781   rm -rf conftest*
10782   ol_cv_var_des_debug=yes
10783 else
10784   echo "configure: failed program was:" >&5
10785   cat conftest.$ac_ext >&5
10786   rm -rf conftest*
10787   ol_cv_var_des_debug=no
10788 fi
10789 rm -f conftest*
10790                                                                 LIBS="$save_LIBS"
10791                         
10792 fi
10793
10794 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10795
10796                         if test $ol_cv_var_des_debug = yes ; then
10797                                 cat >> confdefs.h <<\EOF
10798 #define HAVE_DES_DEBUG 1
10799 EOF
10800
10801                         fi
10802
10803                         LIBS="$save_LIBS"
10804                 fi
10805         fi
10806 fi
10807
10808 if test $ol_link_krb5 = yes ; then
10809         ol_with_kerberos=found
10810 fi
10811
10812 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10813         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10814
10815         for ac_hdr in krb.h des.h krb-archaeology.h 
10816 do
10817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10819 echo "configure:10820: checking for $ac_hdr" >&5
10820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10821   echo $ac_n "(cached) $ac_c" 1>&6
10822 else
10823   cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 #include <$ac_hdr>
10827 EOF
10828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10829 { (eval echo configure:10830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10831 if test -z "$ac_err"; then
10832   rm -rf conftest*
10833   eval "ac_cv_header_$ac_safe=yes"
10834 else
10835   echo "$ac_err" >&5
10836   echo "configure: failed program was:" >&5
10837   cat conftest.$ac_ext >&5
10838   rm -rf conftest*
10839   eval "ac_cv_header_$ac_safe=no"
10840 fi
10841 rm -f conftest*
10842 fi
10843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10844   echo "$ac_t""yes" 1>&6
10845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10846   cat >> confdefs.h <<EOF
10847 #define $ac_tr_hdr 1
10848 EOF
10849  
10850 else
10851   echo "$ac_t""no" 1>&6
10852 fi
10853 done
10854
10855
10856         if test $ac_cv_header_krb_h = yes ; then
10857                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10858 echo "configure:10859: checking for main in -lkrb" >&5
10859 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10860 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10861   echo $ac_n "(cached) $ac_c" 1>&6
10862 else
10863   ac_save_LIBS="$LIBS"
10864 LIBS="-lkrb -ldes $LIBS"
10865 cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868
10869 int main() {
10870 main()
10871 ; return 0; }
10872 EOF
10873 if { (eval echo configure:10874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10874   rm -rf conftest*
10875   eval "ac_cv_lib_$ac_lib_var=yes"
10876 else
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=no"
10881 fi
10882 rm -f conftest*
10883 LIBS="$ac_save_LIBS"
10884
10885 fi
10886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10887   echo "$ac_t""yes" 1>&6
10888   have_k4=yes
10889 else
10890   echo "$ac_t""no" 1>&6
10891 have_k4=no
10892 fi
10893
10894
10895                 if test $have_k4 = yes ; then
10896                         ol_with_kerberos=found
10897                         ol_link_krb4=yes
10898
10899                         cat >> confdefs.h <<\EOF
10900 #define HAVE_KRB4 1
10901 EOF
10902
10903
10904                         KRB4_LIBS="-lkrb -ldes"
10905
10906                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10907                                 cat >> confdefs.h <<\EOF
10908 #define HAVE_KTH_KERBEROS 1
10909 EOF
10910
10911                         fi
10912                 fi
10913         fi
10914 fi
10915
10916 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10917         ol_link_kpasswd=yes
10918 fi
10919
10920 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10921         ol_link_kbind=yes
10922
10923 elif test $ol_enable_kbind = yes ; then
10924         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10925 fi
10926
10927 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10928         cat >> confdefs.h <<\EOF
10929 #define HAVE_KERBEROS 1
10930 EOF
10931
10932
10933 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10934         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10935 fi
10936
10937 ol_link_tls=no
10938 if test $ol_with_tls != no ; then
10939         for ac_hdr in openssl/ssl.h ssl.h
10940 do
10941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10943 echo "configure:10944: checking for $ac_hdr" >&5
10944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <$ac_hdr>
10951 EOF
10952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10953 { (eval echo configure:10954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10955 if test -z "$ac_err"; then
10956   rm -rf conftest*
10957   eval "ac_cv_header_$ac_safe=yes"
10958 else
10959   echo "$ac_err" >&5
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_header_$ac_safe=no"
10964 fi
10965 rm -f conftest*
10966 fi
10967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10970   cat >> confdefs.h <<EOF
10971 #define $ac_tr_hdr 1
10972 EOF
10973  
10974 else
10975   echo "$ac_t""no" 1>&6
10976 fi
10977 done
10978
10979         
10980         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10981                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10982 echo "configure:10983: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10983 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   ac_save_LIBS="$LIBS"
10988 LIBS="-lssl -lcrypto $LIBS"
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 /* Override any gcc2 internal prototype to avoid an error.  */
10993 /* We use char because int might match the return type of a gcc2
10994     builtin and then its argument prototype would still apply.  */
10995 char SSLeay_add_ssl_algorithms();
10996
10997 int main() {
10998 SSLeay_add_ssl_algorithms()
10999 ; return 0; }
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11002   rm -rf conftest*
11003   eval "ac_cv_lib_$ac_lib_var=yes"
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=no"
11009 fi
11010 rm -f conftest*
11011 LIBS="$ac_save_LIBS"
11012
11013 fi
11014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11015   echo "$ac_t""yes" 1>&6
11016   have_ssleay=yes
11017                         need_rsaref=no
11018 else
11019   echo "$ac_t""no" 1>&6
11020 have_ssleay=no
11021 fi
11022
11023                         
11024                 if test $have_ssleay = no ; then
11025                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11026 echo "configure:11027: checking for SSL_library_init in -lssl" >&5
11027 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11029   echo $ac_n "(cached) $ac_c" 1>&6
11030 else
11031   ac_save_LIBS="$LIBS"
11032 LIBS="-lssl -lcrypto $LIBS"
11033 cat > conftest.$ac_ext <<EOF
11034 #line 11035 "configure"
11035 #include "confdefs.h"
11036 /* Override any gcc2 internal prototype to avoid an error.  */
11037 /* We use char because int might match the return type of a gcc2
11038     builtin and then its argument prototype would still apply.  */
11039 char SSL_library_init();
11040
11041 int main() {
11042 SSL_library_init()
11043 ; return 0; }
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=yes"
11048 else
11049   echo "configure: failed program was:" >&5
11050   cat conftest.$ac_ext >&5
11051   rm -rf conftest*
11052   eval "ac_cv_lib_$ac_lib_var=no"
11053 fi
11054 rm -f conftest*
11055 LIBS="$ac_save_LIBS"
11056
11057 fi
11058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11059   echo "$ac_t""yes" 1>&6
11060   have_ssleay=yes
11061                                 need_rsaref=no
11062 else
11063   echo "$ac_t""no" 1>&6
11064 have_ssleay=no
11065 fi
11066
11067                 fi
11068
11069                 if test $have_ssleay = no ; then
11070                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11071 echo "configure:11072: checking for ssl3_accept in -lssl" >&5
11072 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11074   echo $ac_n "(cached) $ac_c" 1>&6
11075 else
11076   ac_save_LIBS="$LIBS"
11077 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11078 cat > conftest.$ac_ext <<EOF
11079 #line 11080 "configure"
11080 #include "confdefs.h"
11081 /* Override any gcc2 internal prototype to avoid an error.  */
11082 /* We use char because int might match the return type of a gcc2
11083     builtin and then its argument prototype would still apply.  */
11084 char ssl3_accept();
11085
11086 int main() {
11087 ssl3_accept()
11088 ; return 0; }
11089 EOF
11090 if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11091   rm -rf conftest*
11092   eval "ac_cv_lib_$ac_lib_var=yes"
11093 else
11094   echo "configure: failed program was:" >&5
11095   cat conftest.$ac_ext >&5
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=no"
11098 fi
11099 rm -f conftest*
11100 LIBS="$ac_save_LIBS"
11101
11102 fi
11103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11104   echo "$ac_t""yes" 1>&6
11105   have_ssleay=yes
11106                                 need_rsaref=yes
11107 else
11108   echo "$ac_t""no" 1>&6
11109 have_ssleay=no
11110 fi
11111
11112                 fi
11113
11114                 if test $have_ssleay = yes ; then
11115                         ol_with_tls=found
11116                         ol_link_tls=yes
11117
11118                         cat >> confdefs.h <<\EOF
11119 #define HAVE_SSLEAY 1
11120 EOF
11121
11122
11123                         if test $need_rsaref = yes; then
11124                                 cat >> confdefs.h <<\EOF
11125 #define HAVE_RSAREF 1
11126 EOF
11127
11128
11129                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11130                         else
11131                                 TLS_LIBS="-lssl -lcrypto"
11132                         fi
11133                 fi
11134         fi
11135
11136 else
11137         echo "configure: warning: TLS data protection not supported!" 1>&2
11138 fi
11139
11140 if test $ol_link_tls = yes ; then
11141         cat >> confdefs.h <<\EOF
11142 #define HAVE_TLS 1
11143 EOF
11144
11145
11146 elif test $ol_with_tls = auto ; then
11147         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11148         echo "configure: warning: TLS data protection not supported!" 1>&2
11149
11150 elif test $ol_with_tls != no ; then
11151         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11152 fi
11153
11154 if test $ol_enable_lmpasswd != no; then
11155         if test $ol_link_tls != yes ; then
11156                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11157         fi
11158
11159         cat >> confdefs.h <<\EOF
11160 #define SLAPD_LMHASH 1
11161 EOF
11162
11163 fi
11164
11165 for ac_func in \
11166         ctime_r                 \
11167         gethostbyname_r gethostbyaddr_r \
11168
11169 do
11170 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11171 echo "configure:11172: checking for $ac_func" >&5
11172 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11173   echo $ac_n "(cached) $ac_c" 1>&6
11174 else
11175   cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 /* System header to define __stub macros and hopefully few prototypes,
11179     which can conflict with char $ac_func(); below.  */
11180 #include <assert.h>
11181 /* Override any gcc2 internal prototype to avoid an error.  */
11182 /* We use char because int might match the return type of a gcc2
11183     builtin and then its argument prototype would still apply.  */
11184 char $ac_func();
11185 char (*f)();
11186
11187 int main() {
11188
11189 /* The GNU C library defines this for functions which it implements
11190     to always fail with ENOSYS.  Some functions are actually named
11191     something starting with __ and the normal name is an alias.  */
11192 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11193 choke me
11194 #else
11195 f = $ac_func;
11196 #endif
11197
11198 ; return 0; }
11199 EOF
11200 if { (eval echo configure:11201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11201   rm -rf conftest*
11202   eval "ac_cv_func_$ac_func=yes"
11203 else
11204   echo "configure: failed program was:" >&5
11205   cat conftest.$ac_ext >&5
11206   rm -rf conftest*
11207   eval "ac_cv_func_$ac_func=no"
11208 fi
11209 rm -f conftest*
11210 fi
11211
11212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11213   echo "$ac_t""yes" 1>&6
11214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11215   cat >> confdefs.h <<EOF
11216 #define $ac_tr_func 1
11217 EOF
11218  
11219 else
11220   echo "$ac_t""no" 1>&6
11221 fi
11222 done
11223
11224
11225 if test "$ac_cv_func_ctime_r" = no ; then
11226         ol_cv_func_ctime_r_nargs=0
11227 else
11228         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11229 echo "configure:11230: checking number of arguments of ctime_r" >&5
11230 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11231   echo $ac_n "(cached) $ac_c" 1>&6
11232 else
11233   cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236 #include <time.h>
11237 int main() {
11238 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11242   rm -rf conftest*
11243   ol_cv_func_ctime_r_nargs3=yes
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   ol_cv_func_ctime_r_nargs3=no
11249 fi
11250 rm -f conftest*
11251
11252         cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 #include <time.h>
11256 int main() {
11257 time_t ti; char *buffer; ctime_r(&ti,buffer);
11258 ; return 0; }
11259 EOF
11260 if { (eval echo configure:11261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11261   rm -rf conftest*
11262   ol_cv_func_ctime_r_nargs2=yes
11263 else
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -rf conftest*
11267   ol_cv_func_ctime_r_nargs2=no
11268 fi
11269 rm -f conftest*
11270
11271         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11272                 $ol_cv_func_ctime_r_nargs2 = no ; then
11273
11274                 ol_cv_func_ctime_r_nargs=3
11275
11276         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11277                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11278
11279                 ol_cv_func_ctime_r_nargs=2
11280
11281         else
11282                 ol_cv_func_ctime_r_nargs=0
11283         fi
11284   
11285 fi
11286
11287 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11288
11289   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11290         cat >> confdefs.h <<EOF
11291 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11292 EOF
11293
11294   fi
11295
11296 fi
11297
11298 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11299         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11300 echo "configure:11301: checking number of arguments of gethostbyname_r" >&5
11301 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11302   echo $ac_n "(cached) $ac_c" 1>&6
11303 else
11304   cat > conftest.$ac_ext <<EOF
11305 #line 11306 "configure"
11306 #include "confdefs.h"
11307 #include <sys/types.h>
11308 #include <sys/socket.h>
11309 #include <netinet/in.h>
11310 #include <netdb.h>
11311 #define BUFSIZE (sizeof(struct hostent)+10)
11312 int main() {
11313 struct hostent hent; char buffer[BUFSIZE];
11314                 int bufsize=BUFSIZE;int h_errno;
11315                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11316                         buffer, bufsize, &h_errno);
11317 ; return 0; }
11318 EOF
11319 if { (eval echo configure:11320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11320   rm -rf conftest*
11321   ol_cv_func_gethostbyname_r_nargs5=yes
11322 else
11323   echo "configure: failed program was:" >&5
11324   cat conftest.$ac_ext >&5
11325   rm -rf conftest*
11326   ol_cv_func_gethostbyname_r_nargs5=no
11327 fi
11328 rm -f conftest*
11329
11330         cat > conftest.$ac_ext <<EOF
11331 #line 11332 "configure"
11332 #include "confdefs.h"
11333 #include <sys/types.h>
11334 #include <sys/socket.h>
11335 #include <netinet/in.h>
11336 #include <netdb.h>
11337 #define BUFSIZE (sizeof(struct hostent)+10)
11338 int main() {
11339 struct hostent hent;struct hostent *rhent;
11340                 char buffer[BUFSIZE];
11341                 int bufsize=BUFSIZE;int h_errno;
11342                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11343                         &rhent, &h_errno);
11344 ; return 0; }
11345 EOF
11346 if { (eval echo configure:11347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11347   rm -rf conftest*
11348   ol_cv_func_gethostbyname_r_nargs6=yes
11349 else
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -rf conftest*
11353   ol_cv_func_gethostbyname_r_nargs6=no
11354 fi
11355 rm -f conftest*
11356
11357         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11358                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11359
11360                 ol_cv_func_gethostbyname_r_nargs=5
11361
11362         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11363                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11364
11365                 ol_cv_func_gethostbyname_r_nargs=6
11366
11367         else
11368                 ol_cv_func_gethostbyname_r_nargs=0
11369         fi
11370   
11371 fi
11372
11373 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11374   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11375         cat >> confdefs.h <<EOF
11376 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11377 EOF
11378
11379   fi
11380
11381 else
11382         ol_cv_func_gethostbyname_r_nargs=0
11383 fi
11384  
11385 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11386         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11387 echo "configure:11388: checking number of arguments of gethostbyaddr_r" >&5
11388 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11389   echo $ac_n "(cached) $ac_c" 1>&6
11390 else
11391   cat > conftest.$ac_ext <<EOF
11392 #line 11393 "configure"
11393 #include "confdefs.h"
11394 #include <sys/types.h>
11395 #include <sys/socket.h>
11396 #include <netinet/in.h>
11397 #include <netdb.h>
11398 #define BUFSIZE (sizeof(struct hostent)+10)
11399 int main() {
11400 struct hostent hent; char buffer[BUFSIZE]; 
11401             struct in_addr add;
11402             size_t alen=sizeof(struct in_addr);
11403             int bufsize=BUFSIZE;int h_errno;
11404                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11405                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11406 ; return 0; }
11407 EOF
11408 if { (eval echo configure:11409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11409   rm -rf conftest*
11410   ol_cv_func_gethostbyaddr_r_nargs7=yes
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   ol_cv_func_gethostbyaddr_r_nargs7=no
11416 fi
11417 rm -f conftest*
11418
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #include <sys/types.h>
11423 #include <sys/socket.h>
11424 #include <netinet/in.h>
11425 #include <netdb.h>
11426 #define BUFSIZE (sizeof(struct hostent)+10)
11427 int main() {
11428 struct hostent hent;
11429                 struct hostent *rhent; char buffer[BUFSIZE]; 
11430                 struct in_addr add;
11431                 size_t alen=sizeof(struct in_addr);
11432                 int bufsize=BUFSIZE;int h_errno;
11433                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11434                         alen, AF_INET, &hent, buffer, bufsize, 
11435                         &rhent, &h_errno);
11436 ; return 0; }
11437 EOF
11438 if { (eval echo configure:11439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11439   rm -rf conftest*
11440   ol_cv_func_gethostbyaddr_r_nargs8=yes
11441 else
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   ol_cv_func_gethostbyaddr_r_nargs8=no
11446 fi
11447 rm -f conftest*
11448
11449         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11450                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11451
11452                 ol_cv_func_gethostbyaddr_r_nargs=7
11453
11454         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11455                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11456
11457                 ol_cv_func_gethostbyaddr_r_nargs=8
11458
11459         else
11460                 ol_cv_func_gethostbyaddr_r_nargs=0
11461         fi
11462   
11463 fi
11464
11465 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11466   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11467     cat >> confdefs.h <<EOF
11468 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11469 EOF
11470
11471   fi
11472
11473 else
11474         ol_cv_func_gethostbyaddr_r_nargs=0
11475 fi
11476
11477 if test "$ac_cv_func_ctime_r" = yes \
11478         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11479         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11480         -a "$ac_cv_func_gethostbyname_r" = yes \
11481         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11482         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11483         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11484         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11485         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11486         ; then
11487  
11488         cat >> confdefs.h <<\EOF
11489 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11490 EOF
11491
11492 fi
11493
11494 ol_link_threads=no
11495
11496 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11497         -o $ol_with_threads = nt ; then
11498
11499         
11500         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11501 echo "configure:11502: checking for _beginthread" >&5
11502 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11503   echo $ac_n "(cached) $ac_c" 1>&6
11504 else
11505   cat > conftest.$ac_ext <<EOF
11506 #line 11507 "configure"
11507 #include "confdefs.h"
11508 /* System header to define __stub macros and hopefully few prototypes,
11509     which can conflict with char _beginthread(); below.  */
11510 #include <assert.h>
11511 /* Override any gcc2 internal prototype to avoid an error.  */
11512 /* We use char because int might match the return type of a gcc2
11513     builtin and then its argument prototype would still apply.  */
11514 char _beginthread();
11515 char (*f)();
11516
11517 int main() {
11518
11519 /* The GNU C library defines this for functions which it implements
11520     to always fail with ENOSYS.  Some functions are actually named
11521     something starting with __ and the normal name is an alias.  */
11522 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11523 choke me
11524 #else
11525 f = _beginthread;
11526 #endif
11527
11528 ; return 0; }
11529 EOF
11530 if { (eval echo configure:11531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11531   rm -rf conftest*
11532   eval "ac_cv_func__beginthread=yes"
11533 else
11534   echo "configure: failed program was:" >&5
11535   cat conftest.$ac_ext >&5
11536   rm -rf conftest*
11537   eval "ac_cv_func__beginthread=no"
11538 fi
11539 rm -f conftest*
11540 fi
11541
11542 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11543   echo "$ac_t""yes" 1>&6
11544   :
11545 else
11546   echo "$ac_t""no" 1>&6
11547 fi
11548
11549
11550         if test $ac_cv_func__beginthread = yes ; then
11551                 cat >> confdefs.h <<\EOF
11552 #define HAVE_NT_THREADS 1
11553 EOF
11554
11555                 ol_cv_nt_threads=yes
11556         fi
11557
11558
11559         if test "$ol_cv_nt_threads" = yes ; then
11560                 ol_link_threads=nt
11561                 ol_with_threads=found
11562                 ol_with_yielding_select=yes
11563
11564                 cat >> confdefs.h <<\EOF
11565 #define HAVE_NT_SERVICE_MANAGER 1
11566 EOF
11567
11568                 cat >> confdefs.h <<\EOF
11569 #define HAVE_NT_EVENT_LOG 1
11570 EOF
11571
11572         fi
11573
11574         if test $ol_with_threads = nt ; then
11575                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11576         fi
11577 fi
11578
11579 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11580         -o $ol_with_threads = posix ; then
11581
11582         for ac_hdr in pthread.h
11583 do
11584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11586 echo "configure:11587: checking for $ac_hdr" >&5
11587 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11588   echo $ac_n "(cached) $ac_c" 1>&6
11589 else
11590   cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593 #include <$ac_hdr>
11594 EOF
11595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11596 { (eval echo configure:11597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11598 if test -z "$ac_err"; then
11599   rm -rf conftest*
11600   eval "ac_cv_header_$ac_safe=yes"
11601 else
11602   echo "$ac_err" >&5
11603   echo "configure: failed program was:" >&5
11604   cat conftest.$ac_ext >&5
11605   rm -rf conftest*
11606   eval "ac_cv_header_$ac_safe=no"
11607 fi
11608 rm -f conftest*
11609 fi
11610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11611   echo "$ac_t""yes" 1>&6
11612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11613   cat >> confdefs.h <<EOF
11614 #define $ac_tr_hdr 1
11615 EOF
11616  
11617 else
11618   echo "$ac_t""no" 1>&6
11619 fi
11620 done
11621
11622
11623         if test $ac_cv_header_pthread_h = yes ; then
11624                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11625 echo "configure:11626: checking POSIX thread version" >&5
11626 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11627   echo $ac_n "(cached) $ac_c" 1>&6
11628 else
11629   
11630         cat > conftest.$ac_ext <<EOF
11631 #line 11632 "configure"
11632 #include "confdefs.h"
11633
11634 #               include <pthread.h>
11635                 /* this check could be improved */
11636 #               ifdef PTHREAD_ONCE_INIT
11637                         pthread_version_final;
11638 #               endif
11639         
11640 EOF
11641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11642   egrep "pthread_version_final" >/dev/null 2>&1; then
11643   rm -rf conftest*
11644   ol_pthread_final=yes
11645 else
11646   rm -rf conftest*
11647   ol_pthread_final=no
11648 fi
11649 rm -f conftest*
11650
11651
11652         cat > conftest.$ac_ext <<EOF
11653 #line 11654 "configure"
11654 #include "confdefs.h"
11655
11656 #               include <pthread.h>
11657                 /* this check could be improved */
11658 #               ifdef pthread_once_init
11659                         pthread_version_draft4;
11660 #               endif
11661         
11662 EOF
11663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11664   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11665   rm -rf conftest*
11666   ol_pthread_draft4=yes
11667 else
11668   rm -rf conftest*
11669   ol_pthread_draft4=no
11670 fi
11671 rm -f conftest*
11672
11673
11674         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11675                 ol_cv_pthread_version=final
11676         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11677                 ol_cv_pthread_version=draft4
11678         else
11679                 ol_cv_pthread_version=unknown
11680         fi
11681
11682 fi
11683
11684 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11685
11686
11687                 if test $ol_cv_pthread_version = final ; then
11688                         cat >> confdefs.h <<\EOF
11689 #define HAVE_PTHREADS_FINAL 1
11690 EOF
11691
11692                 elif test $ol_cv_pthread_version = draft4 ; then
11693                         cat >> confdefs.h <<\EOF
11694 #define HAVE_PTHREADS_D4 1
11695 EOF
11696
11697                 else
11698                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11699                 fi
11700
11701                 # consider threads found
11702                 ol_with_threads=found
11703
11704                 
11705         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11706 echo "configure:11707: checking for LinuxThreads pthread.h" >&5
11707 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11708   echo $ac_n "(cached) $ac_c" 1>&6
11709 else
11710   cat > conftest.$ac_ext <<EOF
11711 #line 11712 "configure"
11712 #include "confdefs.h"
11713 #include <pthread.h>
11714 EOF
11715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11716   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11717   rm -rf conftest*
11718   ol_cv_header_linux_threads=yes
11719 else
11720   rm -rf conftest*
11721   ol_cv_header_linux_threads=no
11722 fi
11723 rm -f conftest*
11724
11725                 
11726 fi
11727
11728 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11729         if test $ol_cv_header_linux_threads = yes; then
11730                 cat >> confdefs.h <<\EOF
11731 #define HAVE_LINUX_THREADS 1
11732 EOF
11733
11734         fi
11735
11736                 
11737         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11738 echo "configure:11739: checking for GNU Pth pthread.h" >&5
11739 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11740   echo $ac_n "(cached) $ac_c" 1>&6
11741 else
11742   cat > conftest.$ac_ext <<EOF
11743 #line 11744 "configure"
11744 #include "confdefs.h"
11745 #include <pthread.h>
11746 #ifdef _POSIX_THREAD_IS_GNU_PTH
11747         __gnu_pth__;
11748 #endif
11749
11750 EOF
11751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11752   egrep "__gnu_pth__" >/dev/null 2>&1; then
11753   rm -rf conftest*
11754   ol_cv_header_gnu_pth_pthread_h=yes
11755 else
11756   rm -rf conftest*
11757   ol_cv_header_gnu_pth_pthread_h=no
11758 fi
11759 rm -f conftest*
11760
11761                 
11762 fi
11763
11764 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11765
11766
11767                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11768                         for ac_hdr in sched.h
11769 do
11770 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11772 echo "configure:11773: checking for $ac_hdr" >&5
11773 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11774   echo $ac_n "(cached) $ac_c" 1>&6
11775 else
11776   cat > conftest.$ac_ext <<EOF
11777 #line 11778 "configure"
11778 #include "confdefs.h"
11779 #include <$ac_hdr>
11780 EOF
11781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11782 { (eval echo configure:11783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11784 if test -z "$ac_err"; then
11785   rm -rf conftest*
11786   eval "ac_cv_header_$ac_safe=yes"
11787 else
11788   echo "$ac_err" >&5
11789   echo "configure: failed program was:" >&5
11790   cat conftest.$ac_ext >&5
11791   rm -rf conftest*
11792   eval "ac_cv_header_$ac_safe=no"
11793 fi
11794 rm -f conftest*
11795 fi
11796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11797   echo "$ac_t""yes" 1>&6
11798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11799   cat >> confdefs.h <<EOF
11800 #define $ac_tr_hdr 1
11801 EOF
11802  
11803 else
11804   echo "$ac_t""no" 1>&6
11805 fi
11806 done
11807
11808                 fi
11809
11810                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11811                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11812 echo "configure:11813: checking for pthread_create in default libraries" >&5
11813 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   
11817                 if test "$cross_compiling" = yes; then
11818   cat > conftest.$ac_ext <<EOF
11819 #line 11820 "configure"
11820 #include "confdefs.h"
11821 /* pthread test headers */
11822 #include <pthread.h>
11823 #ifndef NULL
11824 #define NULL (void*)0
11825 #endif
11826
11827 static void *task(p)
11828         void *p;
11829 {
11830         return (void *) (p == NULL);
11831 }
11832
11833 int main() {
11834
11835         /* pthread test function */
11836         pthread_t t;
11837         int status;
11838         int detach = 1;
11839
11840 #ifdef HAVE_PTHREADS_FINAL
11841         /* Final pthreads */
11842         pthread_attr_t attr;
11843
11844         status = pthread_attr_init(&attr);
11845         if( status ) return status;
11846
11847 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11848         if( !detach ) {
11849 #if defined( PTHREAD_CREATE_JOINABLE )
11850                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11851 #else
11852                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11853 #endif
11854
11855 #ifdef PTHREAD_CREATE_DETACHED
11856         } else {
11857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11858 #endif
11859         }
11860         if( status ) return status;
11861 #endif
11862
11863         status = pthread_create( &t, &attr, task, NULL );
11864         if( status ) return status;
11865
11866 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11867         if( detach ) {
11868                 /* give thread a chance to complete */
11869                 /* it should remain joinable and hence detachable */
11870                 sleep( 1 );
11871
11872                 status = pthread_detach( t );
11873                 if( status ) return status;
11874         }
11875 #endif
11876
11877 #else
11878         /* Draft 4 pthreads */
11879         status = pthread_create( &t, pthread_attr_default, task, NULL );
11880         if( status ) return status;
11881
11882         if( detach ) {
11883                 /* give thread a chance to complete */
11884                 /* it should remain joinable and hence detachable */
11885                 sleep( 1 );
11886
11887                 status = pthread_detach( &t );
11888                 if( status ) return status;
11889         }
11890 #endif
11891
11892 #ifdef HAVE_LINUX_THREADS
11893         pthread_kill_other_threads_np();
11894 #endif
11895
11896         return 0;
11897
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11901   rm -rf conftest*
11902   ol_cv_pthread_create=yes
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   ol_cv_pthread_create=no
11908 fi
11909 rm -f conftest*
11910 else
11911   cat > conftest.$ac_ext <<EOF
11912 #line 11913 "configure"
11913 #include "confdefs.h"
11914 /* pthread test headers */
11915 #include <pthread.h>
11916 #ifndef NULL
11917 #define NULL (void*)0
11918 #endif
11919
11920 static void *task(p)
11921         void *p;
11922 {
11923         return (void *) (p == NULL);
11924 }
11925
11926
11927 int main(argc, argv)
11928         int argc;
11929         char **argv;
11930 {
11931
11932         /* pthread test function */
11933         pthread_t t;
11934         int status;
11935         int detach = 1;
11936
11937 #ifdef HAVE_PTHREADS_FINAL
11938         /* Final pthreads */
11939         pthread_attr_t attr;
11940
11941         status = pthread_attr_init(&attr);
11942         if( status ) return status;
11943
11944 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11945         if( !detach ) {
11946 #if defined( PTHREAD_CREATE_JOINABLE )
11947                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11948 #else
11949                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11950 #endif
11951
11952 #ifdef PTHREAD_CREATE_DETACHED
11953         } else {
11954                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11955 #endif
11956         }
11957         if( status ) return status;
11958 #endif
11959
11960         status = pthread_create( &t, &attr, task, NULL );
11961         if( status ) return status;
11962
11963 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11964         if( detach ) {
11965                 /* give thread a chance to complete */
11966                 /* it should remain joinable and hence detachable */
11967                 sleep( 1 );
11968
11969                 status = pthread_detach( t );
11970                 if( status ) return status;
11971         }
11972 #endif
11973
11974 #else
11975         /* Draft 4 pthreads */
11976         status = pthread_create( &t, pthread_attr_default, task, NULL );
11977         if( status ) return status;
11978
11979         if( detach ) {
11980                 /* give thread a chance to complete */
11981                 /* it should remain joinable and hence detachable */
11982                 sleep( 1 );
11983
11984                 status = pthread_detach( &t );
11985                 if( status ) return status;
11986         }
11987 #endif
11988
11989 #ifdef HAVE_LINUX_THREADS
11990         pthread_kill_other_threads_np();
11991 #endif
11992
11993         return 0;
11994
11995 }
11996
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11999 then
12000   ol_cv_pthread_create=yes
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -fr conftest*
12005   ol_cv_pthread_create=no
12006 fi
12007 rm -fr conftest*
12008 fi
12009
12010 fi
12011
12012 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12013
12014                 if test $ol_cv_pthread_create != no ; then
12015                         ol_link_threads=posix
12016                         ol_link_pthreads=""
12017                 fi
12018                 
12019                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12020 if test "$ol_link_threads" = no ; then
12021         # try -kthread
12022         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12023 echo "configure:12024: checking for pthread link with -kthread" >&5
12024 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12025   echo $ac_n "(cached) $ac_c" 1>&6
12026 else
12027   
12028                 # save the flags
12029                 ol_LIBS="$LIBS"
12030                 LIBS="-kthread $LIBS"
12031
12032                 if test "$cross_compiling" = yes; then
12033   cat > conftest.$ac_ext <<EOF
12034 #line 12035 "configure"
12035 #include "confdefs.h"
12036 /* pthread test headers */
12037 #include <pthread.h>
12038 #ifndef NULL
12039 #define NULL (void*)0
12040 #endif
12041
12042 static void *task(p)
12043         void *p;
12044 {
12045         return (void *) (p == NULL);
12046 }
12047
12048 int main() {
12049
12050         /* pthread test function */
12051         pthread_t t;
12052         int status;
12053         int detach = 1;
12054
12055 #ifdef HAVE_PTHREADS_FINAL
12056         /* Final pthreads */
12057         pthread_attr_t attr;
12058
12059         status = pthread_attr_init(&attr);
12060         if( status ) return status;
12061
12062 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12063         if( !detach ) {
12064 #if defined( PTHREAD_CREATE_JOINABLE )
12065                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12066 #else
12067                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12068 #endif
12069
12070 #ifdef PTHREAD_CREATE_DETACHED
12071         } else {
12072                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12073 #endif
12074         }
12075         if( status ) return status;
12076 #endif
12077
12078         status = pthread_create( &t, &attr, task, NULL );
12079         if( status ) return status;
12080
12081 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12082         if( detach ) {
12083                 /* give thread a chance to complete */
12084                 /* it should remain joinable and hence detachable */
12085                 sleep( 1 );
12086
12087                 status = pthread_detach( t );
12088                 if( status ) return status;
12089         }
12090 #endif
12091
12092 #else
12093         /* Draft 4 pthreads */
12094         status = pthread_create( &t, pthread_attr_default, task, NULL );
12095         if( status ) return status;
12096
12097         if( detach ) {
12098                 /* give thread a chance to complete */
12099                 /* it should remain joinable and hence detachable */
12100                 sleep( 1 );
12101
12102                 status = pthread_detach( &t );
12103                 if( status ) return status;
12104         }
12105 #endif
12106
12107 #ifdef HAVE_LINUX_THREADS
12108         pthread_kill_other_threads_np();
12109 #endif
12110
12111         return 0;
12112
12113 ; return 0; }
12114 EOF
12115 if { (eval echo configure:12116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12116   rm -rf conftest*
12117   ol_cv_pthread_kthread=yes
12118 else
12119   echo "configure: failed program was:" >&5
12120   cat conftest.$ac_ext >&5
12121   rm -rf conftest*
12122   ol_cv_pthread_kthread=no
12123 fi
12124 rm -f conftest*
12125 else
12126   cat > conftest.$ac_ext <<EOF
12127 #line 12128 "configure"
12128 #include "confdefs.h"
12129 /* pthread test headers */
12130 #include <pthread.h>
12131 #ifndef NULL
12132 #define NULL (void*)0
12133 #endif
12134
12135 static void *task(p)
12136         void *p;
12137 {
12138         return (void *) (p == NULL);
12139 }
12140
12141
12142 int main(argc, argv)
12143         int argc;
12144         char **argv;
12145 {
12146
12147         /* pthread test function */
12148         pthread_t t;
12149         int status;
12150         int detach = 1;
12151
12152 #ifdef HAVE_PTHREADS_FINAL
12153         /* Final pthreads */
12154         pthread_attr_t attr;
12155
12156         status = pthread_attr_init(&attr);
12157         if( status ) return status;
12158
12159 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12160         if( !detach ) {
12161 #if defined( PTHREAD_CREATE_JOINABLE )
12162                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12163 #else
12164                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12165 #endif
12166
12167 #ifdef PTHREAD_CREATE_DETACHED
12168         } else {
12169                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12170 #endif
12171         }
12172         if( status ) return status;
12173 #endif
12174
12175         status = pthread_create( &t, &attr, task, NULL );
12176         if( status ) return status;
12177
12178 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12179         if( detach ) {
12180                 /* give thread a chance to complete */
12181                 /* it should remain joinable and hence detachable */
12182                 sleep( 1 );
12183
12184                 status = pthread_detach( t );
12185                 if( status ) return status;
12186         }
12187 #endif
12188
12189 #else
12190         /* Draft 4 pthreads */
12191         status = pthread_create( &t, pthread_attr_default, task, NULL );
12192         if( status ) return status;
12193
12194         if( detach ) {
12195                 /* give thread a chance to complete */
12196                 /* it should remain joinable and hence detachable */
12197                 sleep( 1 );
12198
12199                 status = pthread_detach( &t );
12200                 if( status ) return status;
12201         }
12202 #endif
12203
12204 #ifdef HAVE_LINUX_THREADS
12205         pthread_kill_other_threads_np();
12206 #endif
12207
12208         return 0;
12209
12210 }
12211
12212 EOF
12213 if { (eval echo configure:12214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12214 then
12215   ol_cv_pthread_kthread=yes
12216 else
12217   echo "configure: failed program was:" >&5
12218   cat conftest.$ac_ext >&5
12219   rm -fr conftest*
12220   ol_cv_pthread_kthread=no
12221 fi
12222 rm -fr conftest*
12223 fi
12224
12225
12226                 # restore the LIBS
12227                 LIBS="$ol_LIBS"
12228         
12229 fi
12230
12231 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12232
12233         if test $ol_cv_pthread_kthread = yes ; then
12234                 ol_link_pthreads="-kthread"
12235                 ol_link_threads=posix
12236         fi
12237 fi
12238
12239                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12240 if test "$ol_link_threads" = no ; then
12241         # try -pthread
12242         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12243 echo "configure:12244: checking for pthread link with -pthread" >&5
12244 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12245   echo $ac_n "(cached) $ac_c" 1>&6
12246 else
12247   
12248                 # save the flags
12249                 ol_LIBS="$LIBS"
12250                 LIBS="-pthread $LIBS"
12251
12252                 if test "$cross_compiling" = yes; then
12253   cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256 /* pthread test headers */
12257 #include <pthread.h>
12258 #ifndef NULL
12259 #define NULL (void*)0
12260 #endif
12261
12262 static void *task(p)
12263         void *p;
12264 {
12265         return (void *) (p == NULL);
12266 }
12267
12268 int main() {
12269
12270         /* pthread test function */
12271         pthread_t t;
12272         int status;
12273         int detach = 1;
12274
12275 #ifdef HAVE_PTHREADS_FINAL
12276         /* Final pthreads */
12277         pthread_attr_t attr;
12278
12279         status = pthread_attr_init(&attr);
12280         if( status ) return status;
12281
12282 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12283         if( !detach ) {
12284 #if defined( PTHREAD_CREATE_JOINABLE )
12285                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12286 #else
12287                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12288 #endif
12289
12290 #ifdef PTHREAD_CREATE_DETACHED
12291         } else {
12292                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12293 #endif
12294         }
12295         if( status ) return status;
12296 #endif
12297
12298         status = pthread_create( &t, &attr, task, NULL );
12299         if( status ) return status;
12300
12301 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12302         if( detach ) {
12303                 /* give thread a chance to complete */
12304                 /* it should remain joinable and hence detachable */
12305                 sleep( 1 );
12306
12307                 status = pthread_detach( t );
12308                 if( status ) return status;
12309         }
12310 #endif
12311
12312 #else
12313         /* Draft 4 pthreads */
12314         status = pthread_create( &t, pthread_attr_default, task, NULL );
12315         if( status ) return status;
12316
12317         if( detach ) {
12318                 /* give thread a chance to complete */
12319                 /* it should remain joinable and hence detachable */
12320                 sleep( 1 );
12321
12322                 status = pthread_detach( &t );
12323                 if( status ) return status;
12324         }
12325 #endif
12326
12327 #ifdef HAVE_LINUX_THREADS
12328         pthread_kill_other_threads_np();
12329 #endif
12330
12331         return 0;
12332
12333 ; return 0; }
12334 EOF
12335 if { (eval echo configure:12336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12336   rm -rf conftest*
12337   ol_cv_pthread_pthread=yes
12338 else
12339   echo "configure: failed program was:" >&5
12340   cat conftest.$ac_ext >&5
12341   rm -rf conftest*
12342   ol_cv_pthread_pthread=no
12343 fi
12344 rm -f conftest*
12345 else
12346   cat > conftest.$ac_ext <<EOF
12347 #line 12348 "configure"
12348 #include "confdefs.h"
12349 /* pthread test headers */
12350 #include <pthread.h>
12351 #ifndef NULL
12352 #define NULL (void*)0
12353 #endif
12354
12355 static void *task(p)
12356         void *p;
12357 {
12358         return (void *) (p == NULL);
12359 }
12360
12361
12362 int main(argc, argv)
12363         int argc;
12364         char **argv;
12365 {
12366
12367         /* pthread test function */
12368         pthread_t t;
12369         int status;
12370         int detach = 1;
12371
12372 #ifdef HAVE_PTHREADS_FINAL
12373         /* Final pthreads */
12374         pthread_attr_t attr;
12375
12376         status = pthread_attr_init(&attr);
12377         if( status ) return status;
12378
12379 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12380         if( !detach ) {
12381 #if defined( PTHREAD_CREATE_JOINABLE )
12382                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12383 #else
12384                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12385 #endif
12386
12387 #ifdef PTHREAD_CREATE_DETACHED
12388         } else {
12389                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12390 #endif
12391         }
12392         if( status ) return status;
12393 #endif
12394
12395         status = pthread_create( &t, &attr, task, NULL );
12396         if( status ) return status;
12397
12398 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12399         if( detach ) {
12400                 /* give thread a chance to complete */
12401                 /* it should remain joinable and hence detachable */
12402                 sleep( 1 );
12403
12404                 status = pthread_detach( t );
12405                 if( status ) return status;
12406         }
12407 #endif
12408
12409 #else
12410         /* Draft 4 pthreads */
12411         status = pthread_create( &t, pthread_attr_default, task, NULL );
12412         if( status ) return status;
12413
12414         if( detach ) {
12415                 /* give thread a chance to complete */
12416                 /* it should remain joinable and hence detachable */
12417                 sleep( 1 );
12418
12419                 status = pthread_detach( &t );
12420                 if( status ) return status;
12421         }
12422 #endif
12423
12424 #ifdef HAVE_LINUX_THREADS
12425         pthread_kill_other_threads_np();
12426 #endif
12427
12428         return 0;
12429
12430 }
12431
12432 EOF
12433 if { (eval echo configure:12434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12434 then
12435   ol_cv_pthread_pthread=yes
12436 else
12437   echo "configure: failed program was:" >&5
12438   cat conftest.$ac_ext >&5
12439   rm -fr conftest*
12440   ol_cv_pthread_pthread=no
12441 fi
12442 rm -fr conftest*
12443 fi
12444
12445
12446                 # restore the LIBS
12447                 LIBS="$ol_LIBS"
12448         
12449 fi
12450
12451 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12452
12453         if test $ol_cv_pthread_pthread = yes ; then
12454                 ol_link_pthreads="-pthread"
12455                 ol_link_threads=posix
12456         fi
12457 fi
12458
12459                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12460 if test "$ol_link_threads" = no ; then
12461         # try -pthreads
12462         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12463 echo "configure:12464: checking for pthread link with -pthreads" >&5
12464 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12465   echo $ac_n "(cached) $ac_c" 1>&6
12466 else
12467   
12468                 # save the flags
12469                 ol_LIBS="$LIBS"
12470                 LIBS="-pthreads $LIBS"
12471
12472                 if test "$cross_compiling" = yes; then
12473   cat > conftest.$ac_ext <<EOF
12474 #line 12475 "configure"
12475 #include "confdefs.h"
12476 /* pthread test headers */
12477 #include <pthread.h>
12478 #ifndef NULL
12479 #define NULL (void*)0
12480 #endif
12481
12482 static void *task(p)
12483         void *p;
12484 {
12485         return (void *) (p == NULL);
12486 }
12487
12488 int main() {
12489
12490         /* pthread test function */
12491         pthread_t t;
12492         int status;
12493         int detach = 1;
12494
12495 #ifdef HAVE_PTHREADS_FINAL
12496         /* Final pthreads */
12497         pthread_attr_t attr;
12498
12499         status = pthread_attr_init(&attr);
12500         if( status ) return status;
12501
12502 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12503         if( !detach ) {
12504 #if defined( PTHREAD_CREATE_JOINABLE )
12505                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12506 #else
12507                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12508 #endif
12509
12510 #ifdef PTHREAD_CREATE_DETACHED
12511         } else {
12512                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12513 #endif
12514         }
12515         if( status ) return status;
12516 #endif
12517
12518         status = pthread_create( &t, &attr, task, NULL );
12519         if( status ) return status;
12520
12521 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12522         if( detach ) {
12523                 /* give thread a chance to complete */
12524                 /* it should remain joinable and hence detachable */
12525                 sleep( 1 );
12526
12527                 status = pthread_detach( t );
12528                 if( status ) return status;
12529         }
12530 #endif
12531
12532 #else
12533         /* Draft 4 pthreads */
12534         status = pthread_create( &t, pthread_attr_default, task, NULL );
12535         if( status ) return status;
12536
12537         if( detach ) {
12538                 /* give thread a chance to complete */
12539                 /* it should remain joinable and hence detachable */
12540                 sleep( 1 );
12541
12542                 status = pthread_detach( &t );
12543                 if( status ) return status;
12544         }
12545 #endif
12546
12547 #ifdef HAVE_LINUX_THREADS
12548         pthread_kill_other_threads_np();
12549 #endif
12550
12551         return 0;
12552
12553 ; return 0; }
12554 EOF
12555 if { (eval echo configure:12556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12556   rm -rf conftest*
12557   ol_cv_pthread_pthreads=yes
12558 else
12559   echo "configure: failed program was:" >&5
12560   cat conftest.$ac_ext >&5
12561   rm -rf conftest*
12562   ol_cv_pthread_pthreads=no
12563 fi
12564 rm -f conftest*
12565 else
12566   cat > conftest.$ac_ext <<EOF
12567 #line 12568 "configure"
12568 #include "confdefs.h"
12569 /* pthread test headers */
12570 #include <pthread.h>
12571 #ifndef NULL
12572 #define NULL (void*)0
12573 #endif
12574
12575 static void *task(p)
12576         void *p;
12577 {
12578         return (void *) (p == NULL);
12579 }
12580
12581
12582 int main(argc, argv)
12583         int argc;
12584         char **argv;
12585 {
12586
12587         /* pthread test function */
12588         pthread_t t;
12589         int status;
12590         int detach = 1;
12591
12592 #ifdef HAVE_PTHREADS_FINAL
12593         /* Final pthreads */
12594         pthread_attr_t attr;
12595
12596         status = pthread_attr_init(&attr);
12597         if( status ) return status;
12598
12599 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12600         if( !detach ) {
12601 #if defined( PTHREAD_CREATE_JOINABLE )
12602                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12603 #else
12604                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12605 #endif
12606
12607 #ifdef PTHREAD_CREATE_DETACHED
12608         } else {
12609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12610 #endif
12611         }
12612         if( status ) return status;
12613 #endif
12614
12615         status = pthread_create( &t, &attr, task, NULL );
12616         if( status ) return status;
12617
12618 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12619         if( detach ) {
12620                 /* give thread a chance to complete */
12621                 /* it should remain joinable and hence detachable */
12622                 sleep( 1 );
12623
12624                 status = pthread_detach( t );
12625                 if( status ) return status;
12626         }
12627 #endif
12628
12629 #else
12630         /* Draft 4 pthreads */
12631         status = pthread_create( &t, pthread_attr_default, task, NULL );
12632         if( status ) return status;
12633
12634         if( detach ) {
12635                 /* give thread a chance to complete */
12636                 /* it should remain joinable and hence detachable */
12637                 sleep( 1 );
12638
12639                 status = pthread_detach( &t );
12640                 if( status ) return status;
12641         }
12642 #endif
12643
12644 #ifdef HAVE_LINUX_THREADS
12645         pthread_kill_other_threads_np();
12646 #endif
12647
12648         return 0;
12649
12650 }
12651
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12654 then
12655   ol_cv_pthread_pthreads=yes
12656 else
12657   echo "configure: failed program was:" >&5
12658   cat conftest.$ac_ext >&5
12659   rm -fr conftest*
12660   ol_cv_pthread_pthreads=no
12661 fi
12662 rm -fr conftest*
12663 fi
12664
12665
12666                 # restore the LIBS
12667                 LIBS="$ol_LIBS"
12668         
12669 fi
12670
12671 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12672
12673         if test $ol_cv_pthread_pthreads = yes ; then
12674                 ol_link_pthreads="-pthreads"
12675                 ol_link_threads=posix
12676         fi
12677 fi
12678
12679                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12680 if test "$ol_link_threads" = no ; then
12681         # try -mthreads
12682         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12683 echo "configure:12684: checking for pthread link with -mthreads" >&5
12684 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12685   echo $ac_n "(cached) $ac_c" 1>&6
12686 else
12687   
12688                 # save the flags
12689                 ol_LIBS="$LIBS"
12690                 LIBS="-mthreads $LIBS"
12691
12692                 if test "$cross_compiling" = yes; then
12693   cat > conftest.$ac_ext <<EOF
12694 #line 12695 "configure"
12695 #include "confdefs.h"
12696 /* pthread test headers */
12697 #include <pthread.h>
12698 #ifndef NULL
12699 #define NULL (void*)0
12700 #endif
12701
12702 static void *task(p)
12703         void *p;
12704 {
12705         return (void *) (p == NULL);
12706 }
12707
12708 int main() {
12709
12710         /* pthread test function */
12711         pthread_t t;
12712         int status;
12713         int detach = 1;
12714
12715 #ifdef HAVE_PTHREADS_FINAL
12716         /* Final pthreads */
12717         pthread_attr_t attr;
12718
12719         status = pthread_attr_init(&attr);
12720         if( status ) return status;
12721
12722 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12723         if( !detach ) {
12724 #if defined( PTHREAD_CREATE_JOINABLE )
12725                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12726 #else
12727                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12728 #endif
12729
12730 #ifdef PTHREAD_CREATE_DETACHED
12731         } else {
12732                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12733 #endif
12734         }
12735         if( status ) return status;
12736 #endif
12737
12738         status = pthread_create( &t, &attr, task, NULL );
12739         if( status ) return status;
12740
12741 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12742         if( detach ) {
12743                 /* give thread a chance to complete */
12744                 /* it should remain joinable and hence detachable */
12745                 sleep( 1 );
12746
12747                 status = pthread_detach( t );
12748                 if( status ) return status;
12749         }
12750 #endif
12751
12752 #else
12753         /* Draft 4 pthreads */
12754         status = pthread_create( &t, pthread_attr_default, task, NULL );
12755         if( status ) return status;
12756
12757         if( detach ) {
12758                 /* give thread a chance to complete */
12759                 /* it should remain joinable and hence detachable */
12760                 sleep( 1 );
12761
12762                 status = pthread_detach( &t );
12763                 if( status ) return status;
12764         }
12765 #endif
12766
12767 #ifdef HAVE_LINUX_THREADS
12768         pthread_kill_other_threads_np();
12769 #endif
12770
12771         return 0;
12772
12773 ; return 0; }
12774 EOF
12775 if { (eval echo configure:12776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12776   rm -rf conftest*
12777   ol_cv_pthread_mthreads=yes
12778 else
12779   echo "configure: failed program was:" >&5
12780   cat conftest.$ac_ext >&5
12781   rm -rf conftest*
12782   ol_cv_pthread_mthreads=no
12783 fi
12784 rm -f conftest*
12785 else
12786   cat > conftest.$ac_ext <<EOF
12787 #line 12788 "configure"
12788 #include "confdefs.h"
12789 /* pthread test headers */
12790 #include <pthread.h>
12791 #ifndef NULL
12792 #define NULL (void*)0
12793 #endif
12794
12795 static void *task(p)
12796         void *p;
12797 {
12798         return (void *) (p == NULL);
12799 }
12800
12801
12802 int main(argc, argv)
12803         int argc;
12804         char **argv;
12805 {
12806
12807         /* pthread test function */
12808         pthread_t t;
12809         int status;
12810         int detach = 1;
12811
12812 #ifdef HAVE_PTHREADS_FINAL
12813         /* Final pthreads */
12814         pthread_attr_t attr;
12815
12816         status = pthread_attr_init(&attr);
12817         if( status ) return status;
12818
12819 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12820         if( !detach ) {
12821 #if defined( PTHREAD_CREATE_JOINABLE )
12822                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12823 #else
12824                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12825 #endif
12826
12827 #ifdef PTHREAD_CREATE_DETACHED
12828         } else {
12829                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12830 #endif
12831         }
12832         if( status ) return status;
12833 #endif
12834
12835         status = pthread_create( &t, &attr, task, NULL );
12836         if( status ) return status;
12837
12838 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12839         if( detach ) {
12840                 /* give thread a chance to complete */
12841                 /* it should remain joinable and hence detachable */
12842                 sleep( 1 );
12843
12844                 status = pthread_detach( t );
12845                 if( status ) return status;
12846         }
12847 #endif
12848
12849 #else
12850         /* Draft 4 pthreads */
12851         status = pthread_create( &t, pthread_attr_default, task, NULL );
12852         if( status ) return status;
12853
12854         if( detach ) {
12855                 /* give thread a chance to complete */
12856                 /* it should remain joinable and hence detachable */
12857                 sleep( 1 );
12858
12859                 status = pthread_detach( &t );
12860                 if( status ) return status;
12861         }
12862 #endif
12863
12864 #ifdef HAVE_LINUX_THREADS
12865         pthread_kill_other_threads_np();
12866 #endif
12867
12868         return 0;
12869
12870 }
12871
12872 EOF
12873 if { (eval echo configure:12874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12874 then
12875   ol_cv_pthread_mthreads=yes
12876 else
12877   echo "configure: failed program was:" >&5
12878   cat conftest.$ac_ext >&5
12879   rm -fr conftest*
12880   ol_cv_pthread_mthreads=no
12881 fi
12882 rm -fr conftest*
12883 fi
12884
12885
12886                 # restore the LIBS
12887                 LIBS="$ol_LIBS"
12888         
12889 fi
12890
12891 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12892
12893         if test $ol_cv_pthread_mthreads = yes ; then
12894                 ol_link_pthreads="-mthreads"
12895                 ol_link_threads=posix
12896         fi
12897 fi
12898
12899                 # Pthread try link: -thread (ol_cv_pthread_thread)
12900 if test "$ol_link_threads" = no ; then
12901         # try -thread
12902         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12903 echo "configure:12904: checking for pthread link with -thread" >&5
12904 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12905   echo $ac_n "(cached) $ac_c" 1>&6
12906 else
12907   
12908                 # save the flags
12909                 ol_LIBS="$LIBS"
12910                 LIBS="-thread $LIBS"
12911
12912                 if test "$cross_compiling" = yes; then
12913   cat > conftest.$ac_ext <<EOF
12914 #line 12915 "configure"
12915 #include "confdefs.h"
12916 /* pthread test headers */
12917 #include <pthread.h>
12918 #ifndef NULL
12919 #define NULL (void*)0
12920 #endif
12921
12922 static void *task(p)
12923         void *p;
12924 {
12925         return (void *) (p == NULL);
12926 }
12927
12928 int main() {
12929
12930         /* pthread test function */
12931         pthread_t t;
12932         int status;
12933         int detach = 1;
12934
12935 #ifdef HAVE_PTHREADS_FINAL
12936         /* Final pthreads */
12937         pthread_attr_t attr;
12938
12939         status = pthread_attr_init(&attr);
12940         if( status ) return status;
12941
12942 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12943         if( !detach ) {
12944 #if defined( PTHREAD_CREATE_JOINABLE )
12945                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12946 #else
12947                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12948 #endif
12949
12950 #ifdef PTHREAD_CREATE_DETACHED
12951         } else {
12952                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12953 #endif
12954         }
12955         if( status ) return status;
12956 #endif
12957
12958         status = pthread_create( &t, &attr, task, NULL );
12959         if( status ) return status;
12960
12961 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12962         if( detach ) {
12963                 /* give thread a chance to complete */
12964                 /* it should remain joinable and hence detachable */
12965                 sleep( 1 );
12966
12967                 status = pthread_detach( t );
12968                 if( status ) return status;
12969         }
12970 #endif
12971
12972 #else
12973         /* Draft 4 pthreads */
12974         status = pthread_create( &t, pthread_attr_default, task, NULL );
12975         if( status ) return status;
12976
12977         if( detach ) {
12978                 /* give thread a chance to complete */
12979                 /* it should remain joinable and hence detachable */
12980                 sleep( 1 );
12981
12982                 status = pthread_detach( &t );
12983                 if( status ) return status;
12984         }
12985 #endif
12986
12987 #ifdef HAVE_LINUX_THREADS
12988         pthread_kill_other_threads_np();
12989 #endif
12990
12991         return 0;
12992
12993 ; return 0; }
12994 EOF
12995 if { (eval echo configure:12996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12996   rm -rf conftest*
12997   ol_cv_pthread_thread=yes
12998 else
12999   echo "configure: failed program was:" >&5
13000   cat conftest.$ac_ext >&5
13001   rm -rf conftest*
13002   ol_cv_pthread_thread=no
13003 fi
13004 rm -f conftest*
13005 else
13006   cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 /* pthread test headers */
13010 #include <pthread.h>
13011 #ifndef NULL
13012 #define NULL (void*)0
13013 #endif
13014
13015 static void *task(p)
13016         void *p;
13017 {
13018         return (void *) (p == NULL);
13019 }
13020
13021
13022 int main(argc, argv)
13023         int argc;
13024         char **argv;
13025 {
13026
13027         /* pthread test function */
13028         pthread_t t;
13029         int status;
13030         int detach = 1;
13031
13032 #ifdef HAVE_PTHREADS_FINAL
13033         /* Final pthreads */
13034         pthread_attr_t attr;
13035
13036         status = pthread_attr_init(&attr);
13037         if( status ) return status;
13038
13039 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13040         if( !detach ) {
13041 #if defined( PTHREAD_CREATE_JOINABLE )
13042                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13043 #else
13044                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13045 #endif
13046
13047 #ifdef PTHREAD_CREATE_DETACHED
13048         } else {
13049                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13050 #endif
13051         }
13052         if( status ) return status;
13053 #endif
13054
13055         status = pthread_create( &t, &attr, task, NULL );
13056         if( status ) return status;
13057
13058 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13059         if( detach ) {
13060                 /* give thread a chance to complete */
13061                 /* it should remain joinable and hence detachable */
13062                 sleep( 1 );
13063
13064                 status = pthread_detach( t );
13065                 if( status ) return status;
13066         }
13067 #endif
13068
13069 #else
13070         /* Draft 4 pthreads */
13071         status = pthread_create( &t, pthread_attr_default, task, NULL );
13072         if( status ) return status;
13073
13074         if( detach ) {
13075                 /* give thread a chance to complete */
13076                 /* it should remain joinable and hence detachable */
13077                 sleep( 1 );
13078
13079                 status = pthread_detach( &t );
13080                 if( status ) return status;
13081         }
13082 #endif
13083
13084 #ifdef HAVE_LINUX_THREADS
13085         pthread_kill_other_threads_np();
13086 #endif
13087
13088         return 0;
13089
13090 }
13091
13092 EOF
13093 if { (eval echo configure:13094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13094 then
13095   ol_cv_pthread_thread=yes
13096 else
13097   echo "configure: failed program was:" >&5
13098   cat conftest.$ac_ext >&5
13099   rm -fr conftest*
13100   ol_cv_pthread_thread=no
13101 fi
13102 rm -fr conftest*
13103 fi
13104
13105
13106                 # restore the LIBS
13107                 LIBS="$ol_LIBS"
13108         
13109 fi
13110
13111 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13112
13113         if test $ol_cv_pthread_thread = yes ; then
13114                 ol_link_pthreads="-thread"
13115                 ol_link_threads=posix
13116         fi
13117 fi
13118
13119
13120                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13121 if test "$ol_link_threads" = no ; then
13122         # try -lpthread -lmach -lexc -lc_r
13123         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13124 echo "configure:13125: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13125 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13126   echo $ac_n "(cached) $ac_c" 1>&6
13127 else
13128   
13129                 # save the flags
13130                 ol_LIBS="$LIBS"
13131                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13132
13133                 if test "$cross_compiling" = yes; then
13134   cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 /* pthread test headers */
13138 #include <pthread.h>
13139 #ifndef NULL
13140 #define NULL (void*)0
13141 #endif
13142
13143 static void *task(p)
13144         void *p;
13145 {
13146         return (void *) (p == NULL);
13147 }
13148
13149 int main() {
13150
13151         /* pthread test function */
13152         pthread_t t;
13153         int status;
13154         int detach = 1;
13155
13156 #ifdef HAVE_PTHREADS_FINAL
13157         /* Final pthreads */
13158         pthread_attr_t attr;
13159
13160         status = pthread_attr_init(&attr);
13161         if( status ) return status;
13162
13163 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13164         if( !detach ) {
13165 #if defined( PTHREAD_CREATE_JOINABLE )
13166                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13167 #else
13168                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13169 #endif
13170
13171 #ifdef PTHREAD_CREATE_DETACHED
13172         } else {
13173                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13174 #endif
13175         }
13176         if( status ) return status;
13177 #endif
13178
13179         status = pthread_create( &t, &attr, task, NULL );
13180         if( status ) return status;
13181
13182 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13183         if( detach ) {
13184                 /* give thread a chance to complete */
13185                 /* it should remain joinable and hence detachable */
13186                 sleep( 1 );
13187
13188                 status = pthread_detach( t );
13189                 if( status ) return status;
13190         }
13191 #endif
13192
13193 #else
13194         /* Draft 4 pthreads */
13195         status = pthread_create( &t, pthread_attr_default, task, NULL );
13196         if( status ) return status;
13197
13198         if( detach ) {
13199                 /* give thread a chance to complete */
13200                 /* it should remain joinable and hence detachable */
13201                 sleep( 1 );
13202
13203                 status = pthread_detach( &t );
13204                 if( status ) return status;
13205         }
13206 #endif
13207
13208 #ifdef HAVE_LINUX_THREADS
13209         pthread_kill_other_threads_np();
13210 #endif
13211
13212         return 0;
13213
13214 ; return 0; }
13215 EOF
13216 if { (eval echo configure:13217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13217   rm -rf conftest*
13218   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13219 else
13220   echo "configure: failed program was:" >&5
13221   cat conftest.$ac_ext >&5
13222   rm -rf conftest*
13223   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13224 fi
13225 rm -f conftest*
13226 else
13227   cat > conftest.$ac_ext <<EOF
13228 #line 13229 "configure"
13229 #include "confdefs.h"
13230 /* pthread test headers */
13231 #include <pthread.h>
13232 #ifndef NULL
13233 #define NULL (void*)0
13234 #endif
13235
13236 static void *task(p)
13237         void *p;
13238 {
13239         return (void *) (p == NULL);
13240 }
13241
13242
13243 int main(argc, argv)
13244         int argc;
13245         char **argv;
13246 {
13247
13248         /* pthread test function */
13249         pthread_t t;
13250         int status;
13251         int detach = 1;
13252
13253 #ifdef HAVE_PTHREADS_FINAL
13254         /* Final pthreads */
13255         pthread_attr_t attr;
13256
13257         status = pthread_attr_init(&attr);
13258         if( status ) return status;
13259
13260 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13261         if( !detach ) {
13262 #if defined( PTHREAD_CREATE_JOINABLE )
13263                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13264 #else
13265                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13266 #endif
13267
13268 #ifdef PTHREAD_CREATE_DETACHED
13269         } else {
13270                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13271 #endif
13272         }
13273         if( status ) return status;
13274 #endif
13275
13276         status = pthread_create( &t, &attr, task, NULL );
13277         if( status ) return status;
13278
13279 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13280         if( detach ) {
13281                 /* give thread a chance to complete */
13282                 /* it should remain joinable and hence detachable */
13283                 sleep( 1 );
13284
13285                 status = pthread_detach( t );
13286                 if( status ) return status;
13287         }
13288 #endif
13289
13290 #else
13291         /* Draft 4 pthreads */
13292         status = pthread_create( &t, pthread_attr_default, task, NULL );
13293         if( status ) return status;
13294
13295         if( detach ) {
13296                 /* give thread a chance to complete */
13297                 /* it should remain joinable and hence detachable */
13298                 sleep( 1 );
13299
13300                 status = pthread_detach( &t );
13301                 if( status ) return status;
13302         }
13303 #endif
13304
13305 #ifdef HAVE_LINUX_THREADS
13306         pthread_kill_other_threads_np();
13307 #endif
13308
13309         return 0;
13310
13311 }
13312
13313 EOF
13314 if { (eval echo configure:13315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13315 then
13316   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13317 else
13318   echo "configure: failed program was:" >&5
13319   cat conftest.$ac_ext >&5
13320   rm -fr conftest*
13321   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13322 fi
13323 rm -fr conftest*
13324 fi
13325
13326
13327                 # restore the LIBS
13328                 LIBS="$ol_LIBS"
13329         
13330 fi
13331
13332 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13333
13334         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13335                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13336                 ol_link_threads=posix
13337         fi
13338 fi
13339
13340                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13341 if test "$ol_link_threads" = no ; then
13342         # try -lpthread -lmach -lexc
13343         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13344 echo "configure:13345: checking for pthread link with -lpthread -lmach -lexc" >&5
13345 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13346   echo $ac_n "(cached) $ac_c" 1>&6
13347 else
13348   
13349                 # save the flags
13350                 ol_LIBS="$LIBS"
13351                 LIBS="-lpthread -lmach -lexc $LIBS"
13352
13353                 if test "$cross_compiling" = yes; then
13354   cat > conftest.$ac_ext <<EOF
13355 #line 13356 "configure"
13356 #include "confdefs.h"
13357 /* pthread test headers */
13358 #include <pthread.h>
13359 #ifndef NULL
13360 #define NULL (void*)0
13361 #endif
13362
13363 static void *task(p)
13364         void *p;
13365 {
13366         return (void *) (p == NULL);
13367 }
13368
13369 int main() {
13370
13371         /* pthread test function */
13372         pthread_t t;
13373         int status;
13374         int detach = 1;
13375
13376 #ifdef HAVE_PTHREADS_FINAL
13377         /* Final pthreads */
13378         pthread_attr_t attr;
13379
13380         status = pthread_attr_init(&attr);
13381         if( status ) return status;
13382
13383 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13384         if( !detach ) {
13385 #if defined( PTHREAD_CREATE_JOINABLE )
13386                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13387 #else
13388                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13389 #endif
13390
13391 #ifdef PTHREAD_CREATE_DETACHED
13392         } else {
13393                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13394 #endif
13395         }
13396         if( status ) return status;
13397 #endif
13398
13399         status = pthread_create( &t, &attr, task, NULL );
13400         if( status ) return status;
13401
13402 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13403         if( detach ) {
13404                 /* give thread a chance to complete */
13405                 /* it should remain joinable and hence detachable */
13406                 sleep( 1 );
13407
13408                 status = pthread_detach( t );
13409                 if( status ) return status;
13410         }
13411 #endif
13412
13413 #else
13414         /* Draft 4 pthreads */
13415         status = pthread_create( &t, pthread_attr_default, task, NULL );
13416         if( status ) return status;
13417
13418         if( detach ) {
13419                 /* give thread a chance to complete */
13420                 /* it should remain joinable and hence detachable */
13421                 sleep( 1 );
13422
13423                 status = pthread_detach( &t );
13424                 if( status ) return status;
13425         }
13426 #endif
13427
13428 #ifdef HAVE_LINUX_THREADS
13429         pthread_kill_other_threads_np();
13430 #endif
13431
13432         return 0;
13433
13434 ; return 0; }
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13437   rm -rf conftest*
13438   ol_cv_pthread_lpthread_lmach_lexc=yes
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -rf conftest*
13443   ol_cv_pthread_lpthread_lmach_lexc=no
13444 fi
13445 rm -f conftest*
13446 else
13447   cat > conftest.$ac_ext <<EOF
13448 #line 13449 "configure"
13449 #include "confdefs.h"
13450 /* pthread test headers */
13451 #include <pthread.h>
13452 #ifndef NULL
13453 #define NULL (void*)0
13454 #endif
13455
13456 static void *task(p)
13457         void *p;
13458 {
13459         return (void *) (p == NULL);
13460 }
13461
13462
13463 int main(argc, argv)
13464         int argc;
13465         char **argv;
13466 {
13467
13468         /* pthread test function */
13469         pthread_t t;
13470         int status;
13471         int detach = 1;
13472
13473 #ifdef HAVE_PTHREADS_FINAL
13474         /* Final pthreads */
13475         pthread_attr_t attr;
13476
13477         status = pthread_attr_init(&attr);
13478         if( status ) return status;
13479
13480 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13481         if( !detach ) {
13482 #if defined( PTHREAD_CREATE_JOINABLE )
13483                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13484 #else
13485                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13486 #endif
13487
13488 #ifdef PTHREAD_CREATE_DETACHED
13489         } else {
13490                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13491 #endif
13492         }
13493         if( status ) return status;
13494 #endif
13495
13496         status = pthread_create( &t, &attr, task, NULL );
13497         if( status ) return status;
13498
13499 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13500         if( detach ) {
13501                 /* give thread a chance to complete */
13502                 /* it should remain joinable and hence detachable */
13503                 sleep( 1 );
13504
13505                 status = pthread_detach( t );
13506                 if( status ) return status;
13507         }
13508 #endif
13509
13510 #else
13511         /* Draft 4 pthreads */
13512         status = pthread_create( &t, pthread_attr_default, task, NULL );
13513         if( status ) return status;
13514
13515         if( detach ) {
13516                 /* give thread a chance to complete */
13517                 /* it should remain joinable and hence detachable */
13518                 sleep( 1 );
13519
13520                 status = pthread_detach( &t );
13521                 if( status ) return status;
13522         }
13523 #endif
13524
13525 #ifdef HAVE_LINUX_THREADS
13526         pthread_kill_other_threads_np();
13527 #endif
13528
13529         return 0;
13530
13531 }
13532
13533 EOF
13534 if { (eval echo configure:13535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13535 then
13536   ol_cv_pthread_lpthread_lmach_lexc=yes
13537 else
13538   echo "configure: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   rm -fr conftest*
13541   ol_cv_pthread_lpthread_lmach_lexc=no
13542 fi
13543 rm -fr conftest*
13544 fi
13545
13546
13547                 # restore the LIBS
13548                 LIBS="$ol_LIBS"
13549         
13550 fi
13551
13552 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13553
13554         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13555                 ol_link_pthreads="-lpthread -lmach -lexc"
13556                 ol_link_threads=posix
13557         fi
13558 fi
13559
13560
13561                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13562 if test "$ol_link_threads" = no ; then
13563         # try -lpthread -Wl,-woff,85
13564         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13565 echo "configure:13566: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13566 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13567   echo $ac_n "(cached) $ac_c" 1>&6
13568 else
13569   
13570                 # save the flags
13571                 ol_LIBS="$LIBS"
13572                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13573
13574                 if test "$cross_compiling" = yes; then
13575   cat > conftest.$ac_ext <<EOF
13576 #line 13577 "configure"
13577 #include "confdefs.h"
13578 /* pthread test headers */
13579 #include <pthread.h>
13580 #ifndef NULL
13581 #define NULL (void*)0
13582 #endif
13583
13584 static void *task(p)
13585         void *p;
13586 {
13587         return (void *) (p == NULL);
13588 }
13589
13590 int main() {
13591
13592         /* pthread test function */
13593         pthread_t t;
13594         int status;
13595         int detach = 1;
13596
13597 #ifdef HAVE_PTHREADS_FINAL
13598         /* Final pthreads */
13599         pthread_attr_t attr;
13600
13601         status = pthread_attr_init(&attr);
13602         if( status ) return status;
13603
13604 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13605         if( !detach ) {
13606 #if defined( PTHREAD_CREATE_JOINABLE )
13607                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13608 #else
13609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13610 #endif
13611
13612 #ifdef PTHREAD_CREATE_DETACHED
13613         } else {
13614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13615 #endif
13616         }
13617         if( status ) return status;
13618 #endif
13619
13620         status = pthread_create( &t, &attr, task, NULL );
13621         if( status ) return status;
13622
13623 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13624         if( detach ) {
13625                 /* give thread a chance to complete */
13626                 /* it should remain joinable and hence detachable */
13627                 sleep( 1 );
13628
13629                 status = pthread_detach( t );
13630                 if( status ) return status;
13631         }
13632 #endif
13633
13634 #else
13635         /* Draft 4 pthreads */
13636         status = pthread_create( &t, pthread_attr_default, task, NULL );
13637         if( status ) return status;
13638
13639         if( detach ) {
13640                 /* give thread a chance to complete */
13641                 /* it should remain joinable and hence detachable */
13642                 sleep( 1 );
13643
13644                 status = pthread_detach( &t );
13645                 if( status ) return status;
13646         }
13647 #endif
13648
13649 #ifdef HAVE_LINUX_THREADS
13650         pthread_kill_other_threads_np();
13651 #endif
13652
13653         return 0;
13654
13655 ; return 0; }
13656 EOF
13657 if { (eval echo configure:13658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13658   rm -rf conftest*
13659   ol_cv_pthread_lib_lpthread_woff=yes
13660 else
13661   echo "configure: failed program was:" >&5
13662   cat conftest.$ac_ext >&5
13663   rm -rf conftest*
13664   ol_cv_pthread_lib_lpthread_woff=no
13665 fi
13666 rm -f conftest*
13667 else
13668   cat > conftest.$ac_ext <<EOF
13669 #line 13670 "configure"
13670 #include "confdefs.h"
13671 /* pthread test headers */
13672 #include <pthread.h>
13673 #ifndef NULL
13674 #define NULL (void*)0
13675 #endif
13676
13677 static void *task(p)
13678         void *p;
13679 {
13680         return (void *) (p == NULL);
13681 }
13682
13683
13684 int main(argc, argv)
13685         int argc;
13686         char **argv;
13687 {
13688
13689         /* pthread test function */
13690         pthread_t t;
13691         int status;
13692         int detach = 1;
13693
13694 #ifdef HAVE_PTHREADS_FINAL
13695         /* Final pthreads */
13696         pthread_attr_t attr;
13697
13698         status = pthread_attr_init(&attr);
13699         if( status ) return status;
13700
13701 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13702         if( !detach ) {
13703 #if defined( PTHREAD_CREATE_JOINABLE )
13704                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13705 #else
13706                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13707 #endif
13708
13709 #ifdef PTHREAD_CREATE_DETACHED
13710         } else {
13711                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13712 #endif
13713         }
13714         if( status ) return status;
13715 #endif
13716
13717         status = pthread_create( &t, &attr, task, NULL );
13718         if( status ) return status;
13719
13720 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13721         if( detach ) {
13722                 /* give thread a chance to complete */
13723                 /* it should remain joinable and hence detachable */
13724                 sleep( 1 );
13725
13726                 status = pthread_detach( t );
13727                 if( status ) return status;
13728         }
13729 #endif
13730
13731 #else
13732         /* Draft 4 pthreads */
13733         status = pthread_create( &t, pthread_attr_default, task, NULL );
13734         if( status ) return status;
13735
13736         if( detach ) {
13737                 /* give thread a chance to complete */
13738                 /* it should remain joinable and hence detachable */
13739                 sleep( 1 );
13740
13741                 status = pthread_detach( &t );
13742                 if( status ) return status;
13743         }
13744 #endif
13745
13746 #ifdef HAVE_LINUX_THREADS
13747         pthread_kill_other_threads_np();
13748 #endif
13749
13750         return 0;
13751
13752 }
13753
13754 EOF
13755 if { (eval echo configure:13756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13756 then
13757   ol_cv_pthread_lib_lpthread_woff=yes
13758 else
13759   echo "configure: failed program was:" >&5
13760   cat conftest.$ac_ext >&5
13761   rm -fr conftest*
13762   ol_cv_pthread_lib_lpthread_woff=no
13763 fi
13764 rm -fr conftest*
13765 fi
13766
13767
13768                 # restore the LIBS
13769                 LIBS="$ol_LIBS"
13770         
13771 fi
13772
13773 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13774
13775         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13776                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13777                 ol_link_threads=posix
13778         fi
13779 fi
13780
13781
13782                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13783 if test "$ol_link_threads" = no ; then
13784         # try -lpthread
13785         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13786 echo "configure:13787: checking for pthread link with -lpthread" >&5
13787 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13788   echo $ac_n "(cached) $ac_c" 1>&6
13789 else
13790   
13791                 # save the flags
13792                 ol_LIBS="$LIBS"
13793                 LIBS="-lpthread $LIBS"
13794
13795                 if test "$cross_compiling" = yes; then
13796   cat > conftest.$ac_ext <<EOF
13797 #line 13798 "configure"
13798 #include "confdefs.h"
13799 /* pthread test headers */
13800 #include <pthread.h>
13801 #ifndef NULL
13802 #define NULL (void*)0
13803 #endif
13804
13805 static void *task(p)
13806         void *p;
13807 {
13808         return (void *) (p == NULL);
13809 }
13810
13811 int main() {
13812
13813         /* pthread test function */
13814         pthread_t t;
13815         int status;
13816         int detach = 1;
13817
13818 #ifdef HAVE_PTHREADS_FINAL
13819         /* Final pthreads */
13820         pthread_attr_t attr;
13821
13822         status = pthread_attr_init(&attr);
13823         if( status ) return status;
13824
13825 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13826         if( !detach ) {
13827 #if defined( PTHREAD_CREATE_JOINABLE )
13828                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13829 #else
13830                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13831 #endif
13832
13833 #ifdef PTHREAD_CREATE_DETACHED
13834         } else {
13835                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13836 #endif
13837         }
13838         if( status ) return status;
13839 #endif
13840
13841         status = pthread_create( &t, &attr, task, NULL );
13842         if( status ) return status;
13843
13844 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13845         if( detach ) {
13846                 /* give thread a chance to complete */
13847                 /* it should remain joinable and hence detachable */
13848                 sleep( 1 );
13849
13850                 status = pthread_detach( t );
13851                 if( status ) return status;
13852         }
13853 #endif
13854
13855 #else
13856         /* Draft 4 pthreads */
13857         status = pthread_create( &t, pthread_attr_default, task, NULL );
13858         if( status ) return status;
13859
13860         if( detach ) {
13861                 /* give thread a chance to complete */
13862                 /* it should remain joinable and hence detachable */
13863                 sleep( 1 );
13864
13865                 status = pthread_detach( &t );
13866                 if( status ) return status;
13867         }
13868 #endif
13869
13870 #ifdef HAVE_LINUX_THREADS
13871         pthread_kill_other_threads_np();
13872 #endif
13873
13874         return 0;
13875
13876 ; return 0; }
13877 EOF
13878 if { (eval echo configure:13879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13879   rm -rf conftest*
13880   ol_cv_pthread_lpthread=yes
13881 else
13882   echo "configure: failed program was:" >&5
13883   cat conftest.$ac_ext >&5
13884   rm -rf conftest*
13885   ol_cv_pthread_lpthread=no
13886 fi
13887 rm -f conftest*
13888 else
13889   cat > conftest.$ac_ext <<EOF
13890 #line 13891 "configure"
13891 #include "confdefs.h"
13892 /* pthread test headers */
13893 #include <pthread.h>
13894 #ifndef NULL
13895 #define NULL (void*)0
13896 #endif
13897
13898 static void *task(p)
13899         void *p;
13900 {
13901         return (void *) (p == NULL);
13902 }
13903
13904
13905 int main(argc, argv)
13906         int argc;
13907         char **argv;
13908 {
13909
13910         /* pthread test function */
13911         pthread_t t;
13912         int status;
13913         int detach = 1;
13914
13915 #ifdef HAVE_PTHREADS_FINAL
13916         /* Final pthreads */
13917         pthread_attr_t attr;
13918
13919         status = pthread_attr_init(&attr);
13920         if( status ) return status;
13921
13922 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13923         if( !detach ) {
13924 #if defined( PTHREAD_CREATE_JOINABLE )
13925                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13926 #else
13927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13928 #endif
13929
13930 #ifdef PTHREAD_CREATE_DETACHED
13931         } else {
13932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13933 #endif
13934         }
13935         if( status ) return status;
13936 #endif
13937
13938         status = pthread_create( &t, &attr, task, NULL );
13939         if( status ) return status;
13940
13941 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13942         if( detach ) {
13943                 /* give thread a chance to complete */
13944                 /* it should remain joinable and hence detachable */
13945                 sleep( 1 );
13946
13947                 status = pthread_detach( t );
13948                 if( status ) return status;
13949         }
13950 #endif
13951
13952 #else
13953         /* Draft 4 pthreads */
13954         status = pthread_create( &t, pthread_attr_default, task, NULL );
13955         if( status ) return status;
13956
13957         if( detach ) {
13958                 /* give thread a chance to complete */
13959                 /* it should remain joinable and hence detachable */
13960                 sleep( 1 );
13961
13962                 status = pthread_detach( &t );
13963                 if( status ) return status;
13964         }
13965 #endif
13966
13967 #ifdef HAVE_LINUX_THREADS
13968         pthread_kill_other_threads_np();
13969 #endif
13970
13971         return 0;
13972
13973 }
13974
13975 EOF
13976 if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13977 then
13978   ol_cv_pthread_lpthread=yes
13979 else
13980   echo "configure: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   rm -fr conftest*
13983   ol_cv_pthread_lpthread=no
13984 fi
13985 rm -fr conftest*
13986 fi
13987
13988
13989                 # restore the LIBS
13990                 LIBS="$ol_LIBS"
13991         
13992 fi
13993
13994 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13995
13996         if test $ol_cv_pthread_lpthread = yes ; then
13997                 ol_link_pthreads="-lpthread"
13998                 ol_link_threads=posix
13999         fi
14000 fi
14001
14002                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14003 if test "$ol_link_threads" = no ; then
14004         # try -lc_r
14005         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14006 echo "configure:14007: checking for pthread link with -lc_r" >&5
14007 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14008   echo $ac_n "(cached) $ac_c" 1>&6
14009 else
14010   
14011                 # save the flags
14012                 ol_LIBS="$LIBS"
14013                 LIBS="-lc_r $LIBS"
14014
14015                 if test "$cross_compiling" = yes; then
14016   cat > conftest.$ac_ext <<EOF
14017 #line 14018 "configure"
14018 #include "confdefs.h"
14019 /* pthread test headers */
14020 #include <pthread.h>
14021 #ifndef NULL
14022 #define NULL (void*)0
14023 #endif
14024
14025 static void *task(p)
14026         void *p;
14027 {
14028         return (void *) (p == NULL);
14029 }
14030
14031 int main() {
14032
14033         /* pthread test function */
14034         pthread_t t;
14035         int status;
14036         int detach = 1;
14037
14038 #ifdef HAVE_PTHREADS_FINAL
14039         /* Final pthreads */
14040         pthread_attr_t attr;
14041
14042         status = pthread_attr_init(&attr);
14043         if( status ) return status;
14044
14045 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14046         if( !detach ) {
14047 #if defined( PTHREAD_CREATE_JOINABLE )
14048                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14049 #else
14050                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14051 #endif
14052
14053 #ifdef PTHREAD_CREATE_DETACHED
14054         } else {
14055                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14056 #endif
14057         }
14058         if( status ) return status;
14059 #endif
14060
14061         status = pthread_create( &t, &attr, task, NULL );
14062         if( status ) return status;
14063
14064 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14065         if( detach ) {
14066                 /* give thread a chance to complete */
14067                 /* it should remain joinable and hence detachable */
14068                 sleep( 1 );
14069
14070                 status = pthread_detach( t );
14071                 if( status ) return status;
14072         }
14073 #endif
14074
14075 #else
14076         /* Draft 4 pthreads */
14077         status = pthread_create( &t, pthread_attr_default, task, NULL );
14078         if( status ) return status;
14079
14080         if( detach ) {
14081                 /* give thread a chance to complete */
14082                 /* it should remain joinable and hence detachable */
14083                 sleep( 1 );
14084
14085                 status = pthread_detach( &t );
14086                 if( status ) return status;
14087         }
14088 #endif
14089
14090 #ifdef HAVE_LINUX_THREADS
14091         pthread_kill_other_threads_np();
14092 #endif
14093
14094         return 0;
14095
14096 ; return 0; }
14097 EOF
14098 if { (eval echo configure:14099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14099   rm -rf conftest*
14100   ol_cv_pthread_lc_r=yes
14101 else
14102   echo "configure: failed program was:" >&5
14103   cat conftest.$ac_ext >&5
14104   rm -rf conftest*
14105   ol_cv_pthread_lc_r=no
14106 fi
14107 rm -f conftest*
14108 else
14109   cat > conftest.$ac_ext <<EOF
14110 #line 14111 "configure"
14111 #include "confdefs.h"
14112 /* pthread test headers */
14113 #include <pthread.h>
14114 #ifndef NULL
14115 #define NULL (void*)0
14116 #endif
14117
14118 static void *task(p)
14119         void *p;
14120 {
14121         return (void *) (p == NULL);
14122 }
14123
14124
14125 int main(argc, argv)
14126         int argc;
14127         char **argv;
14128 {
14129
14130         /* pthread test function */
14131         pthread_t t;
14132         int status;
14133         int detach = 1;
14134
14135 #ifdef HAVE_PTHREADS_FINAL
14136         /* Final pthreads */
14137         pthread_attr_t attr;
14138
14139         status = pthread_attr_init(&attr);
14140         if( status ) return status;
14141
14142 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14143         if( !detach ) {
14144 #if defined( PTHREAD_CREATE_JOINABLE )
14145                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14146 #else
14147                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14148 #endif
14149
14150 #ifdef PTHREAD_CREATE_DETACHED
14151         } else {
14152                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14153 #endif
14154         }
14155         if( status ) return status;
14156 #endif
14157
14158         status = pthread_create( &t, &attr, task, NULL );
14159         if( status ) return status;
14160
14161 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14162         if( detach ) {
14163                 /* give thread a chance to complete */
14164                 /* it should remain joinable and hence detachable */
14165                 sleep( 1 );
14166
14167                 status = pthread_detach( t );
14168                 if( status ) return status;
14169         }
14170 #endif
14171
14172 #else
14173         /* Draft 4 pthreads */
14174         status = pthread_create( &t, pthread_attr_default, task, NULL );
14175         if( status ) return status;
14176
14177         if( detach ) {
14178                 /* give thread a chance to complete */
14179                 /* it should remain joinable and hence detachable */
14180                 sleep( 1 );
14181
14182                 status = pthread_detach( &t );
14183                 if( status ) return status;
14184         }
14185 #endif
14186
14187 #ifdef HAVE_LINUX_THREADS
14188         pthread_kill_other_threads_np();
14189 #endif
14190
14191         return 0;
14192
14193 }
14194
14195 EOF
14196 if { (eval echo configure:14197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14197 then
14198   ol_cv_pthread_lc_r=yes
14199 else
14200   echo "configure: failed program was:" >&5
14201   cat conftest.$ac_ext >&5
14202   rm -fr conftest*
14203   ol_cv_pthread_lc_r=no
14204 fi
14205 rm -fr conftest*
14206 fi
14207
14208
14209                 # restore the LIBS
14210                 LIBS="$ol_LIBS"
14211         
14212 fi
14213
14214 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14215
14216         if test $ol_cv_pthread_lc_r = yes ; then
14217                 ol_link_pthreads="-lc_r"
14218                 ol_link_threads=posix
14219         fi
14220 fi
14221
14222
14223                 # Pthread try link: -threads (ol_cv_pthread_threads)
14224 if test "$ol_link_threads" = no ; then
14225         # try -threads
14226         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14227 echo "configure:14228: checking for pthread link with -threads" >&5
14228 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14229   echo $ac_n "(cached) $ac_c" 1>&6
14230 else
14231   
14232                 # save the flags
14233                 ol_LIBS="$LIBS"
14234                 LIBS="-threads $LIBS"
14235
14236                 if test "$cross_compiling" = yes; then
14237   cat > conftest.$ac_ext <<EOF
14238 #line 14239 "configure"
14239 #include "confdefs.h"
14240 /* pthread test headers */
14241 #include <pthread.h>
14242 #ifndef NULL
14243 #define NULL (void*)0
14244 #endif
14245
14246 static void *task(p)
14247         void *p;
14248 {
14249         return (void *) (p == NULL);
14250 }
14251
14252 int main() {
14253
14254         /* pthread test function */
14255         pthread_t t;
14256         int status;
14257         int detach = 1;
14258
14259 #ifdef HAVE_PTHREADS_FINAL
14260         /* Final pthreads */
14261         pthread_attr_t attr;
14262
14263         status = pthread_attr_init(&attr);
14264         if( status ) return status;
14265
14266 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14267         if( !detach ) {
14268 #if defined( PTHREAD_CREATE_JOINABLE )
14269                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14270 #else
14271                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14272 #endif
14273
14274 #ifdef PTHREAD_CREATE_DETACHED
14275         } else {
14276                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14277 #endif
14278         }
14279         if( status ) return status;
14280 #endif
14281
14282         status = pthread_create( &t, &attr, task, NULL );
14283         if( status ) return status;
14284
14285 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14286         if( detach ) {
14287                 /* give thread a chance to complete */
14288                 /* it should remain joinable and hence detachable */
14289                 sleep( 1 );
14290
14291                 status = pthread_detach( t );
14292                 if( status ) return status;
14293         }
14294 #endif
14295
14296 #else
14297         /* Draft 4 pthreads */
14298         status = pthread_create( &t, pthread_attr_default, task, NULL );
14299         if( status ) return status;
14300
14301         if( detach ) {
14302                 /* give thread a chance to complete */
14303                 /* it should remain joinable and hence detachable */
14304                 sleep( 1 );
14305
14306                 status = pthread_detach( &t );
14307                 if( status ) return status;
14308         }
14309 #endif
14310
14311 #ifdef HAVE_LINUX_THREADS
14312         pthread_kill_other_threads_np();
14313 #endif
14314
14315         return 0;
14316
14317 ; return 0; }
14318 EOF
14319 if { (eval echo configure:14320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14320   rm -rf conftest*
14321   ol_cv_pthread_threads=yes
14322 else
14323   echo "configure: failed program was:" >&5
14324   cat conftest.$ac_ext >&5
14325   rm -rf conftest*
14326   ol_cv_pthread_threads=no
14327 fi
14328 rm -f conftest*
14329 else
14330   cat > conftest.$ac_ext <<EOF
14331 #line 14332 "configure"
14332 #include "confdefs.h"
14333 /* pthread test headers */
14334 #include <pthread.h>
14335 #ifndef NULL
14336 #define NULL (void*)0
14337 #endif
14338
14339 static void *task(p)
14340         void *p;
14341 {
14342         return (void *) (p == NULL);
14343 }
14344
14345
14346 int main(argc, argv)
14347         int argc;
14348         char **argv;
14349 {
14350
14351         /* pthread test function */
14352         pthread_t t;
14353         int status;
14354         int detach = 1;
14355
14356 #ifdef HAVE_PTHREADS_FINAL
14357         /* Final pthreads */
14358         pthread_attr_t attr;
14359
14360         status = pthread_attr_init(&attr);
14361         if( status ) return status;
14362
14363 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14364         if( !detach ) {
14365 #if defined( PTHREAD_CREATE_JOINABLE )
14366                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14367 #else
14368                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14369 #endif
14370
14371 #ifdef PTHREAD_CREATE_DETACHED
14372         } else {
14373                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14374 #endif
14375         }
14376         if( status ) return status;
14377 #endif
14378
14379         status = pthread_create( &t, &attr, task, NULL );
14380         if( status ) return status;
14381
14382 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14383         if( detach ) {
14384                 /* give thread a chance to complete */
14385                 /* it should remain joinable and hence detachable */
14386                 sleep( 1 );
14387
14388                 status = pthread_detach( t );
14389                 if( status ) return status;
14390         }
14391 #endif
14392
14393 #else
14394         /* Draft 4 pthreads */
14395         status = pthread_create( &t, pthread_attr_default, task, NULL );
14396         if( status ) return status;
14397
14398         if( detach ) {
14399                 /* give thread a chance to complete */
14400                 /* it should remain joinable and hence detachable */
14401                 sleep( 1 );
14402
14403                 status = pthread_detach( &t );
14404                 if( status ) return status;
14405         }
14406 #endif
14407
14408 #ifdef HAVE_LINUX_THREADS
14409         pthread_kill_other_threads_np();
14410 #endif
14411
14412         return 0;
14413
14414 }
14415
14416 EOF
14417 if { (eval echo configure:14418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14418 then
14419   ol_cv_pthread_threads=yes
14420 else
14421   echo "configure: failed program was:" >&5
14422   cat conftest.$ac_ext >&5
14423   rm -fr conftest*
14424   ol_cv_pthread_threads=no
14425 fi
14426 rm -fr conftest*
14427 fi
14428
14429
14430                 # restore the LIBS
14431                 LIBS="$ol_LIBS"
14432         
14433 fi
14434
14435 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14436
14437         if test $ol_cv_pthread_threads = yes ; then
14438                 ol_link_pthreads="-threads"
14439                 ol_link_threads=posix
14440         fi
14441 fi
14442
14443
14444                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14445 if test "$ol_link_threads" = no ; then
14446         # try -lpthreads -lmach -lexc -lc_r
14447         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14448 echo "configure:14449: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14449 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14450   echo $ac_n "(cached) $ac_c" 1>&6
14451 else
14452   
14453                 # save the flags
14454                 ol_LIBS="$LIBS"
14455                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14456
14457                 if test "$cross_compiling" = yes; then
14458   cat > conftest.$ac_ext <<EOF
14459 #line 14460 "configure"
14460 #include "confdefs.h"
14461 /* pthread test headers */
14462 #include <pthread.h>
14463 #ifndef NULL
14464 #define NULL (void*)0
14465 #endif
14466
14467 static void *task(p)
14468         void *p;
14469 {
14470         return (void *) (p == NULL);
14471 }
14472
14473 int main() {
14474
14475         /* pthread test function */
14476         pthread_t t;
14477         int status;
14478         int detach = 1;
14479
14480 #ifdef HAVE_PTHREADS_FINAL
14481         /* Final pthreads */
14482         pthread_attr_t attr;
14483
14484         status = pthread_attr_init(&attr);
14485         if( status ) return status;
14486
14487 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14488         if( !detach ) {
14489 #if defined( PTHREAD_CREATE_JOINABLE )
14490                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14491 #else
14492                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14493 #endif
14494
14495 #ifdef PTHREAD_CREATE_DETACHED
14496         } else {
14497                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14498 #endif
14499         }
14500         if( status ) return status;
14501 #endif
14502
14503         status = pthread_create( &t, &attr, task, NULL );
14504         if( status ) return status;
14505
14506 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14507         if( detach ) {
14508                 /* give thread a chance to complete */
14509                 /* it should remain joinable and hence detachable */
14510                 sleep( 1 );
14511
14512                 status = pthread_detach( t );
14513                 if( status ) return status;
14514         }
14515 #endif
14516
14517 #else
14518         /* Draft 4 pthreads */
14519         status = pthread_create( &t, pthread_attr_default, task, NULL );
14520         if( status ) return status;
14521
14522         if( detach ) {
14523                 /* give thread a chance to complete */
14524                 /* it should remain joinable and hence detachable */
14525                 sleep( 1 );
14526
14527                 status = pthread_detach( &t );
14528                 if( status ) return status;
14529         }
14530 #endif
14531
14532 #ifdef HAVE_LINUX_THREADS
14533         pthread_kill_other_threads_np();
14534 #endif
14535
14536         return 0;
14537
14538 ; return 0; }
14539 EOF
14540 if { (eval echo configure:14541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14541   rm -rf conftest*
14542   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14543 else
14544   echo "configure: failed program was:" >&5
14545   cat conftest.$ac_ext >&5
14546   rm -rf conftest*
14547   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14548 fi
14549 rm -f conftest*
14550 else
14551   cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554 /* pthread test headers */
14555 #include <pthread.h>
14556 #ifndef NULL
14557 #define NULL (void*)0
14558 #endif
14559
14560 static void *task(p)
14561         void *p;
14562 {
14563         return (void *) (p == NULL);
14564 }
14565
14566
14567 int main(argc, argv)
14568         int argc;
14569         char **argv;
14570 {
14571
14572         /* pthread test function */
14573         pthread_t t;
14574         int status;
14575         int detach = 1;
14576
14577 #ifdef HAVE_PTHREADS_FINAL
14578         /* Final pthreads */
14579         pthread_attr_t attr;
14580
14581         status = pthread_attr_init(&attr);
14582         if( status ) return status;
14583
14584 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14585         if( !detach ) {
14586 #if defined( PTHREAD_CREATE_JOINABLE )
14587                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14588 #else
14589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14590 #endif
14591
14592 #ifdef PTHREAD_CREATE_DETACHED
14593         } else {
14594                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14595 #endif
14596         }
14597         if( status ) return status;
14598 #endif
14599
14600         status = pthread_create( &t, &attr, task, NULL );
14601         if( status ) return status;
14602
14603 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14604         if( detach ) {
14605                 /* give thread a chance to complete */
14606                 /* it should remain joinable and hence detachable */
14607                 sleep( 1 );
14608
14609                 status = pthread_detach( t );
14610                 if( status ) return status;
14611         }
14612 #endif
14613
14614 #else
14615         /* Draft 4 pthreads */
14616         status = pthread_create( &t, pthread_attr_default, task, NULL );
14617         if( status ) return status;
14618
14619         if( detach ) {
14620                 /* give thread a chance to complete */
14621                 /* it should remain joinable and hence detachable */
14622                 sleep( 1 );
14623
14624                 status = pthread_detach( &t );
14625                 if( status ) return status;
14626         }
14627 #endif
14628
14629 #ifdef HAVE_LINUX_THREADS
14630         pthread_kill_other_threads_np();
14631 #endif
14632
14633         return 0;
14634
14635 }
14636
14637 EOF
14638 if { (eval echo configure:14639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14639 then
14640   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14641 else
14642   echo "configure: failed program was:" >&5
14643   cat conftest.$ac_ext >&5
14644   rm -fr conftest*
14645   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14646 fi
14647 rm -fr conftest*
14648 fi
14649
14650
14651                 # restore the LIBS
14652                 LIBS="$ol_LIBS"
14653         
14654 fi
14655
14656 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14657
14658         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14659                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14660                 ol_link_threads=posix
14661         fi
14662 fi
14663
14664                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14665 if test "$ol_link_threads" = no ; then
14666         # try -lpthreads -lmach -lexc
14667         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14668 echo "configure:14669: checking for pthread link with -lpthreads -lmach -lexc" >&5
14669 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14670   echo $ac_n "(cached) $ac_c" 1>&6
14671 else
14672   
14673                 # save the flags
14674                 ol_LIBS="$LIBS"
14675                 LIBS="-lpthreads -lmach -lexc $LIBS"
14676
14677                 if test "$cross_compiling" = yes; then
14678   cat > conftest.$ac_ext <<EOF
14679 #line 14680 "configure"
14680 #include "confdefs.h"
14681 /* pthread test headers */
14682 #include <pthread.h>
14683 #ifndef NULL
14684 #define NULL (void*)0
14685 #endif
14686
14687 static void *task(p)
14688         void *p;
14689 {
14690         return (void *) (p == NULL);
14691 }
14692
14693 int main() {
14694
14695         /* pthread test function */
14696         pthread_t t;
14697         int status;
14698         int detach = 1;
14699
14700 #ifdef HAVE_PTHREADS_FINAL
14701         /* Final pthreads */
14702         pthread_attr_t attr;
14703
14704         status = pthread_attr_init(&attr);
14705         if( status ) return status;
14706
14707 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14708         if( !detach ) {
14709 #if defined( PTHREAD_CREATE_JOINABLE )
14710                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14711 #else
14712                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14713 #endif
14714
14715 #ifdef PTHREAD_CREATE_DETACHED
14716         } else {
14717                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14718 #endif
14719         }
14720         if( status ) return status;
14721 #endif
14722
14723         status = pthread_create( &t, &attr, task, NULL );
14724         if( status ) return status;
14725
14726 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14727         if( detach ) {
14728                 /* give thread a chance to complete */
14729                 /* it should remain joinable and hence detachable */
14730                 sleep( 1 );
14731
14732                 status = pthread_detach( t );
14733                 if( status ) return status;
14734         }
14735 #endif
14736
14737 #else
14738         /* Draft 4 pthreads */
14739         status = pthread_create( &t, pthread_attr_default, task, NULL );
14740         if( status ) return status;
14741
14742         if( detach ) {
14743                 /* give thread a chance to complete */
14744                 /* it should remain joinable and hence detachable */
14745                 sleep( 1 );
14746
14747                 status = pthread_detach( &t );
14748                 if( status ) return status;
14749         }
14750 #endif
14751
14752 #ifdef HAVE_LINUX_THREADS
14753         pthread_kill_other_threads_np();
14754 #endif
14755
14756         return 0;
14757
14758 ; return 0; }
14759 EOF
14760 if { (eval echo configure:14761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14761   rm -rf conftest*
14762   ol_cv_pthread_lpthreads_lmach_lexc=yes
14763 else
14764   echo "configure: failed program was:" >&5
14765   cat conftest.$ac_ext >&5
14766   rm -rf conftest*
14767   ol_cv_pthread_lpthreads_lmach_lexc=no
14768 fi
14769 rm -f conftest*
14770 else
14771   cat > conftest.$ac_ext <<EOF
14772 #line 14773 "configure"
14773 #include "confdefs.h"
14774 /* pthread test headers */
14775 #include <pthread.h>
14776 #ifndef NULL
14777 #define NULL (void*)0
14778 #endif
14779
14780 static void *task(p)
14781         void *p;
14782 {
14783         return (void *) (p == NULL);
14784 }
14785
14786
14787 int main(argc, argv)
14788         int argc;
14789         char **argv;
14790 {
14791
14792         /* pthread test function */
14793         pthread_t t;
14794         int status;
14795         int detach = 1;
14796
14797 #ifdef HAVE_PTHREADS_FINAL
14798         /* Final pthreads */
14799         pthread_attr_t attr;
14800
14801         status = pthread_attr_init(&attr);
14802         if( status ) return status;
14803
14804 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14805         if( !detach ) {
14806 #if defined( PTHREAD_CREATE_JOINABLE )
14807                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14808 #else
14809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14810 #endif
14811
14812 #ifdef PTHREAD_CREATE_DETACHED
14813         } else {
14814                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14815 #endif
14816         }
14817         if( status ) return status;
14818 #endif
14819
14820         status = pthread_create( &t, &attr, task, NULL );
14821         if( status ) return status;
14822
14823 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14824         if( detach ) {
14825                 /* give thread a chance to complete */
14826                 /* it should remain joinable and hence detachable */
14827                 sleep( 1 );
14828
14829                 status = pthread_detach( t );
14830                 if( status ) return status;
14831         }
14832 #endif
14833
14834 #else
14835         /* Draft 4 pthreads */
14836         status = pthread_create( &t, pthread_attr_default, task, NULL );
14837         if( status ) return status;
14838
14839         if( detach ) {
14840                 /* give thread a chance to complete */
14841                 /* it should remain joinable and hence detachable */
14842                 sleep( 1 );
14843
14844                 status = pthread_detach( &t );
14845                 if( status ) return status;
14846         }
14847 #endif
14848
14849 #ifdef HAVE_LINUX_THREADS
14850         pthread_kill_other_threads_np();
14851 #endif
14852
14853         return 0;
14854
14855 }
14856
14857 EOF
14858 if { (eval echo configure:14859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14859 then
14860   ol_cv_pthread_lpthreads_lmach_lexc=yes
14861 else
14862   echo "configure: failed program was:" >&5
14863   cat conftest.$ac_ext >&5
14864   rm -fr conftest*
14865   ol_cv_pthread_lpthreads_lmach_lexc=no
14866 fi
14867 rm -fr conftest*
14868 fi
14869
14870
14871                 # restore the LIBS
14872                 LIBS="$ol_LIBS"
14873         
14874 fi
14875
14876 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14877
14878         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14879                 ol_link_pthreads="-lpthreads -lmach -lexc"
14880                 ol_link_threads=posix
14881         fi
14882 fi
14883
14884                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14885 if test "$ol_link_threads" = no ; then
14886         # try -lpthreads -lexc
14887         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14888 echo "configure:14889: checking for pthread link with -lpthreads -lexc" >&5
14889 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14890   echo $ac_n "(cached) $ac_c" 1>&6
14891 else
14892   
14893                 # save the flags
14894                 ol_LIBS="$LIBS"
14895                 LIBS="-lpthreads -lexc $LIBS"
14896
14897                 if test "$cross_compiling" = yes; then
14898   cat > conftest.$ac_ext <<EOF
14899 #line 14900 "configure"
14900 #include "confdefs.h"
14901 /* pthread test headers */
14902 #include <pthread.h>
14903 #ifndef NULL
14904 #define NULL (void*)0
14905 #endif
14906
14907 static void *task(p)
14908         void *p;
14909 {
14910         return (void *) (p == NULL);
14911 }
14912
14913 int main() {
14914
14915         /* pthread test function */
14916         pthread_t t;
14917         int status;
14918         int detach = 1;
14919
14920 #ifdef HAVE_PTHREADS_FINAL
14921         /* Final pthreads */
14922         pthread_attr_t attr;
14923
14924         status = pthread_attr_init(&attr);
14925         if( status ) return status;
14926
14927 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14928         if( !detach ) {
14929 #if defined( PTHREAD_CREATE_JOINABLE )
14930                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14931 #else
14932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14933 #endif
14934
14935 #ifdef PTHREAD_CREATE_DETACHED
14936         } else {
14937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14938 #endif
14939         }
14940         if( status ) return status;
14941 #endif
14942
14943         status = pthread_create( &t, &attr, task, NULL );
14944         if( status ) return status;
14945
14946 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14947         if( detach ) {
14948                 /* give thread a chance to complete */
14949                 /* it should remain joinable and hence detachable */
14950                 sleep( 1 );
14951
14952                 status = pthread_detach( t );
14953                 if( status ) return status;
14954         }
14955 #endif
14956
14957 #else
14958         /* Draft 4 pthreads */
14959         status = pthread_create( &t, pthread_attr_default, task, NULL );
14960         if( status ) return status;
14961
14962         if( detach ) {
14963                 /* give thread a chance to complete */
14964                 /* it should remain joinable and hence detachable */
14965                 sleep( 1 );
14966
14967                 status = pthread_detach( &t );
14968                 if( status ) return status;
14969         }
14970 #endif
14971
14972 #ifdef HAVE_LINUX_THREADS
14973         pthread_kill_other_threads_np();
14974 #endif
14975
14976         return 0;
14977
14978 ; return 0; }
14979 EOF
14980 if { (eval echo configure:14981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14981   rm -rf conftest*
14982   ol_cv_pthread_lpthreads_lexc=yes
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -rf conftest*
14987   ol_cv_pthread_lpthreads_lexc=no
14988 fi
14989 rm -f conftest*
14990 else
14991   cat > conftest.$ac_ext <<EOF
14992 #line 14993 "configure"
14993 #include "confdefs.h"
14994 /* pthread test headers */
14995 #include <pthread.h>
14996 #ifndef NULL
14997 #define NULL (void*)0
14998 #endif
14999
15000 static void *task(p)
15001         void *p;
15002 {
15003         return (void *) (p == NULL);
15004 }
15005
15006
15007 int main(argc, argv)
15008         int argc;
15009         char **argv;
15010 {
15011
15012         /* pthread test function */
15013         pthread_t t;
15014         int status;
15015         int detach = 1;
15016
15017 #ifdef HAVE_PTHREADS_FINAL
15018         /* Final pthreads */
15019         pthread_attr_t attr;
15020
15021         status = pthread_attr_init(&attr);
15022         if( status ) return status;
15023
15024 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15025         if( !detach ) {
15026 #if defined( PTHREAD_CREATE_JOINABLE )
15027                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15028 #else
15029                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15030 #endif
15031
15032 #ifdef PTHREAD_CREATE_DETACHED
15033         } else {
15034                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15035 #endif
15036         }
15037         if( status ) return status;
15038 #endif
15039
15040         status = pthread_create( &t, &attr, task, NULL );
15041         if( status ) return status;
15042
15043 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15044         if( detach ) {
15045                 /* give thread a chance to complete */
15046                 /* it should remain joinable and hence detachable */
15047                 sleep( 1 );
15048
15049                 status = pthread_detach( t );
15050                 if( status ) return status;
15051         }
15052 #endif
15053
15054 #else
15055         /* Draft 4 pthreads */
15056         status = pthread_create( &t, pthread_attr_default, task, NULL );
15057         if( status ) return status;
15058
15059         if( detach ) {
15060                 /* give thread a chance to complete */
15061                 /* it should remain joinable and hence detachable */
15062                 sleep( 1 );
15063
15064                 status = pthread_detach( &t );
15065                 if( status ) return status;
15066         }
15067 #endif
15068
15069 #ifdef HAVE_LINUX_THREADS
15070         pthread_kill_other_threads_np();
15071 #endif
15072
15073         return 0;
15074
15075 }
15076
15077 EOF
15078 if { (eval echo configure:15079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15079 then
15080   ol_cv_pthread_lpthreads_lexc=yes
15081 else
15082   echo "configure: failed program was:" >&5
15083   cat conftest.$ac_ext >&5
15084   rm -fr conftest*
15085   ol_cv_pthread_lpthreads_lexc=no
15086 fi
15087 rm -fr conftest*
15088 fi
15089
15090
15091                 # restore the LIBS
15092                 LIBS="$ol_LIBS"
15093         
15094 fi
15095
15096 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15097
15098         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15099                 ol_link_pthreads="-lpthreads -lexc"
15100                 ol_link_threads=posix
15101         fi
15102 fi
15103
15104
15105                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15106 if test "$ol_link_threads" = no ; then
15107         # try -lpthreads
15108         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15109 echo "configure:15110: checking for pthread link with -lpthreads" >&5
15110 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15111   echo $ac_n "(cached) $ac_c" 1>&6
15112 else
15113   
15114                 # save the flags
15115                 ol_LIBS="$LIBS"
15116                 LIBS="-lpthreads $LIBS"
15117
15118                 if test "$cross_compiling" = yes; then
15119   cat > conftest.$ac_ext <<EOF
15120 #line 15121 "configure"
15121 #include "confdefs.h"
15122 /* pthread test headers */
15123 #include <pthread.h>
15124 #ifndef NULL
15125 #define NULL (void*)0
15126 #endif
15127
15128 static void *task(p)
15129         void *p;
15130 {
15131         return (void *) (p == NULL);
15132 }
15133
15134 int main() {
15135
15136         /* pthread test function */
15137         pthread_t t;
15138         int status;
15139         int detach = 1;
15140
15141 #ifdef HAVE_PTHREADS_FINAL
15142         /* Final pthreads */
15143         pthread_attr_t attr;
15144
15145         status = pthread_attr_init(&attr);
15146         if( status ) return status;
15147
15148 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15149         if( !detach ) {
15150 #if defined( PTHREAD_CREATE_JOINABLE )
15151                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15152 #else
15153                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15154 #endif
15155
15156 #ifdef PTHREAD_CREATE_DETACHED
15157         } else {
15158                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15159 #endif
15160         }
15161         if( status ) return status;
15162 #endif
15163
15164         status = pthread_create( &t, &attr, task, NULL );
15165         if( status ) return status;
15166
15167 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15168         if( detach ) {
15169                 /* give thread a chance to complete */
15170                 /* it should remain joinable and hence detachable */
15171                 sleep( 1 );
15172
15173                 status = pthread_detach( t );
15174                 if( status ) return status;
15175         }
15176 #endif
15177
15178 #else
15179         /* Draft 4 pthreads */
15180         status = pthread_create( &t, pthread_attr_default, task, NULL );
15181         if( status ) return status;
15182
15183         if( detach ) {
15184                 /* give thread a chance to complete */
15185                 /* it should remain joinable and hence detachable */
15186                 sleep( 1 );
15187
15188                 status = pthread_detach( &t );
15189                 if( status ) return status;
15190         }
15191 #endif
15192
15193 #ifdef HAVE_LINUX_THREADS
15194         pthread_kill_other_threads_np();
15195 #endif
15196
15197         return 0;
15198
15199 ; return 0; }
15200 EOF
15201 if { (eval echo configure:15202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15202   rm -rf conftest*
15203   ol_cv_pthread_lib_lpthreads=yes
15204 else
15205   echo "configure: failed program was:" >&5
15206   cat conftest.$ac_ext >&5
15207   rm -rf conftest*
15208   ol_cv_pthread_lib_lpthreads=no
15209 fi
15210 rm -f conftest*
15211 else
15212   cat > conftest.$ac_ext <<EOF
15213 #line 15214 "configure"
15214 #include "confdefs.h"
15215 /* pthread test headers */
15216 #include <pthread.h>
15217 #ifndef NULL
15218 #define NULL (void*)0
15219 #endif
15220
15221 static void *task(p)
15222         void *p;
15223 {
15224         return (void *) (p == NULL);
15225 }
15226
15227
15228 int main(argc, argv)
15229         int argc;
15230         char **argv;
15231 {
15232
15233         /* pthread test function */
15234         pthread_t t;
15235         int status;
15236         int detach = 1;
15237
15238 #ifdef HAVE_PTHREADS_FINAL
15239         /* Final pthreads */
15240         pthread_attr_t attr;
15241
15242         status = pthread_attr_init(&attr);
15243         if( status ) return status;
15244
15245 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15246         if( !detach ) {
15247 #if defined( PTHREAD_CREATE_JOINABLE )
15248                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15249 #else
15250                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15251 #endif
15252
15253 #ifdef PTHREAD_CREATE_DETACHED
15254         } else {
15255                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15256 #endif
15257         }
15258         if( status ) return status;
15259 #endif
15260
15261         status = pthread_create( &t, &attr, task, NULL );
15262         if( status ) return status;
15263
15264 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15265         if( detach ) {
15266                 /* give thread a chance to complete */
15267                 /* it should remain joinable and hence detachable */
15268                 sleep( 1 );
15269
15270                 status = pthread_detach( t );
15271                 if( status ) return status;
15272         }
15273 #endif
15274
15275 #else
15276         /* Draft 4 pthreads */
15277         status = pthread_create( &t, pthread_attr_default, task, NULL );
15278         if( status ) return status;
15279
15280         if( detach ) {
15281                 /* give thread a chance to complete */
15282                 /* it should remain joinable and hence detachable */
15283                 sleep( 1 );
15284
15285                 status = pthread_detach( &t );
15286                 if( status ) return status;
15287         }
15288 #endif
15289
15290 #ifdef HAVE_LINUX_THREADS
15291         pthread_kill_other_threads_np();
15292 #endif
15293
15294         return 0;
15295
15296 }
15297
15298 EOF
15299 if { (eval echo configure:15300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15300 then
15301   ol_cv_pthread_lib_lpthreads=yes
15302 else
15303   echo "configure: failed program was:" >&5
15304   cat conftest.$ac_ext >&5
15305   rm -fr conftest*
15306   ol_cv_pthread_lib_lpthreads=no
15307 fi
15308 rm -fr conftest*
15309 fi
15310
15311
15312                 # restore the LIBS
15313                 LIBS="$ol_LIBS"
15314         
15315 fi
15316
15317 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15318
15319         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15320                 ol_link_pthreads="-lpthreads"
15321                 ol_link_threads=posix
15322         fi
15323 fi
15324
15325
15326                 if test $ol_link_threads != no ; then
15327                         cat >> confdefs.h <<\EOF
15328 #define HAVE_PTHREADS 1
15329 EOF
15330
15331
15332                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15333
15334                                                 save_CPPFLAGS="$CPPFLAGS"
15335                         save_LIBS="$LIBS"
15336                         LIBS="$LTHREAD_LIBS $LIBS"
15337
15338                                                                                                 for ac_func in sched_yield pthread_yield
15339 do
15340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15341 echo "configure:15342: checking for $ac_func" >&5
15342 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15343   echo $ac_n "(cached) $ac_c" 1>&6
15344 else
15345   cat > conftest.$ac_ext <<EOF
15346 #line 15347 "configure"
15347 #include "confdefs.h"
15348 /* System header to define __stub macros and hopefully few prototypes,
15349     which can conflict with char $ac_func(); below.  */
15350 #include <assert.h>
15351 /* Override any gcc2 internal prototype to avoid an error.  */
15352 /* We use char because int might match the return type of a gcc2
15353     builtin and then its argument prototype would still apply.  */
15354 char $ac_func();
15355 char (*f)();
15356
15357 int main() {
15358
15359 /* The GNU C library defines this for functions which it implements
15360     to always fail with ENOSYS.  Some functions are actually named
15361     something starting with __ and the normal name is an alias.  */
15362 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15363 choke me
15364 #else
15365 f = $ac_func;
15366 #endif
15367
15368 ; return 0; }
15369 EOF
15370 if { (eval echo configure:15371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15371   rm -rf conftest*
15372   eval "ac_cv_func_$ac_func=yes"
15373 else
15374   echo "configure: failed program was:" >&5
15375   cat conftest.$ac_ext >&5
15376   rm -rf conftest*
15377   eval "ac_cv_func_$ac_func=no"
15378 fi
15379 rm -f conftest*
15380 fi
15381
15382 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15383   echo "$ac_t""yes" 1>&6
15384     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15385   cat >> confdefs.h <<EOF
15386 #define $ac_tr_func 1
15387 EOF
15388  
15389 else
15390   echo "$ac_t""no" 1>&6
15391 fi
15392 done
15393
15394
15395                         if test $ac_cv_func_sched_yield = no -a \
15396                                 $ac_cv_func_pthread_yield = no ; then
15397                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15398 echo "configure:15399: checking for sched_yield in -lrt" >&5
15399 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15401   echo $ac_n "(cached) $ac_c" 1>&6
15402 else
15403   ac_save_LIBS="$LIBS"
15404 LIBS="-lrt  $LIBS"
15405 cat > conftest.$ac_ext <<EOF
15406 #line 15407 "configure"
15407 #include "confdefs.h"
15408 /* Override any gcc2 internal prototype to avoid an error.  */
15409 /* We use char because int might match the return type of a gcc2
15410     builtin and then its argument prototype would still apply.  */
15411 char sched_yield();
15412
15413 int main() {
15414 sched_yield()
15415 ; return 0; }
15416 EOF
15417 if { (eval echo configure:15418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15418   rm -rf conftest*
15419   eval "ac_cv_lib_$ac_lib_var=yes"
15420 else
15421   echo "configure: failed program was:" >&5
15422   cat conftest.$ac_ext >&5
15423   rm -rf conftest*
15424   eval "ac_cv_lib_$ac_lib_var=no"
15425 fi
15426 rm -f conftest*
15427 LIBS="$ac_save_LIBS"
15428
15429 fi
15430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15431   echo "$ac_t""yes" 1>&6
15432   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15433                                         cat >> confdefs.h <<\EOF
15434 #define HAVE_SCHED_YIELD 1
15435 EOF
15436
15437                                         ac_cv_func_sched_yield=yes
15438 else
15439   echo "$ac_t""no" 1>&6
15440 ac_cv_func_sched_yield=no
15441 fi
15442
15443                         fi
15444                         if test $ac_cv_func_sched_yield = no -a \
15445                                 $ac_cv_func_pthread_yield = no ; then
15446                                                                                                 for ac_func in thr_yield
15447 do
15448 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15449 echo "configure:15450: checking for $ac_func" >&5
15450 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15451   echo $ac_n "(cached) $ac_c" 1>&6
15452 else
15453   cat > conftest.$ac_ext <<EOF
15454 #line 15455 "configure"
15455 #include "confdefs.h"
15456 /* System header to define __stub macros and hopefully few prototypes,
15457     which can conflict with char $ac_func(); below.  */
15458 #include <assert.h>
15459 /* Override any gcc2 internal prototype to avoid an error.  */
15460 /* We use char because int might match the return type of a gcc2
15461     builtin and then its argument prototype would still apply.  */
15462 char $ac_func();
15463 char (*f)();
15464
15465 int main() {
15466
15467 /* The GNU C library defines this for functions which it implements
15468     to always fail with ENOSYS.  Some functions are actually named
15469     something starting with __ and the normal name is an alias.  */
15470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15471 choke me
15472 #else
15473 f = $ac_func;
15474 #endif
15475
15476 ; return 0; }
15477 EOF
15478 if { (eval echo configure:15479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15479   rm -rf conftest*
15480   eval "ac_cv_func_$ac_func=yes"
15481 else
15482   echo "configure: failed program was:" >&5
15483   cat conftest.$ac_ext >&5
15484   rm -rf conftest*
15485   eval "ac_cv_func_$ac_func=no"
15486 fi
15487 rm -f conftest*
15488 fi
15489
15490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15491   echo "$ac_t""yes" 1>&6
15492     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15493   cat >> confdefs.h <<EOF
15494 #define $ac_tr_func 1
15495 EOF
15496  
15497 else
15498   echo "$ac_t""no" 1>&6
15499 fi
15500 done
15501
15502                         fi
15503                         if test $ac_cv_func_sched_yield = no -a \
15504                                 $ac_cv_func_pthread_yield = no -a \
15505                                 "$ac_cv_func_thr_yield" = no ; then
15506                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15507                         fi
15508
15509                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15510 do
15511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15512 echo "configure:15513: checking for $ac_func" >&5
15513 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15514   echo $ac_n "(cached) $ac_c" 1>&6
15515 else
15516   cat > conftest.$ac_ext <<EOF
15517 #line 15518 "configure"
15518 #include "confdefs.h"
15519 /* System header to define __stub macros and hopefully few prototypes,
15520     which can conflict with char $ac_func(); below.  */
15521 #include <assert.h>
15522 /* Override any gcc2 internal prototype to avoid an error.  */
15523 /* We use char because int might match the return type of a gcc2
15524     builtin and then its argument prototype would still apply.  */
15525 char $ac_func();
15526 char (*f)();
15527
15528 int main() {
15529
15530 /* The GNU C library defines this for functions which it implements
15531     to always fail with ENOSYS.  Some functions are actually named
15532     something starting with __ and the normal name is an alias.  */
15533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15534 choke me
15535 #else
15536 f = $ac_func;
15537 #endif
15538
15539 ; return 0; }
15540 EOF
15541 if { (eval echo configure:15542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15542   rm -rf conftest*
15543   eval "ac_cv_func_$ac_func=yes"
15544 else
15545   echo "configure: failed program was:" >&5
15546   cat conftest.$ac_ext >&5
15547   rm -rf conftest*
15548   eval "ac_cv_func_$ac_func=no"
15549 fi
15550 rm -f conftest*
15551 fi
15552
15553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15554   echo "$ac_t""yes" 1>&6
15555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15556   cat >> confdefs.h <<EOF
15557 #define $ac_tr_func 1
15558 EOF
15559  
15560 else
15561   echo "$ac_t""no" 1>&6
15562 fi
15563 done
15564
15565
15566                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15567 echo "configure:15568: checking for pthread_detach with <pthread.h>" >&5
15568 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15569   echo $ac_n "(cached) $ac_c" 1>&6
15570 else
15571   
15572                                                                 cat > conftest.$ac_ext <<EOF
15573 #line 15574 "configure"
15574 #include "confdefs.h"
15575
15576 #include <pthread.h>
15577 #ifndef NULL
15578 #define NULL (void*)0
15579 #endif
15580
15581 int main() {
15582 pthread_detach(NULL);
15583 ; return 0; }
15584 EOF
15585 if { (eval echo configure:15586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15586   rm -rf conftest*
15587   ol_cv_func_pthread_detach=yes
15588 else
15589   echo "configure: failed program was:" >&5
15590   cat conftest.$ac_ext >&5
15591   rm -rf conftest*
15592   ol_cv_func_pthread_detach=no
15593 fi
15594 rm -f conftest*
15595                         
15596 fi
15597
15598 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15599
15600                         if test $ol_cv_func_pthread_detach = no ; then
15601                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15602                         fi
15603
15604                         cat >> confdefs.h <<\EOF
15605 #define HAVE_PTHREAD_DETACH 1
15606 EOF
15607
15608
15609                                                 for ac_func in \
15610                                 pthread_setconcurrency \
15611                                 pthread_getconcurrency \
15612                                 thr_setconcurrency \
15613                                 thr_getconcurrency \
15614                         
15615 do
15616 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15617 echo "configure:15618: checking for $ac_func" >&5
15618 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15619   echo $ac_n "(cached) $ac_c" 1>&6
15620 else
15621   cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624 /* System header to define __stub macros and hopefully few prototypes,
15625     which can conflict with char $ac_func(); below.  */
15626 #include <assert.h>
15627 /* Override any gcc2 internal prototype to avoid an error.  */
15628 /* We use char because int might match the return type of a gcc2
15629     builtin and then its argument prototype would still apply.  */
15630 char $ac_func();
15631 char (*f)();
15632
15633 int main() {
15634
15635 /* The GNU C library defines this for functions which it implements
15636     to always fail with ENOSYS.  Some functions are actually named
15637     something starting with __ and the normal name is an alias.  */
15638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15639 choke me
15640 #else
15641 f = $ac_func;
15642 #endif
15643
15644 ; return 0; }
15645 EOF
15646 if { (eval echo configure:15647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15647   rm -rf conftest*
15648   eval "ac_cv_func_$ac_func=yes"
15649 else
15650   echo "configure: failed program was:" >&5
15651   cat conftest.$ac_ext >&5
15652   rm -rf conftest*
15653   eval "ac_cv_func_$ac_func=no"
15654 fi
15655 rm -f conftest*
15656 fi
15657
15658 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15659   echo "$ac_t""yes" 1>&6
15660     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15661   cat >> confdefs.h <<EOF
15662 #define $ac_tr_func 1
15663 EOF
15664  
15665 else
15666   echo "$ac_t""no" 1>&6
15667 fi
15668 done
15669
15670
15671                         
15672         for ac_func in pthread_kill_other_threads_np
15673 do
15674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15675 echo "configure:15676: checking for $ac_func" >&5
15676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15677   echo $ac_n "(cached) $ac_c" 1>&6
15678 else
15679   cat > conftest.$ac_ext <<EOF
15680 #line 15681 "configure"
15681 #include "confdefs.h"
15682 /* System header to define __stub macros and hopefully few prototypes,
15683     which can conflict with char $ac_func(); below.  */
15684 #include <assert.h>
15685 /* Override any gcc2 internal prototype to avoid an error.  */
15686 /* We use char because int might match the return type of a gcc2
15687     builtin and then its argument prototype would still apply.  */
15688 char $ac_func();
15689 char (*f)();
15690
15691 int main() {
15692
15693 /* The GNU C library defines this for functions which it implements
15694     to always fail with ENOSYS.  Some functions are actually named
15695     something starting with __ and the normal name is an alias.  */
15696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15697 choke me
15698 #else
15699 f = $ac_func;
15700 #endif
15701
15702 ; return 0; }
15703 EOF
15704 if { (eval echo configure:15705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15705   rm -rf conftest*
15706   eval "ac_cv_func_$ac_func=yes"
15707 else
15708   echo "configure: failed program was:" >&5
15709   cat conftest.$ac_ext >&5
15710   rm -rf conftest*
15711   eval "ac_cv_func_$ac_func=no"
15712 fi
15713 rm -f conftest*
15714 fi
15715
15716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15717   echo "$ac_t""yes" 1>&6
15718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15719   cat >> confdefs.h <<EOF
15720 #define $ac_tr_func 1
15721 EOF
15722  
15723 else
15724   echo "$ac_t""no" 1>&6
15725 fi
15726 done
15727
15728         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15729 echo "configure:15730: checking for LinuxThreads implementation" >&5
15730 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15734 fi
15735
15736 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15737
15738                         
15739         
15740         
15741         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15742 echo "configure:15743: checking for LinuxThreads consistency" >&5
15743 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15744   echo $ac_n "(cached) $ac_c" 1>&6
15745 else
15746   
15747                 if test $ol_cv_header_linux_threads = yes -a \
15748                         $ol_cv_sys_linux_threads = yes; then
15749                         ol_cv_linux_threads=yes
15750                 elif test $ol_cv_header_linux_threads = no -a \
15751                         $ol_cv_sys_linux_threads = no; then
15752                         ol_cv_linux_threads=no
15753                 else
15754                         ol_cv_linux_threads=error
15755                 fi
15756         
15757 fi
15758
15759 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15760
15761
15762                         if test $ol_cv_linux_threads = error; then
15763                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15764                         fi
15765
15766                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15767 echo "configure:15768: checking if pthread_create() works" >&5
15768 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15769   echo $ac_n "(cached) $ac_c" 1>&6
15770 else
15771   
15772                         if test "$cross_compiling" = yes; then
15773                                 ol_cv_pthread_create_works=yes
15774 else
15775   cat > conftest.$ac_ext <<EOF
15776 #line 15777 "configure"
15777 #include "confdefs.h"
15778 /* pthread test headers */
15779 #include <pthread.h>
15780 #ifndef NULL
15781 #define NULL (void*)0
15782 #endif
15783
15784 static void *task(p)
15785         void *p;
15786 {
15787         return (void *) (p == NULL);
15788 }
15789
15790
15791 int main(argc, argv)
15792         int argc;
15793         char **argv;
15794 {
15795
15796         /* pthread test function */
15797         pthread_t t;
15798         int status;
15799         int detach = 1;
15800
15801 #ifdef HAVE_PTHREADS_FINAL
15802         /* Final pthreads */
15803         pthread_attr_t attr;
15804
15805         status = pthread_attr_init(&attr);
15806         if( status ) return status;
15807
15808 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15809         if( !detach ) {
15810 #if defined( PTHREAD_CREATE_JOINABLE )
15811                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15812 #else
15813                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15814 #endif
15815
15816 #ifdef PTHREAD_CREATE_DETACHED
15817         } else {
15818                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15819 #endif
15820         }
15821         if( status ) return status;
15822 #endif
15823
15824         status = pthread_create( &t, &attr, task, NULL );
15825         if( status ) return status;
15826
15827 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15828         if( detach ) {
15829                 /* give thread a chance to complete */
15830                 /* it should remain joinable and hence detachable */
15831                 sleep( 1 );
15832
15833                 status = pthread_detach( t );
15834                 if( status ) return status;
15835         }
15836 #endif
15837
15838 #else
15839         /* Draft 4 pthreads */
15840         status = pthread_create( &t, pthread_attr_default, task, NULL );
15841         if( status ) return status;
15842
15843         if( detach ) {
15844                 /* give thread a chance to complete */
15845                 /* it should remain joinable and hence detachable */
15846                 sleep( 1 );
15847
15848                 status = pthread_detach( &t );
15849                 if( status ) return status;
15850         }
15851 #endif
15852
15853 #ifdef HAVE_LINUX_THREADS
15854         pthread_kill_other_threads_np();
15855 #endif
15856
15857         return 0;
15858
15859 }
15860
15861 EOF
15862 if { (eval echo configure:15863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15863 then
15864   ol_cv_pthread_create_works=yes
15865 else
15866   echo "configure: failed program was:" >&5
15867   cat conftest.$ac_ext >&5
15868   rm -fr conftest*
15869   ol_cv_pthread_create_works=no
15870 fi
15871 rm -fr conftest*
15872 fi
15873
15874 fi
15875
15876 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15877
15878                         if test $ol_cv_pthread_create_works = no ; then
15879                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15880                         fi
15881
15882                                                 if test $ol_with_yielding_select = auto ; then
15883                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15884 echo "configure:15885: checking if select yields when using pthreads" >&5
15885 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15886   echo $ac_n "(cached) $ac_c" 1>&6
15887 else
15888   
15889                                 if test "$cross_compiling" = yes; then
15890   ol_cv_pthread_select_yields=cross
15891 else
15892   cat > conftest.$ac_ext <<EOF
15893 #line 15894 "configure"
15894 #include "confdefs.h"
15895
15896 #include <sys/types.h>
15897 #include <sys/time.h>
15898 #include <unistd.h>
15899 #include <pthread.h>
15900 #ifndef NULL
15901 #define NULL (void*) 0
15902 #endif
15903
15904 static int fildes[2];
15905
15906 static void *task(p)
15907         void *p;
15908 {
15909         int i;
15910         struct timeval tv;
15911
15912         fd_set rfds;
15913
15914         tv.tv_sec=10;
15915         tv.tv_usec=0;
15916
15917         FD_ZERO(&rfds);
15918         FD_SET(fildes[0], &rfds);
15919
15920         /* we're not interested in any fds */
15921         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15922
15923         if(i < 0) {
15924                 perror("select");
15925                 exit(10);
15926         }
15927
15928         exit(0); /* if we exit here, the select blocked the whole process */
15929 }
15930
15931 int main(argc, argv)
15932         int argc;
15933         char **argv;
15934 {
15935         pthread_t t;
15936
15937         /* create a pipe to select */
15938         if(pipe(&fildes[0])) {
15939                 perror("select");
15940                 exit(1);
15941         }
15942
15943 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15944         (void) pthread_setconcurrency(2);
15945 #else
15946 #ifdef HAVE_THR_SETCONCURRENCY
15947         /* Set Solaris LWP concurrency to 2 */
15948         thr_setconcurrency(2);
15949 #endif
15950 #endif
15951
15952 #if HAVE_PTHREADS_D4
15953         pthread_create(&t, pthread_attr_default, task, NULL);
15954 #else
15955         pthread_create(&t, NULL, task, NULL);
15956 #endif
15957
15958 #if HAVE_SCHED_YIELD
15959         sched_yield();  /* make sure task runs first */
15960 #else
15961 #ifdef HAVE_PTHREAD_YIELD
15962         pthread_yield();        /* make sure task runs first */
15963 #endif
15964 #endif
15965
15966         exit(2);
15967 }
15968 EOF
15969 if { (eval echo configure:15970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15970 then
15971   ol_cv_pthread_select_yields=no
15972 else
15973   echo "configure: failed program was:" >&5
15974   cat conftest.$ac_ext >&5
15975   rm -fr conftest*
15976   ol_cv_pthread_select_yields=yes
15977 fi
15978 rm -fr conftest*
15979 fi
15980
15981 fi
15982
15983 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15984
15985                                 if test $ol_cv_pthread_select_yields = cross ; then
15986                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15987                                 fi
15988
15989                                 if test $ol_cv_pthread_select_yields = yes ; then
15990                                         ol_with_yielding_select=yes
15991                                 fi
15992                         fi
15993
15994                                                 CPPFLAGS="$save_CPPFLAGS"
15995                         LIBS="$save_LIBS"
15996                 else
15997                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15998                 fi
15999         fi
16000
16001         if test $ol_with_threads = posix ; then
16002                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16003         fi
16004 fi
16005
16006 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16007         -o $ol_with_threads = mach ; then
16008
16009                 for ac_hdr in mach/cthreads.h cthreads.h
16010 do
16011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16013 echo "configure:16014: checking for $ac_hdr" >&5
16014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16015   echo $ac_n "(cached) $ac_c" 1>&6
16016 else
16017   cat > conftest.$ac_ext <<EOF
16018 #line 16019 "configure"
16019 #include "confdefs.h"
16020 #include <$ac_hdr>
16021 EOF
16022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16023 { (eval echo configure:16024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16025 if test -z "$ac_err"; then
16026   rm -rf conftest*
16027   eval "ac_cv_header_$ac_safe=yes"
16028 else
16029   echo "$ac_err" >&5
16030   echo "configure: failed program was:" >&5
16031   cat conftest.$ac_ext >&5
16032   rm -rf conftest*
16033   eval "ac_cv_header_$ac_safe=no"
16034 fi
16035 rm -f conftest*
16036 fi
16037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16038   echo "$ac_t""yes" 1>&6
16039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16040   cat >> confdefs.h <<EOF
16041 #define $ac_tr_hdr 1
16042 EOF
16043  
16044 else
16045   echo "$ac_t""no" 1>&6
16046 fi
16047 done
16048
16049         if test $ac_cv_header_mach_cthreads_h = yes ; then
16050                 ol_with_threads=found
16051
16052                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16053 echo "configure:16054: checking for cthread_fork" >&5
16054 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16055   echo $ac_n "(cached) $ac_c" 1>&6
16056 else
16057   cat > conftest.$ac_ext <<EOF
16058 #line 16059 "configure"
16059 #include "confdefs.h"
16060 /* System header to define __stub macros and hopefully few prototypes,
16061     which can conflict with char cthread_fork(); below.  */
16062 #include <assert.h>
16063 /* Override any gcc2 internal prototype to avoid an error.  */
16064 /* We use char because int might match the return type of a gcc2
16065     builtin and then its argument prototype would still apply.  */
16066 char cthread_fork();
16067 char (*f)();
16068
16069 int main() {
16070
16071 /* The GNU C library defines this for functions which it implements
16072     to always fail with ENOSYS.  Some functions are actually named
16073     something starting with __ and the normal name is an alias.  */
16074 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16075 choke me
16076 #else
16077 f = cthread_fork;
16078 #endif
16079
16080 ; return 0; }
16081 EOF
16082 if { (eval echo configure:16083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16083   rm -rf conftest*
16084   eval "ac_cv_func_cthread_fork=yes"
16085 else
16086   echo "configure: failed program was:" >&5
16087   cat conftest.$ac_ext >&5
16088   rm -rf conftest*
16089   eval "ac_cv_func_cthread_fork=no"
16090 fi
16091 rm -f conftest*
16092 fi
16093
16094 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16095   echo "$ac_t""yes" 1>&6
16096   ol_link_threads=yes
16097 else
16098   echo "$ac_t""no" 1>&6
16099 fi
16100
16101
16102                 if test $ol_link_threads = no ; then
16103                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16104 echo "configure:16105: checking for cthread_fork with -all_load" >&5
16105 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16106   echo $ac_n "(cached) $ac_c" 1>&6
16107 else
16108   
16109                                                                 save_LIBS="$LIBS"
16110                                 LIBS="-all_load $LIBS"
16111                                 cat > conftest.$ac_ext <<EOF
16112 #line 16113 "configure"
16113 #include "confdefs.h"
16114 #include <mach/cthreads.h>
16115 int main() {
16116
16117                                         cthread_fork((void *)0, (void *)0);
16118                                         
16119 ; return 0; }
16120 EOF
16121 if { (eval echo configure:16122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16122   rm -rf conftest*
16123   ol_cv_cthread_all_load=yes
16124 else
16125   echo "configure: failed program was:" >&5
16126   cat conftest.$ac_ext >&5
16127   rm -rf conftest*
16128   ol_cv_cthread_all_load=no
16129 fi
16130 rm -f conftest*
16131                                                                 LIBS="$save_LIBS"
16132                         
16133 fi
16134
16135 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16136
16137                         if test $ol_cv_cthread_all_load = yes ; then
16138                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16139                                 ol_link_threads=mach
16140                                 ol_with_threads=found
16141                         fi
16142                 fi
16143
16144         elif test $ac_cv_header_cthreads_h = yes ; then
16145                                 
16146                 ol_with_threads=found
16147  
16148                                 save_LIBS="$LIBS"
16149                 LIBS="$LIBS -lthreads"
16150                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16151 echo "configure:16152: checking for cthread_fork" >&5
16152 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16153   echo $ac_n "(cached) $ac_c" 1>&6
16154 else
16155   cat > conftest.$ac_ext <<EOF
16156 #line 16157 "configure"
16157 #include "confdefs.h"
16158 /* System header to define __stub macros and hopefully few prototypes,
16159     which can conflict with char cthread_fork(); below.  */
16160 #include <assert.h>
16161 /* Override any gcc2 internal prototype to avoid an error.  */
16162 /* We use char because int might match the return type of a gcc2
16163     builtin and then its argument prototype would still apply.  */
16164 char cthread_fork();
16165 char (*f)();
16166
16167 int main() {
16168
16169 /* The GNU C library defines this for functions which it implements
16170     to always fail with ENOSYS.  Some functions are actually named
16171     something starting with __ and the normal name is an alias.  */
16172 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16173 choke me
16174 #else
16175 f = cthread_fork;
16176 #endif
16177
16178 ; return 0; }
16179 EOF
16180 if { (eval echo configure:16181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16181   rm -rf conftest*
16182   eval "ac_cv_func_cthread_fork=yes"
16183 else
16184   echo "configure: failed program was:" >&5
16185   cat conftest.$ac_ext >&5
16186   rm -rf conftest*
16187   eval "ac_cv_func_cthread_fork=no"
16188 fi
16189 rm -f conftest*
16190 fi
16191
16192 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16193   echo "$ac_t""yes" 1>&6
16194   ol_link_threads=yes
16195 else
16196   echo "$ac_t""no" 1>&6
16197 fi
16198
16199                 LIBS="$save_LIBS"
16200
16201                 if test $ol_link_threads = yes ; then
16202                         LTHREAD_LIBS="-lthreads"
16203                         ol_link_threads=mach
16204                         ol_with_threads=found
16205                 else
16206                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16207                 fi
16208
16209         elif test $ol_with_threads = mach ; then
16210                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16211         fi
16212
16213         if test $ol_link_threads = mach ; then
16214                 cat >> confdefs.h <<\EOF
16215 #define HAVE_MACH_CTHREADS 1
16216 EOF
16217
16218         elif test $ol_with_threads = found ; then
16219                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16220         fi
16221 fi
16222
16223 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16224         -o $ol_with_threads = pth ; then
16225
16226         for ac_hdr in pth.h
16227 do
16228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16230 echo "configure:16231: checking for $ac_hdr" >&5
16231 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16232   echo $ac_n "(cached) $ac_c" 1>&6
16233 else
16234   cat > conftest.$ac_ext <<EOF
16235 #line 16236 "configure"
16236 #include "confdefs.h"
16237 #include <$ac_hdr>
16238 EOF
16239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16240 { (eval echo configure:16241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16242 if test -z "$ac_err"; then
16243   rm -rf conftest*
16244   eval "ac_cv_header_$ac_safe=yes"
16245 else
16246   echo "$ac_err" >&5
16247   echo "configure: failed program was:" >&5
16248   cat conftest.$ac_ext >&5
16249   rm -rf conftest*
16250   eval "ac_cv_header_$ac_safe=no"
16251 fi
16252 rm -f conftest*
16253 fi
16254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16255   echo "$ac_t""yes" 1>&6
16256     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16257   cat >> confdefs.h <<EOF
16258 #define $ac_tr_hdr 1
16259 EOF
16260  
16261 else
16262   echo "$ac_t""no" 1>&6
16263 fi
16264 done
16265
16266
16267         if test $ac_cv_header_pth_h = yes ; then
16268                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16269 echo "configure:16270: checking for pth_version in -lpth" >&5
16270 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16272   echo $ac_n "(cached) $ac_c" 1>&6
16273 else
16274   ac_save_LIBS="$LIBS"
16275 LIBS="-lpth  $LIBS"
16276 cat > conftest.$ac_ext <<EOF
16277 #line 16278 "configure"
16278 #include "confdefs.h"
16279 /* Override any gcc2 internal prototype to avoid an error.  */
16280 /* We use char because int might match the return type of a gcc2
16281     builtin and then its argument prototype would still apply.  */
16282 char pth_version();
16283
16284 int main() {
16285 pth_version()
16286 ; return 0; }
16287 EOF
16288 if { (eval echo configure:16289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16289   rm -rf conftest*
16290   eval "ac_cv_lib_$ac_lib_var=yes"
16291 else
16292   echo "configure: failed program was:" >&5
16293   cat conftest.$ac_ext >&5
16294   rm -rf conftest*
16295   eval "ac_cv_lib_$ac_lib_var=no"
16296 fi
16297 rm -f conftest*
16298 LIBS="$ac_save_LIBS"
16299
16300 fi
16301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16302   echo "$ac_t""yes" 1>&6
16303   have_pth=yes
16304 else
16305   echo "$ac_t""no" 1>&6
16306 have_pth=no
16307 fi
16308
16309
16310                 if test $have_pth = yes ; then
16311                         cat >> confdefs.h <<\EOF
16312 #define HAVE_GNU_PTH 1
16313 EOF
16314
16315                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16316                         ol_link_threads=pth
16317                         ol_with_threads=found
16318
16319                         if test $ol_with_yielding_select = auto ; then
16320                                 ol_with_yielding_select=yes
16321                         fi
16322                 fi
16323         fi
16324 fi
16325
16326 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16327         -o $ol_with_threads = lwp ; then
16328
16329                 for ac_hdr in thread.h synch.h
16330 do
16331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16333 echo "configure:16334: checking for $ac_hdr" >&5
16334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16335   echo $ac_n "(cached) $ac_c" 1>&6
16336 else
16337   cat > conftest.$ac_ext <<EOF
16338 #line 16339 "configure"
16339 #include "confdefs.h"
16340 #include <$ac_hdr>
16341 EOF
16342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16343 { (eval echo configure:16344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16345 if test -z "$ac_err"; then
16346   rm -rf conftest*
16347   eval "ac_cv_header_$ac_safe=yes"
16348 else
16349   echo "$ac_err" >&5
16350   echo "configure: failed program was:" >&5
16351   cat conftest.$ac_ext >&5
16352   rm -rf conftest*
16353   eval "ac_cv_header_$ac_safe=no"
16354 fi
16355 rm -f conftest*
16356 fi
16357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16358   echo "$ac_t""yes" 1>&6
16359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16360   cat >> confdefs.h <<EOF
16361 #define $ac_tr_hdr 1
16362 EOF
16363  
16364 else
16365   echo "$ac_t""no" 1>&6
16366 fi
16367 done
16368
16369         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16370                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16371 echo "configure:16372: checking for thr_create in -lthread" >&5
16372 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16374   echo $ac_n "(cached) $ac_c" 1>&6
16375 else
16376   ac_save_LIBS="$LIBS"
16377 LIBS="-lthread  $LIBS"
16378 cat > conftest.$ac_ext <<EOF
16379 #line 16380 "configure"
16380 #include "confdefs.h"
16381 /* Override any gcc2 internal prototype to avoid an error.  */
16382 /* We use char because int might match the return type of a gcc2
16383     builtin and then its argument prototype would still apply.  */
16384 char thr_create();
16385
16386 int main() {
16387 thr_create()
16388 ; return 0; }
16389 EOF
16390 if { (eval echo configure:16391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16391   rm -rf conftest*
16392   eval "ac_cv_lib_$ac_lib_var=yes"
16393 else
16394   echo "configure: failed program was:" >&5
16395   cat conftest.$ac_ext >&5
16396   rm -rf conftest*
16397   eval "ac_cv_lib_$ac_lib_var=no"
16398 fi
16399 rm -f conftest*
16400 LIBS="$ac_save_LIBS"
16401
16402 fi
16403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16404   echo "$ac_t""yes" 1>&6
16405   have_thr=yes
16406 else
16407   echo "$ac_t""no" 1>&6
16408 have_thr=no
16409 fi
16410
16411
16412                 if test $have_thr = yes ; then
16413                         cat >> confdefs.h <<\EOF
16414 #define HAVE_THR 1
16415 EOF
16416
16417                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16418                         ol_link_threads=thr
16419
16420                         if test $ol_with_yielding_select = auto ; then
16421                                 ol_with_yielding_select=yes
16422                         fi
16423
16424                                                 for ac_func in \
16425                                 thr_setconcurrency \
16426                                 thr_getconcurrency \
16427                         
16428 do
16429 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16430 echo "configure:16431: checking for $ac_func" >&5
16431 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16432   echo $ac_n "(cached) $ac_c" 1>&6
16433 else
16434   cat > conftest.$ac_ext <<EOF
16435 #line 16436 "configure"
16436 #include "confdefs.h"
16437 /* System header to define __stub macros and hopefully few prototypes,
16438     which can conflict with char $ac_func(); below.  */
16439 #include <assert.h>
16440 /* Override any gcc2 internal prototype to avoid an error.  */
16441 /* We use char because int might match the return type of a gcc2
16442     builtin and then its argument prototype would still apply.  */
16443 char $ac_func();
16444 char (*f)();
16445
16446 int main() {
16447
16448 /* The GNU C library defines this for functions which it implements
16449     to always fail with ENOSYS.  Some functions are actually named
16450     something starting with __ and the normal name is an alias.  */
16451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16452 choke me
16453 #else
16454 f = $ac_func;
16455 #endif
16456
16457 ; return 0; }
16458 EOF
16459 if { (eval echo configure:16460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16460   rm -rf conftest*
16461   eval "ac_cv_func_$ac_func=yes"
16462 else
16463   echo "configure: failed program was:" >&5
16464   cat conftest.$ac_ext >&5
16465   rm -rf conftest*
16466   eval "ac_cv_func_$ac_func=no"
16467 fi
16468 rm -f conftest*
16469 fi
16470
16471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16472   echo "$ac_t""yes" 1>&6
16473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16474   cat >> confdefs.h <<EOF
16475 #define $ac_tr_func 1
16476 EOF
16477  
16478 else
16479   echo "$ac_t""no" 1>&6
16480 fi
16481 done
16482
16483                 fi
16484         fi
16485
16486                 for ac_hdr in lwp/lwp.h
16487 do
16488 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16489 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16490 echo "configure:16491: checking for $ac_hdr" >&5
16491 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16492   echo $ac_n "(cached) $ac_c" 1>&6
16493 else
16494   cat > conftest.$ac_ext <<EOF
16495 #line 16496 "configure"
16496 #include "confdefs.h"
16497 #include <$ac_hdr>
16498 EOF
16499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16500 { (eval echo configure:16501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16502 if test -z "$ac_err"; then
16503   rm -rf conftest*
16504   eval "ac_cv_header_$ac_safe=yes"
16505 else
16506   echo "$ac_err" >&5
16507   echo "configure: failed program was:" >&5
16508   cat conftest.$ac_ext >&5
16509   rm -rf conftest*
16510   eval "ac_cv_header_$ac_safe=no"
16511 fi
16512 rm -f conftest*
16513 fi
16514 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16515   echo "$ac_t""yes" 1>&6
16516     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16517   cat >> confdefs.h <<EOF
16518 #define $ac_tr_hdr 1
16519 EOF
16520  
16521 else
16522   echo "$ac_t""no" 1>&6
16523 fi
16524 done
16525
16526         if test $ac_cv_header_lwp_lwp_h = yes ; then
16527                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16528 echo "configure:16529: checking for lwp_create in -llwp" >&5
16529 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16531   echo $ac_n "(cached) $ac_c" 1>&6
16532 else
16533   ac_save_LIBS="$LIBS"
16534 LIBS="-llwp  $LIBS"
16535 cat > conftest.$ac_ext <<EOF
16536 #line 16537 "configure"
16537 #include "confdefs.h"
16538 /* Override any gcc2 internal prototype to avoid an error.  */
16539 /* We use char because int might match the return type of a gcc2
16540     builtin and then its argument prototype would still apply.  */
16541 char lwp_create();
16542
16543 int main() {
16544 lwp_create()
16545 ; return 0; }
16546 EOF
16547 if { (eval echo configure:16548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16548   rm -rf conftest*
16549   eval "ac_cv_lib_$ac_lib_var=yes"
16550 else
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   eval "ac_cv_lib_$ac_lib_var=no"
16555 fi
16556 rm -f conftest*
16557 LIBS="$ac_save_LIBS"
16558
16559 fi
16560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16561   echo "$ac_t""yes" 1>&6
16562   have_lwp=yes
16563 else
16564   echo "$ac_t""no" 1>&6
16565 have_lwp=no
16566 fi
16567
16568
16569                 if test $have_lwp = yes ; then
16570                         cat >> confdefs.h <<\EOF
16571 #define HAVE_LWP 1
16572 EOF
16573
16574                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16575                         ol_link_threads=lwp
16576
16577                         if test $ol_with_yielding_select = auto ; then
16578                                 ol_with_yielding_select=no
16579                         fi
16580                 fi
16581         fi
16582 fi
16583
16584 if test $ol_with_yielding_select = yes ; then
16585         cat >> confdefs.h <<\EOF
16586 #define HAVE_YIELDING_SELECT 1
16587 EOF
16588
16589 fi
16590
16591 if test $ol_with_threads = manual ; then
16592                 ol_link_threads=yes
16593
16594         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16595
16596         for ac_hdr in pthread.h sched.h
16597 do
16598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16600 echo "configure:16601: checking for $ac_hdr" >&5
16601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16602   echo $ac_n "(cached) $ac_c" 1>&6
16603 else
16604   cat > conftest.$ac_ext <<EOF
16605 #line 16606 "configure"
16606 #include "confdefs.h"
16607 #include <$ac_hdr>
16608 EOF
16609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16610 { (eval echo configure:16611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16612 if test -z "$ac_err"; then
16613   rm -rf conftest*
16614   eval "ac_cv_header_$ac_safe=yes"
16615 else
16616   echo "$ac_err" >&5
16617   echo "configure: failed program was:" >&5
16618   cat conftest.$ac_ext >&5
16619   rm -rf conftest*
16620   eval "ac_cv_header_$ac_safe=no"
16621 fi
16622 rm -f conftest*
16623 fi
16624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16625   echo "$ac_t""yes" 1>&6
16626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16627   cat >> confdefs.h <<EOF
16628 #define $ac_tr_hdr 1
16629 EOF
16630  
16631 else
16632   echo "$ac_t""no" 1>&6
16633 fi
16634 done
16635
16636         for ac_func in sched_yield pthread_yield
16637 do
16638 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16639 echo "configure:16640: checking for $ac_func" >&5
16640 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16641   echo $ac_n "(cached) $ac_c" 1>&6
16642 else
16643   cat > conftest.$ac_ext <<EOF
16644 #line 16645 "configure"
16645 #include "confdefs.h"
16646 /* System header to define __stub macros and hopefully few prototypes,
16647     which can conflict with char $ac_func(); below.  */
16648 #include <assert.h>
16649 /* Override any gcc2 internal prototype to avoid an error.  */
16650 /* We use char because int might match the return type of a gcc2
16651     builtin and then its argument prototype would still apply.  */
16652 char $ac_func();
16653 char (*f)();
16654
16655 int main() {
16656
16657 /* The GNU C library defines this for functions which it implements
16658     to always fail with ENOSYS.  Some functions are actually named
16659     something starting with __ and the normal name is an alias.  */
16660 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16661 choke me
16662 #else
16663 f = $ac_func;
16664 #endif
16665
16666 ; return 0; }
16667 EOF
16668 if { (eval echo configure:16669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16669   rm -rf conftest*
16670   eval "ac_cv_func_$ac_func=yes"
16671 else
16672   echo "configure: failed program was:" >&5
16673   cat conftest.$ac_ext >&5
16674   rm -rf conftest*
16675   eval "ac_cv_func_$ac_func=no"
16676 fi
16677 rm -f conftest*
16678 fi
16679
16680 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16681   echo "$ac_t""yes" 1>&6
16682     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16683   cat >> confdefs.h <<EOF
16684 #define $ac_tr_func 1
16685 EOF
16686  
16687 else
16688   echo "$ac_t""no" 1>&6
16689 fi
16690 done
16691
16692         
16693         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16694 echo "configure:16695: checking for LinuxThreads pthread.h" >&5
16695 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16696   echo $ac_n "(cached) $ac_c" 1>&6
16697 else
16698   cat > conftest.$ac_ext <<EOF
16699 #line 16700 "configure"
16700 #include "confdefs.h"
16701 #include <pthread.h>
16702 EOF
16703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16704   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16705   rm -rf conftest*
16706   ol_cv_header_linux_threads=yes
16707 else
16708   rm -rf conftest*
16709   ol_cv_header_linux_threads=no
16710 fi
16711 rm -f conftest*
16712
16713                 
16714 fi
16715
16716 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16717         if test $ol_cv_header_linux_threads = yes; then
16718                 cat >> confdefs.h <<\EOF
16719 #define HAVE_LINUX_THREADS 1
16720 EOF
16721
16722         fi
16723
16724
16725         for ac_hdr in mach/cthreads.h
16726 do
16727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16729 echo "configure:16730: checking for $ac_hdr" >&5
16730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16731   echo $ac_n "(cached) $ac_c" 1>&6
16732 else
16733   cat > conftest.$ac_ext <<EOF
16734 #line 16735 "configure"
16735 #include "confdefs.h"
16736 #include <$ac_hdr>
16737 EOF
16738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16739 { (eval echo configure:16740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16741 if test -z "$ac_err"; then
16742   rm -rf conftest*
16743   eval "ac_cv_header_$ac_safe=yes"
16744 else
16745   echo "$ac_err" >&5
16746   echo "configure: failed program was:" >&5
16747   cat conftest.$ac_ext >&5
16748   rm -rf conftest*
16749   eval "ac_cv_header_$ac_safe=no"
16750 fi
16751 rm -f conftest*
16752 fi
16753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16754   echo "$ac_t""yes" 1>&6
16755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16756   cat >> confdefs.h <<EOF
16757 #define $ac_tr_hdr 1
16758 EOF
16759  
16760 else
16761   echo "$ac_t""no" 1>&6
16762 fi
16763 done
16764
16765         for ac_hdr in lwp/lwp.h
16766 do
16767 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16768 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16769 echo "configure:16770: checking for $ac_hdr" >&5
16770 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16771   echo $ac_n "(cached) $ac_c" 1>&6
16772 else
16773   cat > conftest.$ac_ext <<EOF
16774 #line 16775 "configure"
16775 #include "confdefs.h"
16776 #include <$ac_hdr>
16777 EOF
16778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16779 { (eval echo configure:16780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16781 if test -z "$ac_err"; then
16782   rm -rf conftest*
16783   eval "ac_cv_header_$ac_safe=yes"
16784 else
16785   echo "$ac_err" >&5
16786   echo "configure: failed program was:" >&5
16787   cat conftest.$ac_ext >&5
16788   rm -rf conftest*
16789   eval "ac_cv_header_$ac_safe=no"
16790 fi
16791 rm -f conftest*
16792 fi
16793 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16794   echo "$ac_t""yes" 1>&6
16795     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16796   cat >> confdefs.h <<EOF
16797 #define $ac_tr_hdr 1
16798 EOF
16799  
16800 else
16801   echo "$ac_t""no" 1>&6
16802 fi
16803 done
16804
16805         for ac_hdr in thread.h synch.h
16806 do
16807 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16808 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16809 echo "configure:16810: checking for $ac_hdr" >&5
16810 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16811   echo $ac_n "(cached) $ac_c" 1>&6
16812 else
16813   cat > conftest.$ac_ext <<EOF
16814 #line 16815 "configure"
16815 #include "confdefs.h"
16816 #include <$ac_hdr>
16817 EOF
16818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16819 { (eval echo configure:16820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16821 if test -z "$ac_err"; then
16822   rm -rf conftest*
16823   eval "ac_cv_header_$ac_safe=yes"
16824 else
16825   echo "$ac_err" >&5
16826   echo "configure: failed program was:" >&5
16827   cat conftest.$ac_ext >&5
16828   rm -rf conftest*
16829   eval "ac_cv_header_$ac_safe=no"
16830 fi
16831 rm -f conftest*
16832 fi
16833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16834   echo "$ac_t""yes" 1>&6
16835     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16836   cat >> confdefs.h <<EOF
16837 #define $ac_tr_hdr 1
16838 EOF
16839  
16840 else
16841   echo "$ac_t""no" 1>&6
16842 fi
16843 done
16844
16845 fi
16846
16847 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16848                         cat >> confdefs.h <<\EOF
16849 #define REENTRANT 1
16850 EOF
16851
16852         cat >> confdefs.h <<\EOF
16853 #define _REENTRANT 1
16854 EOF
16855
16856         cat >> confdefs.h <<\EOF
16857 #define THREAD_SAFE 1
16858 EOF
16859
16860         cat >> confdefs.h <<\EOF
16861 #define _THREAD_SAFE 1
16862 EOF
16863
16864         cat >> confdefs.h <<\EOF
16865 #define THREADSAFE 1
16866 EOF
16867
16868         cat >> confdefs.h <<\EOF
16869 #define _THREADSAFE 1
16870 EOF
16871
16872         cat >> confdefs.h <<\EOF
16873 #define _SGI_MP_SOURCE 1
16874 EOF
16875
16876
16877                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16878 echo "configure:16879: checking for thread specific errno" >&5
16879 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16880   echo $ac_n "(cached) $ac_c" 1>&6
16881 else
16882   
16883                 cat > conftest.$ac_ext <<EOF
16884 #line 16885 "configure"
16885 #include "confdefs.h"
16886 #include <errno.h>
16887 int main() {
16888 errno = 0;
16889 ; return 0; }
16890 EOF
16891 if { (eval echo configure:16892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16892   rm -rf conftest*
16893   ol_cv_errno_thread_specific=yes
16894 else
16895   echo "configure: failed program was:" >&5
16896   cat conftest.$ac_ext >&5
16897   rm -rf conftest*
16898   ol_cv_errno_thread_specific=no
16899 fi
16900 rm -f conftest*
16901         
16902 fi
16903
16904 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16905
16906                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16907 echo "configure:16908: checking for thread specific h_errno" >&5
16908 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16909   echo $ac_n "(cached) $ac_c" 1>&6
16910 else
16911   
16912                 cat > conftest.$ac_ext <<EOF
16913 #line 16914 "configure"
16914 #include "confdefs.h"
16915 #include <netdb.h>
16916 int main() {
16917 h_errno = 0;
16918 ; return 0; }
16919 EOF
16920 if { (eval echo configure:16921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16921   rm -rf conftest*
16922   ol_cv_h_errno_thread_specific=yes
16923 else
16924   echo "configure: failed program was:" >&5
16925   cat conftest.$ac_ext >&5
16926   rm -rf conftest*
16927   ol_cv_h_errno_thread_specific=no
16928 fi
16929 rm -f conftest*
16930         
16931 fi
16932
16933 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16934
16935         if test $ol_cv_errno_thread_specific != yes \
16936                 -o $ol_cv_h_errno_thread_specific != yes ; then
16937                 LIBS="$LTHREAD_LIBS $LIBS"
16938                 LTHREAD_LIBS=""
16939         fi
16940
16941 fi  
16942
16943 if test $ol_link_threads = no ; then
16944         if test $ol_with_threads = yes ; then
16945                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16946         fi
16947
16948         if test $ol_with_threads = auto ; then
16949                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16950                 ol_with_threads=no
16951         fi
16952
16953         cat >> confdefs.h <<\EOF
16954 #define NO_THREADS 1
16955 EOF
16956
16957         LTHREAD_LIBS=""
16958 fi
16959
16960 if test $ol_link_threads != no ; then
16961         cat >> confdefs.h <<\EOF
16962 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16963 EOF
16964
16965 fi
16966
16967 ol_link_ldbm=no 
16968
16969 if test $ol_with_ldbm_api = auto \
16970         -o $ol_with_ldbm_api = berkeley \
16971         -o $ol_with_ldbm_api = bcompat ; then
16972
16973         if test $ol_with_ldbm_api = bcompat; then \
16974                 for ac_hdr in db_185.h db.h
16975 do
16976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16978 echo "configure:16979: checking for $ac_hdr" >&5
16979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16980   echo $ac_n "(cached) $ac_c" 1>&6
16981 else
16982   cat > conftest.$ac_ext <<EOF
16983 #line 16984 "configure"
16984 #include "confdefs.h"
16985 #include <$ac_hdr>
16986 EOF
16987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16988 { (eval echo configure:16989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16990 if test -z "$ac_err"; then
16991   rm -rf conftest*
16992   eval "ac_cv_header_$ac_safe=yes"
16993 else
16994   echo "$ac_err" >&5
16995   echo "configure: failed program was:" >&5
16996   cat conftest.$ac_ext >&5
16997   rm -rf conftest*
16998   eval "ac_cv_header_$ac_safe=no"
16999 fi
17000 rm -f conftest*
17001 fi
17002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17003   echo "$ac_t""yes" 1>&6
17004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17005   cat >> confdefs.h <<EOF
17006 #define $ac_tr_hdr 1
17007 EOF
17008  
17009 else
17010   echo "$ac_t""no" 1>&6
17011 fi
17012 done
17013
17014 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17015         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17016 echo "configure:17017: checking if Berkeley DB header compatibility" >&5
17017 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17018   echo $ac_n "(cached) $ac_c" 1>&6
17019 else
17020   
17021                 cat > conftest.$ac_ext <<EOF
17022 #line 17023 "configure"
17023 #include "confdefs.h"
17024
17025 #if HAVE_DB_185_H
17026 #       include <db_185.h>
17027 #else
17028 #       include <db.h>
17029 #endif
17030
17031  /* this check could be improved */
17032 #ifndef DB_VERSION_MAJOR
17033 #       define DB_VERSION_MAJOR 1
17034 #endif
17035
17036 #if DB_VERSION_MAJOR == 1 
17037         __db_version_1
17038 #endif
17039
17040 EOF
17041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17042   egrep "__db_version_1" >/dev/null 2>&1; then
17043   rm -rf conftest*
17044   ol_cv_header_db1=yes
17045 else
17046   rm -rf conftest*
17047   ol_cv_header_db1=no
17048 fi
17049 rm -f conftest*
17050
17051 fi
17052
17053 echo "$ac_t""$ol_cv_header_db1" 1>&6
17054
17055         if test $ol_cv_header_db1 = yes ; then
17056                 ol_cv_lib_db=no
17057 if test $ol_cv_lib_db = no ; then
17058         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17059 echo "configure:17060: checking for Berkeley DB link (default)" >&5
17060 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17061   echo $ac_n "(cached) $ac_c" 1>&6
17062 else
17063   
17064         ol_DB_LIB=
17065         ol_LIBS=$LIBS
17066         LIBS="$ol_DB_LIB $LIBS"
17067
17068         cat > conftest.$ac_ext <<EOF
17069 #line 17070 "configure"
17070 #include "confdefs.h"
17071
17072 #ifdef HAVE_DB_185_H
17073 # include <db_185.h>
17074 #else
17075 # include <db.h>
17076 #endif
17077
17078 #ifndef DB_VERSION_MAJOR
17079 # define DB_VERSION_MAJOR 1
17080 #endif
17081
17082 #ifndef NULL
17083 #define NULL ((void*)0)
17084 #endif
17085
17086 int main() {
17087
17088 #if DB_VERSION_MAJOR > 1
17089         {
17090                 char *version;
17091                 int major, minor, patch;
17092
17093                 version = db_version( &major, &minor, &patch );
17094
17095                 if( major != DB_VERSION_MAJOR ||
17096                         minor < DB_VERSION_MINOR )
17097                 {
17098                         printf("Berkeley DB version mismatch\n"
17099                                 "\texpected: %s\n\tgot: %s\n",
17100                                 DB_VERSION_STRING, version);
17101                         return 1;
17102                 }
17103         }
17104 #endif
17105
17106 #if DB_VERSION_MAJOR > 2
17107         db_env_create( NULL, 0 );
17108 #elif DB_VERSION_MAJOR > 1
17109         db_appexit( NULL );
17110 #else
17111         (void) dbopen( NULL, 0, 0, 0, NULL);
17112 #endif
17113
17114 ; return 0; }
17115 EOF
17116 if { (eval echo configure:17117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17117   rm -rf conftest*
17118   ol_cv_db_none=yes
17119 else
17120   echo "configure: failed program was:" >&5
17121   cat conftest.$ac_ext >&5
17122   rm -rf conftest*
17123   ol_cv_db_none=no
17124 fi
17125 rm -f conftest*
17126
17127         LIBS="$ol_LIBS"
17128
17129 fi
17130
17131 echo "$ac_t""$ol_cv_db_none" 1>&6
17132
17133         if test $ol_cv_db_none = yes ; then
17134                 ol_cv_lib_db=yes
17135         fi
17136 fi
17137
17138 if test $ol_cv_lib_db = no ; then
17139         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17140 echo "configure:17141: checking for Berkeley DB link (-ldb4)" >&5
17141 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17142   echo $ac_n "(cached) $ac_c" 1>&6
17143 else
17144   
17145         ol_DB_LIB=-ldb4
17146         ol_LIBS=$LIBS
17147         LIBS="$ol_DB_LIB $LIBS"
17148
17149         cat > conftest.$ac_ext <<EOF
17150 #line 17151 "configure"
17151 #include "confdefs.h"
17152
17153 #ifdef HAVE_DB_185_H
17154 # include <db_185.h>
17155 #else
17156 # include <db.h>
17157 #endif
17158
17159 #ifndef DB_VERSION_MAJOR
17160 # define DB_VERSION_MAJOR 1
17161 #endif
17162
17163 #ifndef NULL
17164 #define NULL ((void*)0)
17165 #endif
17166
17167 int main() {
17168
17169 #if DB_VERSION_MAJOR > 1
17170         {
17171                 char *version;
17172                 int major, minor, patch;
17173
17174                 version = db_version( &major, &minor, &patch );
17175
17176                 if( major != DB_VERSION_MAJOR ||
17177                         minor < DB_VERSION_MINOR )
17178                 {
17179                         printf("Berkeley DB version mismatch\n"
17180                                 "\texpected: %s\n\tgot: %s\n",
17181                                 DB_VERSION_STRING, version);
17182                         return 1;
17183                 }
17184         }
17185 #endif
17186
17187 #if DB_VERSION_MAJOR > 2
17188         db_env_create( NULL, 0 );
17189 #elif DB_VERSION_MAJOR > 1
17190         db_appexit( NULL );
17191 #else
17192         (void) dbopen( NULL, 0, 0, 0, NULL);
17193 #endif
17194
17195 ; return 0; }
17196 EOF
17197 if { (eval echo configure:17198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17198   rm -rf conftest*
17199   ol_cv_db_db4=yes
17200 else
17201   echo "configure: failed program was:" >&5
17202   cat conftest.$ac_ext >&5
17203   rm -rf conftest*
17204   ol_cv_db_db4=no
17205 fi
17206 rm -f conftest*
17207
17208         LIBS="$ol_LIBS"
17209
17210 fi
17211
17212 echo "$ac_t""$ol_cv_db_db4" 1>&6
17213
17214         if test $ol_cv_db_db4 = yes ; then
17215                 ol_cv_lib_db=-ldb4
17216         fi
17217 fi
17218
17219 if test $ol_cv_lib_db = no ; then
17220         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17221 echo "configure:17222: checking for Berkeley DB link (-ldb)" >&5
17222 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17223   echo $ac_n "(cached) $ac_c" 1>&6
17224 else
17225   
17226         ol_DB_LIB=-ldb
17227         ol_LIBS=$LIBS
17228         LIBS="$ol_DB_LIB $LIBS"
17229
17230         cat > conftest.$ac_ext <<EOF
17231 #line 17232 "configure"
17232 #include "confdefs.h"
17233
17234 #ifdef HAVE_DB_185_H
17235 # include <db_185.h>
17236 #else
17237 # include <db.h>
17238 #endif
17239
17240 #ifndef DB_VERSION_MAJOR
17241 # define DB_VERSION_MAJOR 1
17242 #endif
17243
17244 #ifndef NULL
17245 #define NULL ((void*)0)
17246 #endif
17247
17248 int main() {
17249
17250 #if DB_VERSION_MAJOR > 1
17251         {
17252                 char *version;
17253                 int major, minor, patch;
17254
17255                 version = db_version( &major, &minor, &patch );
17256
17257                 if( major != DB_VERSION_MAJOR ||
17258                         minor < DB_VERSION_MINOR )
17259                 {
17260                         printf("Berkeley DB version mismatch\n"
17261                                 "\texpected: %s\n\tgot: %s\n",
17262                                 DB_VERSION_STRING, version);
17263                         return 1;
17264                 }
17265         }
17266 #endif
17267
17268 #if DB_VERSION_MAJOR > 2
17269         db_env_create( NULL, 0 );
17270 #elif DB_VERSION_MAJOR > 1
17271         db_appexit( NULL );
17272 #else
17273         (void) dbopen( NULL, 0, 0, 0, NULL);
17274 #endif
17275
17276 ; return 0; }
17277 EOF
17278 if { (eval echo configure:17279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17279   rm -rf conftest*
17280   ol_cv_db_db=yes
17281 else
17282   echo "configure: failed program was:" >&5
17283   cat conftest.$ac_ext >&5
17284   rm -rf conftest*
17285   ol_cv_db_db=no
17286 fi
17287 rm -f conftest*
17288
17289         LIBS="$ol_LIBS"
17290
17291 fi
17292
17293 echo "$ac_t""$ol_cv_db_db" 1>&6
17294
17295         if test $ol_cv_db_db = yes ; then
17296                 ol_cv_lib_db=-ldb
17297         fi
17298 fi
17299
17300 if test $ol_cv_lib_db = no ; then
17301         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17302 echo "configure:17303: checking for Berkeley DB link (-ldb3)" >&5
17303 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17304   echo $ac_n "(cached) $ac_c" 1>&6
17305 else
17306   
17307         ol_DB_LIB=-ldb3
17308         ol_LIBS=$LIBS
17309         LIBS="$ol_DB_LIB $LIBS"
17310
17311         cat > conftest.$ac_ext <<EOF
17312 #line 17313 "configure"
17313 #include "confdefs.h"
17314
17315 #ifdef HAVE_DB_185_H
17316 # include <db_185.h>
17317 #else
17318 # include <db.h>
17319 #endif
17320
17321 #ifndef DB_VERSION_MAJOR
17322 # define DB_VERSION_MAJOR 1
17323 #endif
17324
17325 #ifndef NULL
17326 #define NULL ((void*)0)
17327 #endif
17328
17329 int main() {
17330
17331 #if DB_VERSION_MAJOR > 1
17332         {
17333                 char *version;
17334                 int major, minor, patch;
17335
17336                 version = db_version( &major, &minor, &patch );
17337
17338                 if( major != DB_VERSION_MAJOR ||
17339                         minor < DB_VERSION_MINOR )
17340                 {
17341                         printf("Berkeley DB version mismatch\n"
17342                                 "\texpected: %s\n\tgot: %s\n",
17343                                 DB_VERSION_STRING, version);
17344                         return 1;
17345                 }
17346         }
17347 #endif
17348
17349 #if DB_VERSION_MAJOR > 2
17350         db_env_create( NULL, 0 );
17351 #elif DB_VERSION_MAJOR > 1
17352         db_appexit( NULL );
17353 #else
17354         (void) dbopen( NULL, 0, 0, 0, NULL);
17355 #endif
17356
17357 ; return 0; }
17358 EOF
17359 if { (eval echo configure:17360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17360   rm -rf conftest*
17361   ol_cv_db_db3=yes
17362 else
17363   echo "configure: failed program was:" >&5
17364   cat conftest.$ac_ext >&5
17365   rm -rf conftest*
17366   ol_cv_db_db3=no
17367 fi
17368 rm -f conftest*
17369
17370         LIBS="$ol_LIBS"
17371
17372 fi
17373
17374 echo "$ac_t""$ol_cv_db_db3" 1>&6
17375
17376         if test $ol_cv_db_db3 = yes ; then
17377                 ol_cv_lib_db=-ldb3
17378         fi
17379 fi
17380
17381 if test $ol_cv_lib_db = no ; then
17382         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17383 echo "configure:17384: checking for Berkeley DB link (-ldb2)" >&5
17384 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17385   echo $ac_n "(cached) $ac_c" 1>&6
17386 else
17387   
17388         ol_DB_LIB=-ldb2
17389         ol_LIBS=$LIBS
17390         LIBS="$ol_DB_LIB $LIBS"
17391
17392         cat > conftest.$ac_ext <<EOF
17393 #line 17394 "configure"
17394 #include "confdefs.h"
17395
17396 #ifdef HAVE_DB_185_H
17397 # include <db_185.h>
17398 #else
17399 # include <db.h>
17400 #endif
17401
17402 #ifndef DB_VERSION_MAJOR
17403 # define DB_VERSION_MAJOR 1
17404 #endif
17405
17406 #ifndef NULL
17407 #define NULL ((void*)0)
17408 #endif
17409
17410 int main() {
17411
17412 #if DB_VERSION_MAJOR > 1
17413         {
17414                 char *version;
17415                 int major, minor, patch;
17416
17417                 version = db_version( &major, &minor, &patch );
17418
17419                 if( major != DB_VERSION_MAJOR ||
17420                         minor < DB_VERSION_MINOR )
17421                 {
17422                         printf("Berkeley DB version mismatch\n"
17423                                 "\texpected: %s\n\tgot: %s\n",
17424                                 DB_VERSION_STRING, version);
17425                         return 1;
17426                 }
17427         }
17428 #endif
17429
17430 #if DB_VERSION_MAJOR > 2
17431         db_env_create( NULL, 0 );
17432 #elif DB_VERSION_MAJOR > 1
17433         db_appexit( NULL );
17434 #else
17435         (void) dbopen( NULL, 0, 0, 0, NULL);
17436 #endif
17437
17438 ; return 0; }
17439 EOF
17440 if { (eval echo configure:17441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17441   rm -rf conftest*
17442   ol_cv_db_db2=yes
17443 else
17444   echo "configure: failed program was:" >&5
17445   cat conftest.$ac_ext >&5
17446   rm -rf conftest*
17447   ol_cv_db_db2=no
17448 fi
17449 rm -f conftest*
17450
17451         LIBS="$ol_LIBS"
17452
17453 fi
17454
17455 echo "$ac_t""$ol_cv_db_db2" 1>&6
17456
17457         if test $ol_cv_db_db2 = yes ; then
17458                 ol_cv_lib_db=-ldb2
17459         fi
17460 fi
17461
17462 if test $ol_cv_lib_db = no ; then
17463         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17464 echo "configure:17465: checking for Berkeley DB link (-ldb1)" >&5
17465 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17466   echo $ac_n "(cached) $ac_c" 1>&6
17467 else
17468   
17469         ol_DB_LIB=-ldb1
17470         ol_LIBS=$LIBS
17471         LIBS="$ol_DB_LIB $LIBS"
17472
17473         cat > conftest.$ac_ext <<EOF
17474 #line 17475 "configure"
17475 #include "confdefs.h"
17476
17477 #ifdef HAVE_DB_185_H
17478 # include <db_185.h>
17479 #else
17480 # include <db.h>
17481 #endif
17482
17483 #ifndef DB_VERSION_MAJOR
17484 # define DB_VERSION_MAJOR 1
17485 #endif
17486
17487 #ifndef NULL
17488 #define NULL ((void*)0)
17489 #endif
17490
17491 int main() {
17492
17493 #if DB_VERSION_MAJOR > 1
17494         {
17495                 char *version;
17496                 int major, minor, patch;
17497
17498                 version = db_version( &major, &minor, &patch );
17499
17500                 if( major != DB_VERSION_MAJOR ||
17501                         minor < DB_VERSION_MINOR )
17502                 {
17503                         printf("Berkeley DB version mismatch\n"
17504                                 "\texpected: %s\n\tgot: %s\n",
17505                                 DB_VERSION_STRING, version);
17506                         return 1;
17507                 }
17508         }
17509 #endif
17510
17511 #if DB_VERSION_MAJOR > 2
17512         db_env_create( NULL, 0 );
17513 #elif DB_VERSION_MAJOR > 1
17514         db_appexit( NULL );
17515 #else
17516         (void) dbopen( NULL, 0, 0, 0, NULL);
17517 #endif
17518
17519 ; return 0; }
17520 EOF
17521 if { (eval echo configure:17522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17522   rm -rf conftest*
17523   ol_cv_db_db1=yes
17524 else
17525   echo "configure: failed program was:" >&5
17526   cat conftest.$ac_ext >&5
17527   rm -rf conftest*
17528   ol_cv_db_db1=no
17529 fi
17530 rm -f conftest*
17531
17532         LIBS="$ol_LIBS"
17533
17534 fi
17535
17536 echo "$ac_t""$ol_cv_db_db1" 1>&6
17537
17538         if test $ol_cv_db_db1 = yes ; then
17539                 ol_cv_lib_db=-ldb1
17540         fi
17541 fi
17542
17543
17544                 if test "$ol_cv_lib_db" != no ; then
17545                         ol_cv_berkeley_db=yes
17546                 fi
17547         fi
17548 fi
17549
17550         else
17551                 ol_cv_berkeley_db=no
17552 for ac_hdr in db.h
17553 do
17554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17556 echo "configure:17557: checking for $ac_hdr" >&5
17557 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17558   echo $ac_n "(cached) $ac_c" 1>&6
17559 else
17560   cat > conftest.$ac_ext <<EOF
17561 #line 17562 "configure"
17562 #include "confdefs.h"
17563 #include <$ac_hdr>
17564 EOF
17565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17566 { (eval echo configure:17567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17568 if test -z "$ac_err"; then
17569   rm -rf conftest*
17570   eval "ac_cv_header_$ac_safe=yes"
17571 else
17572   echo "$ac_err" >&5
17573   echo "configure: failed program was:" >&5
17574   cat conftest.$ac_ext >&5
17575   rm -rf conftest*
17576   eval "ac_cv_header_$ac_safe=no"
17577 fi
17578 rm -f conftest*
17579 fi
17580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17581   echo "$ac_t""yes" 1>&6
17582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17583   cat >> confdefs.h <<EOF
17584 #define $ac_tr_hdr 1
17585 EOF
17586  
17587 else
17588   echo "$ac_t""no" 1>&6
17589 fi
17590 done
17591
17592 if test $ac_cv_header_db_h = yes; then
17593         ol_cv_lib_db=no
17594 if test $ol_cv_lib_db = no ; then
17595         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17596 echo "configure:17597: checking for Berkeley DB link (default)" >&5
17597 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17598   echo $ac_n "(cached) $ac_c" 1>&6
17599 else
17600   
17601         ol_DB_LIB=
17602         ol_LIBS=$LIBS
17603         LIBS="$ol_DB_LIB $LIBS"
17604
17605         cat > conftest.$ac_ext <<EOF
17606 #line 17607 "configure"
17607 #include "confdefs.h"
17608
17609 #ifdef HAVE_DB_185_H
17610 # include <db_185.h>
17611 #else
17612 # include <db.h>
17613 #endif
17614
17615 #ifndef DB_VERSION_MAJOR
17616 # define DB_VERSION_MAJOR 1
17617 #endif
17618
17619 #ifndef NULL
17620 #define NULL ((void*)0)
17621 #endif
17622
17623 int main() {
17624
17625 #if DB_VERSION_MAJOR > 1
17626         {
17627                 char *version;
17628                 int major, minor, patch;
17629
17630                 version = db_version( &major, &minor, &patch );
17631
17632                 if( major != DB_VERSION_MAJOR ||
17633                         minor < DB_VERSION_MINOR )
17634                 {
17635                         printf("Berkeley DB version mismatch\n"
17636                                 "\texpected: %s\n\tgot: %s\n",
17637                                 DB_VERSION_STRING, version);
17638                         return 1;
17639                 }
17640         }
17641 #endif
17642
17643 #if DB_VERSION_MAJOR > 2
17644         db_env_create( NULL, 0 );
17645 #elif DB_VERSION_MAJOR > 1
17646         db_appexit( NULL );
17647 #else
17648         (void) dbopen( NULL, 0, 0, 0, NULL);
17649 #endif
17650
17651 ; return 0; }
17652 EOF
17653 if { (eval echo configure:17654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17654   rm -rf conftest*
17655   ol_cv_db_none=yes
17656 else
17657   echo "configure: failed program was:" >&5
17658   cat conftest.$ac_ext >&5
17659   rm -rf conftest*
17660   ol_cv_db_none=no
17661 fi
17662 rm -f conftest*
17663
17664         LIBS="$ol_LIBS"
17665
17666 fi
17667
17668 echo "$ac_t""$ol_cv_db_none" 1>&6
17669
17670         if test $ol_cv_db_none = yes ; then
17671                 ol_cv_lib_db=yes
17672         fi
17673 fi
17674
17675 if test $ol_cv_lib_db = no ; then
17676         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17677 echo "configure:17678: checking for Berkeley DB link (-ldb4)" >&5
17678 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17679   echo $ac_n "(cached) $ac_c" 1>&6
17680 else
17681   
17682         ol_DB_LIB=-ldb4
17683         ol_LIBS=$LIBS
17684         LIBS="$ol_DB_LIB $LIBS"
17685
17686         cat > conftest.$ac_ext <<EOF
17687 #line 17688 "configure"
17688 #include "confdefs.h"
17689
17690 #ifdef HAVE_DB_185_H
17691 # include <db_185.h>
17692 #else
17693 # include <db.h>
17694 #endif
17695
17696 #ifndef DB_VERSION_MAJOR
17697 # define DB_VERSION_MAJOR 1
17698 #endif
17699
17700 #ifndef NULL
17701 #define NULL ((void*)0)
17702 #endif
17703
17704 int main() {
17705
17706 #if DB_VERSION_MAJOR > 1
17707         {
17708                 char *version;
17709                 int major, minor, patch;
17710
17711                 version = db_version( &major, &minor, &patch );
17712
17713                 if( major != DB_VERSION_MAJOR ||
17714                         minor < DB_VERSION_MINOR )
17715                 {
17716                         printf("Berkeley DB version mismatch\n"
17717                                 "\texpected: %s\n\tgot: %s\n",
17718                                 DB_VERSION_STRING, version);
17719                         return 1;
17720                 }
17721         }
17722 #endif
17723
17724 #if DB_VERSION_MAJOR > 2
17725         db_env_create( NULL, 0 );
17726 #elif DB_VERSION_MAJOR > 1
17727         db_appexit( NULL );
17728 #else
17729         (void) dbopen( NULL, 0, 0, 0, NULL);
17730 #endif
17731
17732 ; return 0; }
17733 EOF
17734 if { (eval echo configure:17735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17735   rm -rf conftest*
17736   ol_cv_db_db4=yes
17737 else
17738   echo "configure: failed program was:" >&5
17739   cat conftest.$ac_ext >&5
17740   rm -rf conftest*
17741   ol_cv_db_db4=no
17742 fi
17743 rm -f conftest*
17744
17745         LIBS="$ol_LIBS"
17746
17747 fi
17748
17749 echo "$ac_t""$ol_cv_db_db4" 1>&6
17750
17751         if test $ol_cv_db_db4 = yes ; then
17752                 ol_cv_lib_db=-ldb4
17753         fi
17754 fi
17755
17756 if test $ol_cv_lib_db = no ; then
17757         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17758 echo "configure:17759: checking for Berkeley DB link (-ldb)" >&5
17759 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17760   echo $ac_n "(cached) $ac_c" 1>&6
17761 else
17762   
17763         ol_DB_LIB=-ldb
17764         ol_LIBS=$LIBS
17765         LIBS="$ol_DB_LIB $LIBS"
17766
17767         cat > conftest.$ac_ext <<EOF
17768 #line 17769 "configure"
17769 #include "confdefs.h"
17770
17771 #ifdef HAVE_DB_185_H
17772 # include <db_185.h>
17773 #else
17774 # include <db.h>
17775 #endif
17776
17777 #ifndef DB_VERSION_MAJOR
17778 # define DB_VERSION_MAJOR 1
17779 #endif
17780
17781 #ifndef NULL
17782 #define NULL ((void*)0)
17783 #endif
17784
17785 int main() {
17786
17787 #if DB_VERSION_MAJOR > 1
17788         {
17789                 char *version;
17790                 int major, minor, patch;
17791
17792                 version = db_version( &major, &minor, &patch );
17793
17794                 if( major != DB_VERSION_MAJOR ||
17795                         minor < DB_VERSION_MINOR )
17796                 {
17797                         printf("Berkeley DB version mismatch\n"
17798                                 "\texpected: %s\n\tgot: %s\n",
17799                                 DB_VERSION_STRING, version);
17800                         return 1;
17801                 }
17802         }
17803 #endif
17804
17805 #if DB_VERSION_MAJOR > 2
17806         db_env_create( NULL, 0 );
17807 #elif DB_VERSION_MAJOR > 1
17808         db_appexit( NULL );
17809 #else
17810         (void) dbopen( NULL, 0, 0, 0, NULL);
17811 #endif
17812
17813 ; return 0; }
17814 EOF
17815 if { (eval echo configure:17816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17816   rm -rf conftest*
17817   ol_cv_db_db=yes
17818 else
17819   echo "configure: failed program was:" >&5
17820   cat conftest.$ac_ext >&5
17821   rm -rf conftest*
17822   ol_cv_db_db=no
17823 fi
17824 rm -f conftest*
17825
17826         LIBS="$ol_LIBS"
17827
17828 fi
17829
17830 echo "$ac_t""$ol_cv_db_db" 1>&6
17831
17832         if test $ol_cv_db_db = yes ; then
17833                 ol_cv_lib_db=-ldb
17834         fi
17835 fi
17836
17837 if test $ol_cv_lib_db = no ; then
17838         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17839 echo "configure:17840: checking for Berkeley DB link (-ldb3)" >&5
17840 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17841   echo $ac_n "(cached) $ac_c" 1>&6
17842 else
17843   
17844         ol_DB_LIB=-ldb3
17845         ol_LIBS=$LIBS
17846         LIBS="$ol_DB_LIB $LIBS"
17847
17848         cat > conftest.$ac_ext <<EOF
17849 #line 17850 "configure"
17850 #include "confdefs.h"
17851
17852 #ifdef HAVE_DB_185_H
17853 # include <db_185.h>
17854 #else
17855 # include <db.h>
17856 #endif
17857
17858 #ifndef DB_VERSION_MAJOR
17859 # define DB_VERSION_MAJOR 1
17860 #endif
17861
17862 #ifndef NULL
17863 #define NULL ((void*)0)
17864 #endif
17865
17866 int main() {
17867
17868 #if DB_VERSION_MAJOR > 1
17869         {
17870                 char *version;
17871                 int major, minor, patch;
17872
17873                 version = db_version( &major, &minor, &patch );
17874
17875                 if( major != DB_VERSION_MAJOR ||
17876                         minor < DB_VERSION_MINOR )
17877                 {
17878                         printf("Berkeley DB version mismatch\n"
17879                                 "\texpected: %s\n\tgot: %s\n",
17880                                 DB_VERSION_STRING, version);
17881                         return 1;
17882                 }
17883         }
17884 #endif
17885
17886 #if DB_VERSION_MAJOR > 2
17887         db_env_create( NULL, 0 );
17888 #elif DB_VERSION_MAJOR > 1
17889         db_appexit( NULL );
17890 #else
17891         (void) dbopen( NULL, 0, 0, 0, NULL);
17892 #endif
17893
17894 ; return 0; }
17895 EOF
17896 if { (eval echo configure:17897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17897   rm -rf conftest*
17898   ol_cv_db_db3=yes
17899 else
17900   echo "configure: failed program was:" >&5
17901   cat conftest.$ac_ext >&5
17902   rm -rf conftest*
17903   ol_cv_db_db3=no
17904 fi
17905 rm -f conftest*
17906
17907         LIBS="$ol_LIBS"
17908
17909 fi
17910
17911 echo "$ac_t""$ol_cv_db_db3" 1>&6
17912
17913         if test $ol_cv_db_db3 = yes ; then
17914                 ol_cv_lib_db=-ldb3
17915         fi
17916 fi
17917
17918 if test $ol_cv_lib_db = no ; then
17919         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17920 echo "configure:17921: checking for Berkeley DB link (-ldb2)" >&5
17921 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17922   echo $ac_n "(cached) $ac_c" 1>&6
17923 else
17924   
17925         ol_DB_LIB=-ldb2
17926         ol_LIBS=$LIBS
17927         LIBS="$ol_DB_LIB $LIBS"
17928
17929         cat > conftest.$ac_ext <<EOF
17930 #line 17931 "configure"
17931 #include "confdefs.h"
17932
17933 #ifdef HAVE_DB_185_H
17934 # include <db_185.h>
17935 #else
17936 # include <db.h>
17937 #endif
17938
17939 #ifndef DB_VERSION_MAJOR
17940 # define DB_VERSION_MAJOR 1
17941 #endif
17942
17943 #ifndef NULL
17944 #define NULL ((void*)0)
17945 #endif
17946
17947 int main() {
17948
17949 #if DB_VERSION_MAJOR > 1
17950         {
17951                 char *version;
17952                 int major, minor, patch;
17953
17954                 version = db_version( &major, &minor, &patch );
17955
17956                 if( major != DB_VERSION_MAJOR ||
17957                         minor < DB_VERSION_MINOR )
17958                 {
17959                         printf("Berkeley DB version mismatch\n"
17960                                 "\texpected: %s\n\tgot: %s\n",
17961                                 DB_VERSION_STRING, version);
17962                         return 1;
17963                 }
17964         }
17965 #endif
17966
17967 #if DB_VERSION_MAJOR > 2
17968         db_env_create( NULL, 0 );
17969 #elif DB_VERSION_MAJOR > 1
17970         db_appexit( NULL );
17971 #else
17972         (void) dbopen( NULL, 0, 0, 0, NULL);
17973 #endif
17974
17975 ; return 0; }
17976 EOF
17977 if { (eval echo configure:17978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17978   rm -rf conftest*
17979   ol_cv_db_db2=yes
17980 else
17981   echo "configure: failed program was:" >&5
17982   cat conftest.$ac_ext >&5
17983   rm -rf conftest*
17984   ol_cv_db_db2=no
17985 fi
17986 rm -f conftest*
17987
17988         LIBS="$ol_LIBS"
17989
17990 fi
17991
17992 echo "$ac_t""$ol_cv_db_db2" 1>&6
17993
17994         if test $ol_cv_db_db2 = yes ; then
17995                 ol_cv_lib_db=-ldb2
17996         fi
17997 fi
17998
17999 if test $ol_cv_lib_db = no ; then
18000         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18001 echo "configure:18002: checking for Berkeley DB link (-ldb1)" >&5
18002 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18003   echo $ac_n "(cached) $ac_c" 1>&6
18004 else
18005   
18006         ol_DB_LIB=-ldb1
18007         ol_LIBS=$LIBS
18008         LIBS="$ol_DB_LIB $LIBS"
18009
18010         cat > conftest.$ac_ext <<EOF
18011 #line 18012 "configure"
18012 #include "confdefs.h"
18013
18014 #ifdef HAVE_DB_185_H
18015 # include <db_185.h>
18016 #else
18017 # include <db.h>
18018 #endif
18019
18020 #ifndef DB_VERSION_MAJOR
18021 # define DB_VERSION_MAJOR 1
18022 #endif
18023
18024 #ifndef NULL
18025 #define NULL ((void*)0)
18026 #endif
18027
18028 int main() {
18029
18030 #if DB_VERSION_MAJOR > 1
18031         {
18032                 char *version;
18033                 int major, minor, patch;
18034
18035                 version = db_version( &major, &minor, &patch );
18036
18037                 if( major != DB_VERSION_MAJOR ||
18038                         minor < DB_VERSION_MINOR )
18039                 {
18040                         printf("Berkeley DB version mismatch\n"
18041                                 "\texpected: %s\n\tgot: %s\n",
18042                                 DB_VERSION_STRING, version);
18043                         return 1;
18044                 }
18045         }
18046 #endif
18047
18048 #if DB_VERSION_MAJOR > 2
18049         db_env_create( NULL, 0 );
18050 #elif DB_VERSION_MAJOR > 1
18051         db_appexit( NULL );
18052 #else
18053         (void) dbopen( NULL, 0, 0, 0, NULL);
18054 #endif
18055
18056 ; return 0; }
18057 EOF
18058 if { (eval echo configure:18059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18059   rm -rf conftest*
18060   ol_cv_db_db1=yes
18061 else
18062   echo "configure: failed program was:" >&5
18063   cat conftest.$ac_ext >&5
18064   rm -rf conftest*
18065   ol_cv_db_db1=no
18066 fi
18067 rm -f conftest*
18068
18069         LIBS="$ol_LIBS"
18070
18071 fi
18072
18073 echo "$ac_t""$ol_cv_db_db1" 1>&6
18074
18075         if test $ol_cv_db_db1 = yes ; then
18076                 ol_cv_lib_db=-ldb1
18077         fi
18078 fi
18079
18080
18081         if test "$ol_cv_lib_db" != no ; then
18082                 ol_cv_berkeley_db=yes
18083                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18084 echo "configure:18085: checking for Berkeley DB thread support" >&5
18085 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18086   echo $ac_n "(cached) $ac_c" 1>&6
18087 else
18088   
18089         ol_LIBS="$LIBS"
18090         if test $ol_cv_lib_db != yes ; then
18091                 LIBS="$ol_cv_lib_db"
18092         fi
18093
18094         if test "$cross_compiling" = yes; then
18095   ol_cv_berkeley_db_thread=cross
18096 else
18097   cat > conftest.$ac_ext <<EOF
18098 #line 18099 "configure"
18099 #include "confdefs.h"
18100
18101 #ifdef HAVE_DB_185_H
18102         choke me;
18103 #else
18104 #include <db.h>
18105 #endif
18106 #ifndef NULL
18107 #define NULL ((void *)0)
18108 #endif
18109 main()
18110 {
18111         int rc;
18112         u_int32_t flags = DB_CREATE |
18113 #ifdef DB_PRIVATE
18114                 DB_PRIVATE |
18115 #endif
18116                 DB_THREAD;
18117
18118 #if DB_VERSION_MAJOR > 2
18119         DB_ENV *env = NULL;
18120
18121         rc = db_env_create( &env, 0 );
18122
18123         flags |= DB_INIT_MPOOL;
18124 #ifdef DB_MPOOL_PRIVATE
18125         flags |= DB_MPOOL_PRIVATE;
18126 #endif
18127
18128         if( rc ) {
18129                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18130                 return rc;
18131         }
18132
18133 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18134         rc = env->open( env, NULL, flags, 0 );
18135 #else
18136         rc = env->open( env, NULL, NULL, flags, 0 );
18137 #endif
18138
18139         if ( rc == 0 ) {
18140                 rc = env->close( env, 0 );
18141         }
18142
18143         if( rc ) {
18144                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18145                 return rc;
18146         }
18147
18148 #else
18149         DB_ENV env;
18150         memset( &env, '\0', sizeof(env) );
18151
18152         rc = db_appinit( NULL, NULL, &env, flags );
18153
18154         if( rc == 0 ) {
18155                 db_appexit( &env );
18156         }
18157
18158         unlink("__db_mpool.share");
18159         unlink("__db_lock.share");
18160 #endif
18161
18162         return rc;
18163 }
18164 EOF
18165 if { (eval echo configure:18166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18166 then
18167   ol_cv_berkeley_db_thread=yes
18168 else
18169   echo "configure: failed program was:" >&5
18170   cat conftest.$ac_ext >&5
18171   rm -fr conftest*
18172   ol_cv_berkeley_db_thread=no
18173 fi
18174 rm -fr conftest*
18175 fi
18176
18177
18178         LIBS="$ol_LIBS"
18179
18180         if test $ol_cv_berkeley_db_thread != no ; then
18181                 cat >> confdefs.h <<\EOF
18182 #define HAVE_BERKELEY_DB_THREAD 1
18183 EOF
18184
18185         fi
18186
18187 fi
18188
18189 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18190         fi
18191 fi
18192
18193         fi
18194
18195         if test $ol_cv_berkeley_db != no ; then
18196                 cat >> confdefs.h <<\EOF
18197 #define HAVE_BERKELEY_DB 1
18198 EOF
18199
18200
18201                 ol_link_ldbm=berkeley
18202                 ol_with_ldbm_api=berkeley
18203
18204                 if test $ol_with_ldbm_type = hash ; then
18205                         cat >> confdefs.h <<\EOF
18206 #define LDBM_USE_DBHASH 1
18207 EOF
18208
18209                 else
18210                         cat >> confdefs.h <<\EOF
18211 #define LDBM_USE_DBBTREE 1
18212 EOF
18213
18214                 fi
18215
18216                                                 if test $ol_cv_lib_db != yes ; then
18217                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18218                 fi
18219         fi
18220 fi
18221
18222 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18223         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18224 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18225         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18226 echo "configure:18227: checking Berkeley DB version for BDB backend" >&5
18227 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18228   echo $ac_n "(cached) $ac_c" 1>&6
18229 else
18230   
18231         cat > conftest.$ac_ext <<EOF
18232 #line 18233 "configure"
18233 #include "confdefs.h"
18234
18235 #include <db.h>
18236
18237  /* this check could be improved */
18238 #ifndef DB_VERSION_MAJOR
18239 #       define DB_VERSION_MAJOR 1
18240 #endif
18241
18242 /* require 4.0 or later */
18243 #if DB_VERSION_MAJOR >= 4 
18244         __db_version_compat
18245 #endif
18246         
18247 EOF
18248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18249   egrep "__db_version_compat" >/dev/null 2>&1; then
18250   rm -rf conftest*
18251   ol_cv_bdb_compat=yes
18252 else
18253   rm -rf conftest*
18254   ol_cv_bdb_compat=no
18255 fi
18256 rm -f conftest*
18257
18258 fi
18259
18260 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18261
18262
18263         if test $ol_cv_bdb_compat = yes ; then
18264                 ol_enable_bdb=yes
18265         elif test $ol_enable_bdb = yes ; then
18266                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18267         else
18268                 ol_enable_bdb=no
18269         fi
18270 fi
18271
18272 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18273         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18274         ol_with_ldbm_api=none
18275 fi
18276
18277 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18278         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18279 echo "configure:18280: checking for MDBM library" >&5
18280 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18281   echo $ac_n "(cached) $ac_c" 1>&6
18282 else
18283         ol_LIBS="$LIBS"
18284         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18285 echo "configure:18286: checking for mdbm_set_chain" >&5
18286 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18287   echo $ac_n "(cached) $ac_c" 1>&6
18288 else
18289   cat > conftest.$ac_ext <<EOF
18290 #line 18291 "configure"
18291 #include "confdefs.h"
18292 /* System header to define __stub macros and hopefully few prototypes,
18293     which can conflict with char mdbm_set_chain(); below.  */
18294 #include <assert.h>
18295 /* Override any gcc2 internal prototype to avoid an error.  */
18296 /* We use char because int might match the return type of a gcc2
18297     builtin and then its argument prototype would still apply.  */
18298 char mdbm_set_chain();
18299 char (*f)();
18300
18301 int main() {
18302
18303 /* The GNU C library defines this for functions which it implements
18304     to always fail with ENOSYS.  Some functions are actually named
18305     something starting with __ and the normal name is an alias.  */
18306 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18307 choke me
18308 #else
18309 f = mdbm_set_chain;
18310 #endif
18311
18312 ; return 0; }
18313 EOF
18314 if { (eval echo configure:18315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18315   rm -rf conftest*
18316   eval "ac_cv_func_mdbm_set_chain=yes"
18317 else
18318   echo "configure: failed program was:" >&5
18319   cat conftest.$ac_ext >&5
18320   rm -rf conftest*
18321   eval "ac_cv_func_mdbm_set_chain=no"
18322 fi
18323 rm -f conftest*
18324 fi
18325
18326 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18327   echo "$ac_t""yes" 1>&6
18328   ol_cv_lib_mdbm=yes
18329 else
18330   echo "$ac_t""no" 1>&6
18331
18332                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18333 echo "configure:18334: checking for mdbm_set_chain in -lmdbm" >&5
18334 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18336   echo $ac_n "(cached) $ac_c" 1>&6
18337 else
18338   ac_save_LIBS="$LIBS"
18339 LIBS="-lmdbm  $LIBS"
18340 cat > conftest.$ac_ext <<EOF
18341 #line 18342 "configure"
18342 #include "confdefs.h"
18343 /* Override any gcc2 internal prototype to avoid an error.  */
18344 /* We use char because int might match the return type of a gcc2
18345     builtin and then its argument prototype would still apply.  */
18346 char mdbm_set_chain();
18347
18348 int main() {
18349 mdbm_set_chain()
18350 ; return 0; }
18351 EOF
18352 if { (eval echo configure:18353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18353   rm -rf conftest*
18354   eval "ac_cv_lib_$ac_lib_var=yes"
18355 else
18356   echo "configure: failed program was:" >&5
18357   cat conftest.$ac_ext >&5
18358   rm -rf conftest*
18359   eval "ac_cv_lib_$ac_lib_var=no"
18360 fi
18361 rm -f conftest*
18362 LIBS="$ac_save_LIBS"
18363
18364 fi
18365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18366   echo "$ac_t""yes" 1>&6
18367   ol_cv_lib_mdbm=-lmdbm
18368 else
18369   echo "$ac_t""no" 1>&6
18370 ol_cv_lib_mdbm=no
18371 fi
18372
18373         
18374 fi
18375
18376         LIBS="$ol_LIBS"
18377
18378 fi
18379
18380 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18381
18382
18383  for ac_hdr in mdbm.h
18384 do
18385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18387 echo "configure:18388: checking for $ac_hdr" >&5
18388 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18389   echo $ac_n "(cached) $ac_c" 1>&6
18390 else
18391   cat > conftest.$ac_ext <<EOF
18392 #line 18393 "configure"
18393 #include "confdefs.h"
18394 #include <$ac_hdr>
18395 EOF
18396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18397 { (eval echo configure:18398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18399 if test -z "$ac_err"; then
18400   rm -rf conftest*
18401   eval "ac_cv_header_$ac_safe=yes"
18402 else
18403   echo "$ac_err" >&5
18404   echo "configure: failed program was:" >&5
18405   cat conftest.$ac_ext >&5
18406   rm -rf conftest*
18407   eval "ac_cv_header_$ac_safe=no"
18408 fi
18409 rm -f conftest*
18410 fi
18411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18412   echo "$ac_t""yes" 1>&6
18413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18414   cat >> confdefs.h <<EOF
18415 #define $ac_tr_hdr 1
18416 EOF
18417  
18418 else
18419   echo "$ac_t""no" 1>&6
18420 fi
18421 done
18422
18423  echo $ac_n "checking for db""... $ac_c" 1>&6
18424 echo "configure:18425: checking for db" >&5
18425 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18426   echo $ac_n "(cached) $ac_c" 1>&6
18427 else
18428   
18429         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18430                 ol_cv_mdbm=no
18431         else
18432                 ol_cv_mdbm=yes
18433         fi
18434
18435 fi
18436
18437 echo "$ac_t""$ol_cv_mdbm" 1>&6
18438  if test $ol_cv_mdbm = yes ; then
18439         cat >> confdefs.h <<\EOF
18440 #define HAVE_MDBM 1
18441 EOF
18442
18443  fi
18444
18445
18446         if test $ol_cv_mdbm = yes ; then
18447                 ol_link_ldbm=mdbm
18448                 ol_with_ldbm_api=mdbm
18449                 if test $ol_cv_lib_mdbm != yes ; then
18450                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18451                 fi
18452         fi
18453 fi
18454
18455 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18456         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18457 echo "configure:18458: checking for GDBM library" >&5
18458 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18459   echo $ac_n "(cached) $ac_c" 1>&6
18460 else
18461         ol_LIBS="$LIBS"
18462         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18463 echo "configure:18464: checking for gdbm_open" >&5
18464 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18465   echo $ac_n "(cached) $ac_c" 1>&6
18466 else
18467   cat > conftest.$ac_ext <<EOF
18468 #line 18469 "configure"
18469 #include "confdefs.h"
18470 /* System header to define __stub macros and hopefully few prototypes,
18471     which can conflict with char gdbm_open(); below.  */
18472 #include <assert.h>
18473 /* Override any gcc2 internal prototype to avoid an error.  */
18474 /* We use char because int might match the return type of a gcc2
18475     builtin and then its argument prototype would still apply.  */
18476 char gdbm_open();
18477 char (*f)();
18478
18479 int main() {
18480
18481 /* The GNU C library defines this for functions which it implements
18482     to always fail with ENOSYS.  Some functions are actually named
18483     something starting with __ and the normal name is an alias.  */
18484 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18485 choke me
18486 #else
18487 f = gdbm_open;
18488 #endif
18489
18490 ; return 0; }
18491 EOF
18492 if { (eval echo configure:18493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18493   rm -rf conftest*
18494   eval "ac_cv_func_gdbm_open=yes"
18495 else
18496   echo "configure: failed program was:" >&5
18497   cat conftest.$ac_ext >&5
18498   rm -rf conftest*
18499   eval "ac_cv_func_gdbm_open=no"
18500 fi
18501 rm -f conftest*
18502 fi
18503
18504 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18505   echo "$ac_t""yes" 1>&6
18506   ol_cv_lib_gdbm=yes
18507 else
18508   echo "$ac_t""no" 1>&6
18509
18510                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18511 echo "configure:18512: checking for gdbm_open in -lgdbm" >&5
18512 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18514   echo $ac_n "(cached) $ac_c" 1>&6
18515 else
18516   ac_save_LIBS="$LIBS"
18517 LIBS="-lgdbm  $LIBS"
18518 cat > conftest.$ac_ext <<EOF
18519 #line 18520 "configure"
18520 #include "confdefs.h"
18521 /* Override any gcc2 internal prototype to avoid an error.  */
18522 /* We use char because int might match the return type of a gcc2
18523     builtin and then its argument prototype would still apply.  */
18524 char gdbm_open();
18525
18526 int main() {
18527 gdbm_open()
18528 ; return 0; }
18529 EOF
18530 if { (eval echo configure:18531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18531   rm -rf conftest*
18532   eval "ac_cv_lib_$ac_lib_var=yes"
18533 else
18534   echo "configure: failed program was:" >&5
18535   cat conftest.$ac_ext >&5
18536   rm -rf conftest*
18537   eval "ac_cv_lib_$ac_lib_var=no"
18538 fi
18539 rm -f conftest*
18540 LIBS="$ac_save_LIBS"
18541
18542 fi
18543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18544   echo "$ac_t""yes" 1>&6
18545   ol_cv_lib_gdbm=-lgdbm
18546 else
18547   echo "$ac_t""no" 1>&6
18548 ol_cv_lib_gdbm=no
18549 fi
18550
18551         
18552 fi
18553
18554         LIBS="$ol_LIBS"
18555
18556 fi
18557
18558 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18559
18560
18561  for ac_hdr in gdbm.h
18562 do
18563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18565 echo "configure:18566: checking for $ac_hdr" >&5
18566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18567   echo $ac_n "(cached) $ac_c" 1>&6
18568 else
18569   cat > conftest.$ac_ext <<EOF
18570 #line 18571 "configure"
18571 #include "confdefs.h"
18572 #include <$ac_hdr>
18573 EOF
18574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18575 { (eval echo configure:18576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18577 if test -z "$ac_err"; then
18578   rm -rf conftest*
18579   eval "ac_cv_header_$ac_safe=yes"
18580 else
18581   echo "$ac_err" >&5
18582   echo "configure: failed program was:" >&5
18583   cat conftest.$ac_ext >&5
18584   rm -rf conftest*
18585   eval "ac_cv_header_$ac_safe=no"
18586 fi
18587 rm -f conftest*
18588 fi
18589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18590   echo "$ac_t""yes" 1>&6
18591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18592   cat >> confdefs.h <<EOF
18593 #define $ac_tr_hdr 1
18594 EOF
18595  
18596 else
18597   echo "$ac_t""no" 1>&6
18598 fi
18599 done
18600
18601  echo $ac_n "checking for db""... $ac_c" 1>&6
18602 echo "configure:18603: checking for db" >&5
18603 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18604   echo $ac_n "(cached) $ac_c" 1>&6
18605 else
18606   
18607         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18608                 ol_cv_gdbm=no
18609         else
18610                 ol_cv_gdbm=yes
18611         fi
18612
18613 fi
18614
18615 echo "$ac_t""$ol_cv_gdbm" 1>&6
18616  if test $ol_cv_gdbm = yes ; then
18617         cat >> confdefs.h <<\EOF
18618 #define HAVE_GDBM 1
18619 EOF
18620
18621  fi
18622
18623
18624         if test $ol_cv_gdbm = yes ; then
18625                 ol_link_ldbm=gdbm
18626                 ol_with_ldbm_api=gdbm
18627
18628                 if test $ol_cv_lib_gdbm != yes ; then
18629                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18630                 fi
18631         fi
18632 fi
18633
18634 if test $ol_with_ldbm_api = ndbm ; then
18635         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18636 echo "configure:18637: checking for NDBM library" >&5
18637 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18638   echo $ac_n "(cached) $ac_c" 1>&6
18639 else
18640         ol_LIBS="$LIBS"
18641         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18642 echo "configure:18643: checking for dbm_open" >&5
18643 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18644   echo $ac_n "(cached) $ac_c" 1>&6
18645 else
18646   cat > conftest.$ac_ext <<EOF
18647 #line 18648 "configure"
18648 #include "confdefs.h"
18649 /* System header to define __stub macros and hopefully few prototypes,
18650     which can conflict with char dbm_open(); below.  */
18651 #include <assert.h>
18652 /* Override any gcc2 internal prototype to avoid an error.  */
18653 /* We use char because int might match the return type of a gcc2
18654     builtin and then its argument prototype would still apply.  */
18655 char dbm_open();
18656 char (*f)();
18657
18658 int main() {
18659
18660 /* The GNU C library defines this for functions which it implements
18661     to always fail with ENOSYS.  Some functions are actually named
18662     something starting with __ and the normal name is an alias.  */
18663 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18664 choke me
18665 #else
18666 f = dbm_open;
18667 #endif
18668
18669 ; return 0; }
18670 EOF
18671 if { (eval echo configure:18672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18672   rm -rf conftest*
18673   eval "ac_cv_func_dbm_open=yes"
18674 else
18675   echo "configure: failed program was:" >&5
18676   cat conftest.$ac_ext >&5
18677   rm -rf conftest*
18678   eval "ac_cv_func_dbm_open=no"
18679 fi
18680 rm -f conftest*
18681 fi
18682
18683 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18684   echo "$ac_t""yes" 1>&6
18685   ol_cv_lib_ndbm=yes
18686 else
18687   echo "$ac_t""no" 1>&6
18688
18689                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18690 echo "configure:18691: checking for dbm_open in -lndbm" >&5
18691 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18693   echo $ac_n "(cached) $ac_c" 1>&6
18694 else
18695   ac_save_LIBS="$LIBS"
18696 LIBS="-lndbm  $LIBS"
18697 cat > conftest.$ac_ext <<EOF
18698 #line 18699 "configure"
18699 #include "confdefs.h"
18700 /* Override any gcc2 internal prototype to avoid an error.  */
18701 /* We use char because int might match the return type of a gcc2
18702     builtin and then its argument prototype would still apply.  */
18703 char dbm_open();
18704
18705 int main() {
18706 dbm_open()
18707 ; return 0; }
18708 EOF
18709 if { (eval echo configure:18710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18710   rm -rf conftest*
18711   eval "ac_cv_lib_$ac_lib_var=yes"
18712 else
18713   echo "configure: failed program was:" >&5
18714   cat conftest.$ac_ext >&5
18715   rm -rf conftest*
18716   eval "ac_cv_lib_$ac_lib_var=no"
18717 fi
18718 rm -f conftest*
18719 LIBS="$ac_save_LIBS"
18720
18721 fi
18722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18723   echo "$ac_t""yes" 1>&6
18724   ol_cv_lib_ndbm=-lndbm
18725 else
18726   echo "$ac_t""no" 1>&6
18727
18728                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18729 echo "configure:18730: checking for dbm_open in -ldbm" >&5
18730 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18732   echo $ac_n "(cached) $ac_c" 1>&6
18733 else
18734   ac_save_LIBS="$LIBS"
18735 LIBS="-ldbm  $LIBS"
18736 cat > conftest.$ac_ext <<EOF
18737 #line 18738 "configure"
18738 #include "confdefs.h"
18739 /* Override any gcc2 internal prototype to avoid an error.  */
18740 /* We use char because int might match the return type of a gcc2
18741     builtin and then its argument prototype would still apply.  */
18742 char dbm_open();
18743
18744 int main() {
18745 dbm_open()
18746 ; return 0; }
18747 EOF
18748 if { (eval echo configure:18749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18749   rm -rf conftest*
18750   eval "ac_cv_lib_$ac_lib_var=yes"
18751 else
18752   echo "configure: failed program was:" >&5
18753   cat conftest.$ac_ext >&5
18754   rm -rf conftest*
18755   eval "ac_cv_lib_$ac_lib_var=no"
18756 fi
18757 rm -f conftest*
18758 LIBS="$ac_save_LIBS"
18759
18760 fi
18761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18762   echo "$ac_t""yes" 1>&6
18763   ol_cv_lib_ndbm=-ldbm
18764 else
18765   echo "$ac_t""no" 1>&6
18766 ol_cv_lib_ndbm=no
18767 fi
18768                 
18769 fi
18770
18771         
18772 fi
18773
18774         LIBS="$ol_LIBS"
18775
18776 fi
18777
18778 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18779
18780
18781  for ac_hdr in ndbm.h
18782 do
18783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18785 echo "configure:18786: checking for $ac_hdr" >&5
18786 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18787   echo $ac_n "(cached) $ac_c" 1>&6
18788 else
18789   cat > conftest.$ac_ext <<EOF
18790 #line 18791 "configure"
18791 #include "confdefs.h"
18792 #include <$ac_hdr>
18793 EOF
18794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18795 { (eval echo configure:18796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18797 if test -z "$ac_err"; then
18798   rm -rf conftest*
18799   eval "ac_cv_header_$ac_safe=yes"
18800 else
18801   echo "$ac_err" >&5
18802   echo "configure: failed program was:" >&5
18803   cat conftest.$ac_ext >&5
18804   rm -rf conftest*
18805   eval "ac_cv_header_$ac_safe=no"
18806 fi
18807 rm -f conftest*
18808 fi
18809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18810   echo "$ac_t""yes" 1>&6
18811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18812   cat >> confdefs.h <<EOF
18813 #define $ac_tr_hdr 1
18814 EOF
18815  
18816 else
18817   echo "$ac_t""no" 1>&6
18818 fi
18819 done
18820
18821  echo $ac_n "checking for db""... $ac_c" 1>&6
18822 echo "configure:18823: checking for db" >&5
18823 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18824   echo $ac_n "(cached) $ac_c" 1>&6
18825 else
18826   
18827         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18828                 ol_cv_ndbm=no
18829         else
18830                 ol_cv_ndbm=yes
18831         fi
18832
18833 fi
18834
18835 echo "$ac_t""$ol_cv_ndbm" 1>&6
18836  if test $ol_cv_ndbm = yes ; then
18837         cat >> confdefs.h <<\EOF
18838 #define HAVE_NDBM 1
18839 EOF
18840
18841  fi
18842
18843
18844         if test $ol_cv_ndbm = yes ; then
18845                 ol_link_ldbm=ndbm
18846                 ol_with_ldbm_api=ndbm
18847
18848                 if test $ol_cv_lib_ndbm != yes ; then
18849                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18850                 fi
18851         fi
18852 fi
18853
18854 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18855         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18856         if test $ol_enable_ldbm = yes ; then
18857                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18858         fi
18859
18860         echo "configure: warning: disabling LDBM" 1>&2
18861         ol_enable_ldbm=no
18862 fi
18863
18864 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18865         BUILD_LIBS_DYNAMIC=shared
18866         cat >> confdefs.h <<\EOF
18867 #define LDAP_LIBS_DYNAMIC 1
18868 EOF
18869
18870 else
18871         BUILD_LIBS_DYNAMIC=static
18872 fi
18873
18874 if test $ol_enable_wrappers != no ; then
18875         for ac_hdr in tcpd.h
18876 do
18877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18879 echo "configure:18880: checking for $ac_hdr" >&5
18880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18881   echo $ac_n "(cached) $ac_c" 1>&6
18882 else
18883   cat > conftest.$ac_ext <<EOF
18884 #line 18885 "configure"
18885 #include "confdefs.h"
18886 #include <$ac_hdr>
18887 EOF
18888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18889 { (eval echo configure:18890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18891 if test -z "$ac_err"; then
18892   rm -rf conftest*
18893   eval "ac_cv_header_$ac_safe=yes"
18894 else
18895   echo "$ac_err" >&5
18896   echo "configure: failed program was:" >&5
18897   cat conftest.$ac_ext >&5
18898   rm -rf conftest*
18899   eval "ac_cv_header_$ac_safe=no"
18900 fi
18901 rm -f conftest*
18902 fi
18903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18904   echo "$ac_t""yes" 1>&6
18905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18906   cat >> confdefs.h <<EOF
18907 #define $ac_tr_hdr 1
18908 EOF
18909  
18910                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18911 echo "configure:18912: checking for TCP wrappers library" >&5
18912                 save_LIBS="$LIBS"
18913                 LIBS="$LIBS -lwrap"
18914                 cat > conftest.$ac_ext <<EOF
18915 #line 18916 "configure"
18916 #include "confdefs.h"
18917
18918 #include <tcpd.h>
18919 int allow_severity = 0;
18920 int deny_severity  = 0;
18921
18922 struct request_info *req;
18923                 
18924 int main() {
18925
18926 hosts_access(req)
18927                 
18928 ; return 0; }
18929 EOF
18930 if { (eval echo configure:18931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18931   rm -rf conftest*
18932   echo "$ac_t""-lwrap" 1>&6
18933                 have_wrappers=yes
18934                 LIBS="$save_LIBS"
18935 else
18936   echo "configure: failed program was:" >&5
18937   cat conftest.$ac_ext >&5
18938   rm -rf conftest*
18939   
18940                                 LIBS="$LIBS -lnsl"
18941                 cat > conftest.$ac_ext <<EOF
18942 #line 18943 "configure"
18943 #include "confdefs.h"
18944
18945 #include <tcpd.h>
18946 int allow_severity = 0;
18947 int deny_severity  = 0;
18948
18949 struct request_info *req;
18950                 
18951 int main() {
18952
18953 hosts_access(req)
18954                 
18955 ; return 0; }
18956 EOF
18957 if { (eval echo configure:18958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18958   rm -rf conftest*
18959   echo "$ac_t""-lwrap -lnsl" 1>&6
18960                 have_wrappers=yes
18961                 LIBS="$save_LIBS -lnsl"
18962 else
18963   echo "configure: failed program was:" >&5
18964   cat conftest.$ac_ext >&5
18965   rm -rf conftest*
18966   
18967                 echo "$ac_t""no" 1>&6
18968                 have_wrappers=no
18969                 LIBS=$save_LIBS
18970 fi
18971 rm -f conftest*
18972 fi
18973 rm -f conftest*
18974 else
18975   echo "$ac_t""no" 1>&6
18976 have_wrappers=no
18977 fi
18978 done
18979
18980
18981         if test $have_wrappers = yes ; then
18982                 cat >> confdefs.h <<\EOF
18983 #define HAVE_TCPD 1
18984 EOF
18985
18986                 WRAP_LIBS="-lwrap"
18987         elif test $ol_enable_wrappers = yes ; then
18988                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18989         else
18990                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18991                 WRAP_LIBS=""
18992         fi
18993 fi
18994
18995 if test $ol_enable_syslog != no ; then
18996         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18997 echo "configure:18998: checking for openlog" >&5
18998 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18999   echo $ac_n "(cached) $ac_c" 1>&6
19000 else
19001   cat > conftest.$ac_ext <<EOF
19002 #line 19003 "configure"
19003 #include "confdefs.h"
19004 /* System header to define __stub macros and hopefully few prototypes,
19005     which can conflict with char openlog(); below.  */
19006 #include <assert.h>
19007 /* Override any gcc2 internal prototype to avoid an error.  */
19008 /* We use char because int might match the return type of a gcc2
19009     builtin and then its argument prototype would still apply.  */
19010 char openlog();
19011 char (*f)();
19012
19013 int main() {
19014
19015 /* The GNU C library defines this for functions which it implements
19016     to always fail with ENOSYS.  Some functions are actually named
19017     something starting with __ and the normal name is an alias.  */
19018 #if defined (__stub_openlog) || defined (__stub___openlog)
19019 choke me
19020 #else
19021 f = openlog;
19022 #endif
19023
19024 ; return 0; }
19025 EOF
19026 if { (eval echo configure:19027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19027   rm -rf conftest*
19028   eval "ac_cv_func_openlog=yes"
19029 else
19030   echo "configure: failed program was:" >&5
19031   cat conftest.$ac_ext >&5
19032   rm -rf conftest*
19033   eval "ac_cv_func_openlog=no"
19034 fi
19035 rm -f conftest*
19036 fi
19037
19038 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19039   echo "$ac_t""yes" 1>&6
19040   :
19041 else
19042   echo "$ac_t""no" 1>&6
19043 fi
19044
19045         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19046                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19047         fi
19048         ol_enable_syslog=$ac_cv_func_openlog
19049 fi
19050
19051
19052 ol_link_sql=no
19053 if test $ol_enable_sql != no ; then
19054         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19055 echo "configure:19056: checking for SQLDriverConnect in -liodbc" >&5
19056 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19058   echo $ac_n "(cached) $ac_c" 1>&6
19059 else
19060   ac_save_LIBS="$LIBS"
19061 LIBS="-liodbc  $LIBS"
19062 cat > conftest.$ac_ext <<EOF
19063 #line 19064 "configure"
19064 #include "confdefs.h"
19065 /* Override any gcc2 internal prototype to avoid an error.  */
19066 /* We use char because int might match the return type of a gcc2
19067     builtin and then its argument prototype would still apply.  */
19068 char SQLDriverConnect();
19069
19070 int main() {
19071 SQLDriverConnect()
19072 ; return 0; }
19073 EOF
19074 if { (eval echo configure:19075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19075   rm -rf conftest*
19076   eval "ac_cv_lib_$ac_lib_var=yes"
19077 else
19078   echo "configure: failed program was:" >&5
19079   cat conftest.$ac_ext >&5
19080   rm -rf conftest*
19081   eval "ac_cv_lib_$ac_lib_var=no"
19082 fi
19083 rm -f conftest*
19084 LIBS="$ac_save_LIBS"
19085
19086 fi
19087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19088   echo "$ac_t""yes" 1>&6
19089   have_iodbc=yes
19090 else
19091   echo "$ac_t""no" 1>&6
19092 have_iodbc=no
19093 fi
19094
19095         if test $have_iodbc = yes ; then
19096                 ol_link_sql="-liodbc"
19097         else
19098                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19099 echo "configure:19100: checking for SQLDriverConnect in -lodbc" >&5
19100 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19102   echo $ac_n "(cached) $ac_c" 1>&6
19103 else
19104   ac_save_LIBS="$LIBS"
19105 LIBS="-lodbc  $LIBS"
19106 cat > conftest.$ac_ext <<EOF
19107 #line 19108 "configure"
19108 #include "confdefs.h"
19109 /* Override any gcc2 internal prototype to avoid an error.  */
19110 /* We use char because int might match the return type of a gcc2
19111     builtin and then its argument prototype would still apply.  */
19112 char SQLDriverConnect();
19113
19114 int main() {
19115 SQLDriverConnect()
19116 ; return 0; }
19117 EOF
19118 if { (eval echo configure:19119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19119   rm -rf conftest*
19120   eval "ac_cv_lib_$ac_lib_var=yes"
19121 else
19122   echo "configure: failed program was:" >&5
19123   cat conftest.$ac_ext >&5
19124   rm -rf conftest*
19125   eval "ac_cv_lib_$ac_lib_var=no"
19126 fi
19127 rm -f conftest*
19128 LIBS="$ac_save_LIBS"
19129
19130 fi
19131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19132   echo "$ac_t""yes" 1>&6
19133   have_odbc=yes
19134 else
19135   echo "$ac_t""no" 1>&6
19136 have_odbc=no
19137 fi
19138
19139                 if test $have_odbc = yes ; then
19140                         ol_link_sql="-lodbc"
19141                 fi
19142         fi
19143
19144         if test $ol_link_sql != no ; then
19145                 SLAPD_SQL_LIBS="$ol_link_sql"
19146
19147         elif test $ol_enable_sql != auto ; then
19148                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19149         fi
19150 fi
19151
19152 ol_link_termcap=no
19153 for ac_hdr in termcap.h ncurses.h
19154 do
19155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19157 echo "configure:19158: checking for $ac_hdr" >&5
19158 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19159   echo $ac_n "(cached) $ac_c" 1>&6
19160 else
19161   cat > conftest.$ac_ext <<EOF
19162 #line 19163 "configure"
19163 #include "confdefs.h"
19164 #include <$ac_hdr>
19165 EOF
19166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19167 { (eval echo configure:19168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19169 if test -z "$ac_err"; then
19170   rm -rf conftest*
19171   eval "ac_cv_header_$ac_safe=yes"
19172 else
19173   echo "$ac_err" >&5
19174   echo "configure: failed program was:" >&5
19175   cat conftest.$ac_ext >&5
19176   rm -rf conftest*
19177   eval "ac_cv_header_$ac_safe=no"
19178 fi
19179 rm -f conftest*
19180 fi
19181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19182   echo "$ac_t""yes" 1>&6
19183     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19184   cat >> confdefs.h <<EOF
19185 #define $ac_tr_hdr 1
19186 EOF
19187  
19188 else
19189   echo "$ac_t""no" 1>&6
19190 fi
19191 done
19192
19193
19194 if test $ol_link_termcap = no ; then
19195         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19196 echo "configure:19197: checking for tputs in -ltermcap" >&5
19197 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19199   echo $ac_n "(cached) $ac_c" 1>&6
19200 else
19201   ac_save_LIBS="$LIBS"
19202 LIBS="-ltermcap  $LIBS"
19203 cat > conftest.$ac_ext <<EOF
19204 #line 19205 "configure"
19205 #include "confdefs.h"
19206 /* Override any gcc2 internal prototype to avoid an error.  */
19207 /* We use char because int might match the return type of a gcc2
19208     builtin and then its argument prototype would still apply.  */
19209 char tputs();
19210
19211 int main() {
19212 tputs()
19213 ; return 0; }
19214 EOF
19215 if { (eval echo configure:19216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19216   rm -rf conftest*
19217   eval "ac_cv_lib_$ac_lib_var=yes"
19218 else
19219   echo "configure: failed program was:" >&5
19220   cat conftest.$ac_ext >&5
19221   rm -rf conftest*
19222   eval "ac_cv_lib_$ac_lib_var=no"
19223 fi
19224 rm -f conftest*
19225 LIBS="$ac_save_LIBS"
19226
19227 fi
19228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19229   echo "$ac_t""yes" 1>&6
19230   have_termcap=yes
19231 else
19232   echo "$ac_t""no" 1>&6
19233 have_termcap=no
19234 fi
19235
19236         if test $have_termcap = yes ; then
19237                 cat >> confdefs.h <<\EOF
19238 #define HAVE_TERMCAP 1
19239 EOF
19240
19241                 ol_link_termcap=yes
19242                 TERMCAP_LIBS=-ltermcap
19243         fi
19244 fi
19245
19246 if test $ol_link_termcap = no ; then
19247         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19248 echo "configure:19249: checking for initscr in -lncurses" >&5
19249 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19251   echo $ac_n "(cached) $ac_c" 1>&6
19252 else
19253   ac_save_LIBS="$LIBS"
19254 LIBS="-lncurses  $LIBS"
19255 cat > conftest.$ac_ext <<EOF
19256 #line 19257 "configure"
19257 #include "confdefs.h"
19258 /* Override any gcc2 internal prototype to avoid an error.  */
19259 /* We use char because int might match the return type of a gcc2
19260     builtin and then its argument prototype would still apply.  */
19261 char initscr();
19262
19263 int main() {
19264 initscr()
19265 ; return 0; }
19266 EOF
19267 if { (eval echo configure:19268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19268   rm -rf conftest*
19269   eval "ac_cv_lib_$ac_lib_var=yes"
19270 else
19271   echo "configure: failed program was:" >&5
19272   cat conftest.$ac_ext >&5
19273   rm -rf conftest*
19274   eval "ac_cv_lib_$ac_lib_var=no"
19275 fi
19276 rm -f conftest*
19277 LIBS="$ac_save_LIBS"
19278
19279 fi
19280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19281   echo "$ac_t""yes" 1>&6
19282   have_ncurses=yes
19283 else
19284   echo "$ac_t""no" 1>&6
19285 have_ncurses=no
19286 fi
19287
19288         if test $have_ncurses = yes ; then
19289                 cat >> confdefs.h <<\EOF
19290 #define HAVE_NCURSES 1
19291 EOF
19292
19293                 ol_link_termcap=yes
19294                 TERMCAP_LIBS=-lncurses
19295         fi
19296 fi
19297
19298 if test $ol_link_termcap = no ; then
19299         cat >> confdefs.h <<\EOF
19300 #define NO_TERMCAP 1
19301 EOF
19302
19303         TERMCAP_LIBS=
19304 fi
19305
19306 ol_link_sasl=no
19307 ol_link_spasswd=no
19308 if test $ol_with_cyrus_sasl != no ; then
19309         for ac_hdr in sasl/sasl.h sasl.h
19310 do
19311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19313 echo "configure:19314: checking for $ac_hdr" >&5
19314 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19315   echo $ac_n "(cached) $ac_c" 1>&6
19316 else
19317   cat > conftest.$ac_ext <<EOF
19318 #line 19319 "configure"
19319 #include "confdefs.h"
19320 #include <$ac_hdr>
19321 EOF
19322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19323 { (eval echo configure:19324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19325 if test -z "$ac_err"; then
19326   rm -rf conftest*
19327   eval "ac_cv_header_$ac_safe=yes"
19328 else
19329   echo "$ac_err" >&5
19330   echo "configure: failed program was:" >&5
19331   cat conftest.$ac_ext >&5
19332   rm -rf conftest*
19333   eval "ac_cv_header_$ac_safe=no"
19334 fi
19335 rm -f conftest*
19336 fi
19337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19338   echo "$ac_t""yes" 1>&6
19339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19340   cat >> confdefs.h <<EOF
19341 #define $ac_tr_hdr 1
19342 EOF
19343  
19344 else
19345   echo "$ac_t""no" 1>&6
19346 fi
19347 done
19348
19349
19350         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19351                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19352 echo "configure:19353: checking for sasl_client_init in -lsasl2" >&5
19353 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19354 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19355   echo $ac_n "(cached) $ac_c" 1>&6
19356 else
19357   ac_save_LIBS="$LIBS"
19358 LIBS="-lsasl2  $LIBS"
19359 cat > conftest.$ac_ext <<EOF
19360 #line 19361 "configure"
19361 #include "confdefs.h"
19362 /* Override any gcc2 internal prototype to avoid an error.  */
19363 /* We use char because int might match the return type of a gcc2
19364     builtin and then its argument prototype would still apply.  */
19365 char sasl_client_init();
19366
19367 int main() {
19368 sasl_client_init()
19369 ; return 0; }
19370 EOF
19371 if { (eval echo configure:19372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19372   rm -rf conftest*
19373   eval "ac_cv_lib_$ac_lib_var=yes"
19374 else
19375   echo "configure: failed program was:" >&5
19376   cat conftest.$ac_ext >&5
19377   rm -rf conftest*
19378   eval "ac_cv_lib_$ac_lib_var=no"
19379 fi
19380 rm -f conftest*
19381 LIBS="$ac_save_LIBS"
19382
19383 fi
19384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19385   echo "$ac_t""yes" 1>&6
19386   ol_link_sasl="-lsasl2"
19387 else
19388   echo "$ac_t""no" 1>&6
19389 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19390 echo "configure:19391: checking for sasl_client_init in -lsasl" >&5
19391 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19392 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19393   echo $ac_n "(cached) $ac_c" 1>&6
19394 else
19395   ac_save_LIBS="$LIBS"
19396 LIBS="-lsasl  $LIBS"
19397 cat > conftest.$ac_ext <<EOF
19398 #line 19399 "configure"
19399 #include "confdefs.h"
19400 /* Override any gcc2 internal prototype to avoid an error.  */
19401 /* We use char because int might match the return type of a gcc2
19402     builtin and then its argument prototype would still apply.  */
19403 char sasl_client_init();
19404
19405 int main() {
19406 sasl_client_init()
19407 ; return 0; }
19408 EOF
19409 if { (eval echo configure:19410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19410   rm -rf conftest*
19411   eval "ac_cv_lib_$ac_lib_var=yes"
19412 else
19413   echo "configure: failed program was:" >&5
19414   cat conftest.$ac_ext >&5
19415   rm -rf conftest*
19416   eval "ac_cv_lib_$ac_lib_var=no"
19417 fi
19418 rm -f conftest*
19419 LIBS="$ac_save_LIBS"
19420
19421 fi
19422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19423   echo "$ac_t""yes" 1>&6
19424   ol_link_sasl="-lsasl"
19425 else
19426   echo "$ac_t""no" 1>&6
19427 fi
19428
19429 fi
19430
19431         fi
19432
19433         if test $ol_link_sasl = no ; then
19434                 if test $ol_with_cyrus_sasl != auto ; then
19435                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19436                 else
19437                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19438                         echo "configure: warning: SASL authentication not supported!" 1>&2
19439                         if test $ol_link_tls = no ; then
19440                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19441                         fi
19442                 fi
19443         else
19444                 cat >> confdefs.h <<\EOF
19445 #define HAVE_CYRUS_SASL 1
19446 EOF
19447
19448                 SASL_LIBS="$ol_link_sasl"
19449                 if test $ol_enable_spasswd != no ; then
19450                         ol_link_spasswd=yes
19451                 fi
19452         fi
19453
19454 else
19455         echo "configure: warning: SASL authentication not supported!" 1>&2
19456         if test $ol_link_tls = no ; then
19457                 echo "configure: warning: Strong authentication not supported!" 1>&2
19458         fi
19459 fi
19460
19461 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19462         dev=no
19463         if test -r /dev/urandom ; then
19464                 dev="/dev/urandom";
19465         elif test -r /idev/urandom ; then
19466                 dev="/idev/urandom";
19467         elif test -r /dev/srandom ; then
19468                 dev="/dev/srandom";
19469         elif test -r /dev/random ; then
19470                 dev="/dev/random";
19471         elif test -r /idev/random ; then
19472                 dev="/idev/random";
19473         fi
19474
19475         if test $dev != no ; then
19476                 cat >> confdefs.h <<EOF
19477 #define URANDOM_DEVICE "$dev"
19478 EOF
19479
19480         fi
19481 fi
19482
19483 ol_link_fetch=no
19484 if test $ol_with_fetch != no ; then
19485         ol_LIBS=$LIBS
19486 LIBS="-lfetch -lcom_err $LIBS"
19487 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19488 echo "configure:19489: checking fetch(3) library" >&5
19489 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19490   echo $ac_n "(cached) $ac_c" 1>&6
19491 else
19492   
19493         cat > conftest.$ac_ext <<EOF
19494 #line 19495 "configure"
19495 #include "confdefs.h"
19496
19497 #include <sys/param.h>
19498 #include <stdio.h>
19499 #include <fetch.h>
19500 int main() {
19501 struct url *u = fetchParseURL("file:///"); 
19502 ; return 0; }
19503 EOF
19504 if { (eval echo configure:19505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19505   rm -rf conftest*
19506   ol_cv_lib_fetch=yes
19507 else
19508   echo "configure: failed program was:" >&5
19509   cat conftest.$ac_ext >&5
19510   rm -rf conftest*
19511   ol_cv_lib_fetch=no
19512 fi
19513 rm -f conftest*
19514 fi
19515
19516 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19517 LIBS=$ol_LIBS
19518 if test $ol_cv_lib_fetch != no ; then
19519         ol_link_fetch="-lfetch -lcom_err"
19520         cat >> confdefs.h <<\EOF
19521 #define HAVE_FETCH 1
19522 EOF
19523
19524 fi
19525
19526
19527         if test $ol_cv_lib_fetch != no ; then
19528                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19529                 ol_link_fetch=freebsd
19530
19531         elif test $ol_with_fetch != auto ; then
19532                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19533         fi 
19534 fi
19535
19536 ol_link_readline=no
19537 if test $ol_with_readline != no ; then
19538         for ac_hdr in readline/readline.h readline/history.h
19539 do
19540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19542 echo "configure:19543: checking for $ac_hdr" >&5
19543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19544   echo $ac_n "(cached) $ac_c" 1>&6
19545 else
19546   cat > conftest.$ac_ext <<EOF
19547 #line 19548 "configure"
19548 #include "confdefs.h"
19549 #include <$ac_hdr>
19550 EOF
19551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19552 { (eval echo configure:19553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19554 if test -z "$ac_err"; then
19555   rm -rf conftest*
19556   eval "ac_cv_header_$ac_safe=yes"
19557 else
19558   echo "$ac_err" >&5
19559   echo "configure: failed program was:" >&5
19560   cat conftest.$ac_ext >&5
19561   rm -rf conftest*
19562   eval "ac_cv_header_$ac_safe=no"
19563 fi
19564 rm -f conftest*
19565 fi
19566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19567   echo "$ac_t""yes" 1>&6
19568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19569   cat >> confdefs.h <<EOF
19570 #define $ac_tr_hdr 1
19571 EOF
19572  
19573 else
19574   echo "$ac_t""no" 1>&6
19575 fi
19576 done
19577
19578
19579         if test $ac_cv_header_readline_readline_h = yes ; then
19580                 save_LIBS="$LIBS"
19581                 LIBS="$TERMCAP_LIBS $LIBS"
19582                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19583 echo "configure:19584: checking for readline in -lreadline" >&5
19584 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19586   echo $ac_n "(cached) $ac_c" 1>&6
19587 else
19588   ac_save_LIBS="$LIBS"
19589 LIBS="-lreadline  $LIBS"
19590 cat > conftest.$ac_ext <<EOF
19591 #line 19592 "configure"
19592 #include "confdefs.h"
19593 /* Override any gcc2 internal prototype to avoid an error.  */
19594 /* We use char because int might match the return type of a gcc2
19595     builtin and then its argument prototype would still apply.  */
19596 char readline();
19597
19598 int main() {
19599 readline()
19600 ; return 0; }
19601 EOF
19602 if { (eval echo configure:19603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19603   rm -rf conftest*
19604   eval "ac_cv_lib_$ac_lib_var=yes"
19605 else
19606   echo "configure: failed program was:" >&5
19607   cat conftest.$ac_ext >&5
19608   rm -rf conftest*
19609   eval "ac_cv_lib_$ac_lib_var=no"
19610 fi
19611 rm -f conftest*
19612 LIBS="$ac_save_LIBS"
19613
19614 fi
19615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19616   echo "$ac_t""yes" 1>&6
19617   have_readline=yes
19618 else
19619   echo "$ac_t""no" 1>&6
19620 have_readline=no
19621 fi
19622
19623                 LIBS="$save_LIBS"
19624                         
19625                 if test $have_readline = yes ; then
19626                         ol_with_readline=found
19627                         ol_link_readline=yes
19628
19629                         READLINE_LIBS="-lreadline"
19630                 fi
19631         fi
19632 fi
19633
19634 if test $ol_link_readline = yes ; then
19635         cat >> confdefs.h <<\EOF
19636 #define HAVE_READLINE 1
19637 EOF
19638
19639 fi
19640
19641
19642 if test $ol_enable_crypt != no ; then
19643         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19644 echo "configure:19645: checking for crypt" >&5
19645 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19646   echo $ac_n "(cached) $ac_c" 1>&6
19647 else
19648   cat > conftest.$ac_ext <<EOF
19649 #line 19650 "configure"
19650 #include "confdefs.h"
19651 /* System header to define __stub macros and hopefully few prototypes,
19652     which can conflict with char crypt(); below.  */
19653 #include <assert.h>
19654 /* Override any gcc2 internal prototype to avoid an error.  */
19655 /* We use char because int might match the return type of a gcc2
19656     builtin and then its argument prototype would still apply.  */
19657 char crypt();
19658 char (*f)();
19659
19660 int main() {
19661
19662 /* The GNU C library defines this for functions which it implements
19663     to always fail with ENOSYS.  Some functions are actually named
19664     something starting with __ and the normal name is an alias.  */
19665 #if defined (__stub_crypt) || defined (__stub___crypt)
19666 choke me
19667 #else
19668 f = crypt;
19669 #endif
19670
19671 ; return 0; }
19672 EOF
19673 if { (eval echo configure:19674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19674   rm -rf conftest*
19675   eval "ac_cv_func_crypt=yes"
19676 else
19677   echo "configure: failed program was:" >&5
19678   cat conftest.$ac_ext >&5
19679   rm -rf conftest*
19680   eval "ac_cv_func_crypt=no"
19681 fi
19682 rm -f conftest*
19683 fi
19684
19685 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19686   echo "$ac_t""yes" 1>&6
19687   have_crypt=yes
19688 else
19689   echo "$ac_t""no" 1>&6
19690
19691                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19692 echo "configure:19693: checking for crypt in -lcrypt" >&5
19693 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19695   echo $ac_n "(cached) $ac_c" 1>&6
19696 else
19697   ac_save_LIBS="$LIBS"
19698 LIBS="-lcrypt  $LIBS"
19699 cat > conftest.$ac_ext <<EOF
19700 #line 19701 "configure"
19701 #include "confdefs.h"
19702 /* Override any gcc2 internal prototype to avoid an error.  */
19703 /* We use char because int might match the return type of a gcc2
19704     builtin and then its argument prototype would still apply.  */
19705 char crypt();
19706
19707 int main() {
19708 crypt()
19709 ; return 0; }
19710 EOF
19711 if { (eval echo configure:19712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19712   rm -rf conftest*
19713   eval "ac_cv_lib_$ac_lib_var=yes"
19714 else
19715   echo "configure: failed program was:" >&5
19716   cat conftest.$ac_ext >&5
19717   rm -rf conftest*
19718   eval "ac_cv_lib_$ac_lib_var=no"
19719 fi
19720 rm -f conftest*
19721 LIBS="$ac_save_LIBS"
19722
19723 fi
19724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19725   echo "$ac_t""yes" 1>&6
19726   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19727                         have_crypt=yes
19728 else
19729   echo "$ac_t""no" 1>&6
19730 have_crypt=no
19731 fi
19732
19733 fi
19734
19735
19736         if test $have_crypt = yes ; then
19737                 cat >> confdefs.h <<\EOF
19738 #define HAVE_CRYPT 1
19739 EOF
19740
19741         else
19742                 echo "configure: warning: could not find crypt" 1>&2
19743                 if test $ol_enable_crypt = yes ; then
19744                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19745                 fi
19746
19747                 echo "configure: warning: disabling crypt support" 1>&2
19748                 ol_enable_crypt=no
19749         fi
19750 fi
19751
19752 if test $ol_enable_proctitle != no ; then
19753         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19754 echo "configure:19755: checking for setproctitle" >&5
19755 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19756   echo $ac_n "(cached) $ac_c" 1>&6
19757 else
19758   cat > conftest.$ac_ext <<EOF
19759 #line 19760 "configure"
19760 #include "confdefs.h"
19761 /* System header to define __stub macros and hopefully few prototypes,
19762     which can conflict with char setproctitle(); below.  */
19763 #include <assert.h>
19764 /* Override any gcc2 internal prototype to avoid an error.  */
19765 /* We use char because int might match the return type of a gcc2
19766     builtin and then its argument prototype would still apply.  */
19767 char setproctitle();
19768 char (*f)();
19769
19770 int main() {
19771
19772 /* The GNU C library defines this for functions which it implements
19773     to always fail with ENOSYS.  Some functions are actually named
19774     something starting with __ and the normal name is an alias.  */
19775 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19776 choke me
19777 #else
19778 f = setproctitle;
19779 #endif
19780
19781 ; return 0; }
19782 EOF
19783 if { (eval echo configure:19784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19784   rm -rf conftest*
19785   eval "ac_cv_func_setproctitle=yes"
19786 else
19787   echo "configure: failed program was:" >&5
19788   cat conftest.$ac_ext >&5
19789   rm -rf conftest*
19790   eval "ac_cv_func_setproctitle=no"
19791 fi
19792 rm -f conftest*
19793 fi
19794
19795 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19796   echo "$ac_t""yes" 1>&6
19797   have_setproctitle=yes
19798 else
19799   echo "$ac_t""no" 1>&6
19800
19801                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19802 echo "configure:19803: checking for setproctitle in -lutil" >&5
19803 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19805   echo $ac_n "(cached) $ac_c" 1>&6
19806 else
19807   ac_save_LIBS="$LIBS"
19808 LIBS="-lutil  $LIBS"
19809 cat > conftest.$ac_ext <<EOF
19810 #line 19811 "configure"
19811 #include "confdefs.h"
19812 /* Override any gcc2 internal prototype to avoid an error.  */
19813 /* We use char because int might match the return type of a gcc2
19814     builtin and then its argument prototype would still apply.  */
19815 char setproctitle();
19816
19817 int main() {
19818 setproctitle()
19819 ; return 0; }
19820 EOF
19821 if { (eval echo configure:19822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19822   rm -rf conftest*
19823   eval "ac_cv_lib_$ac_lib_var=yes"
19824 else
19825   echo "configure: failed program was:" >&5
19826   cat conftest.$ac_ext >&5
19827   rm -rf conftest*
19828   eval "ac_cv_lib_$ac_lib_var=no"
19829 fi
19830 rm -f conftest*
19831 LIBS="$ac_save_LIBS"
19832
19833 fi
19834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19835   echo "$ac_t""yes" 1>&6
19836   have_setproctitle=yes
19837                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19838 else
19839   echo "$ac_t""no" 1>&6
19840 have_setproctitle=no
19841                         LIBOBJS="$LIBOBJS setproctitle.o"
19842                         LIBSRCS="$LIBSRCS setproctitle.c"
19843 fi
19844
19845 fi
19846
19847
19848         if test $have_setproctitle = yes ; then
19849                 cat >> confdefs.h <<\EOF
19850 #define HAVE_SETPROCTITLE 1
19851 EOF
19852
19853         fi
19854 fi
19855
19856 if test $ol_enable_slp != no ; then
19857         for ac_hdr in slp.h 
19858 do
19859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19861 echo "configure:19862: checking for $ac_hdr" >&5
19862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19863   echo $ac_n "(cached) $ac_c" 1>&6
19864 else
19865   cat > conftest.$ac_ext <<EOF
19866 #line 19867 "configure"
19867 #include "confdefs.h"
19868 #include <$ac_hdr>
19869 EOF
19870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19871 { (eval echo configure:19872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19873 if test -z "$ac_err"; then
19874   rm -rf conftest*
19875   eval "ac_cv_header_$ac_safe=yes"
19876 else
19877   echo "$ac_err" >&5
19878   echo "configure: failed program was:" >&5
19879   cat conftest.$ac_ext >&5
19880   rm -rf conftest*
19881   eval "ac_cv_header_$ac_safe=no"
19882 fi
19883 rm -f conftest*
19884 fi
19885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19886   echo "$ac_t""yes" 1>&6
19887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19888   cat >> confdefs.h <<EOF
19889 #define $ac_tr_hdr 1
19890 EOF
19891  
19892 else
19893   echo "$ac_t""no" 1>&6
19894 fi
19895 done
19896
19897
19898         if test $ac_cv_header_slp_h = yes ; then
19899                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19900 echo "configure:19901: checking for SLPOpen in -lslp" >&5
19901 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
19902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19903   echo $ac_n "(cached) $ac_c" 1>&6
19904 else
19905   ac_save_LIBS="$LIBS"
19906 LIBS="-lslp  $LIBS"
19907 cat > conftest.$ac_ext <<EOF
19908 #line 19909 "configure"
19909 #include "confdefs.h"
19910 /* Override any gcc2 internal prototype to avoid an error.  */
19911 /* We use char because int might match the return type of a gcc2
19912     builtin and then its argument prototype would still apply.  */
19913 char SLPOpen();
19914
19915 int main() {
19916 SLPOpen()
19917 ; return 0; }
19918 EOF
19919 if { (eval echo configure:19920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19920   rm -rf conftest*
19921   eval "ac_cv_lib_$ac_lib_var=yes"
19922 else
19923   echo "configure: failed program was:" >&5
19924   cat conftest.$ac_ext >&5
19925   rm -rf conftest*
19926   eval "ac_cv_lib_$ac_lib_var=no"
19927 fi
19928 rm -f conftest*
19929 LIBS="$ac_save_LIBS"
19930
19931 fi
19932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19933   echo "$ac_t""yes" 1>&6
19934   have_slp=yes
19935 else
19936   echo "$ac_t""no" 1>&6
19937 have_slp=no
19938 fi
19939
19940                 if test $have_slp = yes ; then
19941                         cat >> confdefs.h <<\EOF
19942 #define HAVE_SLP 1
19943 EOF
19944
19945                         SLAPD_SLP_LIBS=-lslp
19946                 fi
19947
19948         elif test $ol_enable_slp = yes ; then
19949                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
19950         fi
19951 fi
19952
19953 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
19954 echo "configure:19955: checking for ANSI C header files" >&5
19955 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
19956   echo $ac_n "(cached) $ac_c" 1>&6
19957 else
19958   cat > conftest.$ac_ext <<EOF
19959 #line 19960 "configure"
19960 #include "confdefs.h"
19961 #include <stdlib.h>
19962 #include <stdarg.h>
19963 #include <string.h>
19964 #include <float.h>
19965 EOF
19966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19967 { (eval echo configure:19968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19969 if test -z "$ac_err"; then
19970   rm -rf conftest*
19971   ac_cv_header_stdc=yes
19972 else
19973   echo "$ac_err" >&5
19974   echo "configure: failed program was:" >&5
19975   cat conftest.$ac_ext >&5
19976   rm -rf conftest*
19977   ac_cv_header_stdc=no
19978 fi
19979 rm -f conftest*
19980
19981 if test $ac_cv_header_stdc = yes; then
19982   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19983 cat > conftest.$ac_ext <<EOF
19984 #line 19985 "configure"
19985 #include "confdefs.h"
19986 #include <string.h>
19987 EOF
19988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19989   egrep "memchr" >/dev/null 2>&1; then
19990   :
19991 else
19992   rm -rf conftest*
19993   ac_cv_header_stdc=no
19994 fi
19995 rm -f conftest*
19996
19997 fi
19998
19999 if test $ac_cv_header_stdc = yes; then
20000   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20001 cat > conftest.$ac_ext <<EOF
20002 #line 20003 "configure"
20003 #include "confdefs.h"
20004 #include <stdlib.h>
20005 EOF
20006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20007   egrep "free" >/dev/null 2>&1; then
20008   :
20009 else
20010   rm -rf conftest*
20011   ac_cv_header_stdc=no
20012 fi
20013 rm -f conftest*
20014
20015 fi
20016
20017 if test $ac_cv_header_stdc = yes; then
20018   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20019 if test "$cross_compiling" = yes; then
20020   :
20021 else
20022   cat > conftest.$ac_ext <<EOF
20023 #line 20024 "configure"
20024 #include "confdefs.h"
20025 #include <ctype.h>
20026 #if ((' ' & 0x0FF) == 0x020)
20027 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20028 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20029 #else
20030 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20031  || ('j' <= (c) && (c) <= 'r') \
20032  || ('s' <= (c) && (c) <= 'z'))
20033 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20034 #endif
20035 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20036 int main () { int i; for (i = 0; i < 256; i++)
20037 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20038 exit (0); }
20039
20040 EOF
20041 if { (eval echo configure:20042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20042 then
20043   :
20044 else
20045   echo "configure: failed program was:" >&5
20046   cat conftest.$ac_ext >&5
20047   rm -fr conftest*
20048   ac_cv_header_stdc=no
20049 fi
20050 rm -fr conftest*
20051 fi
20052
20053 fi
20054 fi
20055
20056 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20057 if test $ac_cv_header_stdc = yes; then
20058   cat >> confdefs.h <<\EOF
20059 #define STDC_HEADERS 1
20060 EOF
20061
20062 fi
20063
20064 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20065 echo "configure:20066: checking for mode_t" >&5
20066 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20067   echo $ac_n "(cached) $ac_c" 1>&6
20068 else
20069   cat > conftest.$ac_ext <<EOF
20070 #line 20071 "configure"
20071 #include "confdefs.h"
20072 #include <sys/types.h>
20073 #if STDC_HEADERS
20074 #include <stdlib.h>
20075 #include <stddef.h>
20076 #endif
20077
20078 EOF
20079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20080   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20081   rm -rf conftest*
20082   eval "ac_cv_type_mode_t=yes"
20083 else
20084   rm -rf conftest*
20085   eval "ac_cv_type_mode_t=no"
20086 fi
20087 rm -f conftest*
20088
20089 fi
20090 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20091   echo "$ac_t""yes" 1>&6
20092 else
20093   echo "$ac_t""no" 1>&6
20094   cat >> confdefs.h <<EOF
20095 #define mode_t int
20096 EOF
20097
20098 fi
20099
20100 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20101 echo "configure:20102: checking for off_t" >&5
20102 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20103   echo $ac_n "(cached) $ac_c" 1>&6
20104 else
20105   cat > conftest.$ac_ext <<EOF
20106 #line 20107 "configure"
20107 #include "confdefs.h"
20108 #include <sys/types.h>
20109 #if STDC_HEADERS
20110 #include <stdlib.h>
20111 #include <stddef.h>
20112 #endif
20113
20114 EOF
20115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20116   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20117   rm -rf conftest*
20118   eval "ac_cv_type_off_t=yes"
20119 else
20120   rm -rf conftest*
20121   eval "ac_cv_type_off_t=no"
20122 fi
20123 rm -f conftest*
20124
20125 fi
20126 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20127   echo "$ac_t""yes" 1>&6
20128 else
20129   echo "$ac_t""no" 1>&6
20130   cat >> confdefs.h <<EOF
20131 #define off_t long
20132 EOF
20133
20134 fi
20135
20136 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20137 echo "configure:20138: checking for pid_t" >&5
20138 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20139   echo $ac_n "(cached) $ac_c" 1>&6
20140 else
20141   cat > conftest.$ac_ext <<EOF
20142 #line 20143 "configure"
20143 #include "confdefs.h"
20144 #include <sys/types.h>
20145 #if STDC_HEADERS
20146 #include <stdlib.h>
20147 #include <stddef.h>
20148 #endif
20149
20150 EOF
20151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20152   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20153   rm -rf conftest*
20154   eval "ac_cv_type_pid_t=yes"
20155 else
20156   rm -rf conftest*
20157   eval "ac_cv_type_pid_t=no"
20158 fi
20159 rm -f conftest*
20160
20161 fi
20162 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20163   echo "$ac_t""yes" 1>&6
20164 else
20165   echo "$ac_t""no" 1>&6
20166   cat >> confdefs.h <<EOF
20167 #define pid_t int
20168 EOF
20169
20170 fi
20171
20172 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20173 echo "configure:20174: checking for ptrdiff_t" >&5
20174 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20175   echo $ac_n "(cached) $ac_c" 1>&6
20176 else
20177   cat > conftest.$ac_ext <<EOF
20178 #line 20179 "configure"
20179 #include "confdefs.h"
20180 #include <stddef.h>
20181 int main() {
20182 ptrdiff_t p
20183 ; return 0; }
20184 EOF
20185 if { (eval echo configure:20186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20186   rm -rf conftest*
20187   am_cv_type_ptrdiff_t=yes
20188 else
20189   echo "configure: failed program was:" >&5
20190   cat conftest.$ac_ext >&5
20191   rm -rf conftest*
20192   am_cv_type_ptrdiff_t=no
20193 fi
20194 rm -f conftest*
20195 fi
20196
20197 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20198    if test $am_cv_type_ptrdiff_t = yes; then
20199      cat >> confdefs.h <<\EOF
20200 #define HAVE_PTRDIFF_T 1
20201 EOF
20202
20203    fi
20204
20205 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20206 echo "configure:20207: checking return type of signal handlers" >&5
20207 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20208   echo $ac_n "(cached) $ac_c" 1>&6
20209 else
20210   cat > conftest.$ac_ext <<EOF
20211 #line 20212 "configure"
20212 #include "confdefs.h"
20213 #include <sys/types.h>
20214 #include <signal.h>
20215 #ifdef signal
20216 #undef signal
20217 #endif
20218 #ifdef __cplusplus
20219 extern "C" void (*signal (int, void (*)(int)))(int);
20220 #else
20221 void (*signal ()) ();
20222 #endif
20223
20224 int main() {
20225 int i;
20226 ; return 0; }
20227 EOF
20228 if { (eval echo configure:20229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20229   rm -rf conftest*
20230   ac_cv_type_signal=void
20231 else
20232   echo "configure: failed program was:" >&5
20233   cat conftest.$ac_ext >&5
20234   rm -rf conftest*
20235   ac_cv_type_signal=int
20236 fi
20237 rm -f conftest*
20238 fi
20239
20240 echo "$ac_t""$ac_cv_type_signal" 1>&6
20241 cat >> confdefs.h <<EOF
20242 #define RETSIGTYPE $ac_cv_type_signal
20243 EOF
20244
20245
20246 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20247 echo "configure:20248: checking for size_t" >&5
20248 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20249   echo $ac_n "(cached) $ac_c" 1>&6
20250 else
20251   cat > conftest.$ac_ext <<EOF
20252 #line 20253 "configure"
20253 #include "confdefs.h"
20254 #include <sys/types.h>
20255 #if STDC_HEADERS
20256 #include <stdlib.h>
20257 #include <stddef.h>
20258 #endif
20259
20260 EOF
20261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20262   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20263   rm -rf conftest*
20264   eval "ac_cv_type_size_t=yes"
20265 else
20266   rm -rf conftest*
20267   eval "ac_cv_type_size_t=no"
20268 fi
20269 rm -f conftest*
20270
20271 fi
20272 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20273   echo "$ac_t""yes" 1>&6
20274 else
20275   echo "$ac_t""no" 1>&6
20276   cat >> confdefs.h <<EOF
20277 #define size_t unsigned
20278 EOF
20279
20280 fi
20281
20282
20283 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20284 echo "configure:20285: checking for ssize_t" >&5
20285 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20286   echo $ac_n "(cached) $ac_c" 1>&6
20287 else
20288   cat > conftest.$ac_ext <<EOF
20289 #line 20290 "configure"
20290 #include "confdefs.h"
20291 #include <sys/types.h>
20292 #if STDC_HEADERS
20293 #include <stdlib.h>
20294 #include <stddef.h>
20295 #endif
20296
20297 EOF
20298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20299   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20300   rm -rf conftest*
20301   eval "ac_cv_type_ssize_t=yes"
20302 else
20303   rm -rf conftest*
20304   eval "ac_cv_type_ssize_t=no"
20305 fi
20306 rm -f conftest*
20307
20308 fi
20309 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20310   echo "$ac_t""yes" 1>&6
20311 else
20312   echo "$ac_t""no" 1>&6
20313   cat >> confdefs.h <<EOF
20314 #define ssize_t signed int
20315 EOF
20316
20317 fi
20318
20319 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20320 echo "configure:20321: checking for caddr_t" >&5
20321 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20322   echo $ac_n "(cached) $ac_c" 1>&6
20323 else
20324   cat > conftest.$ac_ext <<EOF
20325 #line 20326 "configure"
20326 #include "confdefs.h"
20327 #include <sys/types.h>
20328 #if STDC_HEADERS
20329 #include <stdlib.h>
20330 #include <stddef.h>
20331 #endif
20332
20333 EOF
20334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20335   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20336   rm -rf conftest*
20337   eval "ac_cv_type_caddr_t=yes"
20338 else
20339   rm -rf conftest*
20340   eval "ac_cv_type_caddr_t=no"
20341 fi
20342 rm -f conftest*
20343
20344 fi
20345 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20346   echo "$ac_t""yes" 1>&6
20347 else
20348   echo "$ac_t""no" 1>&6
20349   cat >> confdefs.h <<EOF
20350 #define caddr_t char *
20351 EOF
20352
20353 fi
20354
20355
20356 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20357 echo "configure:20358: checking for socklen_t" >&5
20358 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20359   echo $ac_n "(cached) $ac_c" 1>&6
20360 else
20361   cat > conftest.$ac_ext <<EOF
20362 #line 20363 "configure"
20363 #include "confdefs.h"
20364
20365 #ifdef HAVE_SYS_TYPES_H
20366 #include <sys/types.h>
20367 #endif
20368 #ifdef HAVE_SYS_SOCKET_H
20369 #include <sys/socket.h>
20370 #endif
20371
20372 int main() {
20373 socklen_t len;
20374 ; return 0; }
20375 EOF
20376 if { (eval echo configure:20377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20377   rm -rf conftest*
20378   ol_cv_type_socklen_t=yes
20379 else
20380   echo "configure: failed program was:" >&5
20381   cat conftest.$ac_ext >&5
20382   rm -rf conftest*
20383   ol_cv_type_socklen_t=no
20384 fi
20385 rm -f conftest*
20386 fi
20387
20388 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20389   if test $ol_cv_type_socklen_t = no; then
20390     cat >> confdefs.h <<\EOF
20391 #define socklen_t int
20392 EOF
20393
20394   fi
20395  
20396 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20397 echo "configure:20398: checking for member st_blksize in aggregate type struct stat" >&5
20398 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20399   echo $ac_n "(cached) $ac_c" 1>&6
20400 else
20401   cat > conftest.$ac_ext <<EOF
20402 #line 20403 "configure"
20403 #include "confdefs.h"
20404 #include <sys/types.h>
20405 #include <sys/stat.h>
20406 int main() {
20407 struct stat foo; foo.st_blksize;
20408 ; return 0; }
20409 EOF
20410 if { (eval echo configure:20411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20411   rm -rf conftest*
20412   ac_cv_c_struct_member_st_blksize=yes
20413 else
20414   echo "configure: failed program was:" >&5
20415   cat conftest.$ac_ext >&5
20416   rm -rf conftest*
20417   ac_cv_c_struct_member_st_blksize=no
20418 fi
20419 rm -f conftest*
20420 fi
20421
20422 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20423 st_blksize="$ac_cv_c_struct_member_st_blksize"
20424 if test $ac_cv_c_struct_member_st_blksize = yes; then
20425   cat >> confdefs.h <<\EOF
20426 #define HAVE_ST_BLKSIZE 1
20427 EOF
20428
20429 fi
20430
20431 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20432 echo "configure:20433: checking whether time.h and sys/time.h may both be included" >&5
20433 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20434   echo $ac_n "(cached) $ac_c" 1>&6
20435 else
20436   cat > conftest.$ac_ext <<EOF
20437 #line 20438 "configure"
20438 #include "confdefs.h"
20439 #include <sys/types.h>
20440 #include <sys/time.h>
20441 #include <time.h>
20442 int main() {
20443 struct tm *tp;
20444 ; return 0; }
20445 EOF
20446 if { (eval echo configure:20447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20447   rm -rf conftest*
20448   ac_cv_header_time=yes
20449 else
20450   echo "configure: failed program was:" >&5
20451   cat conftest.$ac_ext >&5
20452   rm -rf conftest*
20453   ac_cv_header_time=no
20454 fi
20455 rm -f conftest*
20456 fi
20457
20458 echo "$ac_t""$ac_cv_header_time" 1>&6
20459 if test $ac_cv_header_time = yes; then
20460   cat >> confdefs.h <<\EOF
20461 #define TIME_WITH_SYS_TIME 1
20462 EOF
20463
20464 fi
20465
20466 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20467 echo "configure:20468: checking whether struct tm is in sys/time.h or time.h" >&5
20468 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   cat > conftest.$ac_ext <<EOF
20472 #line 20473 "configure"
20473 #include "confdefs.h"
20474 #include <sys/types.h>
20475 #include <time.h>
20476 int main() {
20477 struct tm *tp; tp->tm_sec;
20478 ; return 0; }
20479 EOF
20480 if { (eval echo configure:20481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20481   rm -rf conftest*
20482   ac_cv_struct_tm=time.h
20483 else
20484   echo "configure: failed program was:" >&5
20485   cat conftest.$ac_ext >&5
20486   rm -rf conftest*
20487   ac_cv_struct_tm=sys/time.h
20488 fi
20489 rm -f conftest*
20490 fi
20491
20492 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20493 if test $ac_cv_struct_tm = sys/time.h; then
20494   cat >> confdefs.h <<\EOF
20495 #define TM_IN_SYS_TIME 1
20496 EOF
20497
20498 fi
20499
20500 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20501 echo "configure:20502: checking for uid_t in sys/types.h" >&5
20502 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20503   echo $ac_n "(cached) $ac_c" 1>&6
20504 else
20505   cat > conftest.$ac_ext <<EOF
20506 #line 20507 "configure"
20507 #include "confdefs.h"
20508 #include <sys/types.h>
20509 EOF
20510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20511   egrep "uid_t" >/dev/null 2>&1; then
20512   rm -rf conftest*
20513   ac_cv_type_uid_t=yes
20514 else
20515   rm -rf conftest*
20516   ac_cv_type_uid_t=no
20517 fi
20518 rm -f conftest*
20519
20520 fi
20521
20522 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20523 if test $ac_cv_type_uid_t = no; then
20524   cat >> confdefs.h <<\EOF
20525 #define uid_t int
20526 EOF
20527
20528   cat >> confdefs.h <<\EOF
20529 #define gid_t int
20530 EOF
20531
20532 fi
20533
20534 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20535 echo "configure:20536: checking for sig_atomic_t" >&5
20536 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20537   echo $ac_n "(cached) $ac_c" 1>&6
20538 else
20539   cat > conftest.$ac_ext <<EOF
20540 #line 20541 "configure"
20541 #include "confdefs.h"
20542 #include <signal.h>
20543 int main() {
20544 sig_atomic_t atomic;
20545 ; return 0; }
20546 EOF
20547 if { (eval echo configure:20548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20548   rm -rf conftest*
20549   ol_cv_type_sig_atomic_t=yes
20550 else
20551   echo "configure: failed program was:" >&5
20552   cat conftest.$ac_ext >&5
20553   rm -rf conftest*
20554   ol_cv_type_sig_atomic_t=no
20555 fi
20556 rm -f conftest*
20557 fi
20558
20559 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20560   if test $ol_cv_type_sig_atomic_t = no; then
20561     cat >> confdefs.h <<\EOF
20562 #define sig_atomic_t int
20563 EOF
20564
20565   fi
20566  
20567
20568
20569 # test for pw_gecos in struct passwd
20570 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20571 echo "configure:20572: checking struct passwd for pw_gecos" >&5
20572 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20573   echo $ac_n "(cached) $ac_c" 1>&6
20574 else
20575   
20576         cat > conftest.$ac_ext <<EOF
20577 #line 20578 "configure"
20578 #include "confdefs.h"
20579 #include <pwd.h>
20580 int main() {
20581
20582         struct passwd pwd;
20583         pwd.pw_gecos = pwd.pw_name;
20584
20585 ; return 0; }
20586 EOF
20587 if { (eval echo configure:20588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20588   rm -rf conftest*
20589   ol_cv_struct_passwd_pw_gecos=yes
20590 else
20591   echo "configure: failed program was:" >&5
20592   cat conftest.$ac_ext >&5
20593   rm -rf conftest*
20594   ol_cv_struct_passwd_pw_gecos=no
20595 fi
20596 rm -f conftest*
20597 fi
20598
20599 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20600 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20601         cat >> confdefs.h <<\EOF
20602 #define HAVE_PW_GECOS 1
20603 EOF
20604
20605 fi
20606
20607 # test for pw_passwd in struct passwd
20608 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20609 echo "configure:20610: checking struct passwd for pw_passwd" >&5
20610 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20611   echo $ac_n "(cached) $ac_c" 1>&6
20612 else
20613   
20614         cat > conftest.$ac_ext <<EOF
20615 #line 20616 "configure"
20616 #include "confdefs.h"
20617 #include <pwd.h>
20618 int main() {
20619
20620         struct passwd pwd;
20621         pwd.pw_passwd = pwd.pw_name;
20622
20623 ; return 0; }
20624 EOF
20625 if { (eval echo configure:20626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20626   rm -rf conftest*
20627   ol_cv_struct_passwd_pw_passwd=yes
20628 else
20629   echo "configure: failed program was:" >&5
20630   cat conftest.$ac_ext >&5
20631   rm -rf conftest*
20632   ol_cv_struct_passwd_pw_passwd=no
20633 fi
20634 rm -f conftest*
20635 fi
20636
20637 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20638 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20639         cat >> confdefs.h <<\EOF
20640 #define HAVE_PW_PASSWD 1
20641 EOF
20642
20643 fi
20644
20645
20646 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20647 echo "configure:20648: checking if toupper() requires islower()" >&5
20648 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20649   echo $ac_n "(cached) $ac_c" 1>&6
20650 else
20651   
20652         if test "$cross_compiling" = yes; then
20653   ol_cv_c_upper_lower=safe
20654 else
20655   cat > conftest.$ac_ext <<EOF
20656 #line 20657 "configure"
20657 #include "confdefs.h"
20658
20659 #include <ctype.h>
20660 main()
20661 {
20662         if ('C' == toupper('C'))
20663                 exit(0);
20664         else
20665                 exit(1);
20666 }
20667 EOF
20668 if { (eval echo configure:20669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20669 then
20670   ol_cv_c_upper_lower=no
20671 else
20672   echo "configure: failed program was:" >&5
20673   cat conftest.$ac_ext >&5
20674   rm -fr conftest*
20675   ol_cv_c_upper_lower=yes
20676 fi
20677 rm -fr conftest*
20678 fi
20679
20680 fi
20681
20682 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20683 if test $ol_cv_c_upper_lower != no ; then
20684         cat >> confdefs.h <<\EOF
20685 #define C_UPPER_LOWER 1
20686 EOF
20687
20688 fi
20689
20690 echo $ac_n "checking for working const""... $ac_c" 1>&6
20691 echo "configure:20692: checking for working const" >&5
20692 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20693   echo $ac_n "(cached) $ac_c" 1>&6
20694 else
20695   cat > conftest.$ac_ext <<EOF
20696 #line 20697 "configure"
20697 #include "confdefs.h"
20698
20699 int main() {
20700
20701 /* Ultrix mips cc rejects this.  */
20702 typedef int charset[2]; const charset x;
20703 /* SunOS 4.1.1 cc rejects this.  */
20704 char const *const *ccp;
20705 char **p;
20706 /* NEC SVR4.0.2 mips cc rejects this.  */
20707 struct point {int x, y;};
20708 static struct point const zero = {0,0};
20709 /* AIX XL C 1.02.0.0 rejects this.
20710    It does not let you subtract one const X* pointer from another in an arm
20711    of an if-expression whose if-part is not a constant expression */
20712 const char *g = "string";
20713 ccp = &g + (g ? g-g : 0);
20714 /* HPUX 7.0 cc rejects these. */
20715 ++ccp;
20716 p = (char**) ccp;
20717 ccp = (char const *const *) p;
20718 { /* SCO 3.2v4 cc rejects this.  */
20719   char *t;
20720   char const *s = 0 ? (char *) 0 : (char const *) 0;
20721
20722   *t++ = 0;
20723 }
20724 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20725   int x[] = {25, 17};
20726   const int *foo = &x[0];
20727   ++foo;
20728 }
20729 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20730   typedef const int *iptr;
20731   iptr p = 0;
20732   ++p;
20733 }
20734 { /* AIX XL C 1.02.0.0 rejects this saying
20735      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20736   struct s { int j; const int *ap[3]; };
20737   struct s *b; b->j = 5;
20738 }
20739 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20740   const int foo = 10;
20741 }
20742
20743 ; return 0; }
20744 EOF
20745 if { (eval echo configure:20746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20746   rm -rf conftest*
20747   ac_cv_c_const=yes
20748 else
20749   echo "configure: failed program was:" >&5
20750   cat conftest.$ac_ext >&5
20751   rm -rf conftest*
20752   ac_cv_c_const=no
20753 fi
20754 rm -f conftest*
20755 fi
20756
20757 echo "$ac_t""$ac_cv_c_const" 1>&6
20758 if test $ac_cv_c_const = no; then
20759   cat >> confdefs.h <<\EOF
20760 #define const 
20761 EOF
20762
20763 fi
20764
20765 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20766 echo "configure:20767: checking if compiler understands volatile" >&5
20767 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20768   echo $ac_n "(cached) $ac_c" 1>&6
20769 else
20770   cat > conftest.$ac_ext <<EOF
20771 #line 20772 "configure"
20772 #include "confdefs.h"
20773 int x, y, z;
20774 int main() {
20775 volatile int a; int * volatile b = x ? &y : &z;
20776       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20777       *b = 0;
20778 ; return 0; }
20779 EOF
20780 if { (eval echo configure:20781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20781   rm -rf conftest*
20782   ol_cv_c_volatile=yes
20783 else
20784   echo "configure: failed program was:" >&5
20785   cat conftest.$ac_ext >&5
20786   rm -rf conftest*
20787   ol_cv_c_volatile=no
20788 fi
20789 rm -f conftest*
20790 fi
20791
20792 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20793   if test $ol_cv_c_volatile = yes; then
20794     : 
20795   else
20796     cat >> confdefs.h <<\EOF
20797 #define volatile 
20798 EOF
20799
20800   fi
20801  
20802
20803 if test $cross_compiling = yes ; then
20804         cat >> confdefs.h <<\EOF
20805 #define CROSS_COMPILING 1
20806 EOF
20807
20808 else
20809         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20810 echo "configure:20811: checking whether byte ordering is bigendian" >&5
20811 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20812   echo $ac_n "(cached) $ac_c" 1>&6
20813 else
20814   ac_cv_c_bigendian=unknown
20815 # See if sys/param.h defines the BYTE_ORDER macro.
20816 cat > conftest.$ac_ext <<EOF
20817 #line 20818 "configure"
20818 #include "confdefs.h"
20819 #include <sys/types.h>
20820 #include <sys/param.h>
20821 int main() {
20822
20823 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20824  bogus endian macros
20825 #endif
20826 ; return 0; }
20827 EOF
20828 if { (eval echo configure:20829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20829   rm -rf conftest*
20830   # It does; now see whether it defined to BIG_ENDIAN or not.
20831 cat > conftest.$ac_ext <<EOF
20832 #line 20833 "configure"
20833 #include "confdefs.h"
20834 #include <sys/types.h>
20835 #include <sys/param.h>
20836 int main() {
20837
20838 #if BYTE_ORDER != BIG_ENDIAN
20839  not big endian
20840 #endif
20841 ; return 0; }
20842 EOF
20843 if { (eval echo configure:20844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20844   rm -rf conftest*
20845   ac_cv_c_bigendian=yes
20846 else
20847   echo "configure: failed program was:" >&5
20848   cat conftest.$ac_ext >&5
20849   rm -rf conftest*
20850   ac_cv_c_bigendian=no
20851 fi
20852 rm -f conftest*
20853 else
20854   echo "configure: failed program was:" >&5
20855   cat conftest.$ac_ext >&5
20856 fi
20857 rm -f conftest*
20858 if test $ac_cv_c_bigendian = unknown; then
20859 if test "$cross_compiling" = yes; then
20860     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20861 else
20862   cat > conftest.$ac_ext <<EOF
20863 #line 20864 "configure"
20864 #include "confdefs.h"
20865 main () {
20866   /* Are we little or big endian?  From Harbison&Steele.  */
20867   union
20868   {
20869     long l;
20870     char c[sizeof (long)];
20871   } u;
20872   u.l = 1;
20873   exit (u.c[sizeof (long) - 1] == 1);
20874 }
20875 EOF
20876 if { (eval echo configure:20877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20877 then
20878   ac_cv_c_bigendian=no
20879 else
20880   echo "configure: failed program was:" >&5
20881   cat conftest.$ac_ext >&5
20882   rm -fr conftest*
20883   ac_cv_c_bigendian=yes
20884 fi
20885 rm -fr conftest*
20886 fi
20887
20888 fi
20889 fi
20890
20891 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20892 if test $ac_cv_c_bigendian = yes; then
20893   cat >> confdefs.h <<\EOF
20894 #define WORDS_BIGENDIAN 1
20895 EOF
20896
20897 fi
20898
20899 fi
20900
20901 echo $ac_n "checking size of short""... $ac_c" 1>&6
20902 echo "configure:20903: checking size of short" >&5 
20903 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20904   echo $ac_n "(cached) $ac_c" 1>&6
20905 else
20906   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20907   cat > conftest.$ac_ext <<EOF
20908 #line 20909 "configure"
20909 #include "confdefs.h"
20910 #include "confdefs.h" 
20911 #include <sys/types.h> 
20912  
20913
20914 int main() {
20915 switch (0) case 0: case (sizeof (short) == $ac_size):;
20916 ; return 0; }
20917 EOF
20918 if { (eval echo configure:20919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20919   rm -rf conftest*
20920   ac_cv_sizeof_short=$ac_size
20921 else
20922   echo "configure: failed program was:" >&5
20923   cat conftest.$ac_ext >&5
20924 fi
20925 rm -f conftest* 
20926   if test x$ac_cv_sizeof_short != x ; then break; fi 
20927 done 
20928
20929 fi
20930  
20931 if test x$ac_cv_sizeof_short = x ; then 
20932   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20933 fi 
20934 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20935 cat >> confdefs.h <<EOF
20936 #define SIZEOF_SHORT $ac_cv_sizeof_short
20937 EOF
20938  
20939  
20940 echo $ac_n "checking size of int""... $ac_c" 1>&6
20941 echo "configure:20942: checking size of int" >&5 
20942 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20943   echo $ac_n "(cached) $ac_c" 1>&6
20944 else
20945   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20946   cat > conftest.$ac_ext <<EOF
20947 #line 20948 "configure"
20948 #include "confdefs.h"
20949 #include "confdefs.h" 
20950 #include <sys/types.h> 
20951  
20952
20953 int main() {
20954 switch (0) case 0: case (sizeof (int) == $ac_size):;
20955 ; return 0; }
20956 EOF
20957 if { (eval echo configure:20958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20958   rm -rf conftest*
20959   ac_cv_sizeof_int=$ac_size
20960 else
20961   echo "configure: failed program was:" >&5
20962   cat conftest.$ac_ext >&5
20963 fi
20964 rm -f conftest* 
20965   if test x$ac_cv_sizeof_int != x ; then break; fi 
20966 done 
20967
20968 fi
20969  
20970 if test x$ac_cv_sizeof_int = x ; then 
20971   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
20972 fi 
20973 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
20974 cat >> confdefs.h <<EOF
20975 #define SIZEOF_INT $ac_cv_sizeof_int
20976 EOF
20977  
20978  
20979 echo $ac_n "checking size of long""... $ac_c" 1>&6
20980 echo "configure:20981: checking size of long" >&5 
20981 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
20982   echo $ac_n "(cached) $ac_c" 1>&6
20983 else
20984   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20985   cat > conftest.$ac_ext <<EOF
20986 #line 20987 "configure"
20987 #include "confdefs.h"
20988 #include "confdefs.h" 
20989 #include <sys/types.h> 
20990  
20991
20992 int main() {
20993 switch (0) case 0: case (sizeof (long) == $ac_size):;
20994 ; return 0; }
20995 EOF
20996 if { (eval echo configure:20997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20997   rm -rf conftest*
20998   ac_cv_sizeof_long=$ac_size
20999 else
21000   echo "configure: failed program was:" >&5
21001   cat conftest.$ac_ext >&5
21002 fi
21003 rm -f conftest* 
21004   if test x$ac_cv_sizeof_long != x ; then break; fi 
21005 done 
21006
21007 fi
21008  
21009 if test x$ac_cv_sizeof_long = x ; then 
21010   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21011 fi 
21012 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21013 cat >> confdefs.h <<EOF
21014 #define SIZEOF_LONG $ac_cv_sizeof_long
21015 EOF
21016  
21017
21018
21019 if test "$ac_cv_sizeof_int" -lt 4 ; then
21020         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21021
21022         cat >> confdefs.h <<\EOF
21023 #define LBER_INT_T long
21024 EOF
21025
21026 else
21027         cat >> confdefs.h <<\EOF
21028 #define LBER_INT_T int
21029 EOF
21030
21031 fi
21032
21033 cat >> confdefs.h <<\EOF
21034 #define LBER_LEN_T long
21035 EOF
21036
21037 cat >> confdefs.h <<\EOF
21038 #define LBER_SOCKET_T int
21039 EOF
21040
21041 cat >> confdefs.h <<\EOF
21042 #define LBER_TAG_T long
21043 EOF
21044
21045
21046 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21047 echo "configure:21048: checking for 8-bit clean memcmp" >&5
21048 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21049   echo $ac_n "(cached) $ac_c" 1>&6
21050 else
21051   if test "$cross_compiling" = yes; then
21052   ac_cv_func_memcmp_clean=no
21053 else
21054   cat > conftest.$ac_ext <<EOF
21055 #line 21056 "configure"
21056 #include "confdefs.h"
21057
21058 main()
21059 {
21060   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21061   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21062 }
21063
21064 EOF
21065 if { (eval echo configure:21066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21066 then
21067   ac_cv_func_memcmp_clean=yes
21068 else
21069   echo "configure: failed program was:" >&5
21070   cat conftest.$ac_ext >&5
21071   rm -fr conftest*
21072   ac_cv_func_memcmp_clean=no
21073 fi
21074 rm -fr conftest*
21075 fi
21076
21077 fi
21078
21079 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21080 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21081
21082 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21083 echo "configure:21084: checking for strftime" >&5
21084 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21085   echo $ac_n "(cached) $ac_c" 1>&6
21086 else
21087   cat > conftest.$ac_ext <<EOF
21088 #line 21089 "configure"
21089 #include "confdefs.h"
21090 /* System header to define __stub macros and hopefully few prototypes,
21091     which can conflict with char strftime(); below.  */
21092 #include <assert.h>
21093 /* Override any gcc2 internal prototype to avoid an error.  */
21094 /* We use char because int might match the return type of a gcc2
21095     builtin and then its argument prototype would still apply.  */
21096 char strftime();
21097 char (*f)();
21098
21099 int main() {
21100
21101 /* The GNU C library defines this for functions which it implements
21102     to always fail with ENOSYS.  Some functions are actually named
21103     something starting with __ and the normal name is an alias.  */
21104 #if defined (__stub_strftime) || defined (__stub___strftime)
21105 choke me
21106 #else
21107 f = strftime;
21108 #endif
21109
21110 ; return 0; }
21111 EOF
21112 if { (eval echo configure:21113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21113   rm -rf conftest*
21114   eval "ac_cv_func_strftime=yes"
21115 else
21116   echo "configure: failed program was:" >&5
21117   cat conftest.$ac_ext >&5
21118   rm -rf conftest*
21119   eval "ac_cv_func_strftime=no"
21120 fi
21121 rm -f conftest*
21122 fi
21123
21124 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21125   echo "$ac_t""yes" 1>&6
21126   cat >> confdefs.h <<\EOF
21127 #define HAVE_STRFTIME 1
21128 EOF
21129
21130 else
21131   echo "$ac_t""no" 1>&6
21132 # strftime is in -lintl on SCO UNIX.
21133 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21134 echo "configure:21135: checking for strftime in -lintl" >&5
21135 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21137   echo $ac_n "(cached) $ac_c" 1>&6
21138 else
21139   ac_save_LIBS="$LIBS"
21140 LIBS="-lintl  $LIBS"
21141 cat > conftest.$ac_ext <<EOF
21142 #line 21143 "configure"
21143 #include "confdefs.h"
21144 /* Override any gcc2 internal prototype to avoid an error.  */
21145 /* We use char because int might match the return type of a gcc2
21146     builtin and then its argument prototype would still apply.  */
21147 char strftime();
21148
21149 int main() {
21150 strftime()
21151 ; return 0; }
21152 EOF
21153 if { (eval echo configure:21154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21154   rm -rf conftest*
21155   eval "ac_cv_lib_$ac_lib_var=yes"
21156 else
21157   echo "configure: failed program was:" >&5
21158   cat conftest.$ac_ext >&5
21159   rm -rf conftest*
21160   eval "ac_cv_lib_$ac_lib_var=no"
21161 fi
21162 rm -f conftest*
21163 LIBS="$ac_save_LIBS"
21164
21165 fi
21166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21167   echo "$ac_t""yes" 1>&6
21168   cat >> confdefs.h <<\EOF
21169 #define HAVE_STRFTIME 1
21170 EOF
21171
21172 LIBS="-lintl $LIBS"
21173 else
21174   echo "$ac_t""no" 1>&6
21175 fi
21176
21177 fi
21178
21179
21180 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21181 echo "configure:21182: checking for inet_aton()" >&5
21182 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21183   echo $ac_n "(cached) $ac_c" 1>&6
21184 else
21185   cat > conftest.$ac_ext <<EOF
21186 #line 21187 "configure"
21187 #include "confdefs.h"
21188
21189 #ifdef HAVE_SYS_TYPES_H
21190 #       include <sys/types.h>
21191 #endif
21192 #ifdef HAVE_SYS_SOCKET_H
21193 #       include <sys/socket.h>
21194 #       ifdef HAVE_SYS_SELECT_H
21195 #               include <sys/select.h>
21196 #       endif
21197 #       include <netinet/in.h>
21198 #       ifdef HAVE_ARPA_INET_H
21199 #               include <arpa/inet.h>
21200 #       endif
21201 #endif
21202
21203 int main() {
21204 struct in_addr in;
21205 int rc = inet_aton( "255.255.255.255", &in );
21206 ; return 0; }
21207 EOF
21208 if { (eval echo configure:21209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21209   rm -rf conftest*
21210   ol_cv_func_inet_aton=yes
21211 else
21212   echo "configure: failed program was:" >&5
21213   cat conftest.$ac_ext >&5
21214   rm -rf conftest*
21215   ol_cv_func_inet_aton=no
21216 fi
21217 rm -f conftest*
21218 fi
21219
21220 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21221   if test $ol_cv_func_inet_aton != no; then
21222     cat >> confdefs.h <<\EOF
21223 #define HAVE_INET_ATON 1
21224 EOF
21225
21226   fi
21227  
21228
21229 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21230 echo "configure:21231: checking for _spawnlp" >&5
21231 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   cat > conftest.$ac_ext <<EOF
21235 #line 21236 "configure"
21236 #include "confdefs.h"
21237 /* System header to define __stub macros and hopefully few prototypes,
21238     which can conflict with char _spawnlp(); below.  */
21239 #include <assert.h>
21240 /* Override any gcc2 internal prototype to avoid an error.  */
21241 /* We use char because int might match the return type of a gcc2
21242     builtin and then its argument prototype would still apply.  */
21243 char _spawnlp();
21244 char (*f)();
21245
21246 int main() {
21247
21248 /* The GNU C library defines this for functions which it implements
21249     to always fail with ENOSYS.  Some functions are actually named
21250     something starting with __ and the normal name is an alias.  */
21251 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21252 choke me
21253 #else
21254 f = _spawnlp;
21255 #endif
21256
21257 ; return 0; }
21258 EOF
21259 if { (eval echo configure:21260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21260   rm -rf conftest*
21261   eval "ac_cv_func__spawnlp=yes"
21262 else
21263   echo "configure: failed program was:" >&5
21264   cat conftest.$ac_ext >&5
21265   rm -rf conftest*
21266   eval "ac_cv_func__spawnlp=no"
21267 fi
21268 rm -f conftest*
21269 fi
21270
21271 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21272   echo "$ac_t""yes" 1>&6
21273   cat >> confdefs.h <<\EOF
21274 #define HAVE_SPAWNLP 1
21275 EOF
21276
21277 else
21278   echo "$ac_t""no" 1>&6
21279 fi
21280
21281
21282 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21283 echo "configure:21284: checking for _snprintf" >&5
21284 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21285   echo $ac_n "(cached) $ac_c" 1>&6
21286 else
21287   cat > conftest.$ac_ext <<EOF
21288 #line 21289 "configure"
21289 #include "confdefs.h"
21290 /* System header to define __stub macros and hopefully few prototypes,
21291     which can conflict with char _snprintf(); below.  */
21292 #include <assert.h>
21293 /* Override any gcc2 internal prototype to avoid an error.  */
21294 /* We use char because int might match the return type of a gcc2
21295     builtin and then its argument prototype would still apply.  */
21296 char _snprintf();
21297 char (*f)();
21298
21299 int main() {
21300
21301 /* The GNU C library defines this for functions which it implements
21302     to always fail with ENOSYS.  Some functions are actually named
21303     something starting with __ and the normal name is an alias.  */
21304 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21305 choke me
21306 #else
21307 f = _snprintf;
21308 #endif
21309
21310 ; return 0; }
21311 EOF
21312 if { (eval echo configure:21313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21313   rm -rf conftest*
21314   eval "ac_cv_func__snprintf=yes"
21315 else
21316   echo "configure: failed program was:" >&5
21317   cat conftest.$ac_ext >&5
21318   rm -rf conftest*
21319   eval "ac_cv_func__snprintf=no"
21320 fi
21321 rm -f conftest*
21322 fi
21323
21324 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21325   echo "$ac_t""yes" 1>&6
21326   ac_cv_func_snprintf=yes
21327         cat >> confdefs.h <<\EOF
21328 #define snprintf _snprintf
21329 EOF
21330
21331
21332 else
21333   echo "$ac_t""no" 1>&6
21334 fi
21335
21336
21337 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21338 echo "configure:21339: checking for _vsnprintf" >&5
21339 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21340   echo $ac_n "(cached) $ac_c" 1>&6
21341 else
21342   cat > conftest.$ac_ext <<EOF
21343 #line 21344 "configure"
21344 #include "confdefs.h"
21345 /* System header to define __stub macros and hopefully few prototypes,
21346     which can conflict with char _vsnprintf(); below.  */
21347 #include <assert.h>
21348 /* Override any gcc2 internal prototype to avoid an error.  */
21349 /* We use char because int might match the return type of a gcc2
21350     builtin and then its argument prototype would still apply.  */
21351 char _vsnprintf();
21352 char (*f)();
21353
21354 int main() {
21355
21356 /* The GNU C library defines this for functions which it implements
21357     to always fail with ENOSYS.  Some functions are actually named
21358     something starting with __ and the normal name is an alias.  */
21359 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21360 choke me
21361 #else
21362 f = _vsnprintf;
21363 #endif
21364
21365 ; return 0; }
21366 EOF
21367 if { (eval echo configure:21368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21368   rm -rf conftest*
21369   eval "ac_cv_func__vsnprintf=yes"
21370 else
21371   echo "configure: failed program was:" >&5
21372   cat conftest.$ac_ext >&5
21373   rm -rf conftest*
21374   eval "ac_cv_func__vsnprintf=no"
21375 fi
21376 rm -f conftest*
21377 fi
21378
21379 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21380   echo "$ac_t""yes" 1>&6
21381   ac_cv_func_vsnprintf=yes
21382         cat >> confdefs.h <<\EOF
21383 #define vsnprintf _vsnprintf
21384 EOF
21385
21386
21387 else
21388   echo "$ac_t""no" 1>&6
21389 fi
21390
21391
21392 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21393 echo "configure:21394: checking for vprintf" >&5
21394 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21395   echo $ac_n "(cached) $ac_c" 1>&6
21396 else
21397   cat > conftest.$ac_ext <<EOF
21398 #line 21399 "configure"
21399 #include "confdefs.h"
21400 /* System header to define __stub macros and hopefully few prototypes,
21401     which can conflict with char vprintf(); below.  */
21402 #include <assert.h>
21403 /* Override any gcc2 internal prototype to avoid an error.  */
21404 /* We use char because int might match the return type of a gcc2
21405     builtin and then its argument prototype would still apply.  */
21406 char vprintf();
21407 char (*f)();
21408
21409 int main() {
21410
21411 /* The GNU C library defines this for functions which it implements
21412     to always fail with ENOSYS.  Some functions are actually named
21413     something starting with __ and the normal name is an alias.  */
21414 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21415 choke me
21416 #else
21417 f = vprintf;
21418 #endif
21419
21420 ; return 0; }
21421 EOF
21422 if { (eval echo configure:21423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21423   rm -rf conftest*
21424   eval "ac_cv_func_vprintf=yes"
21425 else
21426   echo "configure: failed program was:" >&5
21427   cat conftest.$ac_ext >&5
21428   rm -rf conftest*
21429   eval "ac_cv_func_vprintf=no"
21430 fi
21431 rm -f conftest*
21432 fi
21433
21434 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21435   echo "$ac_t""yes" 1>&6
21436   cat >> confdefs.h <<\EOF
21437 #define HAVE_VPRINTF 1
21438 EOF
21439
21440 else
21441   echo "$ac_t""no" 1>&6
21442 fi
21443
21444 if test "$ac_cv_func_vprintf" != yes; then
21445 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21446 echo "configure:21447: checking for _doprnt" >&5
21447 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21448   echo $ac_n "(cached) $ac_c" 1>&6
21449 else
21450   cat > conftest.$ac_ext <<EOF
21451 #line 21452 "configure"
21452 #include "confdefs.h"
21453 /* System header to define __stub macros and hopefully few prototypes,
21454     which can conflict with char _doprnt(); below.  */
21455 #include <assert.h>
21456 /* Override any gcc2 internal prototype to avoid an error.  */
21457 /* We use char because int might match the return type of a gcc2
21458     builtin and then its argument prototype would still apply.  */
21459 char _doprnt();
21460 char (*f)();
21461
21462 int main() {
21463
21464 /* The GNU C library defines this for functions which it implements
21465     to always fail with ENOSYS.  Some functions are actually named
21466     something starting with __ and the normal name is an alias.  */
21467 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21468 choke me
21469 #else
21470 f = _doprnt;
21471 #endif
21472
21473 ; return 0; }
21474 EOF
21475 if { (eval echo configure:21476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21476   rm -rf conftest*
21477   eval "ac_cv_func__doprnt=yes"
21478 else
21479   echo "configure: failed program was:" >&5
21480   cat conftest.$ac_ext >&5
21481   rm -rf conftest*
21482   eval "ac_cv_func__doprnt=no"
21483 fi
21484 rm -f conftest*
21485 fi
21486
21487 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21488   echo "$ac_t""yes" 1>&6
21489   cat >> confdefs.h <<\EOF
21490 #define HAVE_DOPRNT 1
21491 EOF
21492
21493 else
21494   echo "$ac_t""no" 1>&6
21495 fi
21496
21497 fi
21498
21499
21500 if test $ac_cv_func_vprintf = yes ; then
21501                 for ac_func in vsnprintf vsprintf
21502 do
21503 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21504 echo "configure:21505: checking for $ac_func" >&5
21505 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21506   echo $ac_n "(cached) $ac_c" 1>&6
21507 else
21508   cat > conftest.$ac_ext <<EOF
21509 #line 21510 "configure"
21510 #include "confdefs.h"
21511 /* System header to define __stub macros and hopefully few prototypes,
21512     which can conflict with char $ac_func(); below.  */
21513 #include <assert.h>
21514 /* Override any gcc2 internal prototype to avoid an error.  */
21515 /* We use char because int might match the return type of a gcc2
21516     builtin and then its argument prototype would still apply.  */
21517 char $ac_func();
21518 char (*f)();
21519
21520 int main() {
21521
21522 /* The GNU C library defines this for functions which it implements
21523     to always fail with ENOSYS.  Some functions are actually named
21524     something starting with __ and the normal name is an alias.  */
21525 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21526 choke me
21527 #else
21528 f = $ac_func;
21529 #endif
21530
21531 ; return 0; }
21532 EOF
21533 if { (eval echo configure:21534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21534   rm -rf conftest*
21535   eval "ac_cv_func_$ac_func=yes"
21536 else
21537   echo "configure: failed program was:" >&5
21538   cat conftest.$ac_ext >&5
21539   rm -rf conftest*
21540   eval "ac_cv_func_$ac_func=no"
21541 fi
21542 rm -f conftest*
21543 fi
21544
21545 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21546   echo "$ac_t""yes" 1>&6
21547     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21548   cat >> confdefs.h <<EOF
21549 #define $ac_tr_func 1
21550 EOF
21551  
21552 else
21553   echo "$ac_t""no" 1>&6
21554 fi
21555 done
21556
21557 fi
21558
21559 for ac_func in \
21560         bcopy                   \
21561         closesocket             \
21562         chroot                  \
21563         endgrent                \
21564         endpwent                \
21565         fcntl                   \
21566         flock                   \
21567         getdtablesize   \
21568         getgrgid                \
21569         gethostname             \
21570         getpass                 \
21571         getpassphrase   \
21572         getpwuid                \
21573         getpwnam                \
21574         getspnam                \
21575         gettimeofday    \
21576         initgroups              \
21577         lockf                   \
21578         memcpy                  \
21579         memmove                 \
21580         mkstemp                 \
21581         mktemp                  \
21582         pipe                    \
21583         read                    \
21584         recv                    \
21585         recvfrom                \
21586         setpwfile               \
21587         setgid                  \
21588         setegid                 \
21589         setsid                  \
21590         setuid                  \
21591         seteuid                 \
21592         sigaction               \
21593         signal                  \
21594         sigset                  \
21595         strdup                  \
21596         strerror                \
21597         strpbrk                 \
21598         strrchr                 \
21599         strsep                  \
21600         strstr                  \
21601         strtol                  \
21602         strtoul                 \
21603         strspn                  \
21604         sysconf                 \
21605         usleep                  \
21606         waitpid                 \
21607         wait4                   \
21608         write                   \
21609         send                    \
21610         sendto                  \
21611
21612 do
21613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21614 echo "configure:21615: checking for $ac_func" >&5
21615 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21616   echo $ac_n "(cached) $ac_c" 1>&6
21617 else
21618   cat > conftest.$ac_ext <<EOF
21619 #line 21620 "configure"
21620 #include "confdefs.h"
21621 /* System header to define __stub macros and hopefully few prototypes,
21622     which can conflict with char $ac_func(); below.  */
21623 #include <assert.h>
21624 /* Override any gcc2 internal prototype to avoid an error.  */
21625 /* We use char because int might match the return type of a gcc2
21626     builtin and then its argument prototype would still apply.  */
21627 char $ac_func();
21628 char (*f)();
21629
21630 int main() {
21631
21632 /* The GNU C library defines this for functions which it implements
21633     to always fail with ENOSYS.  Some functions are actually named
21634     something starting with __ and the normal name is an alias.  */
21635 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21636 choke me
21637 #else
21638 f = $ac_func;
21639 #endif
21640
21641 ; return 0; }
21642 EOF
21643 if { (eval echo configure:21644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21644   rm -rf conftest*
21645   eval "ac_cv_func_$ac_func=yes"
21646 else
21647   echo "configure: failed program was:" >&5
21648   cat conftest.$ac_ext >&5
21649   rm -rf conftest*
21650   eval "ac_cv_func_$ac_func=no"
21651 fi
21652 rm -f conftest*
21653 fi
21654
21655 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21656   echo "$ac_t""yes" 1>&6
21657     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21658   cat >> confdefs.h <<EOF
21659 #define $ac_tr_func 1
21660 EOF
21661  
21662 else
21663   echo "$ac_t""no" 1>&6
21664 fi
21665 done
21666
21667
21668 for ac_func in getopt
21669 do
21670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21671 echo "configure:21672: checking for $ac_func" >&5
21672 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21673   echo $ac_n "(cached) $ac_c" 1>&6
21674 else
21675   cat > conftest.$ac_ext <<EOF
21676 #line 21677 "configure"
21677 #include "confdefs.h"
21678 /* System header to define __stub macros and hopefully few prototypes,
21679     which can conflict with char $ac_func(); below.  */
21680 #include <assert.h>
21681 /* Override any gcc2 internal prototype to avoid an error.  */
21682 /* We use char because int might match the return type of a gcc2
21683     builtin and then its argument prototype would still apply.  */
21684 char $ac_func();
21685 char (*f)();
21686
21687 int main() {
21688
21689 /* The GNU C library defines this for functions which it implements
21690     to always fail with ENOSYS.  Some functions are actually named
21691     something starting with __ and the normal name is an alias.  */
21692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21693 choke me
21694 #else
21695 f = $ac_func;
21696 #endif
21697
21698 ; return 0; }
21699 EOF
21700 if { (eval echo configure:21701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21701   rm -rf conftest*
21702   eval "ac_cv_func_$ac_func=yes"
21703 else
21704   echo "configure: failed program was:" >&5
21705   cat conftest.$ac_ext >&5
21706   rm -rf conftest*
21707   eval "ac_cv_func_$ac_func=no"
21708 fi
21709 rm -f conftest*
21710 fi
21711
21712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21713   echo "$ac_t""yes" 1>&6
21714     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21715   cat >> confdefs.h <<EOF
21716 #define $ac_tr_func 1
21717 EOF
21718  
21719 else
21720   echo "$ac_t""no" 1>&6
21721 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21722 fi
21723 done
21724
21725
21726
21727 if test "$ac_cv_func_getopt" != yes; then
21728         LIBSRCS="$LIBSRCS getopt.c"
21729 fi
21730
21731 # Check Configuration
21732 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21733 echo "configure:21734: checking declaration of sys_errlist" >&5
21734 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21735   echo $ac_n "(cached) $ac_c" 1>&6
21736 else
21737   
21738         cat > conftest.$ac_ext <<EOF
21739 #line 21740 "configure"
21740 #include "confdefs.h"
21741
21742 #include <stdio.h>
21743 #include <sys/types.h>
21744 #include <errno.h>
21745 #ifdef WINNT
21746 #include <stdlib.h>
21747 #endif 
21748 int main() {
21749 char *c = (char *) *sys_errlist
21750 ; return 0; }
21751 EOF
21752 if { (eval echo configure:21753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21753   rm -rf conftest*
21754   ol_cv_dcl_sys_errlist=yes
21755         ol_cv_have_sys_errlist=yes
21756 else
21757   echo "configure: failed program was:" >&5
21758   cat conftest.$ac_ext >&5
21759   rm -rf conftest*
21760   ol_cv_dcl_sys_errlist=no
21761 fi
21762 rm -f conftest*
21763 fi
21764
21765 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21766 #
21767 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21768 if test $ol_cv_dcl_sys_errlist = no ; then
21769         cat >> confdefs.h <<\EOF
21770 #define DECL_SYS_ERRLIST 1
21771 EOF
21772
21773
21774         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21775 echo "configure:21776: checking existence of sys_errlist" >&5
21776 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21777   echo $ac_n "(cached) $ac_c" 1>&6
21778 else
21779   
21780                 cat > conftest.$ac_ext <<EOF
21781 #line 21782 "configure"
21782 #include "confdefs.h"
21783 #include <errno.h>
21784 int main() {
21785 char *c = (char *) *sys_errlist
21786 ; return 0; }
21787 EOF
21788 if { (eval echo configure:21789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21789   rm -rf conftest*
21790   ol_cv_have_sys_errlist=yes
21791 else
21792   echo "configure: failed program was:" >&5
21793   cat conftest.$ac_ext >&5
21794   rm -rf conftest*
21795   ol_cv_have_sys_errlist=no
21796 fi
21797 rm -f conftest*
21798 fi
21799
21800 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21801 fi
21802 if test $ol_cv_have_sys_errlist = yes ; then
21803         cat >> confdefs.h <<\EOF
21804 #define HAVE_SYS_ERRLIST 1
21805 EOF
21806
21807 fi
21808
21809
21810
21811 if test "$ol_enable_debug" != no ; then
21812         cat >> confdefs.h <<\EOF
21813 #define LDAP_DEBUG 1
21814 EOF
21815
21816 fi
21817 if test "$ol_enable_syslog" = yes ; then
21818         cat >> confdefs.h <<\EOF
21819 #define LDAP_SYSLOG 1
21820 EOF
21821
21822 fi
21823 if test "$ol_enable_cache" = no ; then
21824         cat >> confdefs.h <<\EOF
21825 #define LDAP_NOCACHE 1
21826 EOF
21827
21828 fi
21829 if test "$ol_link_kbind" != no ; then
21830         cat >> confdefs.h <<\EOF
21831 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21832 EOF
21833
21834 fi
21835 if test "$ol_enable_proctitle" != no ; then
21836         cat >> confdefs.h <<\EOF
21837 #define LDAP_PROCTITLE 1
21838 EOF
21839
21840 fi
21841 if test "$ol_enable_referrals" != no ; then
21842         cat >> confdefs.h <<\EOF
21843 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21844 EOF
21845
21846 fi
21847 if test "$ol_enable_local" != no; then
21848         cat >> confdefs.h <<\EOF
21849 #define LDAP_PF_LOCAL 1
21850 EOF
21851
21852 fi
21853 if test "$ol_link_ipv6" != no; then
21854         cat >> confdefs.h <<\EOF
21855 #define LDAP_PF_INET6 1
21856 EOF
21857
21858 fi
21859 if test "$ol_enable_cleartext" != no ; then
21860         cat >> confdefs.h <<\EOF
21861 #define SLAPD_CLEARTEXT 1
21862 EOF
21863
21864 fi
21865 if test "$ol_enable_crypt" != no ; then
21866         cat >> confdefs.h <<\EOF
21867 #define SLAPD_CRYPT 1
21868 EOF
21869
21870 fi
21871 if test "$ol_link_kpasswd" != no ; then
21872         cat >> confdefs.h <<\EOF
21873 #define SLAPD_KPASSWD 1
21874 EOF
21875
21876 fi
21877 if test "$ol_link_spasswd" != no ; then
21878         cat >> confdefs.h <<\EOF
21879 #define SLAPD_SPASSWD 1
21880 EOF
21881
21882 fi
21883 if test "$ol_enable_phonetic" != no ; then
21884         cat >> confdefs.h <<\EOF
21885 #define SLAPD_PHONETIC 1
21886 EOF
21887
21888 fi
21889 if test "$ol_enable_rlookups" != no ; then
21890         cat >> confdefs.h <<\EOF
21891 #define SLAPD_RLOOKUPS 1
21892 EOF
21893
21894 fi
21895 if test "$ol_enable_aci" != no ; then
21896         cat >> confdefs.h <<\EOF
21897 #define SLAPD_ACI_ENABLED 1
21898 EOF
21899
21900 fi
21901
21902 if test "$ol_link_modules" != no ; then
21903         cat >> confdefs.h <<\EOF
21904 #define SLAPD_MODULES 1
21905 EOF
21906
21907         BUILD_SLAPD=yes
21908         SLAPD_MODULES_LDFLAGS="-dlopen self"
21909 fi
21910
21911 if test "$ol_enable_bdb" != no ; then
21912         cat >> confdefs.h <<\EOF
21913 #define SLAPD_BDB 1
21914 EOF
21915
21916         BUILD_SLAPD=yes
21917         BUILD_BDB=yes
21918         if test "$ol_with_bdb_module" != static ; then
21919                 cat >> confdefs.h <<\EOF
21920 #define SLAPD_BDB_DYNAMIC 1
21921 EOF
21922
21923                 BUILD_BDB=mod
21924                 BUILD_BDB_DYNAMIC=shared
21925                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
21926                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21927         else
21928                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21929         fi
21930 fi
21931
21932 if test "$ol_link_dnssrv" != no ; then
21933         cat >> confdefs.h <<\EOF
21934 #define SLAPD_DNSSRV 1
21935 EOF
21936
21937         BUILD_SLAPD=yes
21938         BUILD_DNSSRV=yes
21939         if test "$ol_with_dnssrv_module" != static ; then
21940                 cat >> confdefs.h <<\EOF
21941 #define SLAPD_DNSSRV_DYNAMIC 1
21942 EOF
21943
21944                 BUILD_DNSSRV=mod
21945                 BUILD_DNSSRV_DYNAMIC=shared
21946                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
21947                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21948         else
21949                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
21950         fi
21951 fi
21952
21953 if test "$ol_enable_ldap" != no ; then
21954         cat >> confdefs.h <<\EOF
21955 #define SLAPD_LDAP 1
21956 EOF
21957
21958         BUILD_SLAPD=yes
21959         BUILD_LDAP=yes
21960         if test "$ol_with_ldap_module" != static ; then
21961                 cat >> confdefs.h <<\EOF
21962 #define SLAPD_LDAP_DYNAMIC 1
21963 EOF
21964
21965                 BUILD_LDAP=mod
21966                 BUILD_LDAP_DYNAMIC=shared
21967                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
21968                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
21969         else
21970                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
21971         fi
21972 fi
21973
21974 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
21975         cat >> confdefs.h <<\EOF
21976 #define SLAPD_LDBM 1
21977 EOF
21978
21979         BUILD_SLAPD=yes
21980         BUILD_LDBM=yes
21981         LDBM_LIB="-lldbm"
21982         if test "$ol_with_ldbm_module" != static ; then
21983                 cat >> confdefs.h <<\EOF
21984 #define SLAPD_LDBM_DYNAMIC 1
21985 EOF
21986
21987                 BUILD_LDBM=mod
21988                 BUILD_LDBM_DYNAMIC=shared
21989                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
21990                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
21991         else
21992                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
21993         fi
21994 fi
21995
21996 if test "$ol_enable_meta" != no ; then
21997         if test "$ol_enable_ldap" = no ; then
21998                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
21999         fi
22000         if test "$ol_enable_rewrite" = no ; then
22001                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22002         fi
22003         cat >> confdefs.h <<\EOF
22004 #define SLAPD_META 1
22005 EOF
22006
22007         BUILD_SLAPD=yes
22008         BUILD_META=yes
22009         if test "$ol_with_meta_module" != static ; then
22010                 cat >> confdefs.h <<\EOF
22011 #define SLAPD_META_DYNAMIC 1
22012 EOF
22013
22014                 BUILD_META=mod
22015                 BUILD_META_DYNAMIC=shared
22016                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
22017                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22018         else
22019                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22020         fi
22021 fi
22022
22023 if test "$ol_enable_monitor" != no ; then
22024         cat >> confdefs.h <<\EOF
22025 #define SLAPD_MONITOR 1
22026 EOF
22027
22028         BUILD_SLAPD=yes
22029         BUILD_MONITOR=yes
22030         if test "$ol_with_monitor_module" != static ; then
22031                 cat >> confdefs.h <<\EOF
22032 #define SLAPD_MONITOR_DYNAMIC 1
22033 EOF
22034
22035                 BUILD_MONITOR=mod
22036                 BUILD_MONITOR_DYNAMIC=shared
22037                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22038                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22039         else
22040                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22041         fi
22042 fi
22043
22044 if test "$ol_enable_null" != no ; then
22045         cat >> confdefs.h <<\EOF
22046 #define SLAPD_NULL 1
22047 EOF
22048
22049         BUILD_SLAPD=yes
22050         BUILD_NULL=yes
22051         if test "$ol_with_null_module" != static ; then
22052                 cat >> confdefs.h <<\EOF
22053 #define SLAPD_NULL_DYNAMIC 1
22054 EOF
22055
22056                 BUILD_NULL=mod
22057                 BUILD_NULL_DYNAMIC=shared
22058                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-null/back_null.la"
22059                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22060         else
22061                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22062         fi
22063 fi
22064
22065 if test "$ol_enable_passwd" != no ; then
22066         cat >> confdefs.h <<\EOF
22067 #define SLAPD_PASSWD 1
22068 EOF
22069
22070         BUILD_SLAPD=yes
22071         BUILD_PASSWD=yes
22072         if test "$ol_with_passwd_module" != static ; then
22073                 cat >> confdefs.h <<\EOF
22074 #define SLAPD_PASSWD_DYNAMIC 1
22075 EOF
22076
22077                 BUILD_PASSWD=mod
22078                 BUILD_PASSWD_DYNAMIC=shared
22079                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22080                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22081         else
22082                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22083         fi
22084 fi
22085
22086 if test "$ol_link_perl" != no ; then
22087         cat >> confdefs.h <<\EOF
22088 #define SLAPD_PERL 1
22089 EOF
22090
22091         BUILD_SLAPD=yes
22092         BUILD_PERL=yes
22093         if test "$ol_with_perl_module" != static ; then
22094                 cat >> confdefs.h <<\EOF
22095 #define SLAPD_PERL_DYNAMIC 1
22096 EOF
22097
22098                 BUILD_PERL=mod
22099                 BUILD_PERL_DYNAMIC=shared
22100                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22101                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22102         else
22103                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22104         fi
22105 fi
22106
22107 if test "$ol_enable_shell" != no ; then
22108         cat >> confdefs.h <<\EOF
22109 #define SLAPD_SHELL 1
22110 EOF
22111
22112         BUILD_SLAPD=yes
22113         BUILD_SHELL=yes
22114         if test "$ol_with_shell_module" != static ; then
22115                 cat >> confdefs.h <<\EOF
22116 #define SLAPD_SHELL_DYNAMIC 1
22117 EOF
22118
22119                 BUILD_SHELL=mod
22120                 BUILD_SHELL_DYNAMIC=shared
22121                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22122                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22123         else
22124                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22125         fi
22126 fi
22127
22128 if test "$ol_link_sql" != no ; then
22129         cat >> confdefs.h <<\EOF
22130 #define SLAPD_SQL 1
22131 EOF
22132
22133         BUILD_SLAPD=yes
22134         BUILD_SQL=yes
22135         if test "$ol_with_sql_module" != static; then
22136                 cat >> confdefs.h <<\EOF
22137 #define SLAPD_SQL_DYNAMIC 1
22138 EOF
22139
22140                 BUILD_SQL=mod
22141                 BUILD_SQL_DYNAMIC=shared
22142                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22143                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22144         else
22145                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22146         fi
22147 fi
22148
22149 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22150         $BUILD_SLAPD = yes ; then
22151         BUILD_SLURPD=yes
22152 fi
22153
22154 if test "$ol_enable_rewrite" != no ; then
22155         cat >> confdefs.h <<\EOF
22156 #define ENABLE_REWRITE 1
22157 EOF
22158
22159         BUILD_REWRITE=yes
22160 fi
22161
22162
22163
22164 if test "$ac_cv_mingw32" = yes ; then
22165         PLAT=NT
22166         SLAPD_MODULES_LDFLAGS=
22167         SLAPD_MODULES_LIST=
22168 else
22169         PLAT=UNIX
22170 fi
22171
22172
22173
22174
22175
22176
22177   
22178   
22179   
22180   
22181   
22182   
22183   
22184   
22185   
22186   
22187   
22188   
22189   
22190   
22191   
22192   
22193   
22194   
22195   
22196   
22197   
22198   
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238 # Check whether --with-xxinstall or --without-xxinstall was given.
22239 if test "${with_xxinstall+set}" = set; then
22240   withval="$with_xxinstall"
22241   :
22242 fi
22243
22244
22245
22246 trap '' 1 2 15
22247
22248 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22249
22250 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22251 # Let make expand exec_prefix.
22252 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22253
22254 # Any assignment to VPATH causes Sun make to only execute
22255 # the first set of double-colon rules, so remove it if not needed.
22256 # If there is a colon in the path, we need to keep it.
22257 if test "x$srcdir" = x.; then
22258   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22259 fi
22260
22261 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22262
22263 DEFS=-DHAVE_CONFIG_H
22264
22265 # Without the "./", some shells look in PATH for config.status.
22266 : ${CONFIG_STATUS=./config.status}
22267
22268 echo creating $CONFIG_STATUS
22269 rm -f $CONFIG_STATUS
22270 cat > $CONFIG_STATUS <<EOF
22271 #! /bin/sh
22272 # Generated automatically by configure.
22273 # Run this file to recreate the current configuration.
22274 # This directory was configured as follows,
22275 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22276 #
22277 # $0 $ac_configure_args
22278 #
22279 # Compiler output produced by configure, useful for debugging
22280 # configure, is in ./config.log if it exists.
22281
22282 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22283 for ac_option
22284 do
22285   case "\$ac_option" in
22286   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22287     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22288     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22289   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22290     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22291     exit 0 ;;
22292   -help | --help | --hel | --he | --h)
22293     echo "\$ac_cs_usage"; exit 0 ;;
22294   *) echo "\$ac_cs_usage"; exit 1 ;;
22295   esac
22296 done
22297
22298 ac_given_srcdir=$srcdir
22299 ac_given_INSTALL="$INSTALL"
22300
22301 trap 'rm -fr `echo "\
22302 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22303 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22304 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22305 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22306 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22307 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22308 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22309 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22310 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22311 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22312 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22313 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22314 include/Makefile:build/top.mk:include/Makefile.in \
22315 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22316 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22317 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22318 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22319 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22320 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22321 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22322 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22323 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22324 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22325 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22326 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22327 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22328 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22329 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22330 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22331 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22332 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22333 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22334 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22335 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22336 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22337 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22338 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22339 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22340 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22341 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22342 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22343  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22344 EOF
22345 cat >> $CONFIG_STATUS <<EOF
22346
22347 # Protect against being on the right side of a sed subst in config.status.
22348 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22349  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22350 $ac_vpsub
22351 $extrasub
22352 s%@SHELL@%$SHELL%g
22353 s%@CFLAGS@%$CFLAGS%g
22354 s%@CPPFLAGS@%$CPPFLAGS%g
22355 s%@CXXFLAGS@%$CXXFLAGS%g
22356 s%@FFLAGS@%$FFLAGS%g
22357 s%@DEFS@%$DEFS%g
22358 s%@LDFLAGS@%$LDFLAGS%g
22359 s%@LIBS@%$LIBS%g
22360 s%@exec_prefix@%$exec_prefix%g
22361 s%@prefix@%$prefix%g
22362 s%@program_transform_name@%$program_transform_name%g
22363 s%@bindir@%$bindir%g
22364 s%@sbindir@%$sbindir%g
22365 s%@libexecdir@%$libexecdir%g
22366 s%@datadir@%$datadir%g
22367 s%@sysconfdir@%$sysconfdir%g
22368 s%@sharedstatedir@%$sharedstatedir%g
22369 s%@localstatedir@%$localstatedir%g
22370 s%@libdir@%$libdir%g
22371 s%@includedir@%$includedir%g
22372 s%@oldincludedir@%$oldincludedir%g
22373 s%@infodir@%$infodir%g
22374 s%@mandir@%$mandir%g
22375 s%@host@%$host%g
22376 s%@host_alias@%$host_alias%g
22377 s%@host_cpu@%$host_cpu%g
22378 s%@host_vendor@%$host_vendor%g
22379 s%@host_os@%$host_os%g
22380 s%@target@%$target%g
22381 s%@target_alias@%$target_alias%g
22382 s%@target_cpu@%$target_cpu%g
22383 s%@target_vendor@%$target_vendor%g
22384 s%@target_os@%$target_os%g
22385 s%@build@%$build%g
22386 s%@build_alias@%$build_alias%g
22387 s%@build_cpu@%$build_cpu%g
22388 s%@build_vendor@%$build_vendor%g
22389 s%@build_os@%$build_os%g
22390 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22391 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22392 s%@INSTALL_DATA@%$INSTALL_DATA%g
22393 s%@PACKAGE@%$PACKAGE%g
22394 s%@VERSION@%$VERSION%g
22395 s%@ACLOCAL@%$ACLOCAL%g
22396 s%@AUTOCONF@%$AUTOCONF%g
22397 s%@AUTOMAKE@%$AUTOMAKE%g
22398 s%@AUTOHEADER@%$AUTOHEADER%g
22399 s%@MAKEINFO@%$MAKEINFO%g
22400 s%@install_sh@%$install_sh%g
22401 s%@AMTAR@%$AMTAR%g
22402 s%@AWK@%$AWK%g
22403 s%@AMTARFLAGS@%$AMTARFLAGS%g
22404 s%@SET_MAKE@%$SET_MAKE%g
22405 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22406 s%@top_builddir@%$top_builddir%g
22407 s%@ldap_subdir@%$ldap_subdir%g
22408 s%@CC@%$CC%g
22409 s%@AR@%$AR%g
22410 s%@LN_S@%$LN_S%g
22411 s%@OBJEXT@%$OBJEXT%g
22412 s%@EXEEXT@%$EXEEXT%g
22413 s%@ECHO@%$ECHO%g
22414 s%@RANLIB@%$RANLIB%g
22415 s%@STRIP@%$STRIP%g
22416 s%@DLLTOOL@%$DLLTOOL%g
22417 s%@AS@%$AS%g
22418 s%@OBJDUMP@%$OBJDUMP%g
22419 s%@CPP@%$CPP%g
22420 s%@LIBTOOL@%$LIBTOOL%g
22421 s%@LN_H@%$LN_H%g
22422 s%@SENDMAIL@%$SENDMAIL%g
22423 s%@EDITOR@%$EDITOR%g
22424 s%@PERLBIN@%$PERLBIN%g
22425 s%@OL_MKDEP@%$OL_MKDEP%g
22426 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22427 s%@LIBOBJS@%$LIBOBJS%g
22428 s%@LIBSRCS@%$LIBSRCS%g
22429 s%@PLAT@%$PLAT%g
22430 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22431 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22432 s%@BUILD_BDB@%$BUILD_BDB%g
22433 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22434 s%@BUILD_LDAP@%$BUILD_LDAP%g
22435 s%@BUILD_LDBM@%$BUILD_LDBM%g
22436 s%@BUILD_META@%$BUILD_META%g
22437 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22438 s%@BUILD_NULL@%$BUILD_NULL%g
22439 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22440 s%@BUILD_PERL@%$BUILD_PERL%g
22441 s%@BUILD_SHELL@%$BUILD_SHELL%g
22442 s%@BUILD_SQL@%$BUILD_SQL%g
22443 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22444 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22445 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22446 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22447 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22448 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22449 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22450 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22451 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22452 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22453 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22454 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22455 s%@LDBM_LIB@%$LDBM_LIB%g
22456 s%@LDAP_LIBS@%$LDAP_LIBS%g
22457 s%@LDIF_LIBS@%$LDIF_LIBS%g
22458 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22459 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22460 s%@LDBM_LIBS@%$LDBM_LIBS%g
22461 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22462 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22463 s%@WRAP_LIBS@%$WRAP_LIBS%g
22464 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22465 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22466 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22467 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22468 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22469 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22470 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22471 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22472 s%@KRB4_LIBS@%$KRB4_LIBS%g
22473 s%@KRB5_LIBS@%$KRB5_LIBS%g
22474 s%@READLINE_LIBS@%$READLINE_LIBS%g
22475 s%@SASL_LIBS@%$SASL_LIBS%g
22476 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22477 s%@TLS_LIBS@%$TLS_LIBS%g
22478 s%@MODULES_LIBS@%$MODULES_LIBS%g
22479 s%@AUTH_LIBS@%$AUTH_LIBS%g
22480 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22481 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22482 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22483 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22484
22485 CEOF
22486 EOF
22487
22488 cat >> $CONFIG_STATUS <<\EOF
22489
22490 # Split the substitutions into bite-sized pieces for seds with
22491 # small command number limits, like on Digital OSF/1 and HP-UX.
22492 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22493 ac_file=1 # Number of current file.
22494 ac_beg=1 # First line for current file.
22495 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22496 ac_more_lines=:
22497 ac_sed_cmds=""
22498 while $ac_more_lines; do
22499   if test $ac_beg -gt 1; then
22500     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22501   else
22502     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22503   fi
22504   if test ! -s conftest.s$ac_file; then
22505     ac_more_lines=false
22506     rm -f conftest.s$ac_file
22507   else
22508     if test -z "$ac_sed_cmds"; then
22509       ac_sed_cmds="sed -f conftest.s$ac_file"
22510     else
22511       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22512     fi
22513     ac_file=`expr $ac_file + 1`
22514     ac_beg=$ac_end
22515     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22516   fi
22517 done
22518 if test -z "$ac_sed_cmds"; then
22519   ac_sed_cmds=cat
22520 fi
22521 EOF
22522
22523 cat >> $CONFIG_STATUS <<EOF
22524
22525 CONFIG_FILES=\${CONFIG_FILES-"\
22526 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22527 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22528 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22529 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22530 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22531 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22532 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22533 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22534 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22535 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22536 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22537 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22538 include/Makefile:build/top.mk:include/Makefile.in \
22539 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22540 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22541 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22542 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22543 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22544 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22545 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22546 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22547 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22548 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22549 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22550 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22551 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22552 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22553 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22554 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22555 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22556 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22557 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22558 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22559 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22560 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22561 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22562 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22563 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22564 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22565 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22566 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22567 "}
22568 EOF
22569 cat >> $CONFIG_STATUS <<\EOF
22570 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22571   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22572   case "$ac_file" in
22573   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22574        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22575   *) ac_file_in="${ac_file}.in" ;;
22576   esac
22577
22578   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22579
22580   # Remove last slash and all that follows it.  Not all systems have dirname.
22581   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22582   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22583     # The file is in a subdirectory.
22584     test ! -d "$ac_dir" && mkdir "$ac_dir"
22585     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22586     # A "../" for each directory in $ac_dir_suffix.
22587     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22588   else
22589     ac_dir_suffix= ac_dots=
22590   fi
22591
22592   case "$ac_given_srcdir" in
22593   .)  srcdir=.
22594       if test -z "$ac_dots"; then top_srcdir=.
22595       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22596   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22597   *) # Relative path.
22598     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22599     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22600   esac
22601
22602   case "$ac_given_INSTALL" in
22603   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22604   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22605   esac
22606
22607   echo creating "$ac_file"
22608   rm -f "$ac_file"
22609   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22610   case "$ac_file" in
22611   *[Mm]akefile*) ac_comsub="1i\\
22612 # $configure_input" ;;
22613   *) ac_comsub= ;;
22614   esac
22615
22616   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22617   sed -e "$ac_comsub
22618 s%@configure_input@%$configure_input%g
22619 s%@srcdir@%$srcdir%g
22620 s%@top_srcdir@%$top_srcdir%g
22621 s%@INSTALL@%$INSTALL%g
22622 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22623 fi; done
22624 rm -f conftest.s*
22625
22626 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22627 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22628 #
22629 # ac_d sets the value in "#define NAME VALUE" lines.
22630 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22631 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22632 ac_dC='\3'
22633 ac_dD='%g'
22634 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22635 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22636 ac_uB='\([      ]\)%\1#\2define\3'
22637 ac_uC=' '
22638 ac_uD='\4%g'
22639 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22640 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22641 ac_eB='$%\1#\2define\3'
22642 ac_eC=' '
22643 ac_eD='%g'
22644
22645 if test "${CONFIG_HEADERS+set}" != set; then
22646 EOF
22647 cat >> $CONFIG_STATUS <<EOF
22648   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22649 EOF
22650 cat >> $CONFIG_STATUS <<\EOF
22651 fi
22652 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22653   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22654   case "$ac_file" in
22655   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22656        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22657   *) ac_file_in="${ac_file}.in" ;;
22658   esac
22659
22660   echo creating $ac_file
22661
22662   rm -f conftest.frag conftest.in conftest.out
22663   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22664   cat $ac_file_inputs > conftest.in
22665
22666 EOF
22667
22668 # Transform confdefs.h into a sed script conftest.vals that substitutes
22669 # the proper values into config.h.in to produce config.h.  And first:
22670 # Protect against being on the right side of a sed subst in config.status.
22671 # Protect against being in an unquoted here document in config.status.
22672 rm -f conftest.vals
22673 cat > conftest.hdr <<\EOF
22674 s/[\\&%]/\\&/g
22675 s%[\\$`]%\\&%g
22676 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22677 s%ac_d%ac_u%gp
22678 s%ac_u%ac_e%gp
22679 EOF
22680 sed -n -f conftest.hdr confdefs.h > conftest.vals
22681 rm -f conftest.hdr
22682
22683 # This sed command replaces #undef with comments.  This is necessary, for
22684 # example, in the case of _POSIX_SOURCE, which is predefined and required
22685 # on some systems where configure will not decide to define it.
22686 cat >> conftest.vals <<\EOF
22687 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22688 EOF
22689
22690 # Break up conftest.vals because some shells have a limit on
22691 # the size of here documents, and old seds have small limits too.
22692
22693 rm -f conftest.tail
22694 while :
22695 do
22696   ac_lines=`grep -c . conftest.vals`
22697   # grep -c gives empty output for an empty file on some AIX systems.
22698   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22699   # Write a limited-size here document to conftest.frag.
22700   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22701   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22702   echo 'CEOF
22703   sed -f conftest.frag conftest.in > conftest.out
22704   rm -f conftest.in
22705   mv conftest.out conftest.in
22706 ' >> $CONFIG_STATUS
22707   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22708   rm -f conftest.vals
22709   mv conftest.tail conftest.vals
22710 done
22711 rm -f conftest.vals
22712
22713 cat >> $CONFIG_STATUS <<\EOF
22714   rm -f conftest.frag conftest.h
22715   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22716   cat conftest.in >> conftest.h
22717   rm -f conftest.in
22718   if cmp -s $ac_file conftest.h 2>/dev/null; then
22719     echo "$ac_file is unchanged"
22720     rm -f conftest.h
22721   else
22722     # Remove last slash and all that follows it.  Not all systems have dirname.
22723       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22724       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22725       # The file is in a subdirectory.
22726       test ! -d "$ac_dir" && mkdir "$ac_dir"
22727     fi
22728     rm -f $ac_file
22729     mv conftest.h $ac_file
22730   fi
22731 fi; done
22732
22733 EOF
22734 cat >> $CONFIG_STATUS <<EOF
22735
22736 EOF
22737 cat >> $CONFIG_STATUS <<\EOF
22738
22739 date > stamp-h
22740 echo Please run \"make depend\" to build dependencies
22741
22742 exit 0
22743 EOF
22744 chmod +x $CONFIG_STATUS
22745 rm -fr confdefs* $ac_clean_files
22746 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22747