]> git.sur5r.net Git - openldap/blob - configure
Import Fix ITS#1865, (ITS#1764?) cond_broadcast behavior was broken
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.420 2002/05/18 00:06:32 hyc 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-x-compile      enable cross compiling [no]"
48 ac_help="$ac_help
49   --with-cyrus-sasl       with Cyrus SASL support [auto]"
50 ac_help="$ac_help
51   --with-fetch            with freeBSD fetch URL support [auto]"
52 ac_help="$ac_help
53   --with-kerberos         with Kerberos support [auto]"
54 ac_help="$ac_help
55   --with-readline         with readline support [auto]"
56 ac_help="$ac_help
57   --with-threads          with threads [auto]"
58 ac_help="$ac_help
59   --with-tls              with TLS/SSL support [auto]"
60 ac_help="$ac_help
61   --with-yielding-select  with implicitly yielding select [auto]"
62 ac_help="$ac_help
63
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd          enable building slapd [yes]"
67 ac_help="$ac_help
68     --enable-aci          enable per-object ACIs (experimental) [no]"
69 ac_help="$ac_help
70     --enable-cleartext    enable cleartext passwords [yes]"
71 ac_help="$ac_help
72     --enable-crypt        enable crypt(3) passwords [no]"
73 ac_help="$ac_help
74     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
75 ac_help="$ac_help
76     --enable-kpasswd      enable Kerberos password verification [no]"
77 ac_help="$ac_help
78     --enable-lmpasswd     enable LAN Manager passwords [no]"
79 ac_help="$ac_help
80     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
81 ac_help="$ac_help
82     --enable-modules      enable dynamic module support [no]"
83 ac_help="$ac_help
84     --enable-phonetic     enable phonetic/soundex [no]"
85 ac_help="$ac_help
86     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups of client hostnames [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|dynamic [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142
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-x_compile
1551         # Check whether --enable-x_compile or --disable-x_compile was given.
1552 if test "${enable_x_compile+set}" = set; then
1553   enableval="$enable_x_compile"
1554   
1555         ol_arg=invalid
1556         for ol_val in 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-x_compile" 1>&2; exit 1; }
1563         fi
1564         ol_enable_x_compile="$ol_arg"
1565
1566 else
1567         ol_enable_x_compile="no"
1568 fi
1569 # end --enable-x_compile
1570
1571
1572 # OpenLDAP --with-cyrus_sasl
1573         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1574 if test "${with_cyrus_sasl+set}" = set; then
1575   withval="$with_cyrus_sasl"
1576   
1577         ol_arg=invalid
1578         for ol_val in auto yes no  ; do
1579                 if test "$withval" = "$ol_val" ; then
1580                         ol_arg="$ol_val"
1581                 fi
1582         done
1583         if test "$ol_arg" = "invalid" ; then
1584                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1585         fi
1586         ol_with_cyrus_sasl="$ol_arg"
1587
1588 else
1589         ol_with_cyrus_sasl="auto"
1590 fi
1591 # end --with-cyrus_sasl
1592
1593 # OpenLDAP --with-fetch
1594         # Check whether --with-fetch or --without-fetch was given.
1595 if test "${with_fetch+set}" = set; then
1596   withval="$with_fetch"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no  ; do
1600                 if test "$withval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1606         fi
1607         ol_with_fetch="$ol_arg"
1608
1609 else
1610         ol_with_fetch="auto"
1611 fi
1612 # end --with-fetch
1613
1614 # OpenLDAP --with-kerberos
1615         # Check whether --with-kerberos or --without-kerberos was given.
1616 if test "${with_kerberos+set}" = set; then
1617   withval="$with_kerberos"
1618   
1619         ol_arg=invalid
1620         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1621                 if test "$withval" = "$ol_val" ; then
1622                         ol_arg="$ol_val"
1623                 fi
1624         done
1625         if test "$ol_arg" = "invalid" ; then
1626                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1627         fi
1628         ol_with_kerberos="$ol_arg"
1629
1630 else
1631         ol_with_kerberos="auto"
1632 fi
1633 # end --with-kerberos
1634
1635 # OpenLDAP --with-readline
1636         # Check whether --with-readline or --without-readline was given.
1637 if test "${with_readline+set}" = set; then
1638   withval="$with_readline"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto yes no  ; do
1642                 if test "$withval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1648         fi
1649         ol_with_readline="$ol_arg"
1650
1651 else
1652         ol_with_readline="auto"
1653 fi
1654 # end --with-readline
1655
1656 # OpenLDAP --with-threads
1657         # Check whether --with-threads or --without-threads was given.
1658 if test "${with_threads+set}" = set; then
1659   withval="$with_threads"
1660   
1661         ol_arg=invalid
1662         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1663                 if test "$withval" = "$ol_val" ; then
1664                         ol_arg="$ol_val"
1665                 fi
1666         done
1667         if test "$ol_arg" = "invalid" ; then
1668                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1669         fi
1670         ol_with_threads="$ol_arg"
1671
1672 else
1673         ol_with_threads="auto"
1674 fi
1675 # end --with-threads
1676
1677 # OpenLDAP --with-tls
1678         # Check whether --with-tls or --without-tls was given.
1679 if test "${with_tls+set}" = set; then
1680   withval="$with_tls"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto ssleay openssl yes no  ; do
1684                 if test "$withval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1690         fi
1691         ol_with_tls="$ol_arg"
1692
1693 else
1694         ol_with_tls="auto"
1695 fi
1696 # end --with-tls
1697
1698 # OpenLDAP --with-yielding_select
1699         # Check whether --with-yielding_select or --without-yielding_select was given.
1700 if test "${with_yielding_select+set}" = set; then
1701   withval="$with_yielding_select"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no manual  ; do
1705                 if test "$withval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1711         fi
1712         ol_with_yielding_select="$ol_arg"
1713
1714 else
1715         ol_with_yielding_select="auto"
1716 fi
1717 # end --with-yielding_select
1718
1719
1720
1721 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1722 if test "${with_xxslapdoptions+set}" = set; then
1723   withval="$with_xxslapdoptions"
1724   :
1725 fi
1726
1727 # OpenLDAP --enable-slapd
1728         # Check whether --enable-slapd or --disable-slapd was given.
1729 if test "${enable_slapd+set}" = set; then
1730   enableval="$enable_slapd"
1731   
1732         ol_arg=invalid
1733         for ol_val in auto yes no ; do
1734                 if test "$enableval" = "$ol_val" ; then
1735                         ol_arg="$ol_val"
1736                 fi
1737         done
1738         if test "$ol_arg" = "invalid" ; then
1739                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1740         fi
1741         ol_enable_slapd="$ol_arg"
1742
1743 else
1744         ol_enable_slapd="yes"
1745 fi
1746 # end --enable-slapd
1747 # OpenLDAP --enable-aci
1748         # Check whether --enable-aci or --disable-aci was given.
1749 if test "${enable_aci+set}" = set; then
1750   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1760         fi
1761         ol_enable_aci="$ol_arg"
1762
1763 else
1764         ol_enable_aci="no"
1765 fi
1766 # end --enable-aci
1767 # OpenLDAP --enable-cleartext
1768         # Check whether --enable-cleartext or --disable-cleartext was given.
1769 if test "${enable_cleartext+set}" = set; then
1770   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1780         fi
1781         ol_enable_cleartext="$ol_arg"
1782
1783 else
1784         ol_enable_cleartext="yes"
1785 fi
1786 # end --enable-cleartext
1787 # OpenLDAP --enable-crypt
1788         # Check whether --enable-crypt or --disable-crypt was given.
1789 if test "${enable_crypt+set}" = set; then
1790   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1800         fi
1801         ol_enable_crypt="$ol_arg"
1802
1803 else
1804         ol_enable_crypt="no"
1805 fi
1806 # end --enable-crypt
1807 # OpenLDAP --enable-dynamic
1808         # Check whether --enable-dynamic or --disable-dynamic was given.
1809 if test "${enable_dynamic+set}" = set; then
1810   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1820         fi
1821         ol_enable_dynamic="$ol_arg"
1822
1823 else
1824         ol_enable_dynamic="no"
1825 fi
1826 # end --enable-dynamic
1827 # OpenLDAP --enable-kpasswd
1828         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1829 if test "${enable_kpasswd+set}" = set; then
1830   enableval="$enable_kpasswd"
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-kpasswd" 1>&2; exit 1; }
1840         fi
1841         ol_enable_kpasswd="$ol_arg"
1842
1843 else
1844         ol_enable_kpasswd="no"
1845 fi
1846 # end --enable-kpasswd
1847 # OpenLDAP --enable-lmpasswd
1848         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1849 if test "${enable_lmpasswd+set}" = set; then
1850   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1860         fi
1861         ol_enable_lmpasswd="$ol_arg"
1862
1863 else
1864         ol_enable_lmpasswd="no"
1865 fi
1866 # end --enable-lmpasswd
1867 # OpenLDAP --enable-spasswd
1868         # Check whether --enable-spasswd or --disable-spasswd was given.
1869 if test "${enable_spasswd+set}" = set; then
1870   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1880         fi
1881         ol_enable_spasswd="$ol_arg"
1882
1883 else
1884         ol_enable_spasswd="no"
1885 fi
1886 # end --enable-spasswd
1887 # OpenLDAP --enable-modules
1888         # Check whether --enable-modules or --disable-modules was given.
1889 if test "${enable_modules+set}" = set; then
1890   enableval="$enable_modules"
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-modules" 1>&2; exit 1; }
1900         fi
1901         ol_enable_modules="$ol_arg"
1902
1903 else
1904         ol_enable_modules="no"
1905 fi
1906 # end --enable-modules
1907 # OpenLDAP --enable-phonetic
1908         # Check whether --enable-phonetic or --disable-phonetic was given.
1909 if test "${enable_phonetic+set}" = set; then
1910   enableval="$enable_phonetic"
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-phonetic" 1>&2; exit 1; }
1920         fi
1921         ol_enable_phonetic="$ol_arg"
1922
1923 else
1924         ol_enable_phonetic="no"
1925 fi
1926 # end --enable-phonetic
1927 # OpenLDAP --enable-rewrite
1928         # Check whether --enable-rewrite or --disable-rewrite was given.
1929 if test "${enable_rewrite+set}" = set; then
1930   enableval="$enable_rewrite"
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-rewrite" 1>&2; exit 1; }
1940         fi
1941         ol_enable_rewrite="$ol_arg"
1942
1943 else
1944         ol_enable_rewrite="no"
1945 fi
1946 # end --enable-rewrite
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
2869 SLAPD_STATIC_BACKENDS=
2870 SLAPD_DYNAMIC_BACKENDS=
2871
2872 SLAPD_PERL_LDFLAGS=
2873 MOD_PERL_LDFLAGS=
2874 PERL_CPPFLAGS=
2875
2876 SLAPD_SQL_LDFLAGS=
2877 SLAPD_SQL_LIBS=
2878 SLAPD_SQL_INCLUDES=
2879
2880 KRB4_LIBS=
2881 KRB5_LIBS=
2882 READLINE_LIBS=
2883 SASL_LIBS=
2884 TERMCAP_LIBS=
2885 TLS_LIBS=
2886 MODULES_LIBS=
2887 AUTH_LIBS=
2888
2889 SLAPD_SLP_LIBS=
2890
2891
2892 # Find a good install program.  We prefer a C program (faster),
2893 # so one script is as good as another.  But avoid the broken or
2894 # incompatible versions:
2895 # SysV /etc/install, /usr/sbin/install
2896 # SunOS /usr/etc/install
2897 # IRIX /sbin/install
2898 # AIX /bin/install
2899 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2900 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2901 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2902 # ./install, which can be erroneously created by make from ./install.sh.
2903 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2904 echo "configure:2905: checking for a BSD compatible install" >&5
2905 if test -z "$INSTALL"; then
2906 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2910   for ac_dir in $PATH; do
2911     # Account for people who put trailing slashes in PATH elements.
2912     case "$ac_dir/" in
2913     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2914     *)
2915       # OSF1 and SCO ODT 3.0 have their own names for install.
2916       # Don't use installbsd from OSF since it installs stuff as root
2917       # by default.
2918       for ac_prog in ginstall scoinst install; do
2919         if test -f $ac_dir/$ac_prog; then
2920           if test $ac_prog = install &&
2921             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2922             # AIX install.  It has an incompatible calling convention.
2923             :
2924           elif test $ac_prog = install &&
2925             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2926             # program-specific install script used by HP pwplus--don't use.
2927             :
2928           else
2929             ac_cv_path_install="$ac_dir/$ac_prog -c"
2930             break 2
2931           fi
2932         fi
2933       done
2934       ;;
2935     esac
2936   done
2937   IFS="$ac_save_IFS"
2938
2939 fi
2940   if test "${ac_cv_path_install+set}" = set; then
2941     INSTALL="$ac_cv_path_install"
2942   else
2943     # As a last resort, use the slow shell script.  We don't cache a
2944     # path for INSTALL within a source directory, because that will
2945     # break other packages using the cache if that directory is
2946     # removed, or if the path is relative.
2947     INSTALL="$ac_install_sh"
2948   fi
2949 fi
2950 echo "$ac_t""$INSTALL" 1>&6
2951
2952 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2953 # It thinks the first close brace ends the variable substitution.
2954 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2955
2956 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2957
2958 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2959
2960
2961 cat >> confdefs.h <<\EOF
2962 #define HAVE_MKVERSION 1
2963 EOF
2964
2965
2966
2967
2968 ol_aix_threads=no
2969 case "$target" in
2970 *-*-aix*)       if test -z "$CC" ; then
2971                 case "$ol_with_threads" in
2972                 auto | yes |  posix) ol_aix_threads=yes ;;
2973                 esac
2974         fi
2975 ;;
2976 esac
2977
2978 if test $ol_aix_threads = yes ; then
2979         if test -z "${CC}" ; then
2980                 for ac_prog in cc_r xlc_r cc
2981 do
2982 # Extract the first word of "$ac_prog", so it can be a program name with args.
2983 set dummy $ac_prog; ac_word=$2
2984 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2985 echo "configure:2986: checking for $ac_word" >&5
2986 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   if test -n "$CC"; then
2990   ac_cv_prog_CC="$CC" # Let the user override the test.
2991 else
2992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2993   ac_dummy="$PATH"
2994   for ac_dir in $ac_dummy; do
2995     test -z "$ac_dir" && ac_dir=.
2996     if test -f $ac_dir/$ac_word; then
2997       ac_cv_prog_CC="$ac_prog"
2998       break
2999     fi
3000   done
3001   IFS="$ac_save_ifs"
3002 fi
3003 fi
3004 CC="$ac_cv_prog_CC"
3005 if test -n "$CC"; then
3006   echo "$ac_t""$CC" 1>&6
3007 else
3008   echo "$ac_t""no" 1>&6
3009 fi
3010
3011 test -n "$CC" && break
3012 done
3013
3014
3015                 if test "$CC" = cc ; then
3016                                                 if test $ol_with_threads != auto ; then
3017                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3018                         else
3019                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3020                         fi
3021                         ol_with_threads=no
3022                 fi
3023         fi
3024
3025         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3026                 ol_with_threads=posix
3027                 ol_cv_pthread_create=yes
3028         fi
3029 fi
3030
3031 if test -z "${CC}"; then
3032         for ac_prog in cc
3033 do
3034 # Extract the first word of "$ac_prog", so it can be a program name with args.
3035 set dummy $ac_prog; ac_word=$2
3036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3037 echo "configure:3038: checking for $ac_word" >&5
3038 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3039   echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041   if test -n "$CC"; then
3042   ac_cv_prog_CC="$CC" # Let the user override the test.
3043 else
3044   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3045   ac_dummy="$PATH"
3046   for ac_dir in $ac_dummy; do
3047     test -z "$ac_dir" && ac_dir=.
3048     if test -f $ac_dir/$ac_word; then
3049       ac_cv_prog_CC="$ac_prog"
3050       break
3051     fi
3052   done
3053   IFS="$ac_save_ifs"
3054 fi
3055 fi
3056 CC="$ac_cv_prog_CC"
3057 if test -n "$CC"; then
3058   echo "$ac_t""$CC" 1>&6
3059 else
3060   echo "$ac_t""no" 1>&6
3061 fi
3062
3063 test -n "$CC" && break
3064 done
3065
3066 fi
3067
3068
3069 if test -z "${AR}"; then
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="missing"
3104
3105
3106         if test "${AR}" = "missing" ; then
3107                 { echo "configure: error: Unable to locate ar(1).  Check PATH or set AR." 1>&2; exit 1; }
3108         fi
3109 fi
3110
3111
3112
3113 # Find the correct PATH separator.  Usually this is `:', but
3114 # DJGPP uses `;' like DOS.
3115 if test "X${PATH_SEPARATOR+set}" != Xset; then
3116   UNAME=${UNAME-`uname 2>/dev/null`}
3117   case X$UNAME in
3118     *-DOS) lt_cv_sys_path_separator=';' ;;
3119     *)     lt_cv_sys_path_separator=':' ;;
3120   esac
3121   PATH_SEPARATOR=$lt_cv_sys_path_separator
3122 fi
3123
3124 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3125 echo "configure:3126: checking for Cygwin environment" >&5
3126 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3127   echo $ac_n "(cached) $ac_c" 1>&6
3128 else
3129   cat > conftest.$ac_ext <<EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3132
3133 int main() {
3134
3135 #ifndef __CYGWIN__
3136 #define __CYGWIN__ __CYGWIN32__
3137 #endif
3138 return __CYGWIN__;
3139 ; return 0; }
3140 EOF
3141 if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3142   rm -rf conftest*
3143   ac_cv_cygwin=yes
3144 else
3145   echo "configure: failed program was:" >&5
3146   cat conftest.$ac_ext >&5
3147   rm -rf conftest*
3148   ac_cv_cygwin=no
3149 fi
3150 rm -f conftest*
3151 fi
3152
3153 echo "$ac_t""$ac_cv_cygwin" 1>&6
3154 CYGWIN=
3155 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3156 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3157 echo "configure:3158: checking for mingw32 environment" >&5
3158 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164
3165 int main() {
3166 return __MINGW32__;
3167 ; return 0; }
3168 EOF
3169 if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3170   rm -rf conftest*
3171   ac_cv_mingw32=yes
3172 else
3173   echo "configure: failed program was:" >&5
3174   cat conftest.$ac_ext >&5
3175   rm -rf conftest*
3176   ac_cv_mingw32=no
3177 fi
3178 rm -f conftest*
3179 fi
3180
3181 echo "$ac_t""$ac_cv_mingw32" 1>&6
3182 MINGW32=
3183 test "$ac_cv_mingw32" = yes && MINGW32=yes
3184 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3185 echo "configure:3186: checking for EMX OS/2 environment" >&5
3186 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192
3193 int main() {
3194 return __EMX__;
3195 ; return 0; }
3196 EOF
3197 if { (eval echo configure:3198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3198   rm -rf conftest*
3199   ac_cv_emxos2=yes
3200 else
3201   echo "configure: failed program was:" >&5
3202   cat conftest.$ac_ext >&5
3203   rm -rf conftest*
3204   ac_cv_emxos2=no
3205 fi
3206 rm -f conftest*
3207 fi
3208
3209 echo "$ac_t""$ac_cv_emxos2" 1>&6
3210 EMXOS2=
3211 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3212 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3213 echo "configure:3214: checking how to run the C preprocessor" >&5
3214 # On Suns, sometimes $CPP names a directory.
3215 if test -n "$CPP" && test -d "$CPP"; then
3216   CPP=
3217 fi
3218 if test -z "$CPP"; then
3219 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3220   echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222     # This must be in double quotes, not single quotes, because CPP may get
3223   # substituted into the Makefile and "${CC-cc}" will confuse make.
3224   CPP="${CC-cc} -E"
3225   # On the NeXT, cc -E runs the code through the compiler's parser,
3226   # not just through cpp.
3227   cat > conftest.$ac_ext <<EOF
3228 #line 3229 "configure"
3229 #include "confdefs.h"
3230 #include <assert.h>
3231 Syntax Error
3232 EOF
3233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3234 { (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3236 if test -z "$ac_err"; then
3237   :
3238 else
3239   echo "$ac_err" >&5
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   CPP="${CC-cc} -E -traditional-cpp"
3244   cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 #include <assert.h>
3248 Syntax Error
3249 EOF
3250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3251 { (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253 if test -z "$ac_err"; then
3254   :
3255 else
3256   echo "$ac_err" >&5
3257   echo "configure: failed program was:" >&5
3258   cat conftest.$ac_ext >&5
3259   rm -rf conftest*
3260   CPP="${CC-cc} -nologo -E"
3261   cat > conftest.$ac_ext <<EOF
3262 #line 3263 "configure"
3263 #include "confdefs.h"
3264 #include <assert.h>
3265 Syntax Error
3266 EOF
3267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3268 { (eval echo configure:3269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3270 if test -z "$ac_err"; then
3271   :
3272 else
3273   echo "$ac_err" >&5
3274   echo "configure: failed program was:" >&5
3275   cat conftest.$ac_ext >&5
3276   rm -rf conftest*
3277   CPP=/lib/cpp
3278 fi
3279 rm -f conftest*
3280 fi
3281 rm -f conftest*
3282 fi
3283 rm -f conftest*
3284   ac_cv_prog_CPP="$CPP"
3285 fi
3286   CPP="$ac_cv_prog_CPP"
3287 else
3288   ac_cv_prog_CPP="$CPP"
3289 fi
3290 echo "$ac_t""$CPP" 1>&6
3291
3292 # Check whether --enable-fast-install or --disable-fast-install was given.
3293 if test "${enable_fast_install+set}" = set; then
3294   enableval="$enable_fast_install"
3295   p=${PACKAGE-default}
3296 case $enableval in
3297 yes) enable_fast_install=yes ;;
3298 no) enable_fast_install=no ;;
3299 *)
3300   enable_fast_install=no
3301   # Look at the argument we got.  We use all the common list separators.
3302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3303   for pkg in $enableval; do
3304     if test "X$pkg" = "X$p"; then
3305       enable_fast_install=yes
3306     fi
3307   done
3308   IFS="$ac_save_ifs"
3309   ;;
3310 esac
3311 else
3312   enable_fast_install=yes
3313 fi
3314
3315 # Extract the first word of "gcc", so it can be a program name with args.
3316 set dummy gcc; ac_word=$2
3317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3318 echo "configure:3319: checking for $ac_word" >&5
3319 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3320   echo $ac_n "(cached) $ac_c" 1>&6
3321 else
3322   if test -n "$CC"; then
3323   ac_cv_prog_CC="$CC" # Let the user override the test.
3324 else
3325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3326   ac_dummy="$PATH"
3327   for ac_dir in $ac_dummy; do
3328     test -z "$ac_dir" && ac_dir=.
3329     if test -f $ac_dir/$ac_word; then
3330       ac_cv_prog_CC="gcc"
3331       break
3332     fi
3333   done
3334   IFS="$ac_save_ifs"
3335 fi
3336 fi
3337 CC="$ac_cv_prog_CC"
3338 if test -n "$CC"; then
3339   echo "$ac_t""$CC" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344 if test -z "$CC"; then
3345   # Extract the first word of "cc", so it can be a program name with args.
3346 set dummy cc; ac_word=$2
3347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3348 echo "configure:3349: checking for $ac_word" >&5
3349 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3350   echo $ac_n "(cached) $ac_c" 1>&6
3351 else
3352   if test -n "$CC"; then
3353   ac_cv_prog_CC="$CC" # Let the user override the test.
3354 else
3355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3356   ac_prog_rejected=no
3357   ac_dummy="$PATH"
3358   for ac_dir in $ac_dummy; do
3359     test -z "$ac_dir" && ac_dir=.
3360     if test -f $ac_dir/$ac_word; then
3361       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3362         ac_prog_rejected=yes
3363         continue
3364       fi
3365       ac_cv_prog_CC="cc"
3366       break
3367     fi
3368   done
3369   IFS="$ac_save_ifs"
3370 if test $ac_prog_rejected = yes; then
3371   # We found a bogon in the path, so make sure we never use it.
3372   set dummy $ac_cv_prog_CC
3373   shift
3374   if test $# -gt 0; then
3375     # We chose a different compiler from the bogus one.
3376     # However, it has the same basename, so the bogon will be chosen
3377     # first if we set CC to just the basename; use the full file name.
3378     shift
3379     set dummy "$ac_dir/$ac_word" "$@"
3380     shift
3381     ac_cv_prog_CC="$@"
3382   fi
3383 fi
3384 fi
3385 fi
3386 CC="$ac_cv_prog_CC"
3387 if test -n "$CC"; then
3388   echo "$ac_t""$CC" 1>&6
3389 else
3390   echo "$ac_t""no" 1>&6
3391 fi
3392
3393   if test -z "$CC"; then
3394     case "`uname -s`" in
3395     *win32* | *WIN32* | *CYGWIN*)
3396       # Extract the first word of "cl", so it can be a program name with args.
3397 set dummy cl; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   if test -n "$CC"; then
3404   ac_cv_prog_CC="$CC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_dummy="$PATH"
3408   for ac_dir in $ac_dummy; do
3409     test -z "$ac_dir" && ac_dir=.
3410     if test -f $ac_dir/$ac_word; then
3411       ac_cv_prog_CC="cl"
3412       break
3413     fi
3414   done
3415   IFS="$ac_save_ifs"
3416 fi
3417 fi
3418 CC="$ac_cv_prog_CC"
3419 if test -n "$CC"; then
3420   echo "$ac_t""$CC" 1>&6
3421 else
3422   echo "$ac_t""no" 1>&6
3423 fi
3424  ;;
3425     esac
3426   fi
3427   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3428 fi
3429
3430 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3431 echo "configure:3432: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3432
3433 ac_ext=c
3434 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3435 ac_cpp='$CPP $CPPFLAGS'
3436 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3437 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3438 cross_compiling=$ac_cv_prog_cc_cross
3439
3440 cat > conftest.$ac_ext << EOF
3441
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444
3445 main(){return(0);}
3446 EOF
3447 if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3448   ac_cv_prog_cc_works=yes
3449   # If we can't run a trivial program, we are probably using a cross compiler.
3450   if (./conftest; exit) 2>/dev/null; then
3451     ac_cv_prog_cc_cross=no
3452   else
3453     ac_cv_prog_cc_cross=yes
3454   fi
3455 else
3456   echo "configure: failed program was:" >&5
3457   cat conftest.$ac_ext >&5
3458   ac_cv_prog_cc_works=no
3459 fi
3460 rm -fr conftest*
3461 ac_ext=c
3462 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3463 ac_cpp='$CPP $CPPFLAGS'
3464 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3465 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3466 cross_compiling=$ac_cv_prog_cc_cross
3467
3468 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3469 if test $ac_cv_prog_cc_works = no; then
3470   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3471 fi
3472 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3473 echo "configure:3474: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3474 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3475 cross_compiling=$ac_cv_prog_cc_cross
3476
3477 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether we are using GNU C" >&5
3479 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3480   echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482   cat > conftest.c <<EOF
3483 #ifdef __GNUC__
3484   yes;
3485 #endif
3486 EOF
3487 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3488   ac_cv_prog_gcc=yes
3489 else
3490   ac_cv_prog_gcc=no
3491 fi
3492 fi
3493
3494 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3495
3496 if test $ac_cv_prog_gcc = yes; then
3497   GCC=yes
3498 else
3499   GCC=
3500 fi
3501
3502 ac_test_CFLAGS="${CFLAGS+set}"
3503 ac_save_CFLAGS="$CFLAGS"
3504 CFLAGS=
3505 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3506 echo "configure:3507: checking whether ${CC-cc} accepts -g" >&5
3507 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3508   echo $ac_n "(cached) $ac_c" 1>&6
3509 else
3510   echo 'void f(){}' > conftest.c
3511 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3512   ac_cv_prog_cc_g=yes
3513 else
3514   ac_cv_prog_cc_g=no
3515 fi
3516 rm -f conftest*
3517
3518 fi
3519
3520 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3521 if test "$ac_test_CFLAGS" = set; then
3522   CFLAGS="$ac_save_CFLAGS"
3523 elif test $ac_cv_prog_cc_g = yes; then
3524   if test "$GCC" = yes; then
3525     CFLAGS="-g -O2"
3526   else
3527     CFLAGS="-g"
3528   fi
3529 else
3530   if test "$GCC" = yes; then
3531     CFLAGS="-O2"
3532   else
3533     CFLAGS=
3534   fi
3535 fi
3536
3537 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3538 if test "${with_gnu_ld+set}" = set; then
3539   withval="$with_gnu_ld"
3540   test "$withval" = no || with_gnu_ld=yes
3541 else
3542   with_gnu_ld=no
3543 fi
3544
3545 ac_prog=ld
3546 if test "$GCC" = yes; then
3547   # Check if gcc -print-prog-name=ld gives a path.
3548   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3549 echo "configure:3550: checking for ld used by GCC" >&5
3550   case $host in
3551   *-*-mingw*)
3552     # gcc leaves a trailing carriage return which upsets mingw
3553     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3554   *)
3555     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3556   esac
3557   case $ac_prog in
3558     # Accept absolute paths.
3559     [\\/]* | [A-Za-z]:[\\/]*)
3560       re_direlt='/[^/][^/]*/\.\./'
3561       # Canonicalize the path of ld
3562       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3563       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3564         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3565       done
3566       test -z "$LD" && LD="$ac_prog"
3567       ;;
3568   "")
3569     # If it fails, then pretend we aren't using GCC.
3570     ac_prog=ld
3571     ;;
3572   *)
3573     # If it is relative, then search for the first ld in PATH.
3574     with_gnu_ld=unknown
3575     ;;
3576   esac
3577 elif test "$with_gnu_ld" = yes; then
3578   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3579 echo "configure:3580: checking for GNU ld" >&5
3580 else
3581   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3582 echo "configure:3583: checking for non-GNU ld" >&5
3583 fi
3584 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3585   echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587   if test -z "$LD"; then
3588   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3589   for ac_dir in $PATH; do
3590     test -z "$ac_dir" && ac_dir=.
3591     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3592       lt_cv_path_LD="$ac_dir/$ac_prog"
3593       # Check to see if the program is GNU ld.  I'd rather use --version,
3594       # but apparently some GNU ld's only accept -v.
3595       # Break only if it was the GNU/non-GNU ld that we prefer.
3596       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3597         test "$with_gnu_ld" != no && break
3598       else
3599         test "$with_gnu_ld" != yes && break
3600       fi
3601     fi
3602   done
3603   IFS="$ac_save_ifs"
3604 else
3605   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3606 fi
3607 fi
3608
3609 LD="$lt_cv_path_LD"
3610 if test -n "$LD"; then
3611   echo "$ac_t""$LD" 1>&6
3612 else
3613   echo "$ac_t""no" 1>&6
3614 fi
3615 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3616 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3617 echo "configure:3618: checking if the linker ($LD) is GNU ld" >&5
3618 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3619   echo $ac_n "(cached) $ac_c" 1>&6
3620 else
3621   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3622 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3623   lt_cv_prog_gnu_ld=yes
3624 else
3625   lt_cv_prog_gnu_ld=no
3626 fi
3627 fi
3628
3629 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3630 with_gnu_ld=$lt_cv_prog_gnu_ld
3631
3632
3633 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3634 echo "configure:3635: checking for $LD option to reload object files" >&5
3635 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   lt_cv_ld_reload_flag='-r'
3639 fi
3640
3641 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3642 reload_flag=$lt_cv_ld_reload_flag
3643 test -n "$reload_flag" && reload_flag=" $reload_flag"
3644
3645 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3646 echo "configure:3647: checking for BSD-compatible nm" >&5
3647 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   if test -n "$NM"; then
3651   # Let the user override the test.
3652   lt_cv_path_NM="$NM"
3653 else
3654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3655   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3656     test -z "$ac_dir" && ac_dir=.
3657     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3658     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3659       # Check to see if the nm accepts a BSD-compat flag.
3660       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3661       #   nm: unknown option "B" ignored
3662       # Tru64's nm complains that /dev/null is an invalid object file
3663       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3664         lt_cv_path_NM="$tmp_nm -B"
3665         break
3666       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3667         lt_cv_path_NM="$tmp_nm -p"
3668         break
3669       else
3670         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3671         continue # so that we can try to find one that supports BSD flags
3672       fi
3673     fi
3674   done
3675   IFS="$ac_save_ifs"
3676   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3677 fi
3678 fi
3679
3680 NM="$lt_cv_path_NM"
3681 echo "$ac_t""$NM" 1>&6
3682
3683 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3684 echo "configure:3685: checking whether ln -s works" >&5
3685 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3686   echo $ac_n "(cached) $ac_c" 1>&6
3687 else
3688   rm -f conftestdata
3689 if ln -s X conftestdata 2>/dev/null
3690 then
3691   rm -f conftestdata
3692   ac_cv_prog_LN_S="ln -s"
3693 else
3694   ac_cv_prog_LN_S=ln
3695 fi
3696 fi
3697 LN_S="$ac_cv_prog_LN_S"
3698 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3699   echo "$ac_t""yes" 1>&6
3700 else
3701   echo "$ac_t""no" 1>&6
3702 fi
3703
3704 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3705 echo "configure:3706: checking how to recognise dependant libraries" >&5
3706 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3707   echo $ac_n "(cached) $ac_c" 1>&6
3708 else
3709   lt_cv_file_magic_cmd='$MAGIC_CMD'
3710 lt_cv_file_magic_test_file=
3711 lt_cv_deplibs_check_method='unknown'
3712 # Need to set the preceding variable on all platforms that support
3713 # interlibrary dependencies.
3714 # 'none' -- dependencies not supported.
3715 # `unknown' -- same as none, but documents that we really don't know.
3716 # 'pass_all' -- all dependencies passed with no checks.
3717 # 'test_compile' -- check by making test program.
3718 # 'file_magic [[regex]]' -- check by looking for files in library path
3719 # which responds to the $file_magic_cmd with a given egrep regex.
3720 # If you have `file' or equivalent on your system and you're not sure
3721 # whether `pass_all' will *always* work, you probably want this one.
3722
3723 case $host_os in
3724 aix4* | aix5*)
3725   lt_cv_deplibs_check_method=pass_all
3726   ;;
3727
3728 beos*)
3729   lt_cv_deplibs_check_method=pass_all
3730   ;;
3731
3732 bsdi4*)
3733   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3734   lt_cv_file_magic_cmd='/usr/bin/file -L'
3735   lt_cv_file_magic_test_file=/shlib/libc.so
3736   ;;
3737
3738 cygwin* | mingw* | pw32*)
3739   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3740   lt_cv_file_magic_cmd='$OBJDUMP -f'
3741   ;;
3742
3743 darwin* | rhapsody*)
3744   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3745   lt_cv_file_magic_cmd='/usr/bin/file -L'
3746   case "$host_os" in
3747   rhapsody* | darwin1.[012])
3748     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3749     ;;
3750   *) # Darwin 1.3 on
3751     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3752     ;;
3753   esac
3754   ;;
3755
3756 freebsd*)
3757   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3758     case $host_cpu in
3759     i*86 )
3760       # Not sure whether the presence of OpenBSD here was a mistake.
3761       # Let's accept both of them until this is cleared up.
3762       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3763       lt_cv_file_magic_cmd=/usr/bin/file
3764       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3765       ;;
3766     esac
3767   else
3768     lt_cv_deplibs_check_method=pass_all
3769   fi
3770   ;;
3771
3772 gnu*)
3773   lt_cv_deplibs_check_method=pass_all
3774   ;;
3775
3776 hpux10.20*|hpux11*)
3777   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3778   lt_cv_file_magic_cmd=/usr/bin/file
3779   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3780   ;;
3781
3782 irix5* | irix6*)
3783   case $host_os in
3784   irix5*)
3785     # this will be overridden with pass_all, but let us keep it just in case
3786     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3787     ;;
3788   *)
3789     case $LD in
3790     *-32|*"-32 ") libmagic=32-bit;;
3791     *-n32|*"-n32 ") libmagic=N32;;
3792     *-64|*"-64 ") libmagic=64-bit;;
3793     *) libmagic=never-match;;
3794     esac
3795     # this will be overridden with pass_all, but let us keep it just in case
3796     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3797     ;;
3798   esac
3799   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3800   lt_cv_deplibs_check_method=pass_all
3801   ;;
3802
3803 # This must be Linux ELF.
3804 linux-gnu*)
3805   case $host_cpu in
3806   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3807     lt_cv_deplibs_check_method=pass_all ;;
3808   *)
3809     # glibc up to 2.1.1 does not perform some relocations on ARM
3810     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3811   esac
3812   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3813   ;;
3814
3815 netbsd*)
3816   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3817     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3818   else
3819     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3820   fi
3821   ;;
3822
3823 newos6*)
3824   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3825   lt_cv_file_magic_cmd=/usr/bin/file
3826   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3827   ;;
3828
3829 openbsd*)
3830   lt_cv_file_magic_cmd=/usr/bin/file
3831   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3832   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3833     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3834   else
3835     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3836   fi
3837   ;;
3838
3839 osf3* | osf4* | osf5*)
3840   # this will be overridden with pass_all, but let us keep it just in case
3841   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3842   lt_cv_file_magic_test_file=/shlib/libc.so
3843   lt_cv_deplibs_check_method=pass_all
3844   ;;
3845
3846 sco3.2v5*)
3847   lt_cv_deplibs_check_method=pass_all
3848   ;;
3849
3850 solaris*)
3851   lt_cv_deplibs_check_method=pass_all
3852   lt_cv_file_magic_test_file=/lib/libc.so
3853   ;;
3854
3855 sysv5uw[78]* | sysv4*uw2*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3860   case $host_vendor in
3861   motorola)
3862     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]'
3863     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3864     ;;
3865   ncr)
3866     lt_cv_deplibs_check_method=pass_all
3867     ;;
3868   sequent)
3869     lt_cv_file_magic_cmd='/bin/file'
3870     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3871     ;;
3872   sni)
3873     lt_cv_file_magic_cmd='/bin/file'
3874     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3875     lt_cv_file_magic_test_file=/lib/libc.so
3876     ;;
3877   esac
3878   ;;
3879 esac
3880
3881 fi
3882
3883 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3884 file_magic_cmd=$lt_cv_file_magic_cmd
3885 deplibs_check_method=$lt_cv_deplibs_check_method
3886
3887 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3888 echo "configure:3889: checking for object suffix" >&5
3889 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3890   echo $ac_n "(cached) $ac_c" 1>&6
3891 else
3892   rm -f conftest*
3893 echo 'int i = 1;' > conftest.$ac_ext
3894 if { (eval echo configure:3895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3895   for ac_file in conftest.*; do
3896     case $ac_file in
3897     *.c) ;;
3898     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3899     esac
3900   done
3901 else
3902   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3903 fi
3904 rm -f conftest*
3905 fi
3906
3907 echo "$ac_t""$ac_cv_objext" 1>&6
3908 OBJEXT=$ac_cv_objext
3909 ac_objext=$ac_cv_objext
3910
3911
3912
3913
3914 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3915 echo "configure:3916: checking for executable suffix" >&5
3916 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3917   echo $ac_n "(cached) $ac_c" 1>&6
3918 else
3919   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3920   ac_cv_exeext=.exe
3921 else
3922   rm -f conftest*
3923   echo 'int main () { return 0; }' > conftest.$ac_ext
3924   ac_cv_exeext=
3925   if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3926     for file in conftest.*; do
3927       case $file in
3928       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3929       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3930       esac
3931     done
3932   else
3933     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3934   fi
3935   rm -f conftest*
3936   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3937 fi
3938 fi
3939
3940 EXEEXT=""
3941 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3942 echo "$ac_t""${ac_cv_exeext}" 1>&6
3943 ac_exeext=$EXEEXT
3944
3945 if test $host != $build; then
3946   ac_tool_prefix=${host_alias}-
3947 else
3948   ac_tool_prefix=
3949 fi
3950
3951
3952
3953
3954 # Check for command to grab the raw symbol name followed by C symbol from nm.
3955 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3956 echo "configure:3957: checking command to parse $NM output" >&5
3957 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3958   echo $ac_n "(cached) $ac_c" 1>&6
3959 else
3960   
3961 # These are sane defaults that work on at least a few old systems.
3962 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3963
3964 # Character class describing NM global symbol codes.
3965 symcode='[BCDEGRST]'
3966
3967 # Regexp to match symbols that can be accessed directly from C.
3968 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3969
3970 # Transform the above into a raw symbol and a C symbol.
3971 symxfrm='\1 \2\3 \3'
3972
3973 # Transform an extracted symbol line into a proper C declaration
3974 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3975
3976 # Transform an extracted symbol line into symbol name and symbol address
3977 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'"
3978
3979 # Define system-specific variables.
3980 case $host_os in
3981 aix*)
3982   symcode='[BCDT]'
3983   ;;
3984 cygwin* | mingw* | pw32*)
3985   symcode='[ABCDGISTW]'
3986   ;;
3987 hpux*) # Its linker distinguishes data from code symbols
3988   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3989   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'"
3990   ;;
3991 irix*)
3992   symcode='[BCDEGRST]'
3993   ;;
3994 solaris* | sysv5*)
3995   symcode='[BDT]'
3996   ;;
3997 sysv4)
3998   symcode='[DFNSTU]'
3999   ;;
4000 esac
4001
4002 # Handle CRLF in mingw tool chain
4003 opt_cr=
4004 case $host_os in
4005 mingw*)
4006   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4007   ;;
4008 esac
4009
4010 # If we're using GNU nm, then use its standard symbol codes.
4011 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4012   symcode='[ABCDGISTW]'
4013 fi
4014
4015 # Try without a prefix undercore, then with it.
4016 for ac_symprfx in "" "_"; do
4017
4018   # Write the raw and C identifiers.
4019 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4020
4021   # Check to see that the pipe works correctly.
4022   pipe_works=no
4023   rm -f conftest*
4024   cat > conftest.$ac_ext <<EOF
4025 #ifdef __cplusplus
4026 extern "C" {
4027 #endif
4028 char nm_test_var;
4029 void nm_test_func(){}
4030 #ifdef __cplusplus
4031 }
4032 #endif
4033 int main(){nm_test_var='a';nm_test_func();return(0);}
4034 EOF
4035
4036   if { (eval echo configure:4037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4037     # Now try to grab the symbols.
4038     nlist=conftest.nm
4039     if { (eval echo configure:4040: \"$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
4040       # Try sorting and uniquifying the output.
4041       if sort "$nlist" | uniq > "$nlist"T; then
4042         mv -f "$nlist"T "$nlist"
4043       else
4044         rm -f "$nlist"T
4045       fi
4046
4047       # Make sure that we snagged all the symbols we need.
4048       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4049         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4050           cat <<EOF > conftest.$ac_ext
4051 #ifdef __cplusplus
4052 extern "C" {
4053 #endif
4054
4055 EOF
4056           # Now generate the symbol file.
4057           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4058
4059           cat <<EOF >> conftest.$ac_ext
4060 #if defined (__STDC__) && __STDC__
4061 # define lt_ptr void *
4062 #else
4063 # define lt_ptr char *
4064 # define const
4065 #endif
4066
4067 /* The mapping between symbol names and symbols. */
4068 const struct {
4069   const char *name;
4070   lt_ptr address;
4071 }
4072 lt_preloaded_symbols[] =
4073 {
4074 EOF
4075           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4076           cat <<\EOF >> conftest.$ac_ext
4077   {0, (lt_ptr) 0}
4078 };
4079
4080 #ifdef __cplusplus
4081 }
4082 #endif
4083 EOF
4084           # Now try linking the two files.
4085           mv conftest.$ac_objext conftstm.$ac_objext
4086           save_LIBS="$LIBS"
4087           save_CFLAGS="$CFLAGS"
4088           LIBS="conftstm.$ac_objext"
4089           CFLAGS="$CFLAGS$no_builtin_flag"
4090           if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4091             pipe_works=yes
4092           fi
4093           LIBS="$save_LIBS"
4094           CFLAGS="$save_CFLAGS"
4095         else
4096           echo "cannot find nm_test_func in $nlist" >&5
4097         fi
4098       else
4099         echo "cannot find nm_test_var in $nlist" >&5
4100       fi
4101     else
4102       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4103     fi
4104   else
4105     echo "$progname: failed program was:" >&5
4106     cat conftest.$ac_ext >&5
4107   fi
4108   rm -f conftest* conftst*
4109
4110   # Do not use the global_symbol_pipe unless it works.
4111   if test "$pipe_works" = yes; then
4112     break
4113   else
4114     lt_cv_sys_global_symbol_pipe=
4115   fi
4116 done
4117
4118 fi
4119
4120 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4121 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4122   global_symbol_to_cdecl=
4123   global_symbol_to_c_name_address=
4124 else
4125   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4126   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4127 fi
4128 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4129 then
4130   echo "$ac_t""failed" 1>&6
4131 else
4132   echo "$ac_t""ok" 1>&6
4133 fi
4134
4135 for ac_hdr in dlfcn.h
4136 do
4137 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4138 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4139 echo "configure:4140: checking for $ac_hdr" >&5
4140 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   cat > conftest.$ac_ext <<EOF
4144 #line 4145 "configure"
4145 #include "confdefs.h"
4146 #include <$ac_hdr>
4147 EOF
4148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4149 { (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4151 if test -z "$ac_err"; then
4152   rm -rf conftest*
4153   eval "ac_cv_header_$ac_safe=yes"
4154 else
4155   echo "$ac_err" >&5
4156   echo "configure: failed program was:" >&5
4157   cat conftest.$ac_ext >&5
4158   rm -rf conftest*
4159   eval "ac_cv_header_$ac_safe=no"
4160 fi
4161 rm -f conftest*
4162 fi
4163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4164   echo "$ac_t""yes" 1>&6
4165     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4166   cat >> confdefs.h <<EOF
4167 #define $ac_tr_hdr 1
4168 EOF
4169  
4170 else
4171   echo "$ac_t""no" 1>&6
4172 fi
4173 done
4174
4175
4176
4177
4178
4179 # Only perform the check for file, if the check method requires it
4180 case $deplibs_check_method in
4181 file_magic*)
4182   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4183     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4184 echo "configure:4185: checking for ${ac_tool_prefix}file" >&5
4185 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   case $MAGIC_CMD in
4189   /*)
4190   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4191   ;;
4192   ?:/*)
4193   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4194   ;;
4195   *)
4196   ac_save_MAGIC_CMD="$MAGIC_CMD"
4197   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4198   ac_dummy="/usr/bin:$PATH"
4199   for ac_dir in $ac_dummy; do
4200     test -z "$ac_dir" && ac_dir=.
4201     if test -f $ac_dir/${ac_tool_prefix}file; then
4202       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4203       if test -n "$file_magic_test_file"; then
4204         case $deplibs_check_method in
4205         "file_magic "*)
4206           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4207           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4208           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4209             egrep "$file_magic_regex" > /dev/null; then
4210             :
4211           else
4212             cat <<EOF 1>&2
4213
4214 *** Warning: the command libtool uses to detect shared libraries,
4215 *** $file_magic_cmd, produces output that libtool cannot recognize.
4216 *** The result is that libtool may fail to recognize shared libraries
4217 *** as such.  This will affect the creation of libtool libraries that
4218 *** depend on shared libraries, but programs linked with such libtool
4219 *** libraries will work regardless of this problem.  Nevertheless, you
4220 *** may want to report the problem to your system manager and/or to
4221 *** bug-libtool@gnu.org
4222
4223 EOF
4224           fi ;;
4225         esac
4226       fi
4227       break
4228     fi
4229   done
4230   IFS="$ac_save_ifs"
4231   MAGIC_CMD="$ac_save_MAGIC_CMD"
4232   ;;
4233 esac
4234 fi
4235
4236 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4237 if test -n "$MAGIC_CMD"; then
4238   echo "$ac_t""$MAGIC_CMD" 1>&6
4239 else
4240   echo "$ac_t""no" 1>&6
4241 fi
4242
4243 if test -z "$lt_cv_path_MAGIC_CMD"; then
4244   if test -n "$ac_tool_prefix"; then
4245     echo $ac_n "checking for file""... $ac_c" 1>&6
4246 echo "configure:4247: checking for file" >&5
4247 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4248   echo $ac_n "(cached) $ac_c" 1>&6
4249 else
4250   case $MAGIC_CMD in
4251   /*)
4252   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4253   ;;
4254   ?:/*)
4255   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4256   ;;
4257   *)
4258   ac_save_MAGIC_CMD="$MAGIC_CMD"
4259   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4260   ac_dummy="/usr/bin:$PATH"
4261   for ac_dir in $ac_dummy; do
4262     test -z "$ac_dir" && ac_dir=.
4263     if test -f $ac_dir/file; then
4264       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4265       if test -n "$file_magic_test_file"; then
4266         case $deplibs_check_method in
4267         "file_magic "*)
4268           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4269           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4270           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4271             egrep "$file_magic_regex" > /dev/null; then
4272             :
4273           else
4274             cat <<EOF 1>&2
4275
4276 *** Warning: the command libtool uses to detect shared libraries,
4277 *** $file_magic_cmd, produces output that libtool cannot recognize.
4278 *** The result is that libtool may fail to recognize shared libraries
4279 *** as such.  This will affect the creation of libtool libraries that
4280 *** depend on shared libraries, but programs linked with such libtool
4281 *** libraries will work regardless of this problem.  Nevertheless, you
4282 *** may want to report the problem to your system manager and/or to
4283 *** bug-libtool@gnu.org
4284
4285 EOF
4286           fi ;;
4287         esac
4288       fi
4289       break
4290     fi
4291   done
4292   IFS="$ac_save_ifs"
4293   MAGIC_CMD="$ac_save_MAGIC_CMD"
4294   ;;
4295 esac
4296 fi
4297
4298 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4299 if test -n "$MAGIC_CMD"; then
4300   echo "$ac_t""$MAGIC_CMD" 1>&6
4301 else
4302   echo "$ac_t""no" 1>&6
4303 fi
4304
4305   else
4306     MAGIC_CMD=:
4307   fi
4308 fi
4309
4310   fi
4311   ;;
4312 esac
4313
4314 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4315 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4317 echo "configure:4318: checking for $ac_word" >&5
4318 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4319   echo $ac_n "(cached) $ac_c" 1>&6
4320 else
4321   if test -n "$RANLIB"; then
4322   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4323 else
4324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4325   ac_dummy="$PATH"
4326   for ac_dir in $ac_dummy; do
4327     test -z "$ac_dir" && ac_dir=.
4328     if test -f $ac_dir/$ac_word; then
4329       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4330       break
4331     fi
4332   done
4333   IFS="$ac_save_ifs"
4334 fi
4335 fi
4336 RANLIB="$ac_cv_prog_RANLIB"
4337 if test -n "$RANLIB"; then
4338   echo "$ac_t""$RANLIB" 1>&6
4339 else
4340   echo "$ac_t""no" 1>&6
4341 fi
4342
4343
4344 if test -z "$ac_cv_prog_RANLIB"; then
4345 if test -n "$ac_tool_prefix"; then
4346   # Extract the first word of "ranlib", so it can be a program name with args.
4347 set dummy ranlib; ac_word=$2
4348 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4349 echo "configure:4350: checking for $ac_word" >&5
4350 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4351   echo $ac_n "(cached) $ac_c" 1>&6
4352 else
4353   if test -n "$RANLIB"; then
4354   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4355 else
4356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4357   ac_dummy="$PATH"
4358   for ac_dir in $ac_dummy; do
4359     test -z "$ac_dir" && ac_dir=.
4360     if test -f $ac_dir/$ac_word; then
4361       ac_cv_prog_RANLIB="ranlib"
4362       break
4363     fi
4364   done
4365   IFS="$ac_save_ifs"
4366   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4367 fi
4368 fi
4369 RANLIB="$ac_cv_prog_RANLIB"
4370 if test -n "$RANLIB"; then
4371   echo "$ac_t""$RANLIB" 1>&6
4372 else
4373   echo "$ac_t""no" 1>&6
4374 fi
4375
4376 else
4377   RANLIB=":"
4378 fi
4379 fi
4380
4381 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4382 set dummy ${ac_tool_prefix}strip; ac_word=$2
4383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4384 echo "configure:4385: checking for $ac_word" >&5
4385 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   if test -n "$STRIP"; then
4389   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4390 else
4391   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4392   ac_dummy="$PATH"
4393   for ac_dir in $ac_dummy; do
4394     test -z "$ac_dir" && ac_dir=.
4395     if test -f $ac_dir/$ac_word; then
4396       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4397       break
4398     fi
4399   done
4400   IFS="$ac_save_ifs"
4401 fi
4402 fi
4403 STRIP="$ac_cv_prog_STRIP"
4404 if test -n "$STRIP"; then
4405   echo "$ac_t""$STRIP" 1>&6
4406 else
4407   echo "$ac_t""no" 1>&6
4408 fi
4409
4410
4411 if test -z "$ac_cv_prog_STRIP"; then
4412 if test -n "$ac_tool_prefix"; then
4413   # Extract the first word of "strip", so it can be a program name with args.
4414 set dummy strip; ac_word=$2
4415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4416 echo "configure:4417: checking for $ac_word" >&5
4417 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4418   echo $ac_n "(cached) $ac_c" 1>&6
4419 else
4420   if test -n "$STRIP"; then
4421   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4422 else
4423   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4424   ac_dummy="$PATH"
4425   for ac_dir in $ac_dummy; do
4426     test -z "$ac_dir" && ac_dir=.
4427     if test -f $ac_dir/$ac_word; then
4428       ac_cv_prog_STRIP="strip"
4429       break
4430     fi
4431   done
4432   IFS="$ac_save_ifs"
4433   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4434 fi
4435 fi
4436 STRIP="$ac_cv_prog_STRIP"
4437 if test -n "$STRIP"; then
4438   echo "$ac_t""$STRIP" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443 else
4444   STRIP=":"
4445 fi
4446 fi
4447
4448
4449 enable_dlopen=yes
4450 enable_win32_dll=yes
4451
4452 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4453 if test "${enable_libtool_lock+set}" = set; then
4454   enableval="$enable_libtool_lock"
4455   :
4456 fi
4457
4458 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4459
4460 # Some flags need to be propagated to the compiler or linker for good
4461 # libtool support.
4462 case $host in
4463 *-*-irix6*)
4464   # Find out which ABI we are using.
4465   echo '#line 4466 "configure"' > conftest.$ac_ext
4466   if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4467     case `/usr/bin/file conftest.$ac_objext` in
4468     *32-bit*)
4469       LD="${LD-ld} -32"
4470       ;;
4471     *N32*)
4472       LD="${LD-ld} -n32"
4473       ;;
4474     *64-bit*)
4475       LD="${LD-ld} -64"
4476       ;;
4477     esac
4478   fi
4479   rm -rf conftest*
4480   ;;
4481
4482 *-*-sco3.2v5*)
4483   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4484   SAVE_CFLAGS="$CFLAGS"
4485   CFLAGS="$CFLAGS -belf"
4486   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4487 echo "configure:4488: checking whether the C compiler needs -belf" >&5
4488 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   
4492      ac_ext=c
4493 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4494 ac_cpp='$CPP $CPPFLAGS'
4495 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4496 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4497 cross_compiling=$ac_cv_prog_cc_cross
4498
4499      cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502
4503 int main() {
4504
4505 ; return 0; }
4506 EOF
4507 if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4508   rm -rf conftest*
4509   lt_cv_cc_needs_belf=yes
4510 else
4511   echo "configure: failed program was:" >&5
4512   cat conftest.$ac_ext >&5
4513   rm -rf conftest*
4514   lt_cv_cc_needs_belf=no
4515 fi
4516 rm -f conftest*
4517      ac_ext=c
4518 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4519 ac_cpp='$CPP $CPPFLAGS'
4520 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4521 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4522 cross_compiling=$ac_cv_prog_cc_cross
4523
4524 fi
4525
4526 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4527   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4528     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4529     CFLAGS="$SAVE_CFLAGS"
4530   fi
4531   ;;
4532
4533 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4534   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4535 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4536 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4537 echo "configure:4538: checking for $ac_word" >&5
4538 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4539   echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541   if test -n "$DLLTOOL"; then
4542   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4543 else
4544   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4545   ac_dummy="$PATH"
4546   for ac_dir in $ac_dummy; do
4547     test -z "$ac_dir" && ac_dir=.
4548     if test -f $ac_dir/$ac_word; then
4549       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4550       break
4551     fi
4552   done
4553   IFS="$ac_save_ifs"
4554 fi
4555 fi
4556 DLLTOOL="$ac_cv_prog_DLLTOOL"
4557 if test -n "$DLLTOOL"; then
4558   echo "$ac_t""$DLLTOOL" 1>&6
4559 else
4560   echo "$ac_t""no" 1>&6
4561 fi
4562
4563
4564 if test -z "$ac_cv_prog_DLLTOOL"; then
4565 if test -n "$ac_tool_prefix"; then
4566   # Extract the first word of "dlltool", so it can be a program name with args.
4567 set dummy dlltool; ac_word=$2
4568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4569 echo "configure:4570: checking for $ac_word" >&5
4570 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4571   echo $ac_n "(cached) $ac_c" 1>&6
4572 else
4573   if test -n "$DLLTOOL"; then
4574   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4575 else
4576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4577   ac_dummy="$PATH"
4578   for ac_dir in $ac_dummy; do
4579     test -z "$ac_dir" && ac_dir=.
4580     if test -f $ac_dir/$ac_word; then
4581       ac_cv_prog_DLLTOOL="dlltool"
4582       break
4583     fi
4584   done
4585   IFS="$ac_save_ifs"
4586   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4587 fi
4588 fi
4589 DLLTOOL="$ac_cv_prog_DLLTOOL"
4590 if test -n "$DLLTOOL"; then
4591   echo "$ac_t""$DLLTOOL" 1>&6
4592 else
4593   echo "$ac_t""no" 1>&6
4594 fi
4595
4596 else
4597   DLLTOOL="false"
4598 fi
4599 fi
4600
4601   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4602 set dummy ${ac_tool_prefix}as; ac_word=$2
4603 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4604 echo "configure:4605: checking for $ac_word" >&5
4605 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4606   echo $ac_n "(cached) $ac_c" 1>&6
4607 else
4608   if test -n "$AS"; then
4609   ac_cv_prog_AS="$AS" # Let the user override the test.
4610 else
4611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4612   ac_dummy="$PATH"
4613   for ac_dir in $ac_dummy; do
4614     test -z "$ac_dir" && ac_dir=.
4615     if test -f $ac_dir/$ac_word; then
4616       ac_cv_prog_AS="${ac_tool_prefix}as"
4617       break
4618     fi
4619   done
4620   IFS="$ac_save_ifs"
4621 fi
4622 fi
4623 AS="$ac_cv_prog_AS"
4624 if test -n "$AS"; then
4625   echo "$ac_t""$AS" 1>&6
4626 else
4627   echo "$ac_t""no" 1>&6
4628 fi
4629
4630
4631 if test -z "$ac_cv_prog_AS"; then
4632 if test -n "$ac_tool_prefix"; then
4633   # Extract the first word of "as", so it can be a program name with args.
4634 set dummy as; ac_word=$2
4635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4636 echo "configure:4637: checking for $ac_word" >&5
4637 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4638   echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640   if test -n "$AS"; then
4641   ac_cv_prog_AS="$AS" # Let the user override the test.
4642 else
4643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4644   ac_dummy="$PATH"
4645   for ac_dir in $ac_dummy; do
4646     test -z "$ac_dir" && ac_dir=.
4647     if test -f $ac_dir/$ac_word; then
4648       ac_cv_prog_AS="as"
4649       break
4650     fi
4651   done
4652   IFS="$ac_save_ifs"
4653   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4654 fi
4655 fi
4656 AS="$ac_cv_prog_AS"
4657 if test -n "$AS"; then
4658   echo "$ac_t""$AS" 1>&6
4659 else
4660   echo "$ac_t""no" 1>&6
4661 fi
4662
4663 else
4664   AS="false"
4665 fi
4666 fi
4667
4668   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4669 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4671 echo "configure:4672: checking for $ac_word" >&5
4672 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4673   echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675   if test -n "$OBJDUMP"; then
4676   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4677 else
4678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4679   ac_dummy="$PATH"
4680   for ac_dir in $ac_dummy; do
4681     test -z "$ac_dir" && ac_dir=.
4682     if test -f $ac_dir/$ac_word; then
4683       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4684       break
4685     fi
4686   done
4687   IFS="$ac_save_ifs"
4688 fi
4689 fi
4690 OBJDUMP="$ac_cv_prog_OBJDUMP"
4691 if test -n "$OBJDUMP"; then
4692   echo "$ac_t""$OBJDUMP" 1>&6
4693 else
4694   echo "$ac_t""no" 1>&6
4695 fi
4696
4697
4698 if test -z "$ac_cv_prog_OBJDUMP"; then
4699 if test -n "$ac_tool_prefix"; then
4700   # Extract the first word of "objdump", so it can be a program name with args.
4701 set dummy objdump; ac_word=$2
4702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4703 echo "configure:4704: checking for $ac_word" >&5
4704 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4705   echo $ac_n "(cached) $ac_c" 1>&6
4706 else
4707   if test -n "$OBJDUMP"; then
4708   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4709 else
4710   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4711   ac_dummy="$PATH"
4712   for ac_dir in $ac_dummy; do
4713     test -z "$ac_dir" && ac_dir=.
4714     if test -f $ac_dir/$ac_word; then
4715       ac_cv_prog_OBJDUMP="objdump"
4716       break
4717     fi
4718   done
4719   IFS="$ac_save_ifs"
4720   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4721 fi
4722 fi
4723 OBJDUMP="$ac_cv_prog_OBJDUMP"
4724 if test -n "$OBJDUMP"; then
4725   echo "$ac_t""$OBJDUMP" 1>&6
4726 else
4727   echo "$ac_t""no" 1>&6
4728 fi
4729
4730 else
4731   OBJDUMP="false"
4732 fi
4733 fi
4734
4735
4736   # recent cygwin and mingw systems supply a stub DllMain which the user
4737   # can override, but on older systems we have to supply one
4738   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4739 echo "configure:4740: checking if libtool should supply DllMain function" >&5
4740 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4741   echo $ac_n "(cached) $ac_c" 1>&6
4742 else
4743   cat > conftest.$ac_ext <<EOF
4744 #line 4745 "configure"
4745 #include "confdefs.h"
4746
4747 int main() {
4748 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4749       DllMain (0, 0, 0);
4750 ; return 0; }
4751 EOF
4752 if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753   rm -rf conftest*
4754   lt_cv_need_dllmain=no
4755 else
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   lt_cv_need_dllmain=yes
4760 fi
4761 rm -f conftest*
4762 fi
4763
4764 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4765
4766   case $host/$CC in
4767   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4768     # old mingw systems require "-dll" to link a DLL, while more recent ones
4769     # require "-mdll"
4770     SAVE_CFLAGS="$CFLAGS"
4771     CFLAGS="$CFLAGS -mdll"
4772     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4773 echo "configure:4774: checking how to link DLLs" >&5
4774 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4775   echo $ac_n "(cached) $ac_c" 1>&6
4776 else
4777   cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780
4781 int main() {
4782
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   lt_cv_cc_dll_switch=-mdll
4788 else
4789   echo "configure: failed program was:" >&5
4790   cat conftest.$ac_ext >&5
4791   rm -rf conftest*
4792   lt_cv_cc_dll_switch=-dll
4793 fi
4794 rm -f conftest*
4795 fi
4796
4797 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4798     CFLAGS="$SAVE_CFLAGS" ;;
4799   *-*-cygwin* | *-*-pw32*)
4800     # cygwin systems need to pass --dll to the linker, and not link
4801     # crt.o which will require a WinMain@16 definition.
4802     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4803   esac
4804   ;;
4805   
4806 esac
4807
4808 # Sed substitution that helps us do robust quoting.  It backslashifies
4809 # metacharacters that are still active within double-quoted strings.
4810 Xsed='sed -e s/^X//'
4811 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4812
4813 # Same as above, but do not quote variable references.
4814 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4815
4816 # Sed substitution to delay expansion of an escaped shell variable in a
4817 # double_quote_subst'ed string.
4818 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4819
4820 # Constants:
4821 rm="rm -f"
4822
4823 # Global variables:
4824 default_ofile=libtool
4825 can_build_shared=yes
4826
4827 # All known linkers require a `.a' archive for static linking (except M$VC,
4828 # which needs '.lib').
4829 libext=a
4830 ltmain="$ac_aux_dir/ltmain.sh"
4831 ofile="$default_ofile"
4832 with_gnu_ld="$lt_cv_prog_gnu_ld"
4833 need_locks="$enable_libtool_lock"
4834
4835 old_CC="$CC"
4836 old_CFLAGS="$CFLAGS"
4837
4838 # Set sane defaults for various variables
4839 test -z "$AR" && AR=ar
4840 test -z "$AR_FLAGS" && AR_FLAGS=cru
4841 test -z "$AS" && AS=as
4842 test -z "$CC" && CC=cc
4843 test -z "$DLLTOOL" && DLLTOOL=dlltool
4844 test -z "$LD" && LD=ld
4845 test -z "$LN_S" && LN_S="ln -s"
4846 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4847 test -z "$NM" && NM=nm
4848 test -z "$OBJDUMP" && OBJDUMP=objdump
4849 test -z "$RANLIB" && RANLIB=:
4850 test -z "$STRIP" && STRIP=:
4851 test -z "$ac_objext" && ac_objext=o
4852
4853 if test x"$host" != x"$build"; then
4854   ac_tool_prefix=${host_alias}-
4855 else
4856   ac_tool_prefix=
4857 fi
4858
4859 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4860 case $host_os in
4861 linux-gnu*) ;;
4862 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4863 esac
4864
4865 case $host_os in
4866 aix3*)
4867   # AIX sometimes has problems with the GCC collect2 program.  For some
4868   # reason, if we set the COLLECT_NAMES environment variable, the problems
4869   # vanish in a puff of smoke.
4870   if test "X${COLLECT_NAMES+set}" != Xset; then
4871     COLLECT_NAMES=
4872     export COLLECT_NAMES
4873   fi
4874   ;;
4875 esac
4876
4877 # Determine commands to create old-style static archives.
4878 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4879 old_postinstall_cmds='chmod 644 $oldlib'
4880 old_postuninstall_cmds=
4881
4882 if test -n "$RANLIB"; then
4883   case $host_os in
4884   openbsd*)
4885     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4886     ;;
4887   *)
4888     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4889     ;;
4890   esac
4891   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4892 fi
4893
4894 # Allow CC to be a program name with arguments.
4895 set dummy $CC
4896 compiler="$2"
4897
4898 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4899 echo "configure:4900: checking for objdir" >&5
4900 rm -f .libs 2>/dev/null
4901 mkdir .libs 2>/dev/null
4902 if test -d .libs; then
4903   objdir=.libs
4904 else
4905   # MS-DOS does not allow filenames that begin with a dot.
4906   objdir=_libs
4907 fi
4908 rmdir .libs 2>/dev/null
4909 echo "$ac_t""$objdir" 1>&6
4910
4911
4912 # Check whether --with-pic or --without-pic was given.
4913 if test "${with_pic+set}" = set; then
4914   withval="$with_pic"
4915   pic_mode="$withval"
4916 else
4917   pic_mode=default
4918 fi
4919
4920 test -z "$pic_mode" && pic_mode=default
4921
4922 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4923 # in isolation, and that seeing it set (from the cache) indicates that
4924 # the associated values are set (in the cache) correctly too.
4925 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4926 echo "configure:4927: checking for $compiler option to produce PIC" >&5
4927 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4928   echo $ac_n "(cached) $ac_c" 1>&6
4929 else
4930    lt_cv_prog_cc_pic=
4931   lt_cv_prog_cc_shlib=
4932   lt_cv_prog_cc_wl=
4933   lt_cv_prog_cc_static=
4934   lt_cv_prog_cc_no_builtin=
4935   lt_cv_prog_cc_can_build_shared=$can_build_shared
4936
4937   if test "$GCC" = yes; then
4938     lt_cv_prog_cc_wl='-Wl,'
4939     lt_cv_prog_cc_static='-static'
4940
4941     case $host_os in
4942     aix*)
4943       # Below there is a dirty hack to force normal static linking with -ldl
4944       # The problem is because libdl dynamically linked with both libc and
4945       # libC (AIX C++ library), which obviously doesn't included in libraries
4946       # list by gcc. This cause undefined symbols with -static flags.
4947       # This hack allows C programs to be linked with "-static -ldl", but
4948       # not sure about C++ programs.
4949       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4950       ;;
4951     amigaos*)
4952       # FIXME: we need at least 68020 code to build shared libraries, but
4953       # adding the `-m68020' flag to GCC prevents building anything better,
4954       # like `-m68040'.
4955       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4956       ;;
4957     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4958       # PIC is the default for these OSes.
4959       ;;
4960     darwin* | rhapsody*)
4961       # PIC is the default on this platform
4962       # Common symbols not allowed in MH_DYLIB files
4963       lt_cv_prog_cc_pic='-fno-common'
4964       ;;
4965     cygwin* | mingw* | pw32* | os2*)
4966       # This hack is so that the source file can tell whether it is being
4967       # built for inclusion in a dll (and should export symbols for example).
4968       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4969       ;;
4970     sysv4*MP*)
4971       if test -d /usr/nec; then
4972          lt_cv_prog_cc_pic=-Kconform_pic
4973       fi
4974       ;;
4975     *)
4976       lt_cv_prog_cc_pic='-fPIC'
4977       ;;
4978     esac
4979   else
4980     # PORTME Check for PIC flags for the system compiler.
4981     case $host_os in
4982     aix3* | aix4* | aix5*)
4983       lt_cv_prog_cc_wl='-Wl,'
4984       # All AIX code is PIC.
4985       if test "$host_cpu" = ia64; then
4986         # AIX 5 now supports IA64 processor
4987         lt_cv_prog_cc_static='-Bstatic'
4988       else
4989         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4990       fi
4991       ;;
4992
4993     hpux9* | hpux10* | hpux11*)
4994       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4995       lt_cv_prog_cc_wl='-Wl,'
4996       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4997       lt_cv_prog_cc_pic='+Z'
4998       ;;
4999
5000     irix5* | irix6*)
5001       lt_cv_prog_cc_wl='-Wl,'
5002       lt_cv_prog_cc_static='-non_shared'
5003       # PIC (with -KPIC) is the default.
5004       ;;
5005
5006     cygwin* | mingw* | pw32* | os2*)
5007       # This hack is so that the source file can tell whether it is being
5008       # built for inclusion in a dll (and should export symbols for example).
5009       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5010       ;;
5011
5012     newsos6)
5013       lt_cv_prog_cc_pic='-KPIC'
5014       lt_cv_prog_cc_static='-Bstatic'
5015       ;;
5016
5017     osf3* | osf4* | osf5*)
5018       # All OSF/1 code is PIC.
5019       lt_cv_prog_cc_wl='-Wl,'
5020       lt_cv_prog_cc_static='-non_shared'
5021       ;;
5022
5023     sco3.2v5*)
5024       lt_cv_prog_cc_pic='-Kpic'
5025       lt_cv_prog_cc_static='-dn'
5026       lt_cv_prog_cc_shlib='-belf'
5027       ;;
5028
5029     solaris*)
5030       lt_cv_prog_cc_pic='-KPIC'
5031       lt_cv_prog_cc_static='-Bstatic'
5032       lt_cv_prog_cc_wl='-Wl,'
5033       ;;
5034
5035     sunos4*)
5036       lt_cv_prog_cc_pic='-PIC'
5037       lt_cv_prog_cc_static='-Bstatic'
5038       lt_cv_prog_cc_wl='-Qoption ld '
5039       ;;
5040
5041     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5042       lt_cv_prog_cc_pic='-KPIC'
5043       lt_cv_prog_cc_static='-Bstatic'
5044       if test "x$host_vendor" = xsni; then
5045         lt_cv_prog_cc_wl='-LD'
5046       else
5047         lt_cv_prog_cc_wl='-Wl,'
5048       fi
5049       ;;
5050
5051     uts4*)
5052       lt_cv_prog_cc_pic='-pic'
5053       lt_cv_prog_cc_static='-Bstatic'
5054       ;;
5055
5056     sysv4*MP*)
5057       if test -d /usr/nec ;then
5058         lt_cv_prog_cc_pic='-Kconform_pic'
5059         lt_cv_prog_cc_static='-Bstatic'
5060       fi
5061       ;;
5062
5063     *)
5064       lt_cv_prog_cc_can_build_shared=no
5065       ;;
5066     esac
5067   fi
5068
5069 fi
5070
5071 if test -z "$lt_cv_prog_cc_pic"; then
5072   echo "$ac_t""none" 1>&6
5073 else
5074   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5075
5076   # Check to make sure the pic_flag actually works.
5077   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5078 echo "configure:5079: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5079   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5080   echo $ac_n "(cached) $ac_c" 1>&6
5081 else
5082       save_CFLAGS="$CFLAGS"
5083     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5084     cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5087
5088 int main() {
5089
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5093   rm -rf conftest*
5094         case $host_os in
5095       hpux9* | hpux10* | hpux11*)
5096         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5097         # they create non-PIC objects.  So, if there were any warnings, we
5098         # assume that PIC is not supported.
5099         if test -s conftest.err; then
5100           lt_cv_prog_cc_pic_works=no
5101         else
5102           lt_cv_prog_cc_pic_works=yes
5103         fi
5104         ;;
5105       *)
5106         lt_cv_prog_cc_pic_works=yes
5107         ;;
5108       esac
5109     
5110 else
5111   echo "configure: failed program was:" >&5
5112   cat conftest.$ac_ext >&5
5113   rm -rf conftest*
5114         lt_cv_prog_cc_pic_works=no
5115     
5116 fi
5117 rm -f conftest*
5118     CFLAGS="$save_CFLAGS"
5119   
5120 fi
5121
5122
5123   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5124     lt_cv_prog_cc_pic=
5125     lt_cv_prog_cc_can_build_shared=no
5126   else
5127     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5128   fi
5129
5130   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5131 fi
5132
5133 # Check for any special shared library compilation flags.
5134 if test -n "$lt_cv_prog_cc_shlib"; then
5135   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5136   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5137   else
5138    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5139     lt_cv_prog_cc_can_build_shared=no
5140   fi
5141 fi
5142
5143 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5144 echo "configure:5145: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5145 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5146   echo $ac_n "(cached) $ac_c" 1>&6
5147 else
5148     lt_cv_prog_cc_static_works=no
5149   save_LDFLAGS="$LDFLAGS"
5150   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5151   cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154
5155 int main() {
5156
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   lt_cv_prog_cc_static_works=yes
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165 fi
5166 rm -f conftest*
5167   LDFLAGS="$save_LDFLAGS"
5168
5169 fi
5170
5171
5172 # Belt *and* braces to stop my trousers falling down:
5173 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5174 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5175
5176 pic_flag="$lt_cv_prog_cc_pic"
5177 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5178 wl="$lt_cv_prog_cc_wl"
5179 link_static_flag="$lt_cv_prog_cc_static"
5180 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5181 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5182
5183
5184 # Check to see if options -o and -c are simultaneously supported by compiler
5185 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5186 echo "configure:5187: checking if $compiler supports -c -o file.$ac_objext" >&5
5187 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   
5191 $rm -r conftest 2>/dev/null
5192 mkdir conftest
5193 cd conftest
5194 echo "int some_variable = 0;" > conftest.$ac_ext
5195 mkdir out
5196 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5197 # that will create temporary files in the current directory regardless of
5198 # the output directory.  Thus, making CWD read-only will cause this test
5199 # to fail, enabling locking or at least warning the user not to do parallel
5200 # builds.
5201 chmod -w .
5202 save_CFLAGS="$CFLAGS"
5203 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5204 compiler_c_o=no
5205 if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5206   # The compiler can only warn and ignore the option if not recognized
5207   # So say no if there are warnings
5208   if test -s out/conftest.err; then
5209     lt_cv_compiler_c_o=no
5210   else
5211     lt_cv_compiler_c_o=yes
5212   fi
5213 else
5214   # Append any errors to the config.log.
5215   cat out/conftest.err 1>&5
5216   lt_cv_compiler_c_o=no
5217 fi
5218 CFLAGS="$save_CFLAGS"
5219 chmod u+w .
5220 $rm conftest* out/*
5221 rmdir out
5222 cd ..
5223 rmdir conftest
5224 $rm -r conftest 2>/dev/null
5225
5226 fi
5227
5228 compiler_c_o=$lt_cv_compiler_c_o
5229 echo "$ac_t""$compiler_c_o" 1>&6
5230
5231 if test x"$compiler_c_o" = x"yes"; then
5232   # Check to see if we can write to a .lo
5233   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5234 echo "configure:5235: checking if $compiler supports -c -o file.lo" >&5
5235   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   
5239   lt_cv_compiler_o_lo=no
5240   save_CFLAGS="$CFLAGS"
5241   CFLAGS="$CFLAGS -c -o conftest.lo"
5242   save_objext="$ac_objext"
5243   ac_objext=lo
5244   cat > conftest.$ac_ext <<EOF
5245 #line 5246 "configure"
5246 #include "confdefs.h"
5247
5248 int main() {
5249 int some_variable = 0;
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5253   rm -rf conftest*
5254       # The compiler can only warn and ignore the option if not recognized
5255     # So say no if there are warnings
5256     if test -s conftest.err; then
5257       lt_cv_compiler_o_lo=no
5258     else
5259       lt_cv_compiler_o_lo=yes
5260     fi
5261   
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265 fi
5266 rm -f conftest*
5267   ac_objext="$save_objext"
5268   CFLAGS="$save_CFLAGS"
5269   
5270 fi
5271
5272   compiler_o_lo=$lt_cv_compiler_o_lo
5273   echo "$ac_t""$compiler_o_lo" 1>&6
5274 else
5275   compiler_o_lo=no
5276 fi
5277
5278 # Check to see if we can do hard links to lock some files if needed
5279 hard_links="nottested"
5280 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5281   # do not overwrite the value of need_locks provided by the user
5282   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5283 echo "configure:5284: checking if we can lock with hard links" >&5
5284   hard_links=yes
5285   $rm conftest*
5286   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5287   touch conftest.a
5288   ln conftest.a conftest.b 2>&5 || hard_links=no
5289   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5290   echo "$ac_t""$hard_links" 1>&6
5291   if test "$hard_links" = no; then
5292     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5293     need_locks=warn
5294   fi
5295 else
5296   need_locks=no
5297 fi
5298
5299 if test "$GCC" = yes; then
5300   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5301   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5302 echo "configure:5303: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5303   echo "int some_variable = 0;" > conftest.$ac_ext
5304   save_CFLAGS="$CFLAGS"
5305   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5306   compiler_rtti_exceptions=no
5307   cat > conftest.$ac_ext <<EOF
5308 #line 5309 "configure"
5309 #include "confdefs.h"
5310
5311 int main() {
5312 int some_variable = 0;
5313 ; return 0; }
5314 EOF
5315 if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5316   rm -rf conftest*
5317       # The compiler can only warn and ignore the option if not recognized
5318     # So say no if there are warnings
5319     if test -s conftest.err; then
5320       compiler_rtti_exceptions=no
5321     else
5322       compiler_rtti_exceptions=yes
5323     fi
5324   
5325 else
5326   echo "configure: failed program was:" >&5
5327   cat conftest.$ac_ext >&5
5328 fi
5329 rm -f conftest*
5330   CFLAGS="$save_CFLAGS"
5331   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5332
5333   if test "$compiler_rtti_exceptions" = "yes"; then
5334     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5335   else
5336     no_builtin_flag=' -fno-builtin'
5337   fi
5338 fi
5339
5340 # See if the linker supports building shared libraries.
5341 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5342 echo "configure:5343: checking whether the linker ($LD) supports shared libraries" >&5
5343
5344 allow_undefined_flag=
5345 no_undefined_flag=
5346 need_lib_prefix=unknown
5347 need_version=unknown
5348 # when you set need_version to no, make sure it does not cause -set_version
5349 # flags to be left without arguments
5350 archive_cmds=
5351 archive_expsym_cmds=
5352 old_archive_from_new_cmds=
5353 old_archive_from_expsyms_cmds=
5354 export_dynamic_flag_spec=
5355 whole_archive_flag_spec=
5356 thread_safe_flag_spec=
5357 hardcode_into_libs=no
5358 hardcode_libdir_flag_spec=
5359 hardcode_libdir_separator=
5360 hardcode_direct=no
5361 hardcode_minus_L=no
5362 hardcode_shlibpath_var=unsupported
5363 runpath_var=
5364 link_all_deplibs=unknown
5365 always_export_symbols=no
5366 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5367 # include_expsyms should be a list of space-separated symbols to be *always*
5368 # included in the symbol list
5369 include_expsyms=
5370 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5371 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5372 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5373 # as well as any symbol that contains `d'.
5374 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5375 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5376 # platforms (ab)use it in PIC code, but their linkers get confused if
5377 # the symbol is explicitly referenced.  Since portable code cannot
5378 # rely on this symbol name, it's probably fine to never include it in
5379 # preloaded symbol tables.
5380 extract_expsyms_cmds=
5381
5382 case $host_os in
5383 cygwin* | mingw* | pw32*)
5384   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5385   # When not using gcc, we currently assume that we are using
5386   # Microsoft Visual C++.
5387   if test "$GCC" != yes; then
5388     with_gnu_ld=no
5389   fi
5390   ;;
5391 openbsd*)
5392   with_gnu_ld=no
5393   ;;
5394 esac
5395
5396 ld_shlibs=yes
5397 if test "$with_gnu_ld" = yes; then
5398   # If archive_cmds runs LD, not CC, wlarc should be empty
5399   wlarc='${wl}'
5400
5401   # See if GNU ld supports shared libraries.
5402   case $host_os in
5403   aix3* | aix4* | aix5*)
5404     # On AIX, the GNU linker is very broken
5405     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5406     ld_shlibs=no
5407     cat <<EOF 1>&2
5408
5409 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5410 *** to be unable to reliably create shared libraries on AIX.
5411 *** Therefore, libtool is disabling shared libraries support.  If you
5412 *** really care for shared libraries, you may want to modify your PATH
5413 *** so that a non-GNU linker is found, and then restart.
5414
5415 EOF
5416     ;;
5417
5418   amigaos*)
5419     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)'
5420     hardcode_libdir_flag_spec='-L$libdir'
5421     hardcode_minus_L=yes
5422
5423     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5424     # that the semantics of dynamic libraries on AmigaOS, at least up
5425     # to version 4, is to share data among multiple programs linked
5426     # with the same dynamic library.  Since this doesn't match the
5427     # behavior of shared libraries on other platforms, we can use
5428     # them.
5429     ld_shlibs=no
5430     ;;
5431
5432   beos*)
5433     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5434       allow_undefined_flag=unsupported
5435       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5436       # support --undefined.  This deserves some investigation.  FIXME
5437       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5438     else
5439       ld_shlibs=no
5440     fi
5441     ;;
5442
5443   cygwin* | mingw* | pw32*)
5444     # hardcode_libdir_flag_spec is actually meaningless, as there is
5445     # no search path for DLLs.
5446     hardcode_libdir_flag_spec='-L$libdir'
5447     allow_undefined_flag=unsupported
5448     always_export_symbols=yes
5449
5450     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5451       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5452       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5453       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5454       else $CC -o impgen impgen.c ; fi)~
5455       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5456
5457     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5458
5459     # cygwin and mingw dlls have different entry points and sets of symbols
5460     # to exclude.
5461     # FIXME: what about values for MSVC?
5462     dll_entry=__cygwin_dll_entry@12
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5464     case $host_os in
5465     mingw*)
5466       # mingw values
5467       dll_entry=_DllMainCRTStartup@12
5468       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5469       ;;
5470     esac
5471
5472     # mingw and cygwin differ, and it's simplest to just exclude the union
5473     # of the two symbol sets.
5474     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5475
5476     # recent cygwin and mingw systems supply a stub DllMain which the user
5477     # can override, but on older systems we have to supply one (in ltdll.c)
5478     if test "x$lt_cv_need_dllmain" = "xyes"; then
5479       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5480       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~
5481         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5482     else
5483       ltdll_obj=
5484       ltdll_cmds=
5485     fi
5486
5487     # Extract the symbol export list from an `--export-all' def file,
5488     # then regenerate the def file from the symbol export list, so that
5489     # the compiled dll only exports the symbol export list.
5490     # Be careful not to strip the DATA tag left be newer dlltools.
5491     export_symbols_cmds="$ltdll_cmds"'
5492       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5493       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5494
5495     # If the export-symbols file already is a .def file (1st line
5496     # is EXPORTS), use it as is.
5497     # If DATA tags from a recent dlltool are present, honour them!
5498     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5499         cp $export_symbols $output_objdir/$soname-def;
5500       else
5501         echo EXPORTS > $output_objdir/$soname-def;
5502         _lt_hint=1;
5503         cat $export_symbols | while read symbol; do
5504          set dummy \$symbol;
5505          case \$# in
5506            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5507            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5508          esac;
5509          _lt_hint=`expr 1 + \$_lt_hint`;
5510         done;
5511       fi~
5512       '"$ltdll_cmds"'
5513       $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~
5514       $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~
5515       $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~
5516       $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~
5517       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5518     ;;
5519
5520   netbsd*)
5521     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5522       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5523       wlarc=
5524     else
5525       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5526       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5527     fi
5528     ;;
5529
5530   solaris* | sysv5*)
5531     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5532       ld_shlibs=no
5533       cat <<EOF 1>&2
5534
5535 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5536 *** create shared libraries on Solaris systems.  Therefore, libtool
5537 *** is disabling shared libraries support.  We urge you to upgrade GNU
5538 *** binutils to release 2.9.1 or newer.  Another option is to modify
5539 *** your PATH or compiler configuration so that the native linker is
5540 *** used, and then restart.
5541
5542 EOF
5543     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5544       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5545       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5546     else
5547       ld_shlibs=no
5548     fi
5549     ;;
5550
5551   sunos4*)
5552     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5553     wlarc=
5554     hardcode_direct=yes
5555     hardcode_shlibpath_var=no
5556     ;;
5557
5558   *)
5559     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5560       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5561       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5562     else
5563       ld_shlibs=no
5564     fi
5565     ;;
5566   esac
5567
5568   if test "$ld_shlibs" = yes; then
5569     runpath_var=LD_RUN_PATH
5570     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5571     export_dynamic_flag_spec='${wl}--export-dynamic'
5572     case $host_os in
5573     cygwin* | mingw* | pw32*)
5574       # dlltool doesn't understand --whole-archive et. al.
5575       whole_archive_flag_spec=
5576       ;;
5577     *)
5578       # ancient GNU ld didn't support --whole-archive et. al.
5579       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5580         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5581       else
5582         whole_archive_flag_spec=
5583       fi
5584       ;;
5585     esac
5586   fi
5587 else
5588   # PORTME fill in a description of your system's linker (not GNU ld)
5589   case $host_os in
5590   aix3*)
5591     allow_undefined_flag=unsupported
5592     always_export_symbols=yes
5593     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'
5594     # Note: this linker hardcodes the directories in LIBPATH if there
5595     # are no directories specified by -L.
5596     hardcode_minus_L=yes
5597     if test "$GCC" = yes && test -z "$link_static_flag"; then
5598       # Neither direct hardcoding nor static linking is supported with a
5599       # broken collect2.
5600       hardcode_direct=unsupported
5601     fi
5602     ;;
5603
5604   aix4* | aix5*)
5605     if test "$host_cpu" = ia64; then
5606       # On IA64, the linker does run time linking by default, so we don't
5607       # have to do anything special.
5608       aix_use_runtimelinking=no
5609       exp_sym_flag='-Bexport'
5610       no_entry_flag=""
5611     else
5612       aix_use_runtimelinking=no
5613
5614       # Test if we are trying to use run time linking or normal
5615       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5616       # need to do runtime linking.
5617       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5618         for ld_flag in $LDFLAGS; do
5619           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5620             aix_use_runtimelinking=yes
5621             break
5622           fi
5623         done
5624       esac
5625
5626       exp_sym_flag='-bexport'
5627       no_entry_flag='-bnoentry'
5628     fi
5629
5630     # When large executables or shared objects are built, AIX ld can
5631     # have problems creating the table of contents.  If linking a library
5632     # or program results in "error TOC overflow" add -mminimal-toc to
5633     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5634     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5635
5636     hardcode_direct=yes
5637     archive_cmds=''
5638     hardcode_libdir_separator=':'
5639     if test "$GCC" = yes; then
5640       case $host_os in aix4.[012]|aix4.[012].*)
5641         collect2name=`${CC} -print-prog-name=collect2`
5642         if test -f "$collect2name" && \
5643           strings "$collect2name" | grep resolve_lib_name >/dev/null
5644         then
5645           # We have reworked collect2
5646           hardcode_direct=yes
5647         else
5648           # We have old collect2
5649           hardcode_direct=unsupported
5650           # It fails to find uninstalled libraries when the uninstalled
5651           # path is not listed in the libpath.  Setting hardcode_minus_L
5652           # to unsupported forces relinking
5653           hardcode_minus_L=yes
5654           hardcode_libdir_flag_spec='-L$libdir'
5655           hardcode_libdir_separator=
5656         fi
5657       esac
5658
5659       shared_flag='-shared'
5660     else
5661       # not using gcc
5662       if test "$host_cpu" = ia64; then
5663         shared_flag='${wl}-G'
5664       else
5665         if test "$aix_use_runtimelinking" = yes; then
5666           shared_flag='${wl}-G'
5667         else
5668           shared_flag='${wl}-bM:SRE'
5669         fi
5670       fi
5671     fi
5672
5673     # It seems that -bexpall can do strange things, so it is better to
5674     # generate a list of symbols to export.
5675     always_export_symbols=yes
5676     if test "$aix_use_runtimelinking" = yes; then
5677       # Warning - without using the other runtime loading flags (-brtl),
5678       # -berok will link without error, but may produce a broken library.
5679       allow_undefined_flag='-berok'
5680       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5681       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"
5682     else
5683       if test "$host_cpu" = ia64; then
5684         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5685         allow_undefined_flag="-z nodefs"
5686         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"
5687       else
5688         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5689         # Warning - without using the other run time loading flags,
5690         # -berok will link without error, but may produce a broken library.
5691         allow_undefined_flag='${wl}-berok'
5692         # This is a bit strange, but is similar to how AIX traditionally builds
5693         # it's shared libraries.
5694         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'
5695       fi
5696     fi
5697     ;;
5698
5699   amigaos*)
5700     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)'
5701     hardcode_libdir_flag_spec='-L$libdir'
5702     hardcode_minus_L=yes
5703     # see comment about different semantics on the GNU ld section
5704     ld_shlibs=no
5705     ;;
5706
5707   cygwin* | mingw* | pw32*)
5708     # When not using gcc, we currently assume that we are using
5709     # Microsoft Visual C++.
5710     # hardcode_libdir_flag_spec is actually meaningless, as there is
5711     # no search path for DLLs.
5712     hardcode_libdir_flag_spec=' '
5713     allow_undefined_flag=unsupported
5714     # Tell ltmain to make .lib files, not .a files.
5715     libext=lib
5716     # FIXME: Setting linknames here is a bad hack.
5717     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5718     # The linker will automatically build a .lib file if we build a DLL.
5719     old_archive_from_new_cmds='true'
5720     # FIXME: Should let the user specify the lib program.
5721     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5722     fix_srcfile_path='`cygpath -w "$srcfile"`'
5723     ;;
5724
5725   darwin* | rhapsody*)
5726     case "$host_os" in
5727     rhapsody* | darwin1.[012])
5728       allow_undefined_flag='-undefined suppress'
5729       ;;
5730     *) # Darwin 1.3 on
5731       allow_undefined_flag='-flat_namespace -undefined suppress'
5732       ;;
5733     esac
5734     # FIXME: Relying on posixy $() will cause problems for
5735     #        cross-compilation, but unfortunately the echo tests do not
5736     #        yet detect zsh echo's removal of \ escapes.
5737     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'
5738     # We need to add '_' to the symbols in $export_symbols first
5739     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5740     hardcode_direct=yes
5741     hardcode_shlibpath_var=no
5742     whole_archive_flag_spec='-all_load $convenience'
5743     ;;
5744
5745   freebsd1*)
5746     ld_shlibs=no
5747     ;;
5748
5749   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5750   # support.  Future versions do this automatically, but an explicit c++rt0.o
5751   # does not break anything, and helps significantly (at the cost of a little
5752   # extra space).
5753   freebsd2.2*)
5754     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5755     hardcode_libdir_flag_spec='-R$libdir'
5756     hardcode_direct=yes
5757     hardcode_shlibpath_var=no
5758     ;;
5759
5760   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5761   freebsd2*)
5762     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5763     hardcode_direct=yes
5764     hardcode_minus_L=yes
5765     hardcode_shlibpath_var=no
5766     ;;
5767
5768   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5769   freebsd*)
5770     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5771     hardcode_libdir_flag_spec='-R$libdir'
5772     hardcode_direct=yes
5773     hardcode_shlibpath_var=no
5774     ;;
5775
5776   hpux9* | hpux10* | hpux11*)
5777     case $host_os in
5778     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' ;;
5779     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5780     esac
5781     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5782     hardcode_libdir_separator=:
5783     hardcode_direct=yes
5784     hardcode_minus_L=yes # Not in the search PATH, but as the default
5785                          # location of the library.
5786     export_dynamic_flag_spec='${wl}-E'
5787     ;;
5788
5789   irix5* | irix6*)
5790     if test "$GCC" = yes; then
5791       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'
5792     else
5793       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'
5794     fi
5795     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5796     hardcode_libdir_separator=:
5797     link_all_deplibs=yes
5798     ;;
5799
5800   netbsd*)
5801     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5802       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5803     else
5804       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5805     fi
5806     hardcode_libdir_flag_spec='-R$libdir'
5807     hardcode_direct=yes
5808     hardcode_shlibpath_var=no
5809     ;;
5810
5811   newsos6)
5812     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5813     hardcode_direct=yes
5814     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5815     hardcode_libdir_separator=:
5816     hardcode_shlibpath_var=no
5817     ;;
5818
5819   openbsd*)
5820     hardcode_direct=yes
5821     hardcode_shlibpath_var=no
5822     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5823       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5824       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5825       export_dynamic_flag_spec='${wl}-E'
5826     else
5827       case "$host_os" in
5828       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5829         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5830         hardcode_libdir_flag_spec='-R$libdir'
5831         ;;
5832       *)
5833         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5834         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5835         ;;
5836       esac
5837     fi
5838     ;;
5839
5840   os2*)
5841     hardcode_libdir_flag_spec='-L$libdir'
5842     hardcode_minus_L=yes
5843     allow_undefined_flag=unsupported
5844     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'
5845     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5846     ;;
5847
5848   osf3*)
5849     if test "$GCC" = yes; then
5850       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5851       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'
5852     else
5853       allow_undefined_flag=' -expect_unresolved \*'
5854       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'
5855     fi
5856     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5857     hardcode_libdir_separator=:
5858     ;;
5859
5860   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5861     if test "$GCC" = yes; then
5862       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5863       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'
5864       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5865     else
5866       allow_undefined_flag=' -expect_unresolved \*'
5867       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'
5868       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5869       $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'
5870
5871       #Both c and cxx compiler support -rpath directly
5872       hardcode_libdir_flag_spec='-rpath $libdir'
5873     fi
5874     hardcode_libdir_separator=:
5875     ;;
5876
5877   sco3.2v5*)
5878     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5879     hardcode_shlibpath_var=no
5880     runpath_var=LD_RUN_PATH
5881     hardcode_runpath_var=yes
5882     export_dynamic_flag_spec='${wl}-Bexport'
5883     ;;
5884
5885   solaris*)
5886     # gcc --version < 3.0 without binutils cannot create self contained
5887     # shared libraries reliably, requiring libgcc.a to resolve some of
5888     # the object symbols generated in some cases.  Libraries that use
5889     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5890     # a copy of libgcc.a into every shared library to guarantee resolving
5891     # such symbols causes other problems:  According to Tim Van Holder
5892     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5893     # (to the application) exception stack for one thing.
5894     no_undefined_flag=' -z defs'
5895     if test "$GCC" = yes; then
5896       case `$CC --version 2>/dev/null` in
5897       [12].*)
5898         cat <<EOF 1>&2
5899
5900 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5901 *** create self contained shared libraries on Solaris systems, without
5902 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5903 *** -no-undefined support, which will at least allow you to build shared
5904 *** libraries.  However, you may find that when you link such libraries
5905 *** into an application without using GCC, you have to manually add
5906 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5907 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5908 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5909
5910 EOF
5911         no_undefined_flag=
5912         ;;
5913       esac
5914     fi
5915     # $CC -shared without GNU ld will not create a library from C++
5916     # object files and a static libstdc++, better avoid it by now
5917     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5919                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5920     hardcode_libdir_flag_spec='-R$libdir'
5921     hardcode_shlibpath_var=no
5922     case $host_os in
5923     solaris2.[0-5] | solaris2.[0-5].*) ;;
5924     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5925       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5926     esac
5927     link_all_deplibs=yes
5928     ;;
5929
5930   sunos4*)
5931     if test "x$host_vendor" = xsequent; then
5932       # Use $CC to link under sequent, because it throws in some extra .o
5933       # files that make .init and .fini sections work.
5934       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5935     else
5936       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5937     fi
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_direct=yes
5940     hardcode_minus_L=yes
5941     hardcode_shlibpath_var=no
5942     ;;
5943
5944   sysv4)
5945     if test "x$host_vendor" = xsno; then
5946       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5947       hardcode_direct=yes # is this really true???
5948     else
5949       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5950       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5951     fi
5952     runpath_var='LD_RUN_PATH'
5953     hardcode_shlibpath_var=no
5954     ;;
5955
5956   sysv4.3*)
5957     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5958     hardcode_shlibpath_var=no
5959     export_dynamic_flag_spec='-Bexport'
5960     ;;
5961
5962   sysv5*)
5963     no_undefined_flag=' -z text'
5964     # $CC -shared without GNU ld will not create a library from C++
5965     # object files and a static libstdc++, better avoid it by now
5966     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5967     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5968                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5969     hardcode_libdir_flag_spec=
5970     hardcode_shlibpath_var=no
5971     runpath_var='LD_RUN_PATH'
5972     ;;
5973
5974   uts4*)
5975     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976     hardcode_libdir_flag_spec='-L$libdir'
5977     hardcode_shlibpath_var=no
5978     ;;
5979
5980   dgux*)
5981     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5982     hardcode_libdir_flag_spec='-L$libdir'
5983     hardcode_shlibpath_var=no
5984     ;;
5985
5986   sysv4*MP*)
5987     if test -d /usr/nec; then
5988       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5989       hardcode_shlibpath_var=no
5990       runpath_var=LD_RUN_PATH
5991       hardcode_runpath_var=yes
5992       ld_shlibs=yes
5993     fi
5994     ;;
5995
5996   sysv4.2uw2*)
5997     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5998     hardcode_direct=yes
5999     hardcode_minus_L=no
6000     hardcode_shlibpath_var=no
6001     hardcode_runpath_var=yes
6002     runpath_var=LD_RUN_PATH
6003     ;;
6004
6005   sysv5uw7* | unixware7*)
6006     no_undefined_flag='${wl}-z ${wl}text'
6007     if test "$GCC" = yes; then
6008       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6009     else
6010       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6011     fi
6012     runpath_var='LD_RUN_PATH'
6013     hardcode_shlibpath_var=no
6014     ;;
6015
6016   *)
6017     ld_shlibs=no
6018     ;;
6019   esac
6020 fi
6021 echo "$ac_t""$ld_shlibs" 1>&6
6022 test "$ld_shlibs" = no && can_build_shared=no
6023
6024 # Check hardcoding attributes.
6025 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6026 echo "configure:6027: checking how to hardcode library paths into programs" >&5
6027 hardcode_action=
6028 if test -n "$hardcode_libdir_flag_spec" || \
6029    test -n "$runpath_var"; then
6030
6031   # We can hardcode non-existant directories.
6032   if test "$hardcode_direct" != no &&
6033      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6034      # have to relink, otherwise we might link with an installed library
6035      # when we should be linking with a yet-to-be-installed one
6036      ## test "$hardcode_shlibpath_var" != no &&
6037      test "$hardcode_minus_L" != no; then
6038     # Linking always hardcodes the temporary library directory.
6039     hardcode_action=relink
6040   else
6041     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6042     hardcode_action=immediate
6043   fi
6044 else
6045   # We cannot hardcode anything, or else we can only hardcode existing
6046   # directories.
6047   hardcode_action=unsupported
6048 fi
6049 echo "$ac_t""$hardcode_action" 1>&6
6050
6051 striplib=
6052 old_striplib=
6053 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6054 echo "configure:6055: checking whether stripping libraries is possible" >&5
6055 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6056   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6057   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6058   echo "$ac_t""yes" 1>&6
6059 else
6060   echo "$ac_t""no" 1>&6
6061 fi
6062
6063 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6064 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6065
6066 # PORTME Fill in your ld.so characteristics
6067 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6068 echo "configure:6069: checking dynamic linker characteristics" >&5
6069 library_names_spec=
6070 libname_spec='lib$name'
6071 soname_spec=
6072 postinstall_cmds=
6073 postuninstall_cmds=
6074 finish_cmds=
6075 finish_eval=
6076 shlibpath_var=
6077 shlibpath_overrides_runpath=unknown
6078 version_type=none
6079 dynamic_linker="$host_os ld.so"
6080 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6081 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6082
6083 case $host_os in
6084 aix3*)
6085   version_type=linux
6086   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6087   shlibpath_var=LIBPATH
6088
6089   # AIX has no versioning support, so we append a major version to the name.
6090   soname_spec='${libname}${release}.so$major'
6091   ;;
6092
6093 aix4* | aix5*)
6094   version_type=linux
6095   if test "$host_cpu" = ia64; then
6096     # AIX 5 supports IA64
6097     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6098     shlibpath_var=LD_LIBRARY_PATH
6099   else
6100     # With GCC up to 2.95.x, collect2 would create an import file
6101     # for dependence libraries.  The import file would start with
6102     # the line `#! .'.  This would cause the generated library to
6103     # depend on `.', always an invalid library.  This was fixed in
6104     # development snapshots of GCC prior to 3.0.
6105     case $host_os in
6106       aix4 | aix4.[01] | aix4.[01].*)
6107         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6108              echo ' yes '
6109              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6110           :
6111         else
6112           can_build_shared=no
6113         fi
6114         ;;
6115     esac
6116     # AIX (on Power*) has no versioning support, so currently we can
6117     # not hardcode correct soname into executable. Probably we can
6118     # add versioning support to collect2, so additional links can
6119     # be useful in future.
6120     if test "$aix_use_runtimelinking" = yes; then
6121       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6122       # instead of lib<name>.a to let people know that these are not
6123       # typical AIX shared libraries.
6124       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6125     else
6126       # We preserve .a as extension for shared libraries through AIX4.2
6127       # and later when we are not doing run time linking.
6128       library_names_spec='${libname}${release}.a $libname.a'
6129       soname_spec='${libname}${release}.so$major'
6130     fi
6131     shlibpath_var=LIBPATH
6132   fi
6133   ;;
6134
6135 amigaos*)
6136   library_names_spec='$libname.ixlibrary $libname.a'
6137   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6138   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'
6139   ;;
6140
6141 beos*)
6142   library_names_spec='${libname}.so'
6143   dynamic_linker="$host_os ld.so"
6144   shlibpath_var=LIBRARY_PATH
6145   ;;
6146
6147 bsdi4*)
6148   version_type=linux
6149   need_version=no
6150   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6151   soname_spec='${libname}${release}.so$major'
6152   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6153   shlibpath_var=LD_LIBRARY_PATH
6154   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6155   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6156   export_dynamic_flag_spec=-rdynamic
6157   # the default ld.so.conf also contains /usr/contrib/lib and
6158   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6159   # libtool to hard-code these into programs
6160   ;;
6161
6162 cygwin* | mingw* | pw32*)
6163   version_type=windows
6164   need_version=no
6165   need_lib_prefix=no
6166   case $GCC,$host_os in
6167   yes,cygwin*)
6168     library_names_spec='$libname.dll.a'
6169     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6170     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6171       dldir=$destdir/`dirname \$dlpath`~
6172       test -d \$dldir || mkdir -p \$dldir~
6173       $install_prog .libs/$dlname \$dldir/$dlname'
6174     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6175       dlpath=$dir/\$dldll~
6176        $rm \$dlpath'
6177     ;;
6178   yes,mingw*)
6179     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6180     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6181     ;;
6182   yes,pw32*)
6183     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6184     ;;
6185   *)
6186     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6187     ;;
6188   esac
6189   dynamic_linker='Win32 ld.exe'
6190   # FIXME: first we should search . and the directory the executable is in
6191   shlibpath_var=PATH
6192   ;;
6193
6194 darwin* | rhapsody*)
6195   dynamic_linker="$host_os dyld"
6196   version_type=darwin
6197   need_lib_prefix=no
6198   need_version=no
6199   # FIXME: Relying on posixy $() will cause problems for
6200   #        cross-compilation, but unfortunately the echo tests do not
6201   #        yet detect zsh echo's removal of \ escapes.
6202   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)'
6203   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6204   shlibpath_overrides_runpath=yes
6205   shlibpath_var=DYLD_LIBRARY_PATH
6206   ;;
6207
6208 freebsd1*)
6209   dynamic_linker=no
6210   ;;
6211
6212 freebsd*)
6213   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6214   version_type=freebsd-$objformat
6215   case $version_type in
6216     freebsd-elf*)
6217       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6218       need_version=no
6219       need_lib_prefix=no
6220       ;;
6221     freebsd-*)
6222       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6223       need_version=yes
6224       ;;
6225   esac
6226   shlibpath_var=LD_LIBRARY_PATH
6227   case $host_os in
6228   freebsd2*)
6229     shlibpath_overrides_runpath=yes
6230     ;;
6231   *)
6232     shlibpath_overrides_runpath=no
6233     hardcode_into_libs=yes
6234     ;;
6235   esac
6236   ;;
6237
6238 gnu*)
6239   version_type=linux
6240   need_lib_prefix=no
6241   need_version=no
6242   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6243   soname_spec='${libname}${release}.so$major'
6244   shlibpath_var=LD_LIBRARY_PATH
6245   hardcode_into_libs=yes
6246   ;;
6247
6248 hpux9* | hpux10* | hpux11*)
6249   # Give a soname corresponding to the major version so that dld.sl refuses to
6250   # link against other versions.
6251   dynamic_linker="$host_os dld.sl"
6252   version_type=sunos
6253   need_lib_prefix=no
6254   need_version=no
6255   shlibpath_var=SHLIB_PATH
6256   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6257   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6258   soname_spec='${libname}${release}.sl$major'
6259   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6260   postinstall_cmds='chmod 555 $lib'
6261   ;;
6262
6263 irix5* | irix6*)
6264   version_type=irix
6265   need_lib_prefix=no
6266   need_version=no
6267   soname_spec='${libname}${release}.so$major'
6268   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6269   case $host_os in
6270   irix5*)
6271     libsuff= shlibsuff=
6272     ;;
6273   *)
6274     case $LD in # libtool.m4 will add one of these switches to LD
6275     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6276     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6277     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6278     *) libsuff= shlibsuff= libmagic=never-match;;
6279     esac
6280     ;;
6281   esac
6282   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6283   shlibpath_overrides_runpath=no
6284   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6285   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6286   ;;
6287
6288 # No shared lib support for Linux oldld, aout, or coff.
6289 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6290   dynamic_linker=no
6291   ;;
6292
6293 # This must be Linux ELF.
6294 linux-gnu*)
6295   version_type=linux
6296   need_lib_prefix=no
6297   need_version=no
6298   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6299   soname_spec='${libname}${release}.so$major'
6300   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6301   shlibpath_var=LD_LIBRARY_PATH
6302   shlibpath_overrides_runpath=no
6303   # This implies no fast_install, which is unacceptable.
6304   # Some rework will be needed to allow for fast_install
6305   # before this can be enabled.
6306   hardcode_into_libs=yes
6307
6308   # We used to test for /lib/ld.so.1 and disable shared libraries on
6309   # powerpc, because MkLinux only supported shared libraries with the
6310   # GNU dynamic linker.  Since this was broken with cross compilers,
6311   # most powerpc-linux boxes support dynamic linking these days and
6312   # people can always --disable-shared, the test was removed, and we
6313   # assume the GNU/Linux dynamic linker is in use.
6314   dynamic_linker='GNU/Linux ld.so'
6315   ;;
6316
6317 netbsd*)
6318   version_type=sunos
6319   need_lib_prefix=no
6320   need_version=no
6321   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6322     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6323     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6324     dynamic_linker='NetBSD (a.out) ld.so'
6325   else
6326     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6327     soname_spec='${libname}${release}.so$major'
6328     dynamic_linker='NetBSD ld.elf_so'
6329   fi
6330   shlibpath_var=LD_LIBRARY_PATH
6331   shlibpath_overrides_runpath=yes
6332   hardcode_into_libs=yes
6333   ;;
6334
6335 newsos6)
6336   version_type=linux
6337   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6338   shlibpath_var=LD_LIBRARY_PATH
6339   shlibpath_overrides_runpath=yes
6340   ;;
6341
6342 openbsd*)
6343   version_type=sunos
6344   need_lib_prefix=no
6345   need_version=no
6346   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6347     case "$host_os" in
6348     openbsd2.[89] | openbsd2.[89].*)
6349       shlibpath_overrides_runpath=no
6350       ;;
6351     *)
6352       shlibpath_overrides_runpath=yes
6353       ;;
6354     esac
6355   else
6356     shlibpath_overrides_runpath=yes
6357   fi
6358   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6359   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6360   shlibpath_var=LD_LIBRARY_PATH
6361   ;;
6362
6363 os2*)
6364   libname_spec='$name'
6365   need_lib_prefix=no
6366   library_names_spec='$libname.dll $libname.a'
6367   dynamic_linker='OS/2 ld.exe'
6368   shlibpath_var=LIBPATH
6369   ;;
6370
6371 osf3* | osf4* | osf5*)
6372   version_type=osf
6373   need_version=no
6374   soname_spec='${libname}${release}.so'
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6376   shlibpath_var=LD_LIBRARY_PATH
6377   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6378   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6379   ;;
6380
6381 sco3.2v5*)
6382   version_type=osf
6383   soname_spec='${libname}${release}.so$major'
6384   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6385   shlibpath_var=LD_LIBRARY_PATH
6386   ;;
6387
6388 solaris*)
6389   version_type=linux
6390   need_lib_prefix=no
6391   need_version=no
6392   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6393   soname_spec='${libname}${release}.so$major'
6394   shlibpath_var=LD_LIBRARY_PATH
6395   shlibpath_overrides_runpath=yes
6396   hardcode_into_libs=yes
6397   # ldd complains unless libraries are executable
6398   postinstall_cmds='chmod +x $lib'
6399   ;;
6400
6401 sunos4*)
6402   version_type=sunos
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6404   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6405   shlibpath_var=LD_LIBRARY_PATH
6406   shlibpath_overrides_runpath=yes
6407   if test "$with_gnu_ld" = yes; then
6408     need_lib_prefix=no
6409   fi
6410   need_version=yes
6411   ;;
6412
6413 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6414   version_type=linux
6415   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6416   soname_spec='${libname}${release}.so$major'
6417   shlibpath_var=LD_LIBRARY_PATH
6418   case $host_vendor in
6419     sni)
6420       shlibpath_overrides_runpath=no
6421       ;;
6422     motorola)
6423       need_lib_prefix=no
6424       need_version=no
6425       shlibpath_overrides_runpath=no
6426       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6427       ;;
6428   esac
6429   ;;
6430
6431 uts4*)
6432   version_type=linux
6433   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6434   soname_spec='${libname}${release}.so$major'
6435   shlibpath_var=LD_LIBRARY_PATH
6436   ;;
6437
6438 dgux*)
6439   version_type=linux
6440   need_lib_prefix=no
6441   need_version=no
6442   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6443   soname_spec='${libname}${release}.so$major'
6444   shlibpath_var=LD_LIBRARY_PATH
6445   ;;
6446
6447 sysv4*MP*)
6448   if test -d /usr/nec ;then
6449     version_type=linux
6450     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6451     soname_spec='$libname.so.$major'
6452     shlibpath_var=LD_LIBRARY_PATH
6453   fi
6454   ;;
6455
6456 *)
6457   dynamic_linker=no
6458   ;;
6459 esac
6460 echo "$ac_t""$dynamic_linker" 1>&6
6461 test "$dynamic_linker" = no && can_build_shared=no
6462
6463 # Report the final consequences.
6464 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6465 echo "configure:6466: checking if libtool supports shared libraries" >&5
6466 echo "$ac_t""$can_build_shared" 1>&6
6467
6468 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6469 echo "configure:6470: checking whether to build shared libraries" >&5
6470 test "$can_build_shared" = "no" && enable_shared=no
6471
6472 # On AIX, shared libraries and static libraries use the same namespace, and
6473 # are all built from PIC.
6474 case "$host_os" in
6475 aix3*)
6476   test "$enable_shared" = yes && enable_static=no
6477   if test -n "$RANLIB"; then
6478     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6479     postinstall_cmds='$RANLIB $lib'
6480   fi
6481   ;;
6482
6483 aix4*)
6484   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6485     test "$enable_shared" = yes && enable_static=no
6486   fi
6487   ;;
6488 esac
6489 echo "$ac_t""$enable_shared" 1>&6
6490
6491 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6492 echo "configure:6493: checking whether to build static libraries" >&5
6493 # Make sure either enable_shared or enable_static is yes.
6494 test "$enable_shared" = yes || enable_static=yes
6495 echo "$ac_t""$enable_static" 1>&6
6496
6497 if test "$hardcode_action" = relink; then
6498   # Fast installation is not supported
6499   enable_fast_install=no
6500 elif test "$shlibpath_overrides_runpath" = yes ||
6501      test "$enable_shared" = no; then
6502   # Fast installation is not necessary
6503   enable_fast_install=needless
6504 fi
6505
6506 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6507 if test "$GCC" = yes; then
6508   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6509 fi
6510
6511 if test "x$enable_dlopen" != xyes; then
6512   enable_dlopen=unknown
6513   enable_dlopen_self=unknown
6514   enable_dlopen_self_static=unknown
6515 else
6516   lt_cv_dlopen=no
6517   lt_cv_dlopen_libs=
6518
6519   case $host_os in
6520   beos*)
6521     lt_cv_dlopen="load_add_on"
6522     lt_cv_dlopen_libs=
6523     lt_cv_dlopen_self=yes
6524     ;;
6525
6526   cygwin* | mingw* | pw32*)
6527     lt_cv_dlopen="LoadLibrary"
6528     lt_cv_dlopen_libs=
6529    ;;
6530
6531   *)
6532     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6533 echo "configure:6534: checking for shl_load" >&5
6534 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6535   echo $ac_n "(cached) $ac_c" 1>&6
6536 else
6537   cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* System header to define __stub macros and hopefully few prototypes,
6541     which can conflict with char shl_load(); below.  */
6542 #include <assert.h>
6543 /* Override any gcc2 internal prototype to avoid an error.  */
6544 /* We use char because int might match the return type of a gcc2
6545     builtin and then its argument prototype would still apply.  */
6546 char shl_load();
6547 char (*f)();
6548
6549 int main() {
6550
6551 /* The GNU C library defines this for functions which it implements
6552     to always fail with ENOSYS.  Some functions are actually named
6553     something starting with __ and the normal name is an alias.  */
6554 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6555 choke me
6556 #else
6557 f = shl_load;
6558 #endif
6559
6560 ; return 0; }
6561 EOF
6562 if { (eval echo configure:6563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6563   rm -rf conftest*
6564   eval "ac_cv_func_shl_load=yes"
6565 else
6566   echo "configure: failed program was:" >&5
6567   cat conftest.$ac_ext >&5
6568   rm -rf conftest*
6569   eval "ac_cv_func_shl_load=no"
6570 fi
6571 rm -f conftest*
6572 fi
6573
6574 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6575   echo "$ac_t""yes" 1>&6
6576   lt_cv_dlopen="shl_load"
6577 else
6578   echo "$ac_t""no" 1>&6
6579 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6580 echo "configure:6581: checking for shl_load in -ldld" >&5
6581 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6583   echo $ac_n "(cached) $ac_c" 1>&6
6584 else
6585   ac_save_LIBS="$LIBS"
6586 LIBS="-ldld  $LIBS"
6587 cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 /* We use char because int might match the return type of a gcc2
6592     builtin and then its argument prototype would still apply.  */
6593 char shl_load();
6594
6595 int main() {
6596 shl_load()
6597 ; return 0; }
6598 EOF
6599 if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=yes"
6602 else
6603   echo "configure: failed program was:" >&5
6604   cat conftest.$ac_ext >&5
6605   rm -rf conftest*
6606   eval "ac_cv_lib_$ac_lib_var=no"
6607 fi
6608 rm -f conftest*
6609 LIBS="$ac_save_LIBS"
6610
6611 fi
6612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6613   echo "$ac_t""yes" 1>&6
6614   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6615 else
6616   echo "$ac_t""no" 1>&6
6617 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6618 echo "configure:6619: checking for dlopen" >&5
6619 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 /* System header to define __stub macros and hopefully few prototypes,
6626     which can conflict with char dlopen(); below.  */
6627 #include <assert.h>
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char dlopen();
6632 char (*f)();
6633
6634 int main() {
6635
6636 /* The GNU C library defines this for functions which it implements
6637     to always fail with ENOSYS.  Some functions are actually named
6638     something starting with __ and the normal name is an alias.  */
6639 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6640 choke me
6641 #else
6642 f = dlopen;
6643 #endif
6644
6645 ; return 0; }
6646 EOF
6647 if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6648   rm -rf conftest*
6649   eval "ac_cv_func_dlopen=yes"
6650 else
6651   echo "configure: failed program was:" >&5
6652   cat conftest.$ac_ext >&5
6653   rm -rf conftest*
6654   eval "ac_cv_func_dlopen=no"
6655 fi
6656 rm -f conftest*
6657 fi
6658
6659 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6660   echo "$ac_t""yes" 1>&6
6661   lt_cv_dlopen="dlopen"
6662 else
6663   echo "$ac_t""no" 1>&6
6664 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6665 echo "configure:6666: checking for dlopen in -ldl" >&5
6666 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   ac_save_LIBS="$LIBS"
6671 LIBS="-ldl  $LIBS"
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 /* We use char because int might match the return type of a gcc2
6677     builtin and then its argument prototype would still apply.  */
6678 char dlopen();
6679
6680 int main() {
6681 dlopen()
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_lib_$ac_lib_var=no"
6692 fi
6693 rm -f conftest*
6694 LIBS="$ac_save_LIBS"
6695
6696 fi
6697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6698   echo "$ac_t""yes" 1>&6
6699   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6700 else
6701   echo "$ac_t""no" 1>&6
6702 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6703 echo "configure:6704: checking for dlopen in -lsvld" >&5
6704 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6705 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   ac_save_LIBS="$LIBS"
6709 LIBS="-lsvld  $LIBS"
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char dlopen();
6717
6718 int main() {
6719 dlopen()
6720 ; return 0; }
6721 EOF
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6723   rm -rf conftest*
6724   eval "ac_cv_lib_$ac_lib_var=yes"
6725 else
6726   echo "configure: failed program was:" >&5
6727   cat conftest.$ac_ext >&5
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=no"
6730 fi
6731 rm -f conftest*
6732 LIBS="$ac_save_LIBS"
6733
6734 fi
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6738 else
6739   echo "$ac_t""no" 1>&6
6740 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6741 echo "configure:6742: checking for dld_link in -ldld" >&5
6742 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6744   echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746   ac_save_LIBS="$LIBS"
6747 LIBS="-ldld  $LIBS"
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 /* Override any gcc2 internal prototype to avoid an error.  */
6752 /* We use char because int might match the return type of a gcc2
6753     builtin and then its argument prototype would still apply.  */
6754 char dld_link();
6755
6756 int main() {
6757 dld_link()
6758 ; return 0; }
6759 EOF
6760 if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=yes"
6763 else
6764   echo "configure: failed program was:" >&5
6765   cat conftest.$ac_ext >&5
6766   rm -rf conftest*
6767   eval "ac_cv_lib_$ac_lib_var=no"
6768 fi
6769 rm -f conftest*
6770 LIBS="$ac_save_LIBS"
6771
6772 fi
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6774   echo "$ac_t""yes" 1>&6
6775   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6776 else
6777   echo "$ac_t""no" 1>&6
6778 fi
6779
6780               
6781 fi
6782
6783             
6784 fi
6785
6786           
6787 fi
6788
6789         
6790 fi
6791
6792       
6793 fi
6794
6795     ;;
6796   esac
6797
6798   if test "x$lt_cv_dlopen" != xno; then
6799     enable_dlopen=yes
6800   else
6801     enable_dlopen=no
6802   fi
6803
6804   case $lt_cv_dlopen in
6805   dlopen)
6806     save_CPPFLAGS="$CPPFLAGS"
6807         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6808
6809     save_LDFLAGS="$LDFLAGS"
6810     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6811
6812     save_LIBS="$LIBS"
6813     LIBS="$lt_cv_dlopen_libs $LIBS"
6814
6815     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6816 echo "configure:6817: checking whether a program can dlopen itself" >&5
6817 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6818   echo $ac_n "(cached) $ac_c" 1>&6
6819 else
6820           if test "$cross_compiling" = yes; then :
6821   lt_cv_dlopen_self=cross
6822 else
6823     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6824   lt_status=$lt_dlunknown
6825   cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828
6829 #if HAVE_DLFCN_H
6830 #include <dlfcn.h>
6831 #endif
6832
6833 #include <stdio.h>
6834
6835 #ifdef RTLD_GLOBAL
6836 #  define LT_DLGLOBAL           RTLD_GLOBAL
6837 #else
6838 #  ifdef DL_GLOBAL
6839 #    define LT_DLGLOBAL         DL_GLOBAL
6840 #  else
6841 #    define LT_DLGLOBAL         0
6842 #  endif
6843 #endif
6844
6845 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6846    find out it does not work in some platform. */
6847 #ifndef LT_DLLAZY_OR_NOW
6848 #  ifdef RTLD_LAZY
6849 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6850 #  else
6851 #    ifdef DL_LAZY
6852 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6853 #    else
6854 #      ifdef RTLD_NOW
6855 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6856 #      else
6857 #        ifdef DL_NOW
6858 #          define LT_DLLAZY_OR_NOW      DL_NOW
6859 #        else
6860 #          define LT_DLLAZY_OR_NOW      0
6861 #        endif
6862 #      endif
6863 #    endif
6864 #  endif
6865 #endif
6866
6867 #ifdef __cplusplus
6868 extern "C" void exit (int);
6869 #endif
6870
6871 void fnord() { int i=42;}
6872 int main ()
6873 {
6874   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6875   int status = $lt_dlunknown;
6876
6877   if (self)
6878     {
6879       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6880       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6881       /* dlclose (self); */
6882     }
6883
6884     exit (status);
6885 }
6886 EOF
6887   if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6888     (./conftest; exit; ) 2>/dev/null
6889     lt_status=$?
6890     case x$lt_status in
6891       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6892       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6893       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6894     esac
6895   else :
6896     # compilation failed
6897     lt_cv_dlopen_self=no
6898   fi
6899 fi
6900 rm -fr conftest*
6901
6902     
6903 fi
6904
6905 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6906
6907     if test "x$lt_cv_dlopen_self" = xyes; then
6908       LDFLAGS="$LDFLAGS $link_static_flag"
6909       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6910 echo "configure:6911: checking whether a statically linked program can dlopen itself" >&5
6911 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6912   echo $ac_n "(cached) $ac_c" 1>&6
6913 else
6914           if test "$cross_compiling" = yes; then :
6915   lt_cv_dlopen_self_static=cross
6916 else
6917     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6918   lt_status=$lt_dlunknown
6919   cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6922
6923 #if HAVE_DLFCN_H
6924 #include <dlfcn.h>
6925 #endif
6926
6927 #include <stdio.h>
6928
6929 #ifdef RTLD_GLOBAL
6930 #  define LT_DLGLOBAL           RTLD_GLOBAL
6931 #else
6932 #  ifdef DL_GLOBAL
6933 #    define LT_DLGLOBAL         DL_GLOBAL
6934 #  else
6935 #    define LT_DLGLOBAL         0
6936 #  endif
6937 #endif
6938
6939 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6940    find out it does not work in some platform. */
6941 #ifndef LT_DLLAZY_OR_NOW
6942 #  ifdef RTLD_LAZY
6943 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6944 #  else
6945 #    ifdef DL_LAZY
6946 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6947 #    else
6948 #      ifdef RTLD_NOW
6949 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6950 #      else
6951 #        ifdef DL_NOW
6952 #          define LT_DLLAZY_OR_NOW      DL_NOW
6953 #        else
6954 #          define LT_DLLAZY_OR_NOW      0
6955 #        endif
6956 #      endif
6957 #    endif
6958 #  endif
6959 #endif
6960
6961 #ifdef __cplusplus
6962 extern "C" void exit (int);
6963 #endif
6964
6965 void fnord() { int i=42;}
6966 int main ()
6967 {
6968   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6969   int status = $lt_dlunknown;
6970
6971   if (self)
6972     {
6973       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6974       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6975       /* dlclose (self); */
6976     }
6977
6978     exit (status);
6979 }
6980 EOF
6981   if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6982     (./conftest; exit; ) 2>/dev/null
6983     lt_status=$?
6984     case x$lt_status in
6985       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6986       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6987       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6988     esac
6989   else :
6990     # compilation failed
6991     lt_cv_dlopen_self_static=no
6992   fi
6993 fi
6994 rm -fr conftest*
6995
6996       
6997 fi
6998
6999 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7000     fi
7001
7002     CPPFLAGS="$save_CPPFLAGS"
7003     LDFLAGS="$save_LDFLAGS"
7004     LIBS="$save_LIBS"
7005     ;;
7006   esac
7007
7008   case $lt_cv_dlopen_self in
7009   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7010   *) enable_dlopen_self=unknown ;;
7011   esac
7012
7013   case $lt_cv_dlopen_self_static in
7014   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7015   *) enable_dlopen_self_static=unknown ;;
7016   esac
7017 fi
7018
7019
7020 if test "$enable_shared" = yes && test "$GCC" = yes; then
7021   case $archive_cmds in
7022   *'~'*)
7023     # FIXME: we may have to deal with multi-command sequences.
7024     ;;
7025   '$CC '*)
7026     # Test whether the compiler implicitly links with -lc since on some
7027     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7028     # to ld, don't add -lc before -lgcc.
7029     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7030 echo "configure:7031: checking whether -lc should be explicitly linked in" >&5
7031     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7032   echo $ac_n "(cached) $ac_c" 1>&6
7033 else
7034   $rm conftest*
7035     echo 'static int dummy;' > conftest.$ac_ext
7036
7037     if { (eval echo configure:7038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7038       soname=conftest
7039       lib=conftest
7040       libobjs=conftest.$ac_objext
7041       deplibs=
7042       wl=$lt_cv_prog_cc_wl
7043       compiler_flags=-v
7044       linker_flags=-v
7045       verstring=
7046       output_objdir=.
7047       libname=conftest
7048       save_allow_undefined_flag=$allow_undefined_flag
7049       allow_undefined_flag=
7050       if { (eval echo configure:7051: \"$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; }
7051       then
7052         lt_cv_archive_cmds_need_lc=no
7053       else
7054         lt_cv_archive_cmds_need_lc=yes
7055       fi
7056       allow_undefined_flag=$save_allow_undefined_flag
7057     else
7058       cat conftest.err 1>&5
7059     fi
7060 fi
7061
7062     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7063     ;;
7064   esac
7065 fi
7066 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7067
7068 # The second clause should only fire when bootstrapping the
7069 # libtool distribution, otherwise you forgot to ship ltmain.sh
7070 # with your package, and you will get complaints that there are
7071 # no rules to generate ltmain.sh.
7072 if test -f "$ltmain"; then
7073   :
7074 else
7075   # If there is no Makefile yet, we rely on a make rule to execute
7076   # `config.status --recheck' to rerun these tests and create the
7077   # libtool script then.
7078   test -f Makefile && make "$ltmain"
7079 fi
7080
7081 if test -f "$ltmain"; then
7082   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7083   $rm -f "${ofile}T"
7084
7085   echo creating $ofile
7086
7087   # Now quote all the things that may contain metacharacters while being
7088   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7089   # variables and quote the copies for generation of the libtool script.
7090   for var in echo old_CC old_CFLAGS \
7091     AR AR_FLAGS CC LD LN_S NM SHELL \
7092     reload_flag reload_cmds wl \
7093     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7094     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7095     library_names_spec soname_spec \
7096     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7097     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7098     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7099     old_striplib striplib file_magic_cmd export_symbols_cmds \
7100     deplibs_check_method allow_undefined_flag no_undefined_flag \
7101     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7102     global_symbol_to_c_name_address \
7103     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7104     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7105     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7106
7107     case $var in
7108     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7109     old_postinstall_cmds | old_postuninstall_cmds | \
7110     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7111     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7112     postinstall_cmds | postuninstall_cmds | \
7113     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7114       # Double-quote double-evaled strings.
7115       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7116       ;;
7117     *)
7118       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7119       ;;
7120     esac
7121   done
7122
7123   cat <<__EOF__ > "${ofile}T"
7124 #! $SHELL
7125
7126 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7127 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7128 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7129 #
7130 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7131 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7132 #
7133 # This program is free software; you can redistribute it and/or modify
7134 # it under the terms of the GNU General Public License as published by
7135 # the Free Software Foundation; either version 2 of the License, or
7136 # (at your option) any later version.
7137 #
7138 # This program is distributed in the hope that it will be useful, but
7139 # WITHOUT ANY WARRANTY; without even the implied warranty of
7140 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7141 # General Public License for more details.
7142 #
7143 # You should have received a copy of the GNU General Public License
7144 # along with this program; if not, write to the Free Software
7145 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7146 #
7147 # As a special exception to the GNU General Public License, if you
7148 # distribute this file as part of a program that contains a
7149 # configuration script generated by Autoconf, you may include it under
7150 # the same distribution terms that you use for the rest of that program.
7151
7152 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7153 Xsed="sed -e s/^X//"
7154
7155 # The HP-UX ksh and POSIX shell print the target directory to stdout
7156 # if CDPATH is set.
7157 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7158
7159 # ### BEGIN LIBTOOL CONFIG
7160
7161 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7162
7163 # Shell to use when invoking shell scripts.
7164 SHELL=$lt_SHELL
7165
7166 # Whether or not to build shared libraries.
7167 build_libtool_libs=$enable_shared
7168
7169 # Whether or not to build static libraries.
7170 build_old_libs=$enable_static
7171
7172 # Whether or not to add -lc for building shared libraries.
7173 build_libtool_need_lc=$need_lc
7174
7175 # Whether or not to optimize for fast installation.
7176 fast_install=$enable_fast_install
7177
7178 # The host system.
7179 host_alias=$host_alias
7180 host=$host
7181
7182 # An echo program that does not interpret backslashes.
7183 echo=$lt_echo
7184
7185 # The archiver.
7186 AR=$lt_AR
7187 AR_FLAGS=$lt_AR_FLAGS
7188
7189 # The default C compiler.
7190 CC=$lt_CC
7191
7192 # Is the compiler the GNU C compiler?
7193 with_gcc=$GCC
7194
7195 # The linker used to build libraries.
7196 LD=$lt_LD
7197
7198 # Whether we need hard or soft links.
7199 LN_S=$lt_LN_S
7200
7201 # A BSD-compatible nm program.
7202 NM=$lt_NM
7203
7204 # A symbol stripping program
7205 STRIP=$STRIP
7206
7207 # Used to examine libraries when file_magic_cmd begins "file"
7208 MAGIC_CMD=$MAGIC_CMD
7209
7210 # Used on cygwin: DLL creation program.
7211 DLLTOOL="$DLLTOOL"
7212
7213 # Used on cygwin: object dumper.
7214 OBJDUMP="$OBJDUMP"
7215
7216 # Used on cygwin: assembler.
7217 AS="$AS"
7218
7219 # The name of the directory that contains temporary libtool files.
7220 objdir=$objdir
7221
7222 # How to create reloadable object files.
7223 reload_flag=$lt_reload_flag
7224 reload_cmds=$lt_reload_cmds
7225
7226 # How to pass a linker flag through the compiler.
7227 wl=$lt_wl
7228
7229 # Object file suffix (normally "o").
7230 objext="$ac_objext"
7231
7232 # Old archive suffix (normally "a").
7233 libext="$libext"
7234
7235 # Executable file suffix (normally "").
7236 exeext="$exeext"
7237
7238 # Additional compiler flags for building library objects.
7239 pic_flag=$lt_pic_flag
7240 pic_mode=$pic_mode
7241
7242 # Does compiler simultaneously support -c and -o options?
7243 compiler_c_o=$lt_compiler_c_o
7244
7245 # Can we write directly to a .lo ?
7246 compiler_o_lo=$lt_compiler_o_lo
7247
7248 # Must we lock files when doing compilation ?
7249 need_locks=$lt_need_locks
7250
7251 # Do we need the lib prefix for modules?
7252 need_lib_prefix=$need_lib_prefix
7253
7254 # Do we need a version for libraries?
7255 need_version=$need_version
7256
7257 # Whether dlopen is supported.
7258 dlopen_support=$enable_dlopen
7259
7260 # Whether dlopen of programs is supported.
7261 dlopen_self=$enable_dlopen_self
7262
7263 # Whether dlopen of statically linked programs is supported.
7264 dlopen_self_static=$enable_dlopen_self_static
7265
7266 # Compiler flag to prevent dynamic linking.
7267 link_static_flag=$lt_link_static_flag
7268
7269 # Compiler flag to turn off builtin functions.
7270 no_builtin_flag=$lt_no_builtin_flag
7271
7272 # Compiler flag to allow reflexive dlopens.
7273 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7274
7275 # Compiler flag to generate shared objects directly from archives.
7276 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7277
7278 # Compiler flag to generate thread-safe objects.
7279 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7280
7281 # Library versioning type.
7282 version_type=$version_type
7283
7284 # Format of library name prefix.
7285 libname_spec=$lt_libname_spec
7286
7287 # List of archive names.  First name is the real one, the rest are links.
7288 # The last name is the one that the linker finds with -lNAME.
7289 library_names_spec=$lt_library_names_spec
7290
7291 # The coded name of the library, if different from the real name.
7292 soname_spec=$lt_soname_spec
7293
7294 # Commands used to build and install an old-style archive.
7295 RANLIB=$lt_RANLIB
7296 old_archive_cmds=$lt_old_archive_cmds
7297 old_postinstall_cmds=$lt_old_postinstall_cmds
7298 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7299
7300 # Create an old-style archive from a shared archive.
7301 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7302
7303 # Create a temporary old-style archive to link instead of a shared archive.
7304 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7305
7306 # Commands used to build and install a shared archive.
7307 archive_cmds=$lt_archive_cmds
7308 archive_expsym_cmds=$lt_archive_expsym_cmds
7309 postinstall_cmds=$lt_postinstall_cmds
7310 postuninstall_cmds=$lt_postuninstall_cmds
7311
7312 # Commands to strip libraries.
7313 old_striplib=$lt_old_striplib
7314 striplib=$lt_striplib
7315
7316 # Method to check whether dependent libraries are shared objects.
7317 deplibs_check_method=$lt_deplibs_check_method
7318
7319 # Command to use when deplibs_check_method == file_magic.
7320 file_magic_cmd=$lt_file_magic_cmd
7321
7322 # Flag that allows shared libraries with undefined symbols to be built.
7323 allow_undefined_flag=$lt_allow_undefined_flag
7324
7325 # Flag that forces no undefined symbols.
7326 no_undefined_flag=$lt_no_undefined_flag
7327
7328 # Commands used to finish a libtool library installation in a directory.
7329 finish_cmds=$lt_finish_cmds
7330
7331 # Same as above, but a single script fragment to be evaled but not shown.
7332 finish_eval=$lt_finish_eval
7333
7334 # Take the output of nm and produce a listing of raw symbols and C names.
7335 global_symbol_pipe=$lt_global_symbol_pipe
7336
7337 # Transform the output of nm in a proper C declaration
7338 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7339
7340 # Transform the output of nm in a C name address pair
7341 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7342
7343 # This is the shared library runtime path variable.
7344 runpath_var=$runpath_var
7345
7346 # This is the shared library path variable.
7347 shlibpath_var=$shlibpath_var
7348
7349 # Is shlibpath searched before the hard-coded library search path?
7350 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7351
7352 # How to hardcode a shared library path into an executable.
7353 hardcode_action=$hardcode_action
7354
7355 # Whether we should hardcode library paths into libraries.
7356 hardcode_into_libs=$hardcode_into_libs
7357
7358 # Flag to hardcode \$libdir into a binary during linking.
7359 # This must work even if \$libdir does not exist.
7360 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7361
7362 # Whether we need a single -rpath flag with a separated argument.
7363 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7364
7365 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7366 # resulting binary.
7367 hardcode_direct=$hardcode_direct
7368
7369 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7370 # resulting binary.
7371 hardcode_minus_L=$hardcode_minus_L
7372
7373 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7374 # the resulting binary.
7375 hardcode_shlibpath_var=$hardcode_shlibpath_var
7376
7377 # Variables whose values should be saved in libtool wrapper scripts and
7378 # restored at relink time.
7379 variables_saved_for_relink="$variables_saved_for_relink"
7380
7381 # Whether libtool must link a program against all its dependency libraries.
7382 link_all_deplibs=$link_all_deplibs
7383
7384 # Compile-time system search path for libraries
7385 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7386
7387 # Run-time system search path for libraries
7388 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7389
7390 # Fix the shell variable \$srcfile for the compiler.
7391 fix_srcfile_path="$fix_srcfile_path"
7392
7393 # Set to yes if exported symbols are required.
7394 always_export_symbols=$always_export_symbols
7395
7396 # The commands to list exported symbols.
7397 export_symbols_cmds=$lt_export_symbols_cmds
7398
7399 # The commands to extract the exported symbol list from a shared archive.
7400 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7401
7402 # Symbols that should not be listed in the preloaded symbols.
7403 exclude_expsyms=$lt_exclude_expsyms
7404
7405 # Symbols that must always be exported.
7406 include_expsyms=$lt_include_expsyms
7407
7408 # ### END LIBTOOL CONFIG
7409
7410 __EOF__
7411
7412   case $host_os in
7413   aix3*)
7414     cat <<\EOF >> "${ofile}T"
7415
7416 # AIX sometimes has problems with the GCC collect2 program.  For some
7417 # reason, if we set the COLLECT_NAMES environment variable, the problems
7418 # vanish in a puff of smoke.
7419 if test "X${COLLECT_NAMES+set}" != Xset; then
7420   COLLECT_NAMES=
7421   export COLLECT_NAMES
7422 fi
7423 EOF
7424     ;;
7425   esac
7426
7427   case $host_os in
7428   cygwin* | mingw* | pw32* | os2*)
7429     cat <<'EOF' >> "${ofile}T"
7430       # This is a source program that is used to create dlls on Windows
7431       # Don't remove nor modify the starting and closing comments
7432 # /* ltdll.c starts here */
7433 # #define WIN32_LEAN_AND_MEAN
7434 # #include <windows.h>
7435 # #undef WIN32_LEAN_AND_MEAN
7436 # #include <stdio.h>
7437 #
7438 # #ifndef __CYGWIN__
7439 # #  ifdef __CYGWIN32__
7440 # #    define __CYGWIN__ __CYGWIN32__
7441 # #  endif
7442 # #endif
7443 #
7444 # #ifdef __cplusplus
7445 # extern "C" {
7446 # #endif
7447 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7448 # #ifdef __cplusplus
7449 # }
7450 # #endif
7451 #
7452 # #ifdef __CYGWIN__
7453 # #include <cygwin/cygwin_dll.h>
7454 # DECLARE_CYGWIN_DLL( DllMain );
7455 # #endif
7456 # HINSTANCE __hDllInstance_base;
7457 #
7458 # BOOL APIENTRY
7459 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7460 # {
7461 #   __hDllInstance_base = hInst;
7462 #   return TRUE;
7463 # }
7464 # /* ltdll.c ends here */
7465         # This is a source program that is used to create import libraries
7466         # on Windows for dlls which lack them. Don't remove nor modify the
7467         # starting and closing comments
7468 # /* impgen.c starts here */
7469 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7470 #
7471 #  This file is part of GNU libtool.
7472 #
7473 #  This program is free software; you can redistribute it and/or modify
7474 #  it under the terms of the GNU General Public License as published by
7475 #  the Free Software Foundation; either version 2 of the License, or
7476 #  (at your option) any later version.
7477 #
7478 #  This program is distributed in the hope that it will be useful,
7479 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7480 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7481 #  GNU General Public License for more details.
7482 #
7483 #  You should have received a copy of the GNU General Public License
7484 #  along with this program; if not, write to the Free Software
7485 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7486 #  */
7487 #
7488 # #include <stdio.h>            /* for printf() */
7489 # #include <unistd.h>           /* for open(), lseek(), read() */
7490 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7491 # #include <string.h>           /* for strdup() */
7492 #
7493 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7494 # #ifndef O_BINARY
7495 # #define O_BINARY 0
7496 # #endif
7497 #
7498 # static unsigned int
7499 # pe_get16 (fd, offset)
7500 #      int fd;
7501 #      int offset;
7502 # {
7503 #   unsigned char b[2];
7504 #   lseek (fd, offset, SEEK_SET);
7505 #   read (fd, b, 2);
7506 #   return b[0] + (b[1]<<8);
7507 # }
7508 #
7509 # static unsigned int
7510 # pe_get32 (fd, offset)
7511 #     int fd;
7512 #     int offset;
7513 # {
7514 #   unsigned char b[4];
7515 #   lseek (fd, offset, SEEK_SET);
7516 #   read (fd, b, 4);
7517 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7518 # }
7519 #
7520 # static unsigned int
7521 # pe_as32 (ptr)
7522 #      void *ptr;
7523 # {
7524 #   unsigned char *b = ptr;
7525 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7526 # }
7527 #
7528 # int
7529 # main (argc, argv)
7530 #     int argc;
7531 #     char *argv[];
7532 # {
7533 #     int dll;
7534 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7535 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7536 #     unsigned long name_rvas, nexp;
7537 #     unsigned char *expdata, *erva;
7538 #     char *filename, *dll_name;
7539 #
7540 #     filename = argv[1];
7541 #
7542 #     dll = open(filename, O_RDONLY|O_BINARY);
7543 #     if (dll < 1)
7544 #       return 1;
7545 #
7546 #     dll_name = filename;
7547 #
7548 #     for (i=0; filename[i]; i++)
7549 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7550 #           dll_name = filename + i +1;
7551 #
7552 #     pe_header_offset = pe_get32 (dll, 0x3c);
7553 #     opthdr_ofs = pe_header_offset + 4 + 20;
7554 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7555 #
7556 #     if (num_entries < 1) /* no exports */
7557 #       return 1;
7558 #
7559 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7560 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7561 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7562 #     secptr = (pe_header_offset + 4 + 20 +
7563 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7564 #
7565 #     expptr = 0;
7566 #     for (i = 0; i < nsections; i++)
7567 #     {
7568 #       char sname[8];
7569 #       unsigned long secptr1 = secptr + 40 * i;
7570 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7571 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7572 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7573 #       lseek(dll, secptr1, SEEK_SET);
7574 #       read(dll, sname, 8);
7575 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7576 #       {
7577 #           expptr = fptr + (export_rva - vaddr);
7578 #           if (export_rva + export_size > vaddr + vsize)
7579 #               export_size = vsize - (export_rva - vaddr);
7580 #           break;
7581 #       }
7582 #     }
7583 #
7584 #     expdata = (unsigned char*)malloc(export_size);
7585 #     lseek (dll, expptr, SEEK_SET);
7586 #     read (dll, expdata, export_size);
7587 #     erva = expdata - export_rva;
7588 #
7589 #     nexp = pe_as32 (expdata+24);
7590 #     name_rvas = pe_as32 (expdata+32);
7591 #
7592 #     printf ("EXPORTS\n");
7593 #     for (i = 0; i<nexp; i++)
7594 #     {
7595 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7596 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7597 #     }
7598 #
7599 #     return 0;
7600 # }
7601 # /* impgen.c ends here */
7602
7603 EOF
7604     ;;
7605   esac
7606
7607   # We use sed instead of cat because bash on DJGPP gets confused if
7608   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7609   # text mode, it properly converts lines to CR/LF.  This bash problem
7610   # is reportedly fixed, but why not run on old versions too?
7611   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7612
7613   mv -f "${ofile}T" "$ofile" || \
7614     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7615   chmod +x "$ofile"
7616 fi
7617
7618
7619
7620
7621
7622 # This can be used to rebuild libtool when needed
7623 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7624
7625 # Always use our own libtool.
7626 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7627
7628 # Prevent multiple expansion
7629
7630
7631
7632 for ac_prog in mawk gawk nawk awk
7633 do
7634 # Extract the first word of "$ac_prog", so it can be a program name with args.
7635 set dummy $ac_prog; ac_word=$2
7636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7637 echo "configure:7638: checking for $ac_word" >&5
7638 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7639   echo $ac_n "(cached) $ac_c" 1>&6
7640 else
7641   if test -n "$AWK"; then
7642   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7643 else
7644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7645   ac_dummy="$PATH"
7646   for ac_dir in $ac_dummy; do
7647     test -z "$ac_dir" && ac_dir=.
7648     if test -f $ac_dir/$ac_word; then
7649       ac_cv_prog_AWK="$ac_prog"
7650       break
7651     fi
7652   done
7653   IFS="$ac_save_ifs"
7654 fi
7655 fi
7656 AWK="$ac_cv_prog_AWK"
7657 if test -n "$AWK"; then
7658   echo "$ac_t""$AWK" 1>&6
7659 else
7660   echo "$ac_t""no" 1>&6
7661 fi
7662
7663 test -n "$AWK" && break
7664 done
7665
7666 # test for ln hardlink support
7667 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7668 echo "configure:7669: checking whether ln works" >&5
7669 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7670   echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672   rm -f conftest.src conftest.dst
7673 echo "conftest" > conftest.src
7674 if ln conftest.src conftest.dst 2>/dev/null
7675 then
7676   ol_cv_prog_LN_H="ln"
7677 else
7678   ol_cv_prog_LN_H="cp"
7679 fi
7680 rm -f conftest.src conftest.dst
7681
7682 fi
7683 LN_H="$ol_cv_prog_LN_H"
7684 if test "$ol_cv_prog_LN_H" = "ln"; then
7685         echo "$ac_t""yes" 1>&6
7686 else
7687         echo "$ac_t""no" 1>&6
7688 fi
7689
7690 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7691 echo "configure:7692: checking whether ln -s works" >&5
7692 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7693   echo $ac_n "(cached) $ac_c" 1>&6
7694 else
7695   rm -f conftestdata
7696 if ln -s X conftestdata 2>/dev/null
7697 then
7698   rm -f conftestdata
7699   ac_cv_prog_LN_S="ln -s"
7700 else
7701   ac_cv_prog_LN_S=ln
7702 fi
7703 fi
7704 LN_S="$ac_cv_prog_LN_S"
7705 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7706   echo "$ac_t""yes" 1>&6
7707 else
7708   echo "$ac_t""no" 1>&6
7709 fi
7710
7711
7712 # Extract the first word of "sendmail", so it can be a program name with args.
7713 set dummy sendmail; ac_word=$2
7714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7715 echo "configure:7716: checking for $ac_word" >&5
7716 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   case "$SENDMAIL" in
7720   /*)
7721   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7722   ;;
7723   ?:/*)
7724   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7725   ;;
7726   *)
7727   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7728   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7729   for ac_dir in $ac_dummy; do 
7730     test -z "$ac_dir" && ac_dir=.
7731     if test -f $ac_dir/$ac_word; then
7732       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7733       break
7734     fi
7735   done
7736   IFS="$ac_save_ifs"
7737   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7738   ;;
7739 esac
7740 fi
7741 SENDMAIL="$ac_cv_path_SENDMAIL"
7742 if test -n "$SENDMAIL"; then
7743   echo "$ac_t""$SENDMAIL" 1>&6
7744 else
7745   echo "$ac_t""no" 1>&6
7746 fi
7747
7748 # Extract the first word of "vi", so it can be a program name with args.
7749 set dummy vi; ac_word=$2
7750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7751 echo "configure:7752: checking for $ac_word" >&5
7752 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7753   echo $ac_n "(cached) $ac_c" 1>&6
7754 else
7755   case "$EDITOR" in
7756   /*)
7757   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7758   ;;
7759   ?:/*)
7760   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7761   ;;
7762   *)
7763   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7764   ac_dummy="$PATH:/usr/ucb"
7765   for ac_dir in $ac_dummy; do 
7766     test -z "$ac_dir" && ac_dir=.
7767     if test -f $ac_dir/$ac_word; then
7768       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7769       break
7770     fi
7771   done
7772   IFS="$ac_save_ifs"
7773   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7774   ;;
7775 esac
7776 fi
7777 EDITOR="$ac_cv_path_EDITOR"
7778 if test -n "$EDITOR"; then
7779   echo "$ac_t""$EDITOR" 1>&6
7780 else
7781   echo "$ac_t""no" 1>&6
7782 fi
7783
7784
7785 ol_link_perl=no
7786 if test $ol_enable_perl != no ; then
7787         # Extract the first word of "perl", so it can be a program name with args.
7788 set dummy perl; ac_word=$2
7789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7790 echo "configure:7791: checking for $ac_word" >&5
7791 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7792   echo $ac_n "(cached) $ac_c" 1>&6
7793 else
7794   case "$PERLBIN" in
7795   /*)
7796   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7797   ;;
7798   ?:/*)
7799   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7800   ;;
7801   *)
7802   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7803   ac_dummy="$PATH"
7804   for ac_dir in $ac_dummy; do 
7805     test -z "$ac_dir" && ac_dir=.
7806     if test -f $ac_dir/$ac_word; then
7807       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7808       break
7809     fi
7810   done
7811   IFS="$ac_save_ifs"
7812   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7813   ;;
7814 esac
7815 fi
7816 PERLBIN="$ac_cv_path_PERLBIN"
7817 if test -n "$PERLBIN"; then
7818   echo "$ac_t""$PERLBIN" 1>&6
7819 else
7820   echo "$ac_t""no" 1>&6
7821 fi
7822
7823
7824         if test "no$PERLBIN" = "no" ; then
7825                 if test $ol_enable_perl = yes ; then
7826                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7827                 fi
7828
7829         else
7830                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7831                 if test x"$ol_with_perl_module" = "xstatic" ; then
7832                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7833                 else
7834                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7835                 fi
7836                                 ol_link_perl=yes
7837         fi
7838 fi
7839
7840 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7841 echo "configure:7842: checking how to run the C preprocessor" >&5
7842 # On Suns, sometimes $CPP names a directory.
7843 if test -n "$CPP" && test -d "$CPP"; then
7844   CPP=
7845 fi
7846 if test -z "$CPP"; then
7847 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7848   echo $ac_n "(cached) $ac_c" 1>&6
7849 else
7850     # This must be in double quotes, not single quotes, because CPP may get
7851   # substituted into the Makefile and "${CC-cc}" will confuse make.
7852   CPP="${CC-cc} -E"
7853   # On the NeXT, cc -E runs the code through the compiler's parser,
7854   # not just through cpp.
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <assert.h>
7859 Syntax Error
7860 EOF
7861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7862 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7864 if test -z "$ac_err"; then
7865   :
7866 else
7867   echo "$ac_err" >&5
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   CPP="${CC-cc} -E -traditional-cpp"
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <assert.h>
7876 Syntax Error
7877 EOF
7878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7879 { (eval echo configure:7880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7881 if test -z "$ac_err"; then
7882   :
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   CPP="${CC-cc} -nologo -E"
7889   cat > conftest.$ac_ext <<EOF
7890 #line 7891 "configure"
7891 #include "confdefs.h"
7892 #include <assert.h>
7893 Syntax Error
7894 EOF
7895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7896 { (eval echo configure:7897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7898 if test -z "$ac_err"; then
7899   :
7900 else
7901   echo "$ac_err" >&5
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   CPP=/lib/cpp
7906 fi
7907 rm -f conftest*
7908 fi
7909 rm -f conftest*
7910 fi
7911 rm -f conftest*
7912   ac_cv_prog_CPP="$CPP"
7913 fi
7914   CPP="$ac_cv_prog_CPP"
7915 else
7916   ac_cv_prog_CPP="$CPP"
7917 fi
7918 echo "$ac_t""$CPP" 1>&6
7919
7920
7921 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7922         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7923
7924 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7925         echo "configure: warning: programs compiled here do run here..." 1>&2
7926         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7927
7928 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7929         echo "configure: warning: programs compiled here do not run here..." 1>&2
7930         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7931 fi
7932
7933
7934 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7935 echo "configure:7936: checking for Cygwin environment" >&5
7936 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7937   echo $ac_n "(cached) $ac_c" 1>&6
7938 else
7939   cat > conftest.$ac_ext <<EOF
7940 #line 7941 "configure"
7941 #include "confdefs.h"
7942
7943 int main() {
7944
7945 #ifndef __CYGWIN__
7946 #define __CYGWIN__ __CYGWIN32__
7947 #endif
7948 return __CYGWIN__;
7949 ; return 0; }
7950 EOF
7951 if { (eval echo configure:7952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7952   rm -rf conftest*
7953   ac_cv_cygwin=yes
7954 else
7955   echo "configure: failed program was:" >&5
7956   cat conftest.$ac_ext >&5
7957   rm -rf conftest*
7958   ac_cv_cygwin=no
7959 fi
7960 rm -f conftest*
7961 fi
7962
7963 echo "$ac_t""$ac_cv_cygwin" 1>&6
7964 CYGWIN=
7965 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7966 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7967 echo "configure:7968: checking for mingw32 environment" >&5
7968 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7969   echo $ac_n "(cached) $ac_c" 1>&6
7970 else
7971   cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974
7975 int main() {
7976 return __MINGW32__;
7977 ; return 0; }
7978 EOF
7979 if { (eval echo configure:7980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7980   rm -rf conftest*
7981   ac_cv_mingw32=yes
7982 else
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   ac_cv_mingw32=no
7987 fi
7988 rm -f conftest*
7989 fi
7990
7991 echo "$ac_t""$ac_cv_mingw32" 1>&6
7992 MINGW32=
7993 test "$ac_cv_mingw32" = yes && MINGW32=yes
7994
7995
7996
7997 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7998 echo "configure:7999: checking for executable suffix" >&5
7999 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8000   echo $ac_n "(cached) $ac_c" 1>&6
8001 else
8002   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8003   ac_cv_exeext=.exe
8004 else
8005   rm -f conftest*
8006   echo 'int main () { return 0; }' > conftest.$ac_ext
8007   ac_cv_exeext=
8008   if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8009     for file in conftest.*; do
8010       case $file in
8011       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8012       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8013       esac
8014     done
8015   else
8016     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8017   fi
8018   rm -f conftest*
8019   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8020 fi
8021 fi
8022
8023 EXEEXT=""
8024 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8025 echo "$ac_t""${ac_cv_exeext}" 1>&6
8026 ac_exeext=$EXEEXT
8027
8028 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8029 echo "configure:8030: checking for object suffix" >&5
8030 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8031   echo $ac_n "(cached) $ac_c" 1>&6
8032 else
8033   rm -f conftest*
8034 echo 'int i = 1;' > conftest.$ac_ext
8035 if { (eval echo configure:8036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8036   for ac_file in conftest.*; do
8037     case $ac_file in
8038     *.c) ;;
8039     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8040     esac
8041   done
8042 else
8043   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8044 fi
8045 rm -f conftest*
8046 fi
8047
8048 echo "$ac_t""$ac_cv_objext" 1>&6
8049 OBJEXT=$ac_cv_objext
8050 ac_objext=$ac_cv_objext
8051
8052
8053 cat >> confdefs.h <<EOF
8054 #define EXEEXT "${EXEEXT}"
8055 EOF
8056
8057
8058 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8059 echo "configure:8060: checking for be_app in -lbe" >&5
8060 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8062   echo $ac_n "(cached) $ac_c" 1>&6
8063 else
8064   ac_save_LIBS="$LIBS"
8065 LIBS="-lbe -lroot -lnet $LIBS"
8066 cat > conftest.$ac_ext <<EOF
8067 #line 8068 "configure"
8068 #include "confdefs.h"
8069 /* Override any gcc2 internal prototype to avoid an error.  */
8070 /* We use char because int might match the return type of a gcc2
8071     builtin and then its argument prototype would still apply.  */
8072 char be_app();
8073
8074 int main() {
8075 be_app()
8076 ; return 0; }
8077 EOF
8078 if { (eval echo configure:8079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8079   rm -rf conftest*
8080   eval "ac_cv_lib_$ac_lib_var=yes"
8081 else
8082   echo "configure: failed program was:" >&5
8083   cat conftest.$ac_ext >&5
8084   rm -rf conftest*
8085   eval "ac_cv_lib_$ac_lib_var=no"
8086 fi
8087 rm -f conftest*
8088 LIBS="$ac_save_LIBS"
8089
8090 fi
8091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8092   echo "$ac_t""yes" 1>&6
8093   LIBS="$LIBS -lbe -lroot -lnet"
8094 else
8095   echo "$ac_t""no" 1>&6
8096 :
8097 fi
8098
8099
8100
8101
8102
8103 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8104 echo "configure:8105: checking for ${CC-cc} option to accept ANSI C" >&5
8105 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8106   echo $ac_n "(cached) $ac_c" 1>&6
8107 else
8108   am_cv_prog_cc_stdc=no
8109 ac_save_CC="$CC"
8110 # Don't try gcc -ansi; that turns off useful extensions and
8111 # breaks some systems' header files.
8112 # AIX                   -qlanglvl=ansi
8113 # Ultrix and OSF/1      -std1
8114 # HP-UX 10.20 and later -Ae
8115 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8116 # SVR4                  -Xc -D__EXTENSIONS__
8117 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8118 do
8119   CC="$ac_save_CC $ac_arg"
8120   cat > conftest.$ac_ext <<EOF
8121 #line 8122 "configure"
8122 #include "confdefs.h"
8123 #include <stdarg.h>
8124 #include <stdio.h>
8125 #include <sys/types.h>
8126 #include <sys/stat.h>
8127 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8128 struct buf { int x; };
8129 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8130 static char *e (p, i)
8131      char **p;
8132      int i;
8133 {
8134   return p[i];
8135 }
8136 static char *f (char * (*g) (char **, int), char **p, ...)
8137 {
8138   char *s;
8139   va_list v;
8140   va_start (v,p);
8141   s = g (p, va_arg (v,int));
8142   va_end (v);
8143   return s;
8144 }
8145 int test (int i, double x);
8146 struct s1 {int (*f) (int a);};
8147 struct s2 {int (*f) (double a);};
8148 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8149 int argc;
8150 char **argv;
8151
8152 int main() {
8153
8154 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8155
8156 ; return 0; }
8157 EOF
8158 if { (eval echo configure:8159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8159   rm -rf conftest*
8160   am_cv_prog_cc_stdc="$ac_arg"; break
8161 else
8162   echo "configure: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164 fi
8165 rm -f conftest*
8166 done
8167 CC="$ac_save_CC"
8168
8169 fi
8170
8171 if test -z "$am_cv_prog_cc_stdc"; then
8172   echo "$ac_t""none needed" 1>&6
8173 else
8174   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8175 fi
8176 case "x$am_cv_prog_cc_stdc" in
8177   x|xno) ;;
8178   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8179 esac
8180
8181 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8182         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8183 fi
8184
8185 # test for make depend flag
8186 OL_MKDEP=
8187 OL_MKDEP_FLAGS=
8188 if test -z "${MKDEP}"; then
8189         OL_MKDEP="${CC-cc}"
8190         if test -z "${MKDEP_FLAGS}"; then
8191                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8192 echo "configure:8193: checking for ${OL_MKDEP} depend flag" >&5
8193 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   
8197                         ol_cv_mkdep=no
8198                         for flag in "-M" "-xM"; do
8199                                 cat > conftest.c <<EOF
8200  noCode;
8201 EOF
8202                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8203                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8204                                 then
8205                                         if test ! -f conftest."${ac_object}" ; then
8206                                                 ol_cv_mkdep=$flag
8207                                                 OL_MKDEP_FLAGS="$flag"
8208                                                 break
8209                                         fi
8210                                 fi
8211                         done
8212                         rm -f conftest*
8213                 
8214 fi
8215
8216 echo "$ac_t""$ol_cv_mkdep" 1>&6
8217         else
8218                 cc_cv_mkdep=yes
8219                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8220         fi
8221 else
8222         cc_cv_mkdep=yes
8223         OL_MKDEP="${MKDEP}"
8224         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8225 fi
8226
8227
8228
8229 if test "${ol_cv_mkdep}" = no ; then
8230         # this will soon become an error
8231         echo "configure: warning: do not know how to generate dependencies" 1>&2
8232 fi
8233
8234 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8235 echo "configure:8236: checking for afopen in -ls" >&5
8236 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8238   echo $ac_n "(cached) $ac_c" 1>&6
8239 else
8240   ac_save_LIBS="$LIBS"
8241 LIBS="-ls  $LIBS"
8242 cat > conftest.$ac_ext <<EOF
8243 #line 8244 "configure"
8244 #include "confdefs.h"
8245 /* Override any gcc2 internal prototype to avoid an error.  */
8246 /* We use char because int might match the return type of a gcc2
8247     builtin and then its argument prototype would still apply.  */
8248 char afopen();
8249
8250 int main() {
8251 afopen()
8252 ; return 0; }
8253 EOF
8254 if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8255   rm -rf conftest*
8256   eval "ac_cv_lib_$ac_lib_var=yes"
8257 else
8258   echo "configure: failed program was:" >&5
8259   cat conftest.$ac_ext >&5
8260   rm -rf conftest*
8261   eval "ac_cv_lib_$ac_lib_var=no"
8262 fi
8263 rm -f conftest*
8264 LIBS="$ac_save_LIBS"
8265
8266 fi
8267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8268   echo "$ac_t""yes" 1>&6
8269   
8270         AUTH_LIBS=-ls
8271         cat >> confdefs.h <<\EOF
8272 #define HAVE_AIX_SECURITY 1
8273 EOF
8274
8275
8276 else
8277   echo "$ac_t""no" 1>&6
8278 fi
8279
8280
8281
8282 ol_link_modules=no
8283 if test $ol_enable_modules != no ; then
8284         for ac_hdr in ltdl.h
8285 do
8286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8288 echo "configure:8289: checking for $ac_hdr" >&5
8289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8290   echo $ac_n "(cached) $ac_c" 1>&6
8291 else
8292   cat > conftest.$ac_ext <<EOF
8293 #line 8294 "configure"
8294 #include "confdefs.h"
8295 #include <$ac_hdr>
8296 EOF
8297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8298 { (eval echo configure:8299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8300 if test -z "$ac_err"; then
8301   rm -rf conftest*
8302   eval "ac_cv_header_$ac_safe=yes"
8303 else
8304   echo "$ac_err" >&5
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_header_$ac_safe=no"
8309 fi
8310 rm -f conftest*
8311 fi
8312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8313   echo "$ac_t""yes" 1>&6
8314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8315   cat >> confdefs.h <<EOF
8316 #define $ac_tr_hdr 1
8317 EOF
8318  
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322 done
8323
8324
8325         if test $ac_cv_header_ltdl_h = no ; then
8326                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8327         fi
8328
8329         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8330 echo "configure:8331: checking for lt_dlinit in -lltdl" >&5
8331 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   ac_save_LIBS="$LIBS"
8336 LIBS="-lltdl  $LIBS"
8337 cat > conftest.$ac_ext <<EOF
8338 #line 8339 "configure"
8339 #include "confdefs.h"
8340 /* Override any gcc2 internal prototype to avoid an error.  */
8341 /* We use char because int might match the return type of a gcc2
8342     builtin and then its argument prototype would still apply.  */
8343 char lt_dlinit();
8344
8345 int main() {
8346 lt_dlinit()
8347 ; return 0; }
8348 EOF
8349 if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8350   rm -rf conftest*
8351   eval "ac_cv_lib_$ac_lib_var=yes"
8352 else
8353   echo "configure: failed program was:" >&5
8354   cat conftest.$ac_ext >&5
8355   rm -rf conftest*
8356   eval "ac_cv_lib_$ac_lib_var=no"
8357 fi
8358 rm -f conftest*
8359 LIBS="$ac_save_LIBS"
8360
8361 fi
8362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8363   echo "$ac_t""yes" 1>&6
8364   
8365                 MODULES_LIBS=-lltdl
8366                 cat >> confdefs.h <<\EOF
8367 #define HAVE_LIBLTDL 1
8368 EOF
8369
8370         
8371 else
8372   echo "$ac_t""no" 1>&6
8373 fi
8374
8375
8376         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8377                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8378         fi
8379         ol_link_modules=yes
8380 else
8381         ol_with_bdb_module=static
8382         ol_with_dnssrv_module=static
8383         ol_with_ldap_module=static
8384         ol_with_ldbm_module=static
8385         ol_with_meta_module=static
8386         ol_with_monitor_module=static
8387         ol_with_null_module=static
8388         ol_with_passwd_module=static
8389         ol_with_perl_module=static
8390         ol_with_shell_module=static
8391         ol_with_sql_module=static
8392 fi
8393
8394 # test for EBCDIC
8395 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8396 echo "configure:8397: checking for EBCDIC" >&5
8397 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8398   echo $ac_n "(cached) $ac_c" 1>&6
8399 else
8400   
8401         cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404
8405 #if !('M' == 0xd4)
8406 #include <__ASCII__/generate_error.h>
8407 #endif
8408
8409 EOF
8410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8411 { (eval echo configure:8412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8413 if test -z "$ac_err"; then
8414   rm -rf conftest*
8415   ol_cv_cpp_ebcdic=yes
8416 else
8417   echo "$ac_err" >&5
8418   echo "configure: failed program was:" >&5
8419   cat conftest.$ac_ext >&5
8420   rm -rf conftest*
8421   ol_cv_cpp_ebcdic=no
8422 fi
8423 rm -f conftest*
8424 fi
8425
8426 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8427 if test $ol_cv_cpp_ebcdic = yes ; then
8428         cat >> confdefs.h <<\EOF
8429 #define HAVE_EBCDIC 1
8430 EOF
8431
8432 fi
8433
8434 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8435 echo "configure:8436: checking for ANSI C header files" >&5
8436 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8437   echo $ac_n "(cached) $ac_c" 1>&6
8438 else
8439   cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 #include <stdlib.h>
8443 #include <stdarg.h>
8444 #include <string.h>
8445 #include <float.h>
8446 EOF
8447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8448 { (eval echo configure:8449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8450 if test -z "$ac_err"; then
8451   rm -rf conftest*
8452   ol_cv_header_stdc=yes
8453 else
8454   echo "$ac_err" >&5
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   ol_cv_header_stdc=no
8459 fi
8460 rm -f conftest*
8461
8462 if test $ol_cv_header_stdc = yes; then
8463   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 #include <string.h>
8468 EOF
8469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8470   egrep "memchr" >/dev/null 2>&1; then
8471   :
8472 else
8473   rm -rf conftest*
8474   ol_cv_header_stdc=no
8475 fi
8476 rm -f conftest*
8477
8478 fi
8479
8480 if test $ol_cv_header_stdc = yes; then
8481   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8482 cat > conftest.$ac_ext <<EOF
8483 #line 8484 "configure"
8484 #include "confdefs.h"
8485 #include <stdlib.h>
8486 EOF
8487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8488   egrep "free" >/dev/null 2>&1; then
8489   :
8490 else
8491   rm -rf conftest*
8492   ol_cv_header_stdc=no
8493 fi
8494 rm -f conftest*
8495
8496 fi
8497
8498 if test $ol_cv_header_stdc = yes; then
8499   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8500 if test "$cross_compiling" = yes; then
8501   :
8502 else
8503   cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8506 #include <ctype.h>
8507 #ifndef HAVE_EBCDIC
8508 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8509 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8510 #else
8511 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8512                 || ('j' <= (c) && (c) <= 'r') \
8513                 || ('s' <= (c) && (c) <= 'z'))
8514 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8515 #endif
8516 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8517 int main () { int i; for (i = 0; i < 256; i++)
8518 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8519 exit (0); }
8520
8521 EOF
8522 if { (eval echo configure:8523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8523 then
8524   :
8525 else
8526   echo "configure: failed program was:" >&5
8527   cat conftest.$ac_ext >&5
8528   rm -fr conftest*
8529   ol_cv_header_stdc=no
8530 fi
8531 rm -fr conftest*
8532 fi
8533
8534 fi
8535 fi
8536
8537 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8538 if test $ol_cv_header_stdc = yes; then
8539   cat >> confdefs.h <<\EOF
8540 #define STDC_HEADERS 1
8541 EOF
8542
8543 fi
8544 ac_cv_header_stdc=disable
8545
8546
8547 if test $ol_cv_header_stdc != yes; then
8548         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8549 fi
8550
8551 ac_header_dirent=no
8552 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8553 do
8554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8555 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8556 echo "configure:8557: checking for $ac_hdr that defines DIR" >&5
8557 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8558   echo $ac_n "(cached) $ac_c" 1>&6
8559 else
8560   cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 #include <sys/types.h>
8564 #include <$ac_hdr>
8565 int main() {
8566 DIR *dirp = 0;
8567 ; return 0; }
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8570   rm -rf conftest*
8571   eval "ac_cv_header_dirent_$ac_safe=yes"
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -rf conftest*
8576   eval "ac_cv_header_dirent_$ac_safe=no"
8577 fi
8578 rm -f conftest*
8579 fi
8580 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8581   echo "$ac_t""yes" 1>&6
8582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8583   cat >> confdefs.h <<EOF
8584 #define $ac_tr_hdr 1
8585 EOF
8586  ac_header_dirent=$ac_hdr; break
8587 else
8588   echo "$ac_t""no" 1>&6
8589 fi
8590 done
8591 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8592 if test $ac_header_dirent = dirent.h; then
8593 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8594 echo "configure:8595: checking for opendir in -ldir" >&5
8595 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   ac_save_LIBS="$LIBS"
8600 LIBS="-ldir  $LIBS"
8601 cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 /* Override any gcc2 internal prototype to avoid an error.  */
8605 /* We use char because int might match the return type of a gcc2
8606     builtin and then its argument prototype would still apply.  */
8607 char opendir();
8608
8609 int main() {
8610 opendir()
8611 ; return 0; }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=yes"
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   eval "ac_cv_lib_$ac_lib_var=no"
8621 fi
8622 rm -f conftest*
8623 LIBS="$ac_save_LIBS"
8624
8625 fi
8626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8627   echo "$ac_t""yes" 1>&6
8628   LIBS="$LIBS -ldir"
8629 else
8630   echo "$ac_t""no" 1>&6
8631 fi
8632
8633 else
8634 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8635 echo "configure:8636: checking for opendir in -lx" >&5
8636 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   ac_save_LIBS="$LIBS"
8641 LIBS="-lx  $LIBS"
8642 cat > conftest.$ac_ext <<EOF
8643 #line 8644 "configure"
8644 #include "confdefs.h"
8645 /* Override any gcc2 internal prototype to avoid an error.  */
8646 /* We use char because int might match the return type of a gcc2
8647     builtin and then its argument prototype would still apply.  */
8648 char opendir();
8649
8650 int main() {
8651 opendir()
8652 ; return 0; }
8653 EOF
8654 if { (eval echo configure:8655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8655   rm -rf conftest*
8656   eval "ac_cv_lib_$ac_lib_var=yes"
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -rf conftest*
8661   eval "ac_cv_lib_$ac_lib_var=no"
8662 fi
8663 rm -f conftest*
8664 LIBS="$ac_save_LIBS"
8665
8666 fi
8667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8668   echo "$ac_t""yes" 1>&6
8669   LIBS="$LIBS -lx"
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673
8674 fi
8675
8676 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8677 echo "configure:8678: checking for sys/wait.h that is POSIX.1 compatible" >&5
8678 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8679   echo $ac_n "(cached) $ac_c" 1>&6
8680 else
8681   cat > conftest.$ac_ext <<EOF
8682 #line 8683 "configure"
8683 #include "confdefs.h"
8684 #include <sys/types.h>
8685 #include <sys/wait.h>
8686 #ifndef WEXITSTATUS
8687 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8688 #endif
8689 #ifndef WIFEXITED
8690 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8691 #endif
8692 int main() {
8693 int s;
8694 wait (&s);
8695 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8699   rm -rf conftest*
8700   ac_cv_header_sys_wait_h=yes
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   ac_cv_header_sys_wait_h=no
8706 fi
8707 rm -f conftest*
8708 fi
8709
8710 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8711 if test $ac_cv_header_sys_wait_h = yes; then
8712   cat >> confdefs.h <<\EOF
8713 #define HAVE_SYS_WAIT_H 1
8714 EOF
8715
8716 fi
8717
8718 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8719 echo "configure:8720: checking POSIX termios" >&5
8720 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8721   echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723   cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726 #include <sys/types.h>
8727 #include <unistd.h>
8728 #include <termios.h>
8729 int main() {
8730 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8731    tcgetattr(0, 0);
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8735   rm -rf conftest*
8736   am_cv_sys_posix_termios=yes
8737 else
8738   echo "configure: failed program was:" >&5
8739   cat conftest.$ac_ext >&5
8740   rm -rf conftest*
8741   am_cv_sys_posix_termios=no
8742 fi
8743 rm -f conftest*
8744 fi
8745
8746 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8747
8748
8749  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8750 echo "configure:8751: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8751 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8752   echo $ac_n "(cached) $ac_c" 1>&6
8753 else
8754   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8755
8756   gwinsz_in_termios_h=no
8757   if test $am_cv_sys_posix_termios = yes; then
8758     cat > conftest.$ac_ext <<EOF
8759 #line 8760 "configure"
8760 #include "confdefs.h"
8761 #include <sys/types.h>
8762 #     include <termios.h>
8763 #     ifdef TIOCGWINSZ
8764         yes
8765 #     endif
8766     
8767 EOF
8768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8769   egrep "yes" >/dev/null 2>&1; then
8770   rm -rf conftest*
8771   gwinsz_in_termios_h=yes
8772 fi
8773 rm -f conftest*
8774
8775   fi
8776
8777   if test $gwinsz_in_termios_h = no; then
8778     cat > conftest.$ac_ext <<EOF
8779 #line 8780 "configure"
8780 #include "confdefs.h"
8781 #include <sys/types.h>
8782 #     include <sys/ioctl.h>
8783 #     ifdef TIOCGWINSZ
8784         yes
8785 #     endif
8786     
8787 EOF
8788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8789   egrep "yes" >/dev/null 2>&1; then
8790   rm -rf conftest*
8791   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8792 fi
8793 rm -f conftest*
8794
8795   fi
8796   
8797 fi
8798
8799 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8800   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8801     cat >> confdefs.h <<\EOF
8802 #define GWINSZ_IN_SYS_IOCTL 1
8803 EOF
8804
8805   fi
8806
8807 if test $am_cv_sys_posix_termios = yes ; then
8808         cat >> confdefs.h <<\EOF
8809 #define HAVE_POSIX_TERMIOS 1
8810 EOF
8811
8812 fi
8813
8814 for ac_hdr in \
8815         arpa/inet.h             \
8816         arpa/nameser.h  \
8817         assert.h                \
8818         conio.h                 \
8819         crypt.h                 \
8820         direct.h                \
8821         errno.h                 \
8822         fcntl.h                 \
8823         filio.h                 \
8824         getopt.h                \
8825         grp.h                   \
8826         io.h                    \
8827         libutil.h               \
8828         limits.h                \
8829         locale.h                \
8830         netinet/tcp.h   \
8831         malloc.h                \
8832         memory.h                \
8833         psap.h                  \
8834         pwd.h                   \
8835         process.h               \
8836         resolv.h                \
8837         sgtty.h                 \
8838         shadow.h                \
8839         stddef.h                \
8840         string.h                \
8841         strings.h               \
8842         sysexits.h              \
8843         sys/file.h              \
8844         sys/filio.h             \
8845         sys/errno.h             \
8846         sys/ioctl.h             \
8847         sys/param.h             \
8848         sys/resource.h  \
8849         sys/select.h    \
8850         sys/socket.h    \
8851         sys/syslog.h    \
8852         sys/time.h              \
8853         sys/types.h             \
8854         syslog.h                \
8855         termios.h               \
8856         unistd.h                \
8857         winsock.h               \
8858         winsock2.h              \
8859
8860 do
8861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8863 echo "configure:8864: checking for $ac_hdr" >&5
8864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 #include <$ac_hdr>
8871 EOF
8872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8873 { (eval echo configure:8874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8875 if test -z "$ac_err"; then
8876   rm -rf conftest*
8877   eval "ac_cv_header_$ac_safe=yes"
8878 else
8879   echo "$ac_err" >&5
8880   echo "configure: failed program was:" >&5
8881   cat conftest.$ac_ext >&5
8882   rm -rf conftest*
8883   eval "ac_cv_header_$ac_safe=no"
8884 fi
8885 rm -f conftest*
8886 fi
8887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8888   echo "$ac_t""yes" 1>&6
8889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8890   cat >> confdefs.h <<EOF
8891 #define $ac_tr_hdr 1
8892 EOF
8893  
8894 else
8895   echo "$ac_t""no" 1>&6
8896 fi
8897 done
8898
8899
8900
8901
8902 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8903 echo "configure:8904: checking for dlopen" >&5
8904 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8905   echo $ac_n "(cached) $ac_c" 1>&6
8906 else
8907   cat > conftest.$ac_ext <<EOF
8908 #line 8909 "configure"
8909 #include "confdefs.h"
8910 /* System header to define __stub macros and hopefully few prototypes,
8911     which can conflict with char dlopen(); below.  */
8912 #include <assert.h>
8913 /* Override any gcc2 internal prototype to avoid an error.  */
8914 /* We use char because int might match the return type of a gcc2
8915     builtin and then its argument prototype would still apply.  */
8916 char dlopen();
8917 char (*f)();
8918
8919 int main() {
8920
8921 /* The GNU C library defines this for functions which it implements
8922     to always fail with ENOSYS.  Some functions are actually named
8923     something starting with __ and the normal name is an alias.  */
8924 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8925 choke me
8926 #else
8927 f = dlopen;
8928 #endif
8929
8930 ; return 0; }
8931 EOF
8932 if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8933   rm -rf conftest*
8934   eval "ac_cv_func_dlopen=yes"
8935 else
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   eval "ac_cv_func_dlopen=no"
8940 fi
8941 rm -f conftest*
8942 fi
8943
8944 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8945   echo "$ac_t""yes" 1>&6
8946   :
8947 else
8948   echo "$ac_t""no" 1>&6
8949 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8950 echo "configure:8951: checking for dlopen in -ldl" >&5
8951 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8953   echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955   ac_save_LIBS="$LIBS"
8956 LIBS="-ldl  $LIBS"
8957 cat > conftest.$ac_ext <<EOF
8958 #line 8959 "configure"
8959 #include "confdefs.h"
8960 /* Override any gcc2 internal prototype to avoid an error.  */
8961 /* We use char because int might match the return type of a gcc2
8962     builtin and then its argument prototype would still apply.  */
8963 char dlopen();
8964
8965 int main() {
8966 dlopen()
8967 ; return 0; }
8968 EOF
8969 if { (eval echo configure:8970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8970   rm -rf conftest*
8971   eval "ac_cv_lib_$ac_lib_var=yes"
8972 else
8973   echo "configure: failed program was:" >&5
8974   cat conftest.$ac_ext >&5
8975   rm -rf conftest*
8976   eval "ac_cv_lib_$ac_lib_var=no"
8977 fi
8978 rm -f conftest*
8979 LIBS="$ac_save_LIBS"
8980
8981 fi
8982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8983   echo "$ac_t""yes" 1>&6
8984     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8986   cat >> confdefs.h <<EOF
8987 #define $ac_tr_lib 1
8988 EOF
8989
8990   LIBS="-ldl $LIBS"
8991
8992 else
8993   echo "$ac_t""no" 1>&6
8994 fi
8995
8996 fi
8997
8998
8999 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9000 echo "configure:9001: checking for sigset in -lV3" >&5
9001 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9003   echo $ac_n "(cached) $ac_c" 1>&6
9004 else
9005   ac_save_LIBS="$LIBS"
9006 LIBS="-lV3  $LIBS"
9007 cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* Override any gcc2 internal prototype to avoid an error.  */
9011 /* We use char because int might match the return type of a gcc2
9012     builtin and then its argument prototype would still apply.  */
9013 char sigset();
9014
9015 int main() {
9016 sigset()
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_lib_$ac_lib_var=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_lib_$ac_lib_var=no"
9027 fi
9028 rm -f conftest*
9029 LIBS="$ac_save_LIBS"
9030
9031 fi
9032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9033   echo "$ac_t""yes" 1>&6
9034     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9036   cat >> confdefs.h <<EOF
9037 #define $ac_tr_lib 1
9038 EOF
9039
9040   LIBS="-lV3 $LIBS"
9041
9042 else
9043   echo "$ac_t""no" 1>&6
9044 fi
9045
9046
9047 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9048 echo "configure:9049: checking for winsock" >&5
9049 save_LIBS="$LIBS"
9050 for curlib in ws2_32 wsock32; do
9051         LIBS="$LIBS -l$curlib"
9052         cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9055
9056                         char socket@12();
9057                         char select@20();
9058                         char closesocket@4();
9059                         char gethostname@8();
9060                         
9061 int main() {
9062
9063                         socket@12();
9064                         select@20();
9065                         closesocket@4();
9066                         gethostname@8();
9067                         
9068 ; return 0; }
9069 EOF
9070 if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9071   rm -rf conftest*
9072   have_winsock=yes
9073 else
9074   echo "configure: failed program was:" >&5
9075   cat conftest.$ac_ext >&5
9076   rm -rf conftest*
9077   have_winsock=no
9078 fi
9079 rm -f conftest*
9080
9081         if test $have_winsock = yes; then
9082                 cat >> confdefs.h <<\EOF
9083 #define HAVE_WINSOCK 1
9084 EOF
9085
9086                 ac_cv_func_socket=yes
9087                 ac_cv_func_select=yes
9088                 ac_cv_func_closesocket=yes
9089                 ac_cv_func_gethostname=yes
9090                 if test $curlib = ws2_32; then
9091                         have_winsock=winsock2
9092                         cat >> confdefs.h <<\EOF
9093 #define HAVE_WINSOCK2 1
9094 EOF
9095
9096                 fi
9097                 break
9098         fi
9099         LIBS="$save_LIBS"
9100 done
9101 echo "$ac_t""$have_winsock" 1>&6
9102
9103
9104 echo $ac_n "checking for socket""... $ac_c" 1>&6
9105 echo "configure:9106: checking for socket" >&5
9106 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   cat > conftest.$ac_ext <<EOF
9110 #line 9111 "configure"
9111 #include "confdefs.h"
9112 /* System header to define __stub macros and hopefully few prototypes,
9113     which can conflict with char socket(); below.  */
9114 #include <assert.h>
9115 /* Override any gcc2 internal prototype to avoid an error.  */
9116 /* We use char because int might match the return type of a gcc2
9117     builtin and then its argument prototype would still apply.  */
9118 char socket();
9119 char (*f)();
9120
9121 int main() {
9122
9123 /* The GNU C library defines this for functions which it implements
9124     to always fail with ENOSYS.  Some functions are actually named
9125     something starting with __ and the normal name is an alias.  */
9126 #if defined (__stub_socket) || defined (__stub___socket)
9127 choke me
9128 #else
9129 f = socket;
9130 #endif
9131
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9135   rm -rf conftest*
9136   eval "ac_cv_func_socket=yes"
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   eval "ac_cv_func_socket=no"
9142 fi
9143 rm -f conftest*
9144 fi
9145
9146 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9147   echo "$ac_t""yes" 1>&6
9148   :
9149 else
9150   echo "$ac_t""no" 1>&6
9151         
9152         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9153 echo "configure:9154: checking for main in -lsocket" >&5
9154 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9156   echo $ac_n "(cached) $ac_c" 1>&6
9157 else
9158   ac_save_LIBS="$LIBS"
9159 LIBS="-lsocket  $LIBS"
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163
9164 int main() {
9165 main()
9166 ; return 0; }
9167 EOF
9168 if { (eval echo configure:9169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9169   rm -rf conftest*
9170   eval "ac_cv_lib_$ac_lib_var=yes"
9171 else
9172   echo "configure: failed program was:" >&5
9173   cat conftest.$ac_ext >&5
9174   rm -rf conftest*
9175   eval "ac_cv_lib_$ac_lib_var=no"
9176 fi
9177 rm -f conftest*
9178 LIBS="$ac_save_LIBS"
9179
9180 fi
9181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9182   echo "$ac_t""yes" 1>&6
9183     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9184     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9185   cat >> confdefs.h <<EOF
9186 #define $ac_tr_lib 1
9187 EOF
9188
9189   LIBS="-lsocket $LIBS"
9190
9191 else
9192   echo "$ac_t""no" 1>&6
9193 fi
9194
9195         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9196 echo "configure:9197: checking for main in -lnet" >&5
9197 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9199   echo $ac_n "(cached) $ac_c" 1>&6
9200 else
9201   ac_save_LIBS="$LIBS"
9202 LIBS="-lnet  $LIBS"
9203 cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206
9207 int main() {
9208 main()
9209 ; return 0; }
9210 EOF
9211 if { (eval echo configure:9212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=yes"
9214 else
9215   echo "configure: failed program was:" >&5
9216   cat conftest.$ac_ext >&5
9217   rm -rf conftest*
9218   eval "ac_cv_lib_$ac_lib_var=no"
9219 fi
9220 rm -f conftest*
9221 LIBS="$ac_save_LIBS"
9222
9223 fi
9224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9225   echo "$ac_t""yes" 1>&6
9226     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9227     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9228   cat >> confdefs.h <<EOF
9229 #define $ac_tr_lib 1
9230 EOF
9231
9232   LIBS="-lnet $LIBS"
9233
9234 else
9235   echo "$ac_t""no" 1>&6
9236 fi
9237
9238         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9239 echo "configure:9240: checking for main in -lnsl_s" >&5
9240 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9241 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9242   echo $ac_n "(cached) $ac_c" 1>&6
9243 else
9244   ac_save_LIBS="$LIBS"
9245 LIBS="-lnsl_s  $LIBS"
9246 cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249
9250 int main() {
9251 main()
9252 ; return 0; }
9253 EOF
9254 if { (eval echo configure:9255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9255   rm -rf conftest*
9256   eval "ac_cv_lib_$ac_lib_var=yes"
9257 else
9258   echo "configure: failed program was:" >&5
9259   cat conftest.$ac_ext >&5
9260   rm -rf conftest*
9261   eval "ac_cv_lib_$ac_lib_var=no"
9262 fi
9263 rm -f conftest*
9264 LIBS="$ac_save_LIBS"
9265
9266 fi
9267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9268   echo "$ac_t""yes" 1>&6
9269     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9270     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9271   cat >> confdefs.h <<EOF
9272 #define $ac_tr_lib 1
9273 EOF
9274
9275   LIBS="-lnsl_s $LIBS"
9276
9277 else
9278   echo "$ac_t""no" 1>&6
9279 fi
9280
9281         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9282 echo "configure:9283: checking for main in -lnsl" >&5
9283 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   ac_save_LIBS="$LIBS"
9288 LIBS="-lnsl  $LIBS"
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292
9293 int main() {
9294 main()
9295 ; return 0; }
9296 EOF
9297 if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=yes"
9300 else
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=no"
9305 fi
9306 rm -f conftest*
9307 LIBS="$ac_save_LIBS"
9308
9309 fi
9310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9314   cat >> confdefs.h <<EOF
9315 #define $ac_tr_lib 1
9316 EOF
9317
9318   LIBS="-lnsl $LIBS"
9319
9320 else
9321   echo "$ac_t""no" 1>&6
9322 fi
9323
9324         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9325 echo "configure:9326: checking for socket in -linet" >&5
9326 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   ac_save_LIBS="$LIBS"
9331 LIBS="-linet  $LIBS"
9332 cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335 /* Override any gcc2 internal prototype to avoid an error.  */
9336 /* We use char because int might match the return type of a gcc2
9337     builtin and then its argument prototype would still apply.  */
9338 char socket();
9339
9340 int main() {
9341 socket()
9342 ; return 0; }
9343 EOF
9344 if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9345   rm -rf conftest*
9346   eval "ac_cv_lib_$ac_lib_var=yes"
9347 else
9348   echo "configure: failed program was:" >&5
9349   cat conftest.$ac_ext >&5
9350   rm -rf conftest*
9351   eval "ac_cv_lib_$ac_lib_var=no"
9352 fi
9353 rm -f conftest*
9354 LIBS="$ac_save_LIBS"
9355
9356 fi
9357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9358   echo "$ac_t""yes" 1>&6
9359     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9361   cat >> confdefs.h <<EOF
9362 #define $ac_tr_lib 1
9363 EOF
9364
9365   LIBS="-linet $LIBS"
9366
9367 else
9368   echo "$ac_t""no" 1>&6
9369 fi
9370
9371         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9372 echo "configure:9373: checking for main in -lgen" >&5
9373 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9375   echo $ac_n "(cached) $ac_c" 1>&6
9376 else
9377   ac_save_LIBS="$LIBS"
9378 LIBS="-lgen  $LIBS"
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382
9383 int main() {
9384 main()
9385 ; return 0; }
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9388   rm -rf conftest*
9389   eval "ac_cv_lib_$ac_lib_var=yes"
9390 else
9391   echo "configure: failed program was:" >&5
9392   cat conftest.$ac_ext >&5
9393   rm -rf conftest*
9394   eval "ac_cv_lib_$ac_lib_var=no"
9395 fi
9396 rm -f conftest*
9397 LIBS="$ac_save_LIBS"
9398
9399 fi
9400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9401   echo "$ac_t""yes" 1>&6
9402     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9404   cat >> confdefs.h <<EOF
9405 #define $ac_tr_lib 1
9406 EOF
9407
9408   LIBS="-lgen $LIBS"
9409
9410 else
9411   echo "$ac_t""no" 1>&6
9412 fi
9413
9414
9415 fi
9416
9417
9418 echo $ac_n "checking for select""... $ac_c" 1>&6
9419 echo "configure:9420: checking for select" >&5
9420 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9421   echo $ac_n "(cached) $ac_c" 1>&6
9422 else
9423   cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426 /* System header to define __stub macros and hopefully few prototypes,
9427     which can conflict with char select(); below.  */
9428 #include <assert.h>
9429 /* Override any gcc2 internal prototype to avoid an error.  */
9430 /* We use char because int might match the return type of a gcc2
9431     builtin and then its argument prototype would still apply.  */
9432 char select();
9433 char (*f)();
9434
9435 int main() {
9436
9437 /* The GNU C library defines this for functions which it implements
9438     to always fail with ENOSYS.  Some functions are actually named
9439     something starting with __ and the normal name is an alias.  */
9440 #if defined (__stub_select) || defined (__stub___select)
9441 choke me
9442 #else
9443 f = select;
9444 #endif
9445
9446 ; return 0; }
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9449   rm -rf conftest*
9450   eval "ac_cv_func_select=yes"
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   eval "ac_cv_func_select=no"
9456 fi
9457 rm -f conftest*
9458 fi
9459
9460 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9461   echo "$ac_t""yes" 1>&6
9462   :
9463 else
9464   echo "$ac_t""no" 1>&6
9465 { echo "configure: error: select() required." 1>&2; exit 1; }
9466 fi
9467
9468
9469 if test "${ac_cv_header_winsock_h}" != yes; then
9470                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9471 echo "configure:9472: checking types of arguments for select()" >&5
9472  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9476   echo $ac_n "(cached) $ac_c" 1>&6
9477 else
9478     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9479   echo $ac_n "(cached) $ac_c" 1>&6
9480 else
9481      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9482      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9483       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9484        cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 #ifdef HAVE_SYS_TYPES_H
9488 #include <sys/types.h>
9489 #endif
9490 #ifdef HAVE_SYS_TIME_H
9491 #include <sys/time.h>
9492 #endif
9493 #ifdef HAVE_SYS_SELECT_H
9494 #include <sys/select.h>
9495 #endif
9496 #ifdef HAVE_SYS_SOCKET_H
9497 #include <sys/socket.h>
9498 #endif
9499 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);
9500 int main() {
9501
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9505   rm -rf conftest*
9506           ac_not_found=no ; break 3
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   ac_not_found=yes
9512 fi
9513 rm -f conftest*
9514       done
9515      done
9516     done
9517    
9518 fi
9519   
9520 fi
9521  
9522 fi
9523  if test "$ac_not_found" = yes; then
9524   ac_cv_func_select_arg1=int 
9525   ac_cv_func_select_arg234='int *' 
9526   ac_cv_func_select_arg5='struct timeval *'
9527  fi
9528  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9529  cat >> confdefs.h <<EOF
9530 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9531 EOF
9532
9533  cat >> confdefs.h <<EOF
9534 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9535 EOF
9536
9537  cat >> confdefs.h <<EOF
9538 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9539 EOF
9540
9541
9542 fi
9543
9544
9545 for ac_hdr in regex.h 
9546 do
9547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9549 echo "configure:9550: checking for $ac_hdr" >&5
9550 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9551   echo $ac_n "(cached) $ac_c" 1>&6
9552 else
9553   cat > conftest.$ac_ext <<EOF
9554 #line 9555 "configure"
9555 #include "confdefs.h"
9556 #include <$ac_hdr>
9557 EOF
9558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9559 { (eval echo configure:9560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9561 if test -z "$ac_err"; then
9562   rm -rf conftest*
9563   eval "ac_cv_header_$ac_safe=yes"
9564 else
9565   echo "$ac_err" >&5
9566   echo "configure: failed program was:" >&5
9567   cat conftest.$ac_ext >&5
9568   rm -rf conftest*
9569   eval "ac_cv_header_$ac_safe=no"
9570 fi
9571 rm -f conftest*
9572 fi
9573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9574   echo "$ac_t""yes" 1>&6
9575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9576   cat >> confdefs.h <<EOF
9577 #define $ac_tr_hdr 1
9578 EOF
9579  
9580 else
9581   echo "$ac_t""no" 1>&6
9582 fi
9583 done
9584
9585 if test "$ac_cv_header_regex_h" != yes ; then
9586         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9587 fi
9588
9589 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9590 echo "configure:9591: checking for library containing regfree" >&5
9591 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   ac_func_search_save_LIBS="$LIBS"
9595 ac_cv_search_regfree="no"
9596 cat > conftest.$ac_ext <<EOF
9597 #line 9598 "configure"
9598 #include "confdefs.h"
9599 /* Override any gcc2 internal prototype to avoid an error.  */
9600 /* We use char because int might match the return type of a gcc2
9601     builtin and then its argument prototype would still apply.  */
9602 char regfree();
9603
9604 int main() {
9605 regfree()
9606 ; return 0; }
9607 EOF
9608 if { (eval echo configure:9609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9609   rm -rf conftest*
9610   ac_cv_search_regfree="none required"
9611 else
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614 fi
9615 rm -f conftest*
9616 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9617 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9618 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 /* Override any gcc2 internal prototype to avoid an error.  */
9622 /* We use char because int might match the return type of a gcc2
9623     builtin and then its argument prototype would still apply.  */
9624 char regfree();
9625
9626 int main() {
9627 regfree()
9628 ; return 0; }
9629 EOF
9630 if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9631   rm -rf conftest*
9632   ac_cv_search_regfree="-l$ac_lib"
9633 break
9634 else
9635   echo "configure: failed program was:" >&5
9636   cat conftest.$ac_ext >&5
9637 fi
9638 rm -f conftest*
9639 done
9640 LIBS="$ac_func_search_save_LIBS"
9641 fi
9642
9643 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9644 if test "$ac_cv_search_regfree" != "no"; then
9645   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9646   :
9647 else :
9648   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9649 fi
9650
9651
9652 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9653 echo "configure:9654: checking for compatible POSIX regex" >&5
9654 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9655   echo $ac_n "(cached) $ac_c" 1>&6
9656 else
9657   
9658         if test "$cross_compiling" = yes; then
9659   ol_cv_c_posix_regex=cross
9660 else
9661   cat > conftest.$ac_ext <<EOF
9662 #line 9663 "configure"
9663 #include "confdefs.h"
9664
9665 #include <sys/types.h>
9666 #include <regex.h>
9667 static char *pattern, *string;
9668 main()
9669 {
9670         int rc;
9671         regex_t re;
9672
9673         pattern = "^A";
9674
9675         if(regcomp(&re, pattern, 0)) {
9676                 return -1;
9677         }
9678         
9679         string = "ALL MATCH";
9680         
9681         rc = regexec(&re, string, 0, (void*)0, 0);
9682
9683         regfree(&re);
9684
9685         return rc;
9686 }
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9689 then
9690   ol_cv_c_posix_regex=yes
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -fr conftest*
9695   ol_cv_c_posix_regex=no
9696 fi
9697 rm -fr conftest*
9698 fi
9699
9700 fi
9701
9702 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9703
9704 if test "$ol_cv_c_posix_regex" = no ; then
9705         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9706 fi
9707
9708
9709 have_uuid=no
9710 for ac_hdr in sys/uuid.h
9711 do
9712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9714 echo "configure:9715: checking for $ac_hdr" >&5
9715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 #include <$ac_hdr>
9722 EOF
9723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9724 { (eval echo configure:9725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9726 if test -z "$ac_err"; then
9727   rm -rf conftest*
9728   eval "ac_cv_header_$ac_safe=yes"
9729 else
9730   echo "$ac_err" >&5
9731   echo "configure: failed program was:" >&5
9732   cat conftest.$ac_ext >&5
9733   rm -rf conftest*
9734   eval "ac_cv_header_$ac_safe=no"
9735 fi
9736 rm -f conftest*
9737 fi
9738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9739   echo "$ac_t""yes" 1>&6
9740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9741   cat >> confdefs.h <<EOF
9742 #define $ac_tr_hdr 1
9743 EOF
9744  
9745 else
9746   echo "$ac_t""no" 1>&6
9747 fi
9748 done
9749
9750 if test $ac_cv_header_sys_uuid_h = yes ; then
9751         save_LIBS="$LIBS"
9752         
9753 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9754 echo "configure:9755: checking for library containing uuid_to_str" >&5
9755 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9756   echo $ac_n "(cached) $ac_c" 1>&6
9757 else
9758   ac_func_search_save_LIBS="$LIBS"
9759 ac_cv_search_uuid_to_str="no"
9760 cat > conftest.$ac_ext <<EOF
9761 #line 9762 "configure"
9762 #include "confdefs.h"
9763 /* Override any gcc2 internal prototype to avoid an error.  */
9764 /* We use char because int might match the return type of a gcc2
9765     builtin and then its argument prototype would still apply.  */
9766 char uuid_to_str();
9767
9768 int main() {
9769 uuid_to_str()
9770 ; return 0; }
9771 EOF
9772 if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9773   rm -rf conftest*
9774   ac_cv_search_uuid_to_str="none required"
9775 else
9776   echo "configure: failed program was:" >&5
9777   cat conftest.$ac_ext >&5
9778 fi
9779 rm -f conftest*
9780 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9781 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9782 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* Override any gcc2 internal prototype to avoid an error.  */
9786 /* We use char because int might match the return type of a gcc2
9787     builtin and then its argument prototype would still apply.  */
9788 char uuid_to_str();
9789
9790 int main() {
9791 uuid_to_str()
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9795   rm -rf conftest*
9796   ac_cv_search_uuid_to_str="-l$ac_lib"
9797 break
9798 else
9799   echo "configure: failed program was:" >&5
9800   cat conftest.$ac_ext >&5
9801 fi
9802 rm -f conftest*
9803 done
9804 LIBS="$ac_func_search_save_LIBS"
9805 fi
9806
9807 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9808 if test "$ac_cv_search_uuid_to_str" != "no"; then
9809   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9810   have_uuid=yes
9811 else :
9812   :
9813 fi
9814         LIBS="$save_LIBS"
9815
9816         if test have_uuid = yes ; then
9817                 cat >> confdefs.h <<\EOF
9818 #define HAVE_UUID_TO_STR 1
9819 EOF
9820
9821
9822                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9823                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9824         fi
9825 fi
9826
9827 if test $have_uuid = no ; then
9828         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9829 echo "configure:9830: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9830         save_LIBS="$LIBS"
9831         LIBS="$LIBS -lrpcrt4"
9832         cat > conftest.$ac_ext <<EOF
9833 #line 9834 "configure"
9834 #include "confdefs.h"
9835
9836                 char UuidCreate@4();
9837                 char UuidToStringA@8();
9838                 
9839 int main() {
9840
9841                 UuidCreate@4();
9842                 UuidToStringA@8();
9843                 
9844 ; return 0; }
9845 EOF
9846 if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9847   rm -rf conftest*
9848   need_rpcrt=yes
9849 else
9850   echo "configure: failed program was:" >&5
9851   cat conftest.$ac_ext >&5
9852   rm -rf conftest*
9853   need_rpcrt=no
9854 fi
9855 rm -f conftest*
9856         if test $need_rpcrt = yes; then
9857                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9858         fi
9859         LIBS="$save_LIBS"
9860         echo "$ac_t""$need_rpcrt" 1>&6
9861 fi
9862
9863 ol_link_dnssrv=no
9864 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9865 echo "configure:9866: checking for res_query" >&5
9866 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9867   echo $ac_n "(cached) $ac_c" 1>&6
9868 else
9869   cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 /* System header to define __stub macros and hopefully few prototypes,
9873     which can conflict with char res_query(); below.  */
9874 #include <assert.h>
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 /* We use char because int might match the return type of a gcc2
9877     builtin and then its argument prototype would still apply.  */
9878 char res_query();
9879 char (*f)();
9880
9881 int main() {
9882
9883 /* The GNU C library defines this for functions which it implements
9884     to always fail with ENOSYS.  Some functions are actually named
9885     something starting with __ and the normal name is an alias.  */
9886 #if defined (__stub_res_query) || defined (__stub___res_query)
9887 choke me
9888 #else
9889 f = res_query;
9890 #endif
9891
9892 ; return 0; }
9893 EOF
9894 if { (eval echo configure:9895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9895   rm -rf conftest*
9896   eval "ac_cv_func_res_query=yes"
9897 else
9898   echo "configure: failed program was:" >&5
9899   cat conftest.$ac_ext >&5
9900   rm -rf conftest*
9901   eval "ac_cv_func_res_query=no"
9902 fi
9903 rm -f conftest*
9904 fi
9905
9906 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9907   echo "$ac_t""yes" 1>&6
9908   :
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912
9913 if test $ac_cv_func_res_query = no ; then 
9914         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9915 echo "configure:9916: checking for __res_query" >&5
9916 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9917   echo $ac_n "(cached) $ac_c" 1>&6
9918 else
9919   cat > conftest.$ac_ext <<EOF
9920 #line 9921 "configure"
9921 #include "confdefs.h"
9922 /* System header to define __stub macros and hopefully few prototypes,
9923     which can conflict with char __res_query(); below.  */
9924 #include <assert.h>
9925 /* Override any gcc2 internal prototype to avoid an error.  */
9926 /* We use char because int might match the return type of a gcc2
9927     builtin and then its argument prototype would still apply.  */
9928 char __res_query();
9929 char (*f)();
9930
9931 int main() {
9932
9933 /* The GNU C library defines this for functions which it implements
9934     to always fail with ENOSYS.  Some functions are actually named
9935     something starting with __ and the normal name is an alias.  */
9936 #if defined (__stub___res_query) || defined (__stub_____res_query)
9937 choke me
9938 #else
9939 f = __res_query;
9940 #endif
9941
9942 ; return 0; }
9943 EOF
9944 if { (eval echo configure:9945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9945   rm -rf conftest*
9946   eval "ac_cv_func___res_query=yes"
9947 else
9948   echo "configure: failed program was:" >&5
9949   cat conftest.$ac_ext >&5
9950   rm -rf conftest*
9951   eval "ac_cv_func___res_query=no"
9952 fi
9953 rm -f conftest*
9954 fi
9955
9956 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9957   echo "$ac_t""yes" 1>&6
9958   :
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962
9963         ac_cv_func_res_query=$ac_cv_func___res_query
9964 fi
9965
9966 if test $ac_cv_func_res_query = no ; then 
9967         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9968 echo "configure:9969: checking for res_query in -lbind" >&5
9969 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   ac_save_LIBS="$LIBS"
9974 LIBS="-lbind  $LIBS"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char res_query();
9982
9983 int main() {
9984 res_query()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_lib_$ac_lib_var=no"
9995 fi
9996 rm -f conftest*
9997 LIBS="$ac_save_LIBS"
9998
9999 fi
10000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10003     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10004   cat >> confdefs.h <<EOF
10005 #define $ac_tr_lib 1
10006 EOF
10007
10008   LIBS="-lbind $LIBS"
10009
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10015 fi
10016
10017 if test $ac_cv_func_res_query = no ; then 
10018         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10019 echo "configure:10020: checking for __res_query in -lbind" >&5
10020 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10022   echo $ac_n "(cached) $ac_c" 1>&6
10023 else
10024   ac_save_LIBS="$LIBS"
10025 LIBS="-lbind  $LIBS"
10026 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 /* Override any gcc2 internal prototype to avoid an error.  */
10030 /* We use char because int might match the return type of a gcc2
10031     builtin and then its argument prototype would still apply.  */
10032 char __res_query();
10033
10034 int main() {
10035 __res_query()
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10039   rm -rf conftest*
10040   eval "ac_cv_lib_$ac_lib_var=yes"
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=no"
10046 fi
10047 rm -f conftest*
10048 LIBS="$ac_save_LIBS"
10049
10050 fi
10051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10052   echo "$ac_t""yes" 1>&6
10053     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10054     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10055   cat >> confdefs.h <<EOF
10056 #define $ac_tr_lib 1
10057 EOF
10058
10059   LIBS="-lbind $LIBS"
10060
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064
10065         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10066 fi
10067
10068 if test $ac_cv_func_res_query = no ; then 
10069         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10070 echo "configure:10071: checking for res_query in -lresolv" >&5
10071 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10073   echo $ac_n "(cached) $ac_c" 1>&6
10074 else
10075   ac_save_LIBS="$LIBS"
10076 LIBS="-lresolv  $LIBS"
10077 cat > conftest.$ac_ext <<EOF
10078 #line 10079 "configure"
10079 #include "confdefs.h"
10080 /* Override any gcc2 internal prototype to avoid an error.  */
10081 /* We use char because int might match the return type of a gcc2
10082     builtin and then its argument prototype would still apply.  */
10083 char res_query();
10084
10085 int main() {
10086 res_query()
10087 ; return 0; }
10088 EOF
10089 if { (eval echo configure:10090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10090   rm -rf conftest*
10091   eval "ac_cv_lib_$ac_lib_var=yes"
10092 else
10093   echo "configure: failed program was:" >&5
10094   cat conftest.$ac_ext >&5
10095   rm -rf conftest*
10096   eval "ac_cv_lib_$ac_lib_var=no"
10097 fi
10098 rm -f conftest*
10099 LIBS="$ac_save_LIBS"
10100
10101 fi
10102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10103   echo "$ac_t""yes" 1>&6
10104     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10106   cat >> confdefs.h <<EOF
10107 #define $ac_tr_lib 1
10108 EOF
10109
10110   LIBS="-lresolv $LIBS"
10111
10112 else
10113   echo "$ac_t""no" 1>&6
10114 fi
10115
10116         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10117 fi
10118
10119 if test $ac_cv_func_res_query = no ; then 
10120         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10121 echo "configure:10122: checking for __res_query in -lresolv" >&5
10122 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   ac_save_LIBS="$LIBS"
10127 LIBS="-lresolv  $LIBS"
10128 cat > conftest.$ac_ext <<EOF
10129 #line 10130 "configure"
10130 #include "confdefs.h"
10131 /* Override any gcc2 internal prototype to avoid an error.  */
10132 /* We use char because int might match the return type of a gcc2
10133     builtin and then its argument prototype would still apply.  */
10134 char __res_query();
10135
10136 int main() {
10137 __res_query()
10138 ; return 0; }
10139 EOF
10140 if { (eval echo configure:10141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10141   rm -rf conftest*
10142   eval "ac_cv_lib_$ac_lib_var=yes"
10143 else
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -rf conftest*
10147   eval "ac_cv_lib_$ac_lib_var=no"
10148 fi
10149 rm -f conftest*
10150 LIBS="$ac_save_LIBS"
10151
10152 fi
10153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10154   echo "$ac_t""yes" 1>&6
10155     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10156     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10157   cat >> confdefs.h <<EOF
10158 #define $ac_tr_lib 1
10159 EOF
10160
10161   LIBS="-lresolv $LIBS"
10162
10163 else
10164   echo "$ac_t""no" 1>&6
10165 fi
10166
10167         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10168 fi
10169
10170 if test "$ac_cv_func_res_query" = yes ; then
10171         cat >> confdefs.h <<\EOF
10172 #define HAVE_RES_QUERY 1
10173 EOF
10174
10175
10176         if test $ol_enable_dnssrv != no ; then
10177                 ol_link_dnssrv=yes
10178         fi
10179 fi
10180
10181 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10182         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10183 fi
10184
10185 for ac_func in getaddrinfo gai_strerror inet_ntop 
10186 do
10187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10188 echo "configure:10189: checking for $ac_func" >&5
10189 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10190   echo $ac_n "(cached) $ac_c" 1>&6
10191 else
10192   cat > conftest.$ac_ext <<EOF
10193 #line 10194 "configure"
10194 #include "confdefs.h"
10195 /* System header to define __stub macros and hopefully few prototypes,
10196     which can conflict with char $ac_func(); below.  */
10197 #include <assert.h>
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 /* We use char because int might match the return type of a gcc2
10200     builtin and then its argument prototype would still apply.  */
10201 char $ac_func();
10202 char (*f)();
10203
10204 int main() {
10205
10206 /* The GNU C library defines this for functions which it implements
10207     to always fail with ENOSYS.  Some functions are actually named
10208     something starting with __ and the normal name is an alias.  */
10209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10210 choke me
10211 #else
10212 f = $ac_func;
10213 #endif
10214
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_func_$ac_func=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_func_$ac_func=no"
10225 fi
10226 rm -f conftest*
10227 fi
10228
10229 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10230   echo "$ac_t""yes" 1>&6
10231     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10232   cat >> confdefs.h <<EOF
10233 #define $ac_tr_func 1
10234 EOF
10235  
10236 else
10237   echo "$ac_t""no" 1>&6
10238 fi
10239 done
10240
10241
10242 ol_link_ipv6=no
10243 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10244         if test $ol_enable_ipv6 = yes ; then
10245                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10246         fi
10247 elif test $ol_enable_ipv6 != no ; then
10248         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10249 echo "configure:10250: checking INET6_ADDRSTRLEN" >&5
10250 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10251   echo $ac_n "(cached) $ac_c" 1>&6
10252 else
10253   
10254                 cat > conftest.$ac_ext <<EOF
10255 #line 10256 "configure"
10256 #include "confdefs.h"
10257
10258 #                       include <netinet/in.h>
10259 #                       ifdef INET6_ADDRSTRLEN
10260                                 __has_inet6_addrstrlen__;
10261 #                       endif
10262                 
10263 EOF
10264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10265   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10266   rm -rf conftest*
10267   ol_cv_inet6_addrstrlen=yes
10268 else
10269   rm -rf conftest*
10270   ol_cv_inet6_addrstrlen=no
10271 fi
10272 rm -f conftest*
10273
10274 fi
10275
10276 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10277
10278         if test $ol_cv_inet6_addrstrlen = yes ; then
10279                 ol_link_ipv6=yes
10280         elif test $ol_enable_ipv6 = yes ; then
10281                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10282         fi
10283 fi
10284
10285 if test $ol_enable_local != no ; then
10286         for ac_hdr in sys/un.h 
10287 do
10288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10290 echo "configure:10291: checking for $ac_hdr" >&5
10291 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10292   echo $ac_n "(cached) $ac_c" 1>&6
10293 else
10294   cat > conftest.$ac_ext <<EOF
10295 #line 10296 "configure"
10296 #include "confdefs.h"
10297 #include <$ac_hdr>
10298 EOF
10299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10300 { (eval echo configure:10301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10302 if test -z "$ac_err"; then
10303   rm -rf conftest*
10304   eval "ac_cv_header_$ac_safe=yes"
10305 else
10306   echo "$ac_err" >&5
10307   echo "configure: failed program was:" >&5
10308   cat conftest.$ac_ext >&5
10309   rm -rf conftest*
10310   eval "ac_cv_header_$ac_safe=no"
10311 fi
10312 rm -f conftest*
10313 fi
10314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10315   echo "$ac_t""yes" 1>&6
10316     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10317   cat >> confdefs.h <<EOF
10318 #define $ac_tr_hdr 1
10319 EOF
10320  
10321 else
10322   echo "$ac_t""no" 1>&6
10323 fi
10324 done
10325
10326
10327         if test $ol_enable_local = auto ; then
10328                 ol_enable_local=$ac_cv_header_sys_un_h
10329         elif test $ac_cv_header_sys_un_h = no ; then
10330                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10331         fi
10332 fi
10333
10334 ol_link_kbind=no
10335 ol_link_kpasswd=no
10336 ol_link_krb5=no
10337 ol_link_krb4=no
10338
10339 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10340         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10341         -o $ol_with_kerberos = k425 ; then
10342
10343         for ac_hdr in krb5.h
10344 do
10345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10347 echo "configure:10348: checking for $ac_hdr" >&5
10348 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10349   echo $ac_n "(cached) $ac_c" 1>&6
10350 else
10351   cat > conftest.$ac_ext <<EOF
10352 #line 10353 "configure"
10353 #include "confdefs.h"
10354 #include <$ac_hdr>
10355 EOF
10356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10357 { (eval echo configure:10358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10359 if test -z "$ac_err"; then
10360   rm -rf conftest*
10361   eval "ac_cv_header_$ac_safe=yes"
10362 else
10363   echo "$ac_err" >&5
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   eval "ac_cv_header_$ac_safe=no"
10368 fi
10369 rm -f conftest*
10370 fi
10371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10374   cat >> confdefs.h <<EOF
10375 #define $ac_tr_hdr 1
10376 EOF
10377  
10378 else
10379   echo "$ac_t""no" 1>&6
10380 fi
10381 done
10382
10383
10384         if test $ac_cv_header_krb5_h = yes ; then
10385                                 for ac_hdr in heim_err.h
10386 do
10387 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10388 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10389 echo "configure:10390: checking for $ac_hdr" >&5
10390 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <$ac_hdr>
10397 EOF
10398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10399 { (eval echo configure:10400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10401 if test -z "$ac_err"; then
10402   rm -rf conftest*
10403   eval "ac_cv_header_$ac_safe=yes"
10404 else
10405   echo "$ac_err" >&5
10406   echo "configure: failed program was:" >&5
10407   cat conftest.$ac_ext >&5
10408   rm -rf conftest*
10409   eval "ac_cv_header_$ac_safe=no"
10410 fi
10411 rm -f conftest*
10412 fi
10413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10414   echo "$ac_t""yes" 1>&6
10415     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10416   cat >> confdefs.h <<EOF
10417 #define $ac_tr_hdr 1
10418 EOF
10419  
10420 else
10421   echo "$ac_t""no" 1>&6
10422 fi
10423 done
10424
10425                 if test $ac_cv_header_heim_err_h = yes ; then
10426                         krb5_impl=heimdal
10427                 else
10428                         krb5_impl=mit
10429                 fi
10430
10431                 if test $krb5_impl = mit; then
10432                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10433 echo "configure:10434: checking for main in -lk5crypto" >&5
10434 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10435 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10436   echo $ac_n "(cached) $ac_c" 1>&6
10437 else
10438   ac_save_LIBS="$LIBS"
10439 LIBS="-lk5crypto  $LIBS"
10440 cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443
10444 int main() {
10445 main()
10446 ; return 0; }
10447 EOF
10448 if { (eval echo configure:10449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10449   rm -rf conftest*
10450   eval "ac_cv_lib_$ac_lib_var=yes"
10451 else
10452   echo "configure: failed program was:" >&5
10453   cat conftest.$ac_ext >&5
10454   rm -rf conftest*
10455   eval "ac_cv_lib_$ac_lib_var=no"
10456 fi
10457 rm -f conftest*
10458 LIBS="$ac_save_LIBS"
10459
10460 fi
10461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10462   echo "$ac_t""yes" 1>&6
10463   krb5crypto=k5crypto
10464 else
10465   echo "$ac_t""no" 1>&6
10466 krb5crypto=crypto
10467 fi
10468
10469
10470                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10471 echo "configure:10472: checking for main in -lkrb5" >&5
10472 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10473 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10474   echo $ac_n "(cached) $ac_c" 1>&6
10475 else
10476   ac_save_LIBS="$LIBS"
10477 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10478 cat > conftest.$ac_ext <<EOF
10479 #line 10480 "configure"
10480 #include "confdefs.h"
10481
10482 int main() {
10483 main()
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10487   rm -rf conftest*
10488   eval "ac_cv_lib_$ac_lib_var=yes"
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   eval "ac_cv_lib_$ac_lib_var=no"
10494 fi
10495 rm -f conftest*
10496 LIBS="$ac_save_LIBS"
10497
10498 fi
10499 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10500   echo "$ac_t""yes" 1>&6
10501   have_krb5=yes
10502                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10503 else
10504   echo "$ac_t""no" 1>&6
10505 have_krb5=no
10506 fi
10507
10508
10509                 elif test $krb5_impl = heimdal; then
10510                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10511 echo "configure:10512: checking for main in -ldes" >&5
10512 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   ac_save_LIBS="$LIBS"
10517 LIBS="-ldes  $LIBS"
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521
10522 int main() {
10523 main()
10524 ; return 0; }
10525 EOF
10526 if { (eval echo configure:10527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10527   rm -rf conftest*
10528   eval "ac_cv_lib_$ac_lib_var=yes"
10529 else
10530   echo "configure: failed program was:" >&5
10531   cat conftest.$ac_ext >&5
10532   rm -rf conftest*
10533   eval "ac_cv_lib_$ac_lib_var=no"
10534 fi
10535 rm -f conftest*
10536 LIBS="$ac_save_LIBS"
10537
10538 fi
10539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541   krb5crypto=des
10542 else
10543   echo "$ac_t""no" 1>&6
10544 krb5crypto=crypto
10545 fi
10546
10547
10548                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10549 echo "configure:10550: checking for main in -lkrb5" >&5
10550 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10551 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10552   echo $ac_n "(cached) $ac_c" 1>&6
10553 else
10554   ac_save_LIBS="$LIBS"
10555 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10556 cat > conftest.$ac_ext <<EOF
10557 #line 10558 "configure"
10558 #include "confdefs.h"
10559
10560 int main() {
10561 main()
10562 ; return 0; }
10563 EOF
10564 if { (eval echo configure:10565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10565   rm -rf conftest*
10566   eval "ac_cv_lib_$ac_lib_var=yes"
10567 else
10568   echo "configure: failed program was:" >&5
10569   cat conftest.$ac_ext >&5
10570   rm -rf conftest*
10571   eval "ac_cv_lib_$ac_lib_var=no"
10572 fi
10573 rm -f conftest*
10574 LIBS="$ac_save_LIBS"
10575
10576 fi
10577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10578   echo "$ac_t""yes" 1>&6
10579   have_krb5=yes
10580                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10581 else
10582   echo "$ac_t""no" 1>&6
10583 have_krb5=no
10584 fi
10585
10586
10587                         cat >> confdefs.h <<\EOF
10588 #define HAVE_HEIMDAL_KERBEROS 1
10589 EOF
10590
10591
10592                 else
10593                         have_krb5=no
10594                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10595                 fi
10596
10597                 if test $have_krb5 = yes ; then
10598                         ol_link_krb5=yes
10599
10600                         cat >> confdefs.h <<\EOF
10601 #define HAVE_KRB5 1
10602 EOF
10603
10604
10605                         if test $ol_enable_kpasswd != no ; then
10606                                 ol_link_kpasswd=yes;
10607                         fi
10608
10609                         if test $ol_with_kerberos = k5only ; then
10610                                 ol_with_kerberos=found
10611                         fi
10612
10613                 elif test $ol_with_kerberos != auto ; then
10614                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10615                 fi
10616
10617         fi
10618 fi
10619
10620 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10621         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10622
10623         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10624 do
10625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10627 echo "configure:10628: checking for $ac_hdr" >&5
10628 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10629   echo $ac_n "(cached) $ac_c" 1>&6
10630 else
10631   cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634 #include <$ac_hdr>
10635 EOF
10636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10637 { (eval echo configure:10638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10639 if test -z "$ac_err"; then
10640   rm -rf conftest*
10641   eval "ac_cv_header_$ac_safe=yes"
10642 else
10643   echo "$ac_err" >&5
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   eval "ac_cv_header_$ac_safe=no"
10648 fi
10649 rm -f conftest*
10650 fi
10651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10652   echo "$ac_t""yes" 1>&6
10653     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10654   cat >> confdefs.h <<EOF
10655 #define $ac_tr_hdr 1
10656 EOF
10657  
10658 else
10659   echo "$ac_t""no" 1>&6
10660 fi
10661 done
10662
10663
10664         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10665                 if test $krb5_impl = mit; then
10666                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10667 echo "configure:10668: checking for main in -lkrb4" >&5
10668 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10670   echo $ac_n "(cached) $ac_c" 1>&6
10671 else
10672   ac_save_LIBS="$LIBS"
10673 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677
10678 int main() {
10679 main()
10680 ; return 0; }
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=yes"
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -rf conftest*
10689   eval "ac_cv_lib_$ac_lib_var=no"
10690 fi
10691 rm -f conftest*
10692 LIBS="$ac_save_LIBS"
10693
10694 fi
10695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10696   echo "$ac_t""yes" 1>&6
10697   have_k425=yes
10698                                 KRB4_LIBS="-lkrb4 -ldes425"
10699 else
10700   echo "$ac_t""no" 1>&6
10701 have_k425=no
10702 fi
10703
10704
10705                 elif test $krb5_impl = heimdal; then
10706                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10707 echo "configure:10708: checking for main in -lkrb4" >&5
10708 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10710   echo $ac_n "(cached) $ac_c" 1>&6
10711 else
10712   ac_save_LIBS="$LIBS"
10713 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10714 cat > conftest.$ac_ext <<EOF
10715 #line 10716 "configure"
10716 #include "confdefs.h"
10717
10718 int main() {
10719 main()
10720 ; return 0; }
10721 EOF
10722 if { (eval echo configure:10723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10723   rm -rf conftest*
10724   eval "ac_cv_lib_$ac_lib_var=yes"
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -rf conftest*
10729   eval "ac_cv_lib_$ac_lib_var=no"
10730 fi
10731 rm -f conftest*
10732 LIBS="$ac_save_LIBS"
10733
10734 fi
10735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10736   echo "$ac_t""yes" 1>&6
10737   have_k425=yes
10738                                 KRB4_LIBS="-lkrb4"
10739 else
10740   echo "$ac_t""no" 1>&6
10741 have_k425=no
10742 fi
10743
10744
10745                 else
10746                         have_425=no
10747                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10748                 fi
10749
10750                 if test $have_k425 = yes ; then
10751                         ol_with_kerberos=found
10752                         ol_link_krb4=yes
10753
10754                         cat >> confdefs.h <<\EOF
10755 #define HAVE_KRB425 1
10756 EOF
10757
10758                         cat >> confdefs.h <<\EOF
10759 #define HAVE_KRB4 1
10760 EOF
10761
10762
10763                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10764 echo "configure:10765: checking for des_debug in Kerberos libraries" >&5
10765 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10766   echo $ac_n "(cached) $ac_c" 1>&6
10767 else
10768   
10769                                                                 save_LIBS="$LIBS"
10770                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10771                                 cat > conftest.$ac_ext <<EOF
10772 #line 10773 "configure"
10773 #include "confdefs.h"
10774
10775 #include <kerberosIV/krb.h>
10776 #include <kerberosIV/des.h>
10777 extern int des_debug;
10778
10779 int main() {
10780
10781 des_debug = 1;
10782
10783 ; return 0; }
10784 EOF
10785 if { (eval echo configure:10786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10786   rm -rf conftest*
10787   ol_cv_var_des_debug=yes
10788 else
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -rf conftest*
10792   ol_cv_var_des_debug=no
10793 fi
10794 rm -f conftest*
10795                                                                 LIBS="$save_LIBS"
10796                         
10797 fi
10798
10799 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10800
10801                         if test $ol_cv_var_des_debug = yes ; then
10802                                 cat >> confdefs.h <<\EOF
10803 #define HAVE_DES_DEBUG 1
10804 EOF
10805
10806                         fi
10807
10808                         LIBS="$save_LIBS"
10809                 fi
10810         fi
10811 fi
10812
10813 if test $ol_link_krb5 = yes ; then
10814         ol_with_kerberos=found
10815 fi
10816
10817 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10818         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10819
10820         for ac_hdr in krb.h des.h krb-archaeology.h 
10821 do
10822 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10823 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10824 echo "configure:10825: checking for $ac_hdr" >&5
10825 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10826   echo $ac_n "(cached) $ac_c" 1>&6
10827 else
10828   cat > conftest.$ac_ext <<EOF
10829 #line 10830 "configure"
10830 #include "confdefs.h"
10831 #include <$ac_hdr>
10832 EOF
10833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10834 { (eval echo configure:10835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10836 if test -z "$ac_err"; then
10837   rm -rf conftest*
10838   eval "ac_cv_header_$ac_safe=yes"
10839 else
10840   echo "$ac_err" >&5
10841   echo "configure: failed program was:" >&5
10842   cat conftest.$ac_ext >&5
10843   rm -rf conftest*
10844   eval "ac_cv_header_$ac_safe=no"
10845 fi
10846 rm -f conftest*
10847 fi
10848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10851   cat >> confdefs.h <<EOF
10852 #define $ac_tr_hdr 1
10853 EOF
10854  
10855 else
10856   echo "$ac_t""no" 1>&6
10857 fi
10858 done
10859
10860
10861         if test $ac_cv_header_krb_h = yes ; then
10862                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10863 echo "configure:10864: checking for main in -lkrb" >&5
10864 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10866   echo $ac_n "(cached) $ac_c" 1>&6
10867 else
10868   ac_save_LIBS="$LIBS"
10869 LIBS="-lkrb -ldes $LIBS"
10870 cat > conftest.$ac_ext <<EOF
10871 #line 10872 "configure"
10872 #include "confdefs.h"
10873
10874 int main() {
10875 main()
10876 ; return 0; }
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10879   rm -rf conftest*
10880   eval "ac_cv_lib_$ac_lib_var=yes"
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   eval "ac_cv_lib_$ac_lib_var=no"
10886 fi
10887 rm -f conftest*
10888 LIBS="$ac_save_LIBS"
10889
10890 fi
10891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10892   echo "$ac_t""yes" 1>&6
10893   have_k4=yes
10894 else
10895   echo "$ac_t""no" 1>&6
10896 have_k4=no
10897 fi
10898
10899
10900                 if test $have_k4 = yes ; then
10901                         ol_with_kerberos=found
10902                         ol_link_krb4=yes
10903
10904                         cat >> confdefs.h <<\EOF
10905 #define HAVE_KRB4 1
10906 EOF
10907
10908
10909                         KRB4_LIBS="-lkrb -ldes"
10910
10911                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10912                                 cat >> confdefs.h <<\EOF
10913 #define HAVE_KTH_KERBEROS 1
10914 EOF
10915
10916                         fi
10917                 fi
10918         fi
10919 fi
10920
10921 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10922         ol_link_kpasswd=yes
10923 fi
10924
10925 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10926         ol_link_kbind=yes
10927
10928 elif test $ol_enable_kbind = yes ; then
10929         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10930 fi
10931
10932 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10933         cat >> confdefs.h <<\EOF
10934 #define HAVE_KERBEROS 1
10935 EOF
10936
10937
10938 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10939         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10940 fi
10941
10942 ol_link_tls=no
10943 if test $ol_with_tls != no ; then
10944         for ac_hdr in openssl/ssl.h ssl.h
10945 do
10946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10948 echo "configure:10949: checking for $ac_hdr" >&5
10949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10950   echo $ac_n "(cached) $ac_c" 1>&6
10951 else
10952   cat > conftest.$ac_ext <<EOF
10953 #line 10954 "configure"
10954 #include "confdefs.h"
10955 #include <$ac_hdr>
10956 EOF
10957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10958 { (eval echo configure:10959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10960 if test -z "$ac_err"; then
10961   rm -rf conftest*
10962   eval "ac_cv_header_$ac_safe=yes"
10963 else
10964   echo "$ac_err" >&5
10965   echo "configure: failed program was:" >&5
10966   cat conftest.$ac_ext >&5
10967   rm -rf conftest*
10968   eval "ac_cv_header_$ac_safe=no"
10969 fi
10970 rm -f conftest*
10971 fi
10972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10973   echo "$ac_t""yes" 1>&6
10974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10975   cat >> confdefs.h <<EOF
10976 #define $ac_tr_hdr 1
10977 EOF
10978  
10979 else
10980   echo "$ac_t""no" 1>&6
10981 fi
10982 done
10983
10984         
10985         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10986                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10987 echo "configure:10988: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10988 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   ac_save_LIBS="$LIBS"
10993 LIBS="-lssl -lcrypto $LIBS"
10994 cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997 /* Override any gcc2 internal prototype to avoid an error.  */
10998 /* We use char because int might match the return type of a gcc2
10999     builtin and then its argument prototype would still apply.  */
11000 char SSLeay_add_ssl_algorithms();
11001
11002 int main() {
11003 SSLeay_add_ssl_algorithms()
11004 ; return 0; }
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=yes"
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=no"
11014 fi
11015 rm -f conftest*
11016 LIBS="$ac_save_LIBS"
11017
11018 fi
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11020   echo "$ac_t""yes" 1>&6
11021   have_ssleay=yes
11022                         need_rsaref=no
11023 else
11024   echo "$ac_t""no" 1>&6
11025 have_ssleay=no
11026 fi
11027
11028                         
11029                 if test $have_ssleay = no ; then
11030                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11031 echo "configure:11032: checking for SSL_library_init in -lssl" >&5
11032 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   ac_save_LIBS="$LIBS"
11037 LIBS="-lssl -lcrypto $LIBS"
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 /* Override any gcc2 internal prototype to avoid an error.  */
11042 /* We use char because int might match the return type of a gcc2
11043     builtin and then its argument prototype would still apply.  */
11044 char SSL_library_init();
11045
11046 int main() {
11047 SSL_library_init()
11048 ; return 0; }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11051   rm -rf conftest*
11052   eval "ac_cv_lib_$ac_lib_var=yes"
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_lib_$ac_lib_var=no"
11058 fi
11059 rm -f conftest*
11060 LIBS="$ac_save_LIBS"
11061
11062 fi
11063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11064   echo "$ac_t""yes" 1>&6
11065   have_ssleay=yes
11066                                 need_rsaref=no
11067 else
11068   echo "$ac_t""no" 1>&6
11069 have_ssleay=no
11070 fi
11071
11072                 fi
11073
11074                 if test $have_ssleay = no ; then
11075                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11076 echo "configure:11077: checking for ssl3_accept in -lssl" >&5
11077 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   ac_save_LIBS="$LIBS"
11082 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char ssl3_accept();
11090
11091 int main() {
11092 ssl3_accept()
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=yes"
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=no"
11103 fi
11104 rm -f conftest*
11105 LIBS="$ac_save_LIBS"
11106
11107 fi
11108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110   have_ssleay=yes
11111                                 need_rsaref=yes
11112 else
11113   echo "$ac_t""no" 1>&6
11114 have_ssleay=no
11115 fi
11116
11117                 fi
11118
11119                 if test $have_ssleay = yes ; then
11120                         ol_with_tls=found
11121                         ol_link_tls=yes
11122
11123                         cat >> confdefs.h <<\EOF
11124 #define HAVE_SSLEAY 1
11125 EOF
11126
11127
11128                         if test $need_rsaref = yes; then
11129                                 cat >> confdefs.h <<\EOF
11130 #define HAVE_RSAREF 1
11131 EOF
11132
11133
11134                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11135                         else
11136                                 TLS_LIBS="-lssl -lcrypto"
11137                         fi
11138                 fi
11139         fi
11140
11141 else
11142         echo "configure: warning: TLS data protection not supported!" 1>&2
11143 fi
11144
11145 if test $ol_link_tls = yes ; then
11146         cat >> confdefs.h <<\EOF
11147 #define HAVE_TLS 1
11148 EOF
11149
11150
11151 elif test $ol_with_tls = auto ; then
11152         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11153         echo "configure: warning: TLS data protection not supported!" 1>&2
11154
11155 elif test $ol_with_tls != no ; then
11156         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11157 fi
11158
11159 if test $ol_enable_lmpasswd != no; then
11160         if test $ol_link_tls != yes ; then
11161                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11162         fi
11163
11164         cat >> confdefs.h <<\EOF
11165 #define SLAPD_LMHASH 1
11166 EOF
11167
11168 fi
11169
11170 for ac_func in \
11171         ctime_r                 \
11172         gethostbyname_r gethostbyaddr_r \
11173
11174 do
11175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11176 echo "configure:11177: checking for $ac_func" >&5
11177 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11178   echo $ac_n "(cached) $ac_c" 1>&6
11179 else
11180   cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183 /* System header to define __stub macros and hopefully few prototypes,
11184     which can conflict with char $ac_func(); below.  */
11185 #include <assert.h>
11186 /* Override any gcc2 internal prototype to avoid an error.  */
11187 /* We use char because int might match the return type of a gcc2
11188     builtin and then its argument prototype would still apply.  */
11189 char $ac_func();
11190 char (*f)();
11191
11192 int main() {
11193
11194 /* The GNU C library defines this for functions which it implements
11195     to always fail with ENOSYS.  Some functions are actually named
11196     something starting with __ and the normal name is an alias.  */
11197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11198 choke me
11199 #else
11200 f = $ac_func;
11201 #endif
11202
11203 ; return 0; }
11204 EOF
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11206   rm -rf conftest*
11207   eval "ac_cv_func_$ac_func=yes"
11208 else
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -rf conftest*
11212   eval "ac_cv_func_$ac_func=no"
11213 fi
11214 rm -f conftest*
11215 fi
11216
11217 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11218   echo "$ac_t""yes" 1>&6
11219     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11220   cat >> confdefs.h <<EOF
11221 #define $ac_tr_func 1
11222 EOF
11223  
11224 else
11225   echo "$ac_t""no" 1>&6
11226 fi
11227 done
11228
11229
11230 if test "$ac_cv_func_ctime_r" = no ; then
11231         ol_cv_func_ctime_r_nargs=0
11232 else
11233         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11234 echo "configure:11235: checking number of arguments of ctime_r" >&5
11235 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11236   echo $ac_n "(cached) $ac_c" 1>&6
11237 else
11238   cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241 #include <time.h>
11242 int main() {
11243 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11244 ; return 0; }
11245 EOF
11246 if { (eval echo configure:11247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11247   rm -rf conftest*
11248   ol_cv_func_ctime_r_nargs3=yes
11249 else
11250   echo "configure: failed program was:" >&5
11251   cat conftest.$ac_ext >&5
11252   rm -rf conftest*
11253   ol_cv_func_ctime_r_nargs3=no
11254 fi
11255 rm -f conftest*
11256
11257         cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 #include <time.h>
11261 int main() {
11262 time_t ti; char *buffer; ctime_r(&ti,buffer);
11263 ; return 0; }
11264 EOF
11265 if { (eval echo configure:11266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11266   rm -rf conftest*
11267   ol_cv_func_ctime_r_nargs2=yes
11268 else
11269   echo "configure: failed program was:" >&5
11270   cat conftest.$ac_ext >&5
11271   rm -rf conftest*
11272   ol_cv_func_ctime_r_nargs2=no
11273 fi
11274 rm -f conftest*
11275
11276         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11277                 $ol_cv_func_ctime_r_nargs2 = no ; then
11278
11279                 ol_cv_func_ctime_r_nargs=3
11280
11281         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11282                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11283
11284                 ol_cv_func_ctime_r_nargs=2
11285
11286         else
11287                 ol_cv_func_ctime_r_nargs=0
11288         fi
11289   
11290 fi
11291
11292 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11293
11294   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11295         cat >> confdefs.h <<EOF
11296 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11297 EOF
11298
11299   fi
11300
11301 fi
11302
11303 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11304         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11305 echo "configure:11306: checking number of arguments of gethostbyname_r" >&5
11306 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11307   echo $ac_n "(cached) $ac_c" 1>&6
11308 else
11309   cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312 #include <sys/types.h>
11313 #include <sys/socket.h>
11314 #include <netinet/in.h>
11315 #include <netdb.h>
11316 #define BUFSIZE (sizeof(struct hostent)+10)
11317 int main() {
11318 struct hostent hent; char buffer[BUFSIZE];
11319                 int bufsize=BUFSIZE;int h_errno;
11320                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11321                         buffer, bufsize, &h_errno);
11322 ; return 0; }
11323 EOF
11324 if { (eval echo configure:11325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11325   rm -rf conftest*
11326   ol_cv_func_gethostbyname_r_nargs5=yes
11327 else
11328   echo "configure: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   rm -rf conftest*
11331   ol_cv_func_gethostbyname_r_nargs5=no
11332 fi
11333 rm -f conftest*
11334
11335         cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 #include <sys/types.h>
11339 #include <sys/socket.h>
11340 #include <netinet/in.h>
11341 #include <netdb.h>
11342 #define BUFSIZE (sizeof(struct hostent)+10)
11343 int main() {
11344 struct hostent hent;struct hostent *rhent;
11345                 char buffer[BUFSIZE];
11346                 int bufsize=BUFSIZE;int h_errno;
11347                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11348                         &rhent, &h_errno);
11349 ; return 0; }
11350 EOF
11351 if { (eval echo configure:11352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11352   rm -rf conftest*
11353   ol_cv_func_gethostbyname_r_nargs6=yes
11354 else
11355   echo "configure: failed program was:" >&5
11356   cat conftest.$ac_ext >&5
11357   rm -rf conftest*
11358   ol_cv_func_gethostbyname_r_nargs6=no
11359 fi
11360 rm -f conftest*
11361
11362         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11363                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11364
11365                 ol_cv_func_gethostbyname_r_nargs=5
11366
11367         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11368                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11369
11370                 ol_cv_func_gethostbyname_r_nargs=6
11371
11372         else
11373                 ol_cv_func_gethostbyname_r_nargs=0
11374         fi
11375   
11376 fi
11377
11378 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11379   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11380         cat >> confdefs.h <<EOF
11381 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11382 EOF
11383
11384   fi
11385
11386 else
11387         ol_cv_func_gethostbyname_r_nargs=0
11388 fi
11389  
11390 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11391         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11392 echo "configure:11393: checking number of arguments of gethostbyaddr_r" >&5
11393 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11394   echo $ac_n "(cached) $ac_c" 1>&6
11395 else
11396   cat > conftest.$ac_ext <<EOF
11397 #line 11398 "configure"
11398 #include "confdefs.h"
11399 #include <sys/types.h>
11400 #include <sys/socket.h>
11401 #include <netinet/in.h>
11402 #include <netdb.h>
11403 #define BUFSIZE (sizeof(struct hostent)+10)
11404 int main() {
11405 struct hostent hent; char buffer[BUFSIZE]; 
11406             struct in_addr add;
11407             size_t alen=sizeof(struct in_addr);
11408             int bufsize=BUFSIZE;int h_errno;
11409                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11410                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11411 ; return 0; }
11412 EOF
11413 if { (eval echo configure:11414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11414   rm -rf conftest*
11415   ol_cv_func_gethostbyaddr_r_nargs7=yes
11416 else
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   ol_cv_func_gethostbyaddr_r_nargs7=no
11421 fi
11422 rm -f conftest*
11423
11424         cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <sys/types.h>
11428 #include <sys/socket.h>
11429 #include <netinet/in.h>
11430 #include <netdb.h>
11431 #define BUFSIZE (sizeof(struct hostent)+10)
11432 int main() {
11433 struct hostent hent;
11434                 struct hostent *rhent; char buffer[BUFSIZE]; 
11435                 struct in_addr add;
11436                 size_t alen=sizeof(struct in_addr);
11437                 int bufsize=BUFSIZE;int h_errno;
11438                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11439                         alen, AF_INET, &hent, buffer, bufsize, 
11440                         &rhent, &h_errno);
11441 ; return 0; }
11442 EOF
11443 if { (eval echo configure:11444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11444   rm -rf conftest*
11445   ol_cv_func_gethostbyaddr_r_nargs8=yes
11446 else
11447   echo "configure: failed program was:" >&5
11448   cat conftest.$ac_ext >&5
11449   rm -rf conftest*
11450   ol_cv_func_gethostbyaddr_r_nargs8=no
11451 fi
11452 rm -f conftest*
11453
11454         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11455                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11456
11457                 ol_cv_func_gethostbyaddr_r_nargs=7
11458
11459         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11460                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11461
11462                 ol_cv_func_gethostbyaddr_r_nargs=8
11463
11464         else
11465                 ol_cv_func_gethostbyaddr_r_nargs=0
11466         fi
11467   
11468 fi
11469
11470 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11471   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11472     cat >> confdefs.h <<EOF
11473 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11474 EOF
11475
11476   fi
11477
11478 else
11479         ol_cv_func_gethostbyaddr_r_nargs=0
11480 fi
11481
11482 if test "$ac_cv_func_ctime_r" = yes \
11483         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11484         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11485         -a "$ac_cv_func_gethostbyname_r" = yes \
11486         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11487         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11488         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11489         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11490         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11491         ; then
11492  
11493         cat >> confdefs.h <<\EOF
11494 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11495 EOF
11496
11497 fi
11498
11499 ol_link_threads=no
11500
11501 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11502         -o $ol_with_threads = nt ; then
11503
11504         
11505         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11506 echo "configure:11507: checking for _beginthread" >&5
11507 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513 /* System header to define __stub macros and hopefully few prototypes,
11514     which can conflict with char _beginthread(); below.  */
11515 #include <assert.h>
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 /* We use char because int might match the return type of a gcc2
11518     builtin and then its argument prototype would still apply.  */
11519 char _beginthread();
11520 char (*f)();
11521
11522 int main() {
11523
11524 /* The GNU C library defines this for functions which it implements
11525     to always fail with ENOSYS.  Some functions are actually named
11526     something starting with __ and the normal name is an alias.  */
11527 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11528 choke me
11529 #else
11530 f = _beginthread;
11531 #endif
11532
11533 ; return 0; }
11534 EOF
11535 if { (eval echo configure:11536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11536   rm -rf conftest*
11537   eval "ac_cv_func__beginthread=yes"
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   eval "ac_cv_func__beginthread=no"
11543 fi
11544 rm -f conftest*
11545 fi
11546
11547 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11548   echo "$ac_t""yes" 1>&6
11549   :
11550 else
11551   echo "$ac_t""no" 1>&6
11552 fi
11553
11554
11555         if test $ac_cv_func__beginthread = yes ; then
11556                 cat >> confdefs.h <<\EOF
11557 #define HAVE_NT_THREADS 1
11558 EOF
11559
11560                 ol_cv_nt_threads=yes
11561         fi
11562
11563
11564         if test "$ol_cv_nt_threads" = yes ; then
11565                 ol_link_threads=nt
11566                 ol_with_threads=found
11567                 ol_with_yielding_select=yes
11568
11569                 cat >> confdefs.h <<\EOF
11570 #define HAVE_NT_SERVICE_MANAGER 1
11571 EOF
11572
11573                 cat >> confdefs.h <<\EOF
11574 #define HAVE_NT_EVENT_LOG 1
11575 EOF
11576
11577         fi
11578
11579         if test $ol_with_threads = nt ; then
11580                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11581         fi
11582 fi
11583
11584 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11585         -o $ol_with_threads = posix ; then
11586
11587         for ac_hdr in pthread.h
11588 do
11589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11591 echo "configure:11592: checking for $ac_hdr" >&5
11592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11593   echo $ac_n "(cached) $ac_c" 1>&6
11594 else
11595   cat > conftest.$ac_ext <<EOF
11596 #line 11597 "configure"
11597 #include "confdefs.h"
11598 #include <$ac_hdr>
11599 EOF
11600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11601 { (eval echo configure:11602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11603 if test -z "$ac_err"; then
11604   rm -rf conftest*
11605   eval "ac_cv_header_$ac_safe=yes"
11606 else
11607   echo "$ac_err" >&5
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=no"
11612 fi
11613 rm -f conftest*
11614 fi
11615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11616   echo "$ac_t""yes" 1>&6
11617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11618   cat >> confdefs.h <<EOF
11619 #define $ac_tr_hdr 1
11620 EOF
11621  
11622 else
11623   echo "$ac_t""no" 1>&6
11624 fi
11625 done
11626
11627
11628         if test $ac_cv_header_pthread_h = yes ; then
11629                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11630 echo "configure:11631: checking POSIX thread version" >&5
11631 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11632   echo $ac_n "(cached) $ac_c" 1>&6
11633 else
11634   
11635         cat > conftest.$ac_ext <<EOF
11636 #line 11637 "configure"
11637 #include "confdefs.h"
11638
11639 #               include <pthread.h>
11640                 /* this check could be improved */
11641 #               ifdef PTHREAD_ONCE_INIT
11642                         pthread_version_final;
11643 #               endif
11644         
11645 EOF
11646 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11647   egrep "pthread_version_final" >/dev/null 2>&1; then
11648   rm -rf conftest*
11649   ol_pthread_final=yes
11650 else
11651   rm -rf conftest*
11652   ol_pthread_final=no
11653 fi
11654 rm -f conftest*
11655
11656
11657         cat > conftest.$ac_ext <<EOF
11658 #line 11659 "configure"
11659 #include "confdefs.h"
11660
11661 #               include <pthread.h>
11662                 /* this check could be improved */
11663 #               ifdef pthread_once_init
11664                         pthread_version_draft4;
11665 #               endif
11666         
11667 EOF
11668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11669   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11670   rm -rf conftest*
11671   ol_pthread_draft4=yes
11672 else
11673   rm -rf conftest*
11674   ol_pthread_draft4=no
11675 fi
11676 rm -f conftest*
11677
11678
11679         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11680                 ol_cv_pthread_version=final
11681         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11682                 ol_cv_pthread_version=draft4
11683         else
11684                 ol_cv_pthread_version=unknown
11685         fi
11686
11687 fi
11688
11689 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11690
11691
11692                 if test $ol_cv_pthread_version = final ; then
11693                         cat >> confdefs.h <<\EOF
11694 #define HAVE_PTHREADS_FINAL 1
11695 EOF
11696
11697                 elif test $ol_cv_pthread_version = draft4 ; then
11698                         cat >> confdefs.h <<\EOF
11699 #define HAVE_PTHREADS_D4 1
11700 EOF
11701
11702                 else
11703                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11704                 fi
11705
11706                 # consider threads found
11707                 ol_with_threads=found
11708
11709                 
11710         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11711 echo "configure:11712: checking for LinuxThreads pthread.h" >&5
11712 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11713   echo $ac_n "(cached) $ac_c" 1>&6
11714 else
11715   cat > conftest.$ac_ext <<EOF
11716 #line 11717 "configure"
11717 #include "confdefs.h"
11718 #include <pthread.h>
11719 EOF
11720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11721   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11722   rm -rf conftest*
11723   ol_cv_header_linux_threads=yes
11724 else
11725   rm -rf conftest*
11726   ol_cv_header_linux_threads=no
11727 fi
11728 rm -f conftest*
11729
11730                 
11731 fi
11732
11733 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11734         if test $ol_cv_header_linux_threads = yes; then
11735                 cat >> confdefs.h <<\EOF
11736 #define HAVE_LINUX_THREADS 1
11737 EOF
11738
11739         fi
11740
11741                 
11742         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11743 echo "configure:11744: checking for GNU Pth pthread.h" >&5
11744 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11745   echo $ac_n "(cached) $ac_c" 1>&6
11746 else
11747   cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750 #include <pthread.h>
11751 #ifdef _POSIX_THREAD_IS_GNU_PTH
11752         __gnu_pth__;
11753 #endif
11754
11755 EOF
11756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11757   egrep "__gnu_pth__" >/dev/null 2>&1; then
11758   rm -rf conftest*
11759   ol_cv_header_gnu_pth_pthread_h=yes
11760 else
11761   rm -rf conftest*
11762   ol_cv_header_gnu_pth_pthread_h=no
11763 fi
11764 rm -f conftest*
11765
11766                 
11767 fi
11768
11769 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11770
11771
11772                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11773                         for ac_hdr in sched.h
11774 do
11775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11777 echo "configure:11778: checking for $ac_hdr" >&5
11778 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784 #include <$ac_hdr>
11785 EOF
11786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11787 { (eval echo configure:11788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11789 if test -z "$ac_err"; then
11790   rm -rf conftest*
11791   eval "ac_cv_header_$ac_safe=yes"
11792 else
11793   echo "$ac_err" >&5
11794   echo "configure: failed program was:" >&5
11795   cat conftest.$ac_ext >&5
11796   rm -rf conftest*
11797   eval "ac_cv_header_$ac_safe=no"
11798 fi
11799 rm -f conftest*
11800 fi
11801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11802   echo "$ac_t""yes" 1>&6
11803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11804   cat >> confdefs.h <<EOF
11805 #define $ac_tr_hdr 1
11806 EOF
11807  
11808 else
11809   echo "$ac_t""no" 1>&6
11810 fi
11811 done
11812
11813                 fi
11814
11815                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11816                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11817 echo "configure:11818: checking for pthread_create in default libraries" >&5
11818 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11819   echo $ac_n "(cached) $ac_c" 1>&6
11820 else
11821   
11822                 if test "$cross_compiling" = yes; then
11823   cat > conftest.$ac_ext <<EOF
11824 #line 11825 "configure"
11825 #include "confdefs.h"
11826 /* pthread test headers */
11827 #include <pthread.h>
11828 #ifndef NULL
11829 #define NULL (void*)0
11830 #endif
11831
11832 static void *task(p)
11833         void *p;
11834 {
11835         return (void *) (p == NULL);
11836 }
11837
11838 int main() {
11839
11840         /* pthread test function */
11841         pthread_t t;
11842         int status;
11843         int detach = 1;
11844
11845 #ifdef HAVE_PTHREADS_FINAL
11846         /* Final pthreads */
11847         pthread_attr_t attr;
11848
11849         status = pthread_attr_init(&attr);
11850         if( status ) return status;
11851
11852 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11853         if( !detach ) {
11854 #if defined( PTHREAD_CREATE_JOINABLE )
11855                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11856 #else
11857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11858 #endif
11859
11860 #ifdef PTHREAD_CREATE_DETACHED
11861         } else {
11862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11863 #endif
11864         }
11865         if( status ) return status;
11866 #endif
11867
11868         status = pthread_create( &t, &attr, task, NULL );
11869         if( status ) return status;
11870
11871 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11872         if( detach ) {
11873                 /* give thread a chance to complete */
11874                 /* it should remain joinable and hence detachable */
11875                 sleep( 1 );
11876
11877                 status = pthread_detach( t );
11878                 if( status ) return status;
11879         }
11880 #endif
11881
11882 #else
11883         /* Draft 4 pthreads */
11884         status = pthread_create( &t, pthread_attr_default, task, NULL );
11885         if( status ) return status;
11886
11887         if( detach ) {
11888                 /* give thread a chance to complete */
11889                 /* it should remain joinable and hence detachable */
11890                 sleep( 1 );
11891
11892                 status = pthread_detach( &t );
11893                 if( status ) return status;
11894         }
11895 #endif
11896
11897 #ifdef HAVE_LINUX_THREADS
11898         pthread_kill_other_threads_np();
11899 #endif
11900
11901         return 0;
11902
11903 ; return 0; }
11904 EOF
11905 if { (eval echo configure:11906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11906   rm -rf conftest*
11907   ol_cv_pthread_create=yes
11908 else
11909   echo "configure: failed program was:" >&5
11910   cat conftest.$ac_ext >&5
11911   rm -rf conftest*
11912   ol_cv_pthread_create=no
11913 fi
11914 rm -f conftest*
11915 else
11916   cat > conftest.$ac_ext <<EOF
11917 #line 11918 "configure"
11918 #include "confdefs.h"
11919 /* pthread test headers */
11920 #include <pthread.h>
11921 #ifndef NULL
11922 #define NULL (void*)0
11923 #endif
11924
11925 static void *task(p)
11926         void *p;
11927 {
11928         return (void *) (p == NULL);
11929 }
11930
11931
11932 int main(argc, argv)
11933         int argc;
11934         char **argv;
11935 {
11936
11937         /* pthread test function */
11938         pthread_t t;
11939         int status;
11940         int detach = 1;
11941
11942 #ifdef HAVE_PTHREADS_FINAL
11943         /* Final pthreads */
11944         pthread_attr_t attr;
11945
11946         status = pthread_attr_init(&attr);
11947         if( status ) return status;
11948
11949 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11950         if( !detach ) {
11951 #if defined( PTHREAD_CREATE_JOINABLE )
11952                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11953 #else
11954                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11955 #endif
11956
11957 #ifdef PTHREAD_CREATE_DETACHED
11958         } else {
11959                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11960 #endif
11961         }
11962         if( status ) return status;
11963 #endif
11964
11965         status = pthread_create( &t, &attr, task, NULL );
11966         if( status ) return status;
11967
11968 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11969         if( detach ) {
11970                 /* give thread a chance to complete */
11971                 /* it should remain joinable and hence detachable */
11972                 sleep( 1 );
11973
11974                 status = pthread_detach( t );
11975                 if( status ) return status;
11976         }
11977 #endif
11978
11979 #else
11980         /* Draft 4 pthreads */
11981         status = pthread_create( &t, pthread_attr_default, task, NULL );
11982         if( status ) return status;
11983
11984         if( detach ) {
11985                 /* give thread a chance to complete */
11986                 /* it should remain joinable and hence detachable */
11987                 sleep( 1 );
11988
11989                 status = pthread_detach( &t );
11990                 if( status ) return status;
11991         }
11992 #endif
11993
11994 #ifdef HAVE_LINUX_THREADS
11995         pthread_kill_other_threads_np();
11996 #endif
11997
11998         return 0;
11999
12000 }
12001
12002 EOF
12003 if { (eval echo configure:12004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12004 then
12005   ol_cv_pthread_create=yes
12006 else
12007   echo "configure: failed program was:" >&5
12008   cat conftest.$ac_ext >&5
12009   rm -fr conftest*
12010   ol_cv_pthread_create=no
12011 fi
12012 rm -fr conftest*
12013 fi
12014
12015 fi
12016
12017 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12018
12019                 if test $ol_cv_pthread_create != no ; then
12020                         ol_link_threads=posix
12021                         ol_link_pthreads=""
12022                 fi
12023                 
12024                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12025 if test "$ol_link_threads" = no ; then
12026         # try -kthread
12027         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12028 echo "configure:12029: checking for pthread link with -kthread" >&5
12029 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   
12033                 # save the flags
12034                 ol_LIBS="$LIBS"
12035                 LIBS="-kthread $LIBS"
12036
12037                 if test "$cross_compiling" = yes; then
12038   cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 /* pthread test headers */
12042 #include <pthread.h>
12043 #ifndef NULL
12044 #define NULL (void*)0
12045 #endif
12046
12047 static void *task(p)
12048         void *p;
12049 {
12050         return (void *) (p == NULL);
12051 }
12052
12053 int main() {
12054
12055         /* pthread test function */
12056         pthread_t t;
12057         int status;
12058         int detach = 1;
12059
12060 #ifdef HAVE_PTHREADS_FINAL
12061         /* Final pthreads */
12062         pthread_attr_t attr;
12063
12064         status = pthread_attr_init(&attr);
12065         if( status ) return status;
12066
12067 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12068         if( !detach ) {
12069 #if defined( PTHREAD_CREATE_JOINABLE )
12070                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12071 #else
12072                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12073 #endif
12074
12075 #ifdef PTHREAD_CREATE_DETACHED
12076         } else {
12077                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12078 #endif
12079         }
12080         if( status ) return status;
12081 #endif
12082
12083         status = pthread_create( &t, &attr, task, NULL );
12084         if( status ) return status;
12085
12086 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12087         if( detach ) {
12088                 /* give thread a chance to complete */
12089                 /* it should remain joinable and hence detachable */
12090                 sleep( 1 );
12091
12092                 status = pthread_detach( t );
12093                 if( status ) return status;
12094         }
12095 #endif
12096
12097 #else
12098         /* Draft 4 pthreads */
12099         status = pthread_create( &t, pthread_attr_default, task, NULL );
12100         if( status ) return status;
12101
12102         if( detach ) {
12103                 /* give thread a chance to complete */
12104                 /* it should remain joinable and hence detachable */
12105                 sleep( 1 );
12106
12107                 status = pthread_detach( &t );
12108                 if( status ) return status;
12109         }
12110 #endif
12111
12112 #ifdef HAVE_LINUX_THREADS
12113         pthread_kill_other_threads_np();
12114 #endif
12115
12116         return 0;
12117
12118 ; return 0; }
12119 EOF
12120 if { (eval echo configure:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12121   rm -rf conftest*
12122   ol_cv_pthread_kthread=yes
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   ol_cv_pthread_kthread=no
12128 fi
12129 rm -f conftest*
12130 else
12131   cat > conftest.$ac_ext <<EOF
12132 #line 12133 "configure"
12133 #include "confdefs.h"
12134 /* pthread test headers */
12135 #include <pthread.h>
12136 #ifndef NULL
12137 #define NULL (void*)0
12138 #endif
12139
12140 static void *task(p)
12141         void *p;
12142 {
12143         return (void *) (p == NULL);
12144 }
12145
12146
12147 int main(argc, argv)
12148         int argc;
12149         char **argv;
12150 {
12151
12152         /* pthread test function */
12153         pthread_t t;
12154         int status;
12155         int detach = 1;
12156
12157 #ifdef HAVE_PTHREADS_FINAL
12158         /* Final pthreads */
12159         pthread_attr_t attr;
12160
12161         status = pthread_attr_init(&attr);
12162         if( status ) return status;
12163
12164 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12165         if( !detach ) {
12166 #if defined( PTHREAD_CREATE_JOINABLE )
12167                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12168 #else
12169                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12170 #endif
12171
12172 #ifdef PTHREAD_CREATE_DETACHED
12173         } else {
12174                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12175 #endif
12176         }
12177         if( status ) return status;
12178 #endif
12179
12180         status = pthread_create( &t, &attr, task, NULL );
12181         if( status ) return status;
12182
12183 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12184         if( detach ) {
12185                 /* give thread a chance to complete */
12186                 /* it should remain joinable and hence detachable */
12187                 sleep( 1 );
12188
12189                 status = pthread_detach( t );
12190                 if( status ) return status;
12191         }
12192 #endif
12193
12194 #else
12195         /* Draft 4 pthreads */
12196         status = pthread_create( &t, pthread_attr_default, task, NULL );
12197         if( status ) return status;
12198
12199         if( detach ) {
12200                 /* give thread a chance to complete */
12201                 /* it should remain joinable and hence detachable */
12202                 sleep( 1 );
12203
12204                 status = pthread_detach( &t );
12205                 if( status ) return status;
12206         }
12207 #endif
12208
12209 #ifdef HAVE_LINUX_THREADS
12210         pthread_kill_other_threads_np();
12211 #endif
12212
12213         return 0;
12214
12215 }
12216
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12219 then
12220   ol_cv_pthread_kthread=yes
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -fr conftest*
12225   ol_cv_pthread_kthread=no
12226 fi
12227 rm -fr conftest*
12228 fi
12229
12230
12231                 # restore the LIBS
12232                 LIBS="$ol_LIBS"
12233         
12234 fi
12235
12236 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12237
12238         if test $ol_cv_pthread_kthread = yes ; then
12239                 ol_link_pthreads="-kthread"
12240                 ol_link_threads=posix
12241         fi
12242 fi
12243
12244                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12245 if test "$ol_link_threads" = no ; then
12246         # try -pthread
12247         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12248 echo "configure:12249: checking for pthread link with -pthread" >&5
12249 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12250   echo $ac_n "(cached) $ac_c" 1>&6
12251 else
12252   
12253                 # save the flags
12254                 ol_LIBS="$LIBS"
12255                 LIBS="-pthread $LIBS"
12256
12257                 if test "$cross_compiling" = yes; then
12258   cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 /* pthread test headers */
12262 #include <pthread.h>
12263 #ifndef NULL
12264 #define NULL (void*)0
12265 #endif
12266
12267 static void *task(p)
12268         void *p;
12269 {
12270         return (void *) (p == NULL);
12271 }
12272
12273 int main() {
12274
12275         /* pthread test function */
12276         pthread_t t;
12277         int status;
12278         int detach = 1;
12279
12280 #ifdef HAVE_PTHREADS_FINAL
12281         /* Final pthreads */
12282         pthread_attr_t attr;
12283
12284         status = pthread_attr_init(&attr);
12285         if( status ) return status;
12286
12287 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12288         if( !detach ) {
12289 #if defined( PTHREAD_CREATE_JOINABLE )
12290                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12291 #else
12292                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12293 #endif
12294
12295 #ifdef PTHREAD_CREATE_DETACHED
12296         } else {
12297                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12298 #endif
12299         }
12300         if( status ) return status;
12301 #endif
12302
12303         status = pthread_create( &t, &attr, task, NULL );
12304         if( status ) return status;
12305
12306 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12307         if( detach ) {
12308                 /* give thread a chance to complete */
12309                 /* it should remain joinable and hence detachable */
12310                 sleep( 1 );
12311
12312                 status = pthread_detach( t );
12313                 if( status ) return status;
12314         }
12315 #endif
12316
12317 #else
12318         /* Draft 4 pthreads */
12319         status = pthread_create( &t, pthread_attr_default, task, NULL );
12320         if( status ) return status;
12321
12322         if( detach ) {
12323                 /* give thread a chance to complete */
12324                 /* it should remain joinable and hence detachable */
12325                 sleep( 1 );
12326
12327                 status = pthread_detach( &t );
12328                 if( status ) return status;
12329         }
12330 #endif
12331
12332 #ifdef HAVE_LINUX_THREADS
12333         pthread_kill_other_threads_np();
12334 #endif
12335
12336         return 0;
12337
12338 ; return 0; }
12339 EOF
12340 if { (eval echo configure:12341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12341   rm -rf conftest*
12342   ol_cv_pthread_pthread=yes
12343 else
12344   echo "configure: failed program was:" >&5
12345   cat conftest.$ac_ext >&5
12346   rm -rf conftest*
12347   ol_cv_pthread_pthread=no
12348 fi
12349 rm -f conftest*
12350 else
12351   cat > conftest.$ac_ext <<EOF
12352 #line 12353 "configure"
12353 #include "confdefs.h"
12354 /* pthread test headers */
12355 #include <pthread.h>
12356 #ifndef NULL
12357 #define NULL (void*)0
12358 #endif
12359
12360 static void *task(p)
12361         void *p;
12362 {
12363         return (void *) (p == NULL);
12364 }
12365
12366
12367 int main(argc, argv)
12368         int argc;
12369         char **argv;
12370 {
12371
12372         /* pthread test function */
12373         pthread_t t;
12374         int status;
12375         int detach = 1;
12376
12377 #ifdef HAVE_PTHREADS_FINAL
12378         /* Final pthreads */
12379         pthread_attr_t attr;
12380
12381         status = pthread_attr_init(&attr);
12382         if( status ) return status;
12383
12384 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12385         if( !detach ) {
12386 #if defined( PTHREAD_CREATE_JOINABLE )
12387                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12388 #else
12389                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12390 #endif
12391
12392 #ifdef PTHREAD_CREATE_DETACHED
12393         } else {
12394                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12395 #endif
12396         }
12397         if( status ) return status;
12398 #endif
12399
12400         status = pthread_create( &t, &attr, task, NULL );
12401         if( status ) return status;
12402
12403 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12404         if( detach ) {
12405                 /* give thread a chance to complete */
12406                 /* it should remain joinable and hence detachable */
12407                 sleep( 1 );
12408
12409                 status = pthread_detach( t );
12410                 if( status ) return status;
12411         }
12412 #endif
12413
12414 #else
12415         /* Draft 4 pthreads */
12416         status = pthread_create( &t, pthread_attr_default, task, NULL );
12417         if( status ) return status;
12418
12419         if( detach ) {
12420                 /* give thread a chance to complete */
12421                 /* it should remain joinable and hence detachable */
12422                 sleep( 1 );
12423
12424                 status = pthread_detach( &t );
12425                 if( status ) return status;
12426         }
12427 #endif
12428
12429 #ifdef HAVE_LINUX_THREADS
12430         pthread_kill_other_threads_np();
12431 #endif
12432
12433         return 0;
12434
12435 }
12436
12437 EOF
12438 if { (eval echo configure:12439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12439 then
12440   ol_cv_pthread_pthread=yes
12441 else
12442   echo "configure: failed program was:" >&5
12443   cat conftest.$ac_ext >&5
12444   rm -fr conftest*
12445   ol_cv_pthread_pthread=no
12446 fi
12447 rm -fr conftest*
12448 fi
12449
12450
12451                 # restore the LIBS
12452                 LIBS="$ol_LIBS"
12453         
12454 fi
12455
12456 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12457
12458         if test $ol_cv_pthread_pthread = yes ; then
12459                 ol_link_pthreads="-pthread"
12460                 ol_link_threads=posix
12461         fi
12462 fi
12463
12464                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12465 if test "$ol_link_threads" = no ; then
12466         # try -pthreads
12467         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12468 echo "configure:12469: checking for pthread link with -pthreads" >&5
12469 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12470   echo $ac_n "(cached) $ac_c" 1>&6
12471 else
12472   
12473                 # save the flags
12474                 ol_LIBS="$LIBS"
12475                 LIBS="-pthreads $LIBS"
12476
12477                 if test "$cross_compiling" = yes; then
12478   cat > conftest.$ac_ext <<EOF
12479 #line 12480 "configure"
12480 #include "confdefs.h"
12481 /* pthread test headers */
12482 #include <pthread.h>
12483 #ifndef NULL
12484 #define NULL (void*)0
12485 #endif
12486
12487 static void *task(p)
12488         void *p;
12489 {
12490         return (void *) (p == NULL);
12491 }
12492
12493 int main() {
12494
12495         /* pthread test function */
12496         pthread_t t;
12497         int status;
12498         int detach = 1;
12499
12500 #ifdef HAVE_PTHREADS_FINAL
12501         /* Final pthreads */
12502         pthread_attr_t attr;
12503
12504         status = pthread_attr_init(&attr);
12505         if( status ) return status;
12506
12507 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12508         if( !detach ) {
12509 #if defined( PTHREAD_CREATE_JOINABLE )
12510                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12511 #else
12512                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12513 #endif
12514
12515 #ifdef PTHREAD_CREATE_DETACHED
12516         } else {
12517                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12518 #endif
12519         }
12520         if( status ) return status;
12521 #endif
12522
12523         status = pthread_create( &t, &attr, task, NULL );
12524         if( status ) return status;
12525
12526 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12527         if( detach ) {
12528                 /* give thread a chance to complete */
12529                 /* it should remain joinable and hence detachable */
12530                 sleep( 1 );
12531
12532                 status = pthread_detach( t );
12533                 if( status ) return status;
12534         }
12535 #endif
12536
12537 #else
12538         /* Draft 4 pthreads */
12539         status = pthread_create( &t, pthread_attr_default, task, NULL );
12540         if( status ) return status;
12541
12542         if( detach ) {
12543                 /* give thread a chance to complete */
12544                 /* it should remain joinable and hence detachable */
12545                 sleep( 1 );
12546
12547                 status = pthread_detach( &t );
12548                 if( status ) return status;
12549         }
12550 #endif
12551
12552 #ifdef HAVE_LINUX_THREADS
12553         pthread_kill_other_threads_np();
12554 #endif
12555
12556         return 0;
12557
12558 ; return 0; }
12559 EOF
12560 if { (eval echo configure:12561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12561   rm -rf conftest*
12562   ol_cv_pthread_pthreads=yes
12563 else
12564   echo "configure: failed program was:" >&5
12565   cat conftest.$ac_ext >&5
12566   rm -rf conftest*
12567   ol_cv_pthread_pthreads=no
12568 fi
12569 rm -f conftest*
12570 else
12571   cat > conftest.$ac_ext <<EOF
12572 #line 12573 "configure"
12573 #include "confdefs.h"
12574 /* pthread test headers */
12575 #include <pthread.h>
12576 #ifndef NULL
12577 #define NULL (void*)0
12578 #endif
12579
12580 static void *task(p)
12581         void *p;
12582 {
12583         return (void *) (p == NULL);
12584 }
12585
12586
12587 int main(argc, argv)
12588         int argc;
12589         char **argv;
12590 {
12591
12592         /* pthread test function */
12593         pthread_t t;
12594         int status;
12595         int detach = 1;
12596
12597 #ifdef HAVE_PTHREADS_FINAL
12598         /* Final pthreads */
12599         pthread_attr_t attr;
12600
12601         status = pthread_attr_init(&attr);
12602         if( status ) return status;
12603
12604 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12605         if( !detach ) {
12606 #if defined( PTHREAD_CREATE_JOINABLE )
12607                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12608 #else
12609                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12610 #endif
12611
12612 #ifdef PTHREAD_CREATE_DETACHED
12613         } else {
12614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12615 #endif
12616         }
12617         if( status ) return status;
12618 #endif
12619
12620         status = pthread_create( &t, &attr, task, NULL );
12621         if( status ) return status;
12622
12623 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12624         if( detach ) {
12625                 /* give thread a chance to complete */
12626                 /* it should remain joinable and hence detachable */
12627                 sleep( 1 );
12628
12629                 status = pthread_detach( t );
12630                 if( status ) return status;
12631         }
12632 #endif
12633
12634 #else
12635         /* Draft 4 pthreads */
12636         status = pthread_create( &t, pthread_attr_default, task, NULL );
12637         if( status ) return status;
12638
12639         if( detach ) {
12640                 /* give thread a chance to complete */
12641                 /* it should remain joinable and hence detachable */
12642                 sleep( 1 );
12643
12644                 status = pthread_detach( &t );
12645                 if( status ) return status;
12646         }
12647 #endif
12648
12649 #ifdef HAVE_LINUX_THREADS
12650         pthread_kill_other_threads_np();
12651 #endif
12652
12653         return 0;
12654
12655 }
12656
12657 EOF
12658 if { (eval echo configure:12659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12659 then
12660   ol_cv_pthread_pthreads=yes
12661 else
12662   echo "configure: failed program was:" >&5
12663   cat conftest.$ac_ext >&5
12664   rm -fr conftest*
12665   ol_cv_pthread_pthreads=no
12666 fi
12667 rm -fr conftest*
12668 fi
12669
12670
12671                 # restore the LIBS
12672                 LIBS="$ol_LIBS"
12673         
12674 fi
12675
12676 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12677
12678         if test $ol_cv_pthread_pthreads = yes ; then
12679                 ol_link_pthreads="-pthreads"
12680                 ol_link_threads=posix
12681         fi
12682 fi
12683
12684                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12685 if test "$ol_link_threads" = no ; then
12686         # try -mthreads
12687         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12688 echo "configure:12689: checking for pthread link with -mthreads" >&5
12689 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12690   echo $ac_n "(cached) $ac_c" 1>&6
12691 else
12692   
12693                 # save the flags
12694                 ol_LIBS="$LIBS"
12695                 LIBS="-mthreads $LIBS"
12696
12697                 if test "$cross_compiling" = yes; then
12698   cat > conftest.$ac_ext <<EOF
12699 #line 12700 "configure"
12700 #include "confdefs.h"
12701 /* pthread test headers */
12702 #include <pthread.h>
12703 #ifndef NULL
12704 #define NULL (void*)0
12705 #endif
12706
12707 static void *task(p)
12708         void *p;
12709 {
12710         return (void *) (p == NULL);
12711 }
12712
12713 int main() {
12714
12715         /* pthread test function */
12716         pthread_t t;
12717         int status;
12718         int detach = 1;
12719
12720 #ifdef HAVE_PTHREADS_FINAL
12721         /* Final pthreads */
12722         pthread_attr_t attr;
12723
12724         status = pthread_attr_init(&attr);
12725         if( status ) return status;
12726
12727 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12728         if( !detach ) {
12729 #if defined( PTHREAD_CREATE_JOINABLE )
12730                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12731 #else
12732                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12733 #endif
12734
12735 #ifdef PTHREAD_CREATE_DETACHED
12736         } else {
12737                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12738 #endif
12739         }
12740         if( status ) return status;
12741 #endif
12742
12743         status = pthread_create( &t, &attr, task, NULL );
12744         if( status ) return status;
12745
12746 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12747         if( detach ) {
12748                 /* give thread a chance to complete */
12749                 /* it should remain joinable and hence detachable */
12750                 sleep( 1 );
12751
12752                 status = pthread_detach( t );
12753                 if( status ) return status;
12754         }
12755 #endif
12756
12757 #else
12758         /* Draft 4 pthreads */
12759         status = pthread_create( &t, pthread_attr_default, task, NULL );
12760         if( status ) return status;
12761
12762         if( detach ) {
12763                 /* give thread a chance to complete */
12764                 /* it should remain joinable and hence detachable */
12765                 sleep( 1 );
12766
12767                 status = pthread_detach( &t );
12768                 if( status ) return status;
12769         }
12770 #endif
12771
12772 #ifdef HAVE_LINUX_THREADS
12773         pthread_kill_other_threads_np();
12774 #endif
12775
12776         return 0;
12777
12778 ; return 0; }
12779 EOF
12780 if { (eval echo configure:12781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12781   rm -rf conftest*
12782   ol_cv_pthread_mthreads=yes
12783 else
12784   echo "configure: failed program was:" >&5
12785   cat conftest.$ac_ext >&5
12786   rm -rf conftest*
12787   ol_cv_pthread_mthreads=no
12788 fi
12789 rm -f conftest*
12790 else
12791   cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 /* pthread test headers */
12795 #include <pthread.h>
12796 #ifndef NULL
12797 #define NULL (void*)0
12798 #endif
12799
12800 static void *task(p)
12801         void *p;
12802 {
12803         return (void *) (p == NULL);
12804 }
12805
12806
12807 int main(argc, argv)
12808         int argc;
12809         char **argv;
12810 {
12811
12812         /* pthread test function */
12813         pthread_t t;
12814         int status;
12815         int detach = 1;
12816
12817 #ifdef HAVE_PTHREADS_FINAL
12818         /* Final pthreads */
12819         pthread_attr_t attr;
12820
12821         status = pthread_attr_init(&attr);
12822         if( status ) return status;
12823
12824 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12825         if( !detach ) {
12826 #if defined( PTHREAD_CREATE_JOINABLE )
12827                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12828 #else
12829                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12830 #endif
12831
12832 #ifdef PTHREAD_CREATE_DETACHED
12833         } else {
12834                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12835 #endif
12836         }
12837         if( status ) return status;
12838 #endif
12839
12840         status = pthread_create( &t, &attr, task, NULL );
12841         if( status ) return status;
12842
12843 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12844         if( detach ) {
12845                 /* give thread a chance to complete */
12846                 /* it should remain joinable and hence detachable */
12847                 sleep( 1 );
12848
12849                 status = pthread_detach( t );
12850                 if( status ) return status;
12851         }
12852 #endif
12853
12854 #else
12855         /* Draft 4 pthreads */
12856         status = pthread_create( &t, pthread_attr_default, task, NULL );
12857         if( status ) return status;
12858
12859         if( detach ) {
12860                 /* give thread a chance to complete */
12861                 /* it should remain joinable and hence detachable */
12862                 sleep( 1 );
12863
12864                 status = pthread_detach( &t );
12865                 if( status ) return status;
12866         }
12867 #endif
12868
12869 #ifdef HAVE_LINUX_THREADS
12870         pthread_kill_other_threads_np();
12871 #endif
12872
12873         return 0;
12874
12875 }
12876
12877 EOF
12878 if { (eval echo configure:12879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12879 then
12880   ol_cv_pthread_mthreads=yes
12881 else
12882   echo "configure: failed program was:" >&5
12883   cat conftest.$ac_ext >&5
12884   rm -fr conftest*
12885   ol_cv_pthread_mthreads=no
12886 fi
12887 rm -fr conftest*
12888 fi
12889
12890
12891                 # restore the LIBS
12892                 LIBS="$ol_LIBS"
12893         
12894 fi
12895
12896 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12897
12898         if test $ol_cv_pthread_mthreads = yes ; then
12899                 ol_link_pthreads="-mthreads"
12900                 ol_link_threads=posix
12901         fi
12902 fi
12903
12904                 # Pthread try link: -thread (ol_cv_pthread_thread)
12905 if test "$ol_link_threads" = no ; then
12906         # try -thread
12907         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12908 echo "configure:12909: checking for pthread link with -thread" >&5
12909 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   
12913                 # save the flags
12914                 ol_LIBS="$LIBS"
12915                 LIBS="-thread $LIBS"
12916
12917                 if test "$cross_compiling" = yes; then
12918   cat > conftest.$ac_ext <<EOF
12919 #line 12920 "configure"
12920 #include "confdefs.h"
12921 /* pthread test headers */
12922 #include <pthread.h>
12923 #ifndef NULL
12924 #define NULL (void*)0
12925 #endif
12926
12927 static void *task(p)
12928         void *p;
12929 {
12930         return (void *) (p == NULL);
12931 }
12932
12933 int main() {
12934
12935         /* pthread test function */
12936         pthread_t t;
12937         int status;
12938         int detach = 1;
12939
12940 #ifdef HAVE_PTHREADS_FINAL
12941         /* Final pthreads */
12942         pthread_attr_t attr;
12943
12944         status = pthread_attr_init(&attr);
12945         if( status ) return status;
12946
12947 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12948         if( !detach ) {
12949 #if defined( PTHREAD_CREATE_JOINABLE )
12950                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12951 #else
12952                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12953 #endif
12954
12955 #ifdef PTHREAD_CREATE_DETACHED
12956         } else {
12957                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12958 #endif
12959         }
12960         if( status ) return status;
12961 #endif
12962
12963         status = pthread_create( &t, &attr, task, NULL );
12964         if( status ) return status;
12965
12966 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12967         if( detach ) {
12968                 /* give thread a chance to complete */
12969                 /* it should remain joinable and hence detachable */
12970                 sleep( 1 );
12971
12972                 status = pthread_detach( t );
12973                 if( status ) return status;
12974         }
12975 #endif
12976
12977 #else
12978         /* Draft 4 pthreads */
12979         status = pthread_create( &t, pthread_attr_default, task, NULL );
12980         if( status ) return status;
12981
12982         if( detach ) {
12983                 /* give thread a chance to complete */
12984                 /* it should remain joinable and hence detachable */
12985                 sleep( 1 );
12986
12987                 status = pthread_detach( &t );
12988                 if( status ) return status;
12989         }
12990 #endif
12991
12992 #ifdef HAVE_LINUX_THREADS
12993         pthread_kill_other_threads_np();
12994 #endif
12995
12996         return 0;
12997
12998 ; return 0; }
12999 EOF
13000 if { (eval echo configure:13001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13001   rm -rf conftest*
13002   ol_cv_pthread_thread=yes
13003 else
13004   echo "configure: failed program was:" >&5
13005   cat conftest.$ac_ext >&5
13006   rm -rf conftest*
13007   ol_cv_pthread_thread=no
13008 fi
13009 rm -f conftest*
13010 else
13011   cat > conftest.$ac_ext <<EOF
13012 #line 13013 "configure"
13013 #include "confdefs.h"
13014 /* pthread test headers */
13015 #include <pthread.h>
13016 #ifndef NULL
13017 #define NULL (void*)0
13018 #endif
13019
13020 static void *task(p)
13021         void *p;
13022 {
13023         return (void *) (p == NULL);
13024 }
13025
13026
13027 int main(argc, argv)
13028         int argc;
13029         char **argv;
13030 {
13031
13032         /* pthread test function */
13033         pthread_t t;
13034         int status;
13035         int detach = 1;
13036
13037 #ifdef HAVE_PTHREADS_FINAL
13038         /* Final pthreads */
13039         pthread_attr_t attr;
13040
13041         status = pthread_attr_init(&attr);
13042         if( status ) return status;
13043
13044 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13045         if( !detach ) {
13046 #if defined( PTHREAD_CREATE_JOINABLE )
13047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13048 #else
13049                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13050 #endif
13051
13052 #ifdef PTHREAD_CREATE_DETACHED
13053         } else {
13054                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13055 #endif
13056         }
13057         if( status ) return status;
13058 #endif
13059
13060         status = pthread_create( &t, &attr, task, NULL );
13061         if( status ) return status;
13062
13063 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13064         if( detach ) {
13065                 /* give thread a chance to complete */
13066                 /* it should remain joinable and hence detachable */
13067                 sleep( 1 );
13068
13069                 status = pthread_detach( t );
13070                 if( status ) return status;
13071         }
13072 #endif
13073
13074 #else
13075         /* Draft 4 pthreads */
13076         status = pthread_create( &t, pthread_attr_default, task, NULL );
13077         if( status ) return status;
13078
13079         if( detach ) {
13080                 /* give thread a chance to complete */
13081                 /* it should remain joinable and hence detachable */
13082                 sleep( 1 );
13083
13084                 status = pthread_detach( &t );
13085                 if( status ) return status;
13086         }
13087 #endif
13088
13089 #ifdef HAVE_LINUX_THREADS
13090         pthread_kill_other_threads_np();
13091 #endif
13092
13093         return 0;
13094
13095 }
13096
13097 EOF
13098 if { (eval echo configure:13099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13099 then
13100   ol_cv_pthread_thread=yes
13101 else
13102   echo "configure: failed program was:" >&5
13103   cat conftest.$ac_ext >&5
13104   rm -fr conftest*
13105   ol_cv_pthread_thread=no
13106 fi
13107 rm -fr conftest*
13108 fi
13109
13110
13111                 # restore the LIBS
13112                 LIBS="$ol_LIBS"
13113         
13114 fi
13115
13116 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13117
13118         if test $ol_cv_pthread_thread = yes ; then
13119                 ol_link_pthreads="-thread"
13120                 ol_link_threads=posix
13121         fi
13122 fi
13123
13124
13125                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13126 if test "$ol_link_threads" = no ; then
13127         # try -lpthread -lmach -lexc -lc_r
13128         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13129 echo "configure:13130: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13130 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13131   echo $ac_n "(cached) $ac_c" 1>&6
13132 else
13133   
13134                 # save the flags
13135                 ol_LIBS="$LIBS"
13136                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13137
13138                 if test "$cross_compiling" = yes; then
13139   cat > conftest.$ac_ext <<EOF
13140 #line 13141 "configure"
13141 #include "confdefs.h"
13142 /* pthread test headers */
13143 #include <pthread.h>
13144 #ifndef NULL
13145 #define NULL (void*)0
13146 #endif
13147
13148 static void *task(p)
13149         void *p;
13150 {
13151         return (void *) (p == NULL);
13152 }
13153
13154 int main() {
13155
13156         /* pthread test function */
13157         pthread_t t;
13158         int status;
13159         int detach = 1;
13160
13161 #ifdef HAVE_PTHREADS_FINAL
13162         /* Final pthreads */
13163         pthread_attr_t attr;
13164
13165         status = pthread_attr_init(&attr);
13166         if( status ) return status;
13167
13168 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13169         if( !detach ) {
13170 #if defined( PTHREAD_CREATE_JOINABLE )
13171                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13172 #else
13173                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13174 #endif
13175
13176 #ifdef PTHREAD_CREATE_DETACHED
13177         } else {
13178                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13179 #endif
13180         }
13181         if( status ) return status;
13182 #endif
13183
13184         status = pthread_create( &t, &attr, task, NULL );
13185         if( status ) return status;
13186
13187 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13188         if( detach ) {
13189                 /* give thread a chance to complete */
13190                 /* it should remain joinable and hence detachable */
13191                 sleep( 1 );
13192
13193                 status = pthread_detach( t );
13194                 if( status ) return status;
13195         }
13196 #endif
13197
13198 #else
13199         /* Draft 4 pthreads */
13200         status = pthread_create( &t, pthread_attr_default, task, NULL );
13201         if( status ) return status;
13202
13203         if( detach ) {
13204                 /* give thread a chance to complete */
13205                 /* it should remain joinable and hence detachable */
13206                 sleep( 1 );
13207
13208                 status = pthread_detach( &t );
13209                 if( status ) return status;
13210         }
13211 #endif
13212
13213 #ifdef HAVE_LINUX_THREADS
13214         pthread_kill_other_threads_np();
13215 #endif
13216
13217         return 0;
13218
13219 ; return 0; }
13220 EOF
13221 if { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13222   rm -rf conftest*
13223   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13224 else
13225   echo "configure: failed program was:" >&5
13226   cat conftest.$ac_ext >&5
13227   rm -rf conftest*
13228   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13229 fi
13230 rm -f conftest*
13231 else
13232   cat > conftest.$ac_ext <<EOF
13233 #line 13234 "configure"
13234 #include "confdefs.h"
13235 /* pthread test headers */
13236 #include <pthread.h>
13237 #ifndef NULL
13238 #define NULL (void*)0
13239 #endif
13240
13241 static void *task(p)
13242         void *p;
13243 {
13244         return (void *) (p == NULL);
13245 }
13246
13247
13248 int main(argc, argv)
13249         int argc;
13250         char **argv;
13251 {
13252
13253         /* pthread test function */
13254         pthread_t t;
13255         int status;
13256         int detach = 1;
13257
13258 #ifdef HAVE_PTHREADS_FINAL
13259         /* Final pthreads */
13260         pthread_attr_t attr;
13261
13262         status = pthread_attr_init(&attr);
13263         if( status ) return status;
13264
13265 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13266         if( !detach ) {
13267 #if defined( PTHREAD_CREATE_JOINABLE )
13268                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13269 #else
13270                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13271 #endif
13272
13273 #ifdef PTHREAD_CREATE_DETACHED
13274         } else {
13275                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13276 #endif
13277         }
13278         if( status ) return status;
13279 #endif
13280
13281         status = pthread_create( &t, &attr, task, NULL );
13282         if( status ) return status;
13283
13284 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13285         if( detach ) {
13286                 /* give thread a chance to complete */
13287                 /* it should remain joinable and hence detachable */
13288                 sleep( 1 );
13289
13290                 status = pthread_detach( t );
13291                 if( status ) return status;
13292         }
13293 #endif
13294
13295 #else
13296         /* Draft 4 pthreads */
13297         status = pthread_create( &t, pthread_attr_default, task, NULL );
13298         if( status ) return status;
13299
13300         if( detach ) {
13301                 /* give thread a chance to complete */
13302                 /* it should remain joinable and hence detachable */
13303                 sleep( 1 );
13304
13305                 status = pthread_detach( &t );
13306                 if( status ) return status;
13307         }
13308 #endif
13309
13310 #ifdef HAVE_LINUX_THREADS
13311         pthread_kill_other_threads_np();
13312 #endif
13313
13314         return 0;
13315
13316 }
13317
13318 EOF
13319 if { (eval echo configure:13320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13320 then
13321   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13322 else
13323   echo "configure: failed program was:" >&5
13324   cat conftest.$ac_ext >&5
13325   rm -fr conftest*
13326   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13327 fi
13328 rm -fr conftest*
13329 fi
13330
13331
13332                 # restore the LIBS
13333                 LIBS="$ol_LIBS"
13334         
13335 fi
13336
13337 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13338
13339         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13340                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13341                 ol_link_threads=posix
13342         fi
13343 fi
13344
13345                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13346 if test "$ol_link_threads" = no ; then
13347         # try -lpthread -lmach -lexc
13348         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13349 echo "configure:13350: checking for pthread link with -lpthread -lmach -lexc" >&5
13350 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13351   echo $ac_n "(cached) $ac_c" 1>&6
13352 else
13353   
13354                 # save the flags
13355                 ol_LIBS="$LIBS"
13356                 LIBS="-lpthread -lmach -lexc $LIBS"
13357
13358                 if test "$cross_compiling" = yes; then
13359   cat > conftest.$ac_ext <<EOF
13360 #line 13361 "configure"
13361 #include "confdefs.h"
13362 /* pthread test headers */
13363 #include <pthread.h>
13364 #ifndef NULL
13365 #define NULL (void*)0
13366 #endif
13367
13368 static void *task(p)
13369         void *p;
13370 {
13371         return (void *) (p == NULL);
13372 }
13373
13374 int main() {
13375
13376         /* pthread test function */
13377         pthread_t t;
13378         int status;
13379         int detach = 1;
13380
13381 #ifdef HAVE_PTHREADS_FINAL
13382         /* Final pthreads */
13383         pthread_attr_t attr;
13384
13385         status = pthread_attr_init(&attr);
13386         if( status ) return status;
13387
13388 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13389         if( !detach ) {
13390 #if defined( PTHREAD_CREATE_JOINABLE )
13391                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13392 #else
13393                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13394 #endif
13395
13396 #ifdef PTHREAD_CREATE_DETACHED
13397         } else {
13398                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13399 #endif
13400         }
13401         if( status ) return status;
13402 #endif
13403
13404         status = pthread_create( &t, &attr, task, NULL );
13405         if( status ) return status;
13406
13407 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13408         if( detach ) {
13409                 /* give thread a chance to complete */
13410                 /* it should remain joinable and hence detachable */
13411                 sleep( 1 );
13412
13413                 status = pthread_detach( t );
13414                 if( status ) return status;
13415         }
13416 #endif
13417
13418 #else
13419         /* Draft 4 pthreads */
13420         status = pthread_create( &t, pthread_attr_default, task, NULL );
13421         if( status ) return status;
13422
13423         if( detach ) {
13424                 /* give thread a chance to complete */
13425                 /* it should remain joinable and hence detachable */
13426                 sleep( 1 );
13427
13428                 status = pthread_detach( &t );
13429                 if( status ) return status;
13430         }
13431 #endif
13432
13433 #ifdef HAVE_LINUX_THREADS
13434         pthread_kill_other_threads_np();
13435 #endif
13436
13437         return 0;
13438
13439 ; return 0; }
13440 EOF
13441 if { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13442   rm -rf conftest*
13443   ol_cv_pthread_lpthread_lmach_lexc=yes
13444 else
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -rf conftest*
13448   ol_cv_pthread_lpthread_lmach_lexc=no
13449 fi
13450 rm -f conftest*
13451 else
13452   cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 /* pthread test headers */
13456 #include <pthread.h>
13457 #ifndef NULL
13458 #define NULL (void*)0
13459 #endif
13460
13461 static void *task(p)
13462         void *p;
13463 {
13464         return (void *) (p == NULL);
13465 }
13466
13467
13468 int main(argc, argv)
13469         int argc;
13470         char **argv;
13471 {
13472
13473         /* pthread test function */
13474         pthread_t t;
13475         int status;
13476         int detach = 1;
13477
13478 #ifdef HAVE_PTHREADS_FINAL
13479         /* Final pthreads */
13480         pthread_attr_t attr;
13481
13482         status = pthread_attr_init(&attr);
13483         if( status ) return status;
13484
13485 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13486         if( !detach ) {
13487 #if defined( PTHREAD_CREATE_JOINABLE )
13488                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13489 #else
13490                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13491 #endif
13492
13493 #ifdef PTHREAD_CREATE_DETACHED
13494         } else {
13495                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13496 #endif
13497         }
13498         if( status ) return status;
13499 #endif
13500
13501         status = pthread_create( &t, &attr, task, NULL );
13502         if( status ) return status;
13503
13504 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13505         if( detach ) {
13506                 /* give thread a chance to complete */
13507                 /* it should remain joinable and hence detachable */
13508                 sleep( 1 );
13509
13510                 status = pthread_detach( t );
13511                 if( status ) return status;
13512         }
13513 #endif
13514
13515 #else
13516         /* Draft 4 pthreads */
13517         status = pthread_create( &t, pthread_attr_default, task, NULL );
13518         if( status ) return status;
13519
13520         if( detach ) {
13521                 /* give thread a chance to complete */
13522                 /* it should remain joinable and hence detachable */
13523                 sleep( 1 );
13524
13525                 status = pthread_detach( &t );
13526                 if( status ) return status;
13527         }
13528 #endif
13529
13530 #ifdef HAVE_LINUX_THREADS
13531         pthread_kill_other_threads_np();
13532 #endif
13533
13534         return 0;
13535
13536 }
13537
13538 EOF
13539 if { (eval echo configure:13540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13540 then
13541   ol_cv_pthread_lpthread_lmach_lexc=yes
13542 else
13543   echo "configure: failed program was:" >&5
13544   cat conftest.$ac_ext >&5
13545   rm -fr conftest*
13546   ol_cv_pthread_lpthread_lmach_lexc=no
13547 fi
13548 rm -fr conftest*
13549 fi
13550
13551
13552                 # restore the LIBS
13553                 LIBS="$ol_LIBS"
13554         
13555 fi
13556
13557 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13558
13559         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13560                 ol_link_pthreads="-lpthread -lmach -lexc"
13561                 ol_link_threads=posix
13562         fi
13563 fi
13564
13565
13566                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13567 if test "$ol_link_threads" = no ; then
13568         # try -lpthread -Wl,-woff,85
13569         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13570 echo "configure:13571: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13571 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13572   echo $ac_n "(cached) $ac_c" 1>&6
13573 else
13574   
13575                 # save the flags
13576                 ol_LIBS="$LIBS"
13577                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13578
13579                 if test "$cross_compiling" = yes; then
13580   cat > conftest.$ac_ext <<EOF
13581 #line 13582 "configure"
13582 #include "confdefs.h"
13583 /* pthread test headers */
13584 #include <pthread.h>
13585 #ifndef NULL
13586 #define NULL (void*)0
13587 #endif
13588
13589 static void *task(p)
13590         void *p;
13591 {
13592         return (void *) (p == NULL);
13593 }
13594
13595 int main() {
13596
13597         /* pthread test function */
13598         pthread_t t;
13599         int status;
13600         int detach = 1;
13601
13602 #ifdef HAVE_PTHREADS_FINAL
13603         /* Final pthreads */
13604         pthread_attr_t attr;
13605
13606         status = pthread_attr_init(&attr);
13607         if( status ) return status;
13608
13609 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13610         if( !detach ) {
13611 #if defined( PTHREAD_CREATE_JOINABLE )
13612                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13613 #else
13614                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13615 #endif
13616
13617 #ifdef PTHREAD_CREATE_DETACHED
13618         } else {
13619                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13620 #endif
13621         }
13622         if( status ) return status;
13623 #endif
13624
13625         status = pthread_create( &t, &attr, task, NULL );
13626         if( status ) return status;
13627
13628 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13629         if( detach ) {
13630                 /* give thread a chance to complete */
13631                 /* it should remain joinable and hence detachable */
13632                 sleep( 1 );
13633
13634                 status = pthread_detach( t );
13635                 if( status ) return status;
13636         }
13637 #endif
13638
13639 #else
13640         /* Draft 4 pthreads */
13641         status = pthread_create( &t, pthread_attr_default, task, NULL );
13642         if( status ) return status;
13643
13644         if( detach ) {
13645                 /* give thread a chance to complete */
13646                 /* it should remain joinable and hence detachable */
13647                 sleep( 1 );
13648
13649                 status = pthread_detach( &t );
13650                 if( status ) return status;
13651         }
13652 #endif
13653
13654 #ifdef HAVE_LINUX_THREADS
13655         pthread_kill_other_threads_np();
13656 #endif
13657
13658         return 0;
13659
13660 ; return 0; }
13661 EOF
13662 if { (eval echo configure:13663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13663   rm -rf conftest*
13664   ol_cv_pthread_lib_lpthread_woff=yes
13665 else
13666   echo "configure: failed program was:" >&5
13667   cat conftest.$ac_ext >&5
13668   rm -rf conftest*
13669   ol_cv_pthread_lib_lpthread_woff=no
13670 fi
13671 rm -f conftest*
13672 else
13673   cat > conftest.$ac_ext <<EOF
13674 #line 13675 "configure"
13675 #include "confdefs.h"
13676 /* pthread test headers */
13677 #include <pthread.h>
13678 #ifndef NULL
13679 #define NULL (void*)0
13680 #endif
13681
13682 static void *task(p)
13683         void *p;
13684 {
13685         return (void *) (p == NULL);
13686 }
13687
13688
13689 int main(argc, argv)
13690         int argc;
13691         char **argv;
13692 {
13693
13694         /* pthread test function */
13695         pthread_t t;
13696         int status;
13697         int detach = 1;
13698
13699 #ifdef HAVE_PTHREADS_FINAL
13700         /* Final pthreads */
13701         pthread_attr_t attr;
13702
13703         status = pthread_attr_init(&attr);
13704         if( status ) return status;
13705
13706 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13707         if( !detach ) {
13708 #if defined( PTHREAD_CREATE_JOINABLE )
13709                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13710 #else
13711                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13712 #endif
13713
13714 #ifdef PTHREAD_CREATE_DETACHED
13715         } else {
13716                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13717 #endif
13718         }
13719         if( status ) return status;
13720 #endif
13721
13722         status = pthread_create( &t, &attr, task, NULL );
13723         if( status ) return status;
13724
13725 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13726         if( detach ) {
13727                 /* give thread a chance to complete */
13728                 /* it should remain joinable and hence detachable */
13729                 sleep( 1 );
13730
13731                 status = pthread_detach( t );
13732                 if( status ) return status;
13733         }
13734 #endif
13735
13736 #else
13737         /* Draft 4 pthreads */
13738         status = pthread_create( &t, pthread_attr_default, task, NULL );
13739         if( status ) return status;
13740
13741         if( detach ) {
13742                 /* give thread a chance to complete */
13743                 /* it should remain joinable and hence detachable */
13744                 sleep( 1 );
13745
13746                 status = pthread_detach( &t );
13747                 if( status ) return status;
13748         }
13749 #endif
13750
13751 #ifdef HAVE_LINUX_THREADS
13752         pthread_kill_other_threads_np();
13753 #endif
13754
13755         return 0;
13756
13757 }
13758
13759 EOF
13760 if { (eval echo configure:13761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13761 then
13762   ol_cv_pthread_lib_lpthread_woff=yes
13763 else
13764   echo "configure: failed program was:" >&5
13765   cat conftest.$ac_ext >&5
13766   rm -fr conftest*
13767   ol_cv_pthread_lib_lpthread_woff=no
13768 fi
13769 rm -fr conftest*
13770 fi
13771
13772
13773                 # restore the LIBS
13774                 LIBS="$ol_LIBS"
13775         
13776 fi
13777
13778 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13779
13780         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13781                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13782                 ol_link_threads=posix
13783         fi
13784 fi
13785
13786
13787                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13788 if test "$ol_link_threads" = no ; then
13789         # try -lpthread
13790         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13791 echo "configure:13792: checking for pthread link with -lpthread" >&5
13792 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13793   echo $ac_n "(cached) $ac_c" 1>&6
13794 else
13795   
13796                 # save the flags
13797                 ol_LIBS="$LIBS"
13798                 LIBS="-lpthread $LIBS"
13799
13800                 if test "$cross_compiling" = yes; then
13801   cat > conftest.$ac_ext <<EOF
13802 #line 13803 "configure"
13803 #include "confdefs.h"
13804 /* pthread test headers */
13805 #include <pthread.h>
13806 #ifndef NULL
13807 #define NULL (void*)0
13808 #endif
13809
13810 static void *task(p)
13811         void *p;
13812 {
13813         return (void *) (p == NULL);
13814 }
13815
13816 int main() {
13817
13818         /* pthread test function */
13819         pthread_t t;
13820         int status;
13821         int detach = 1;
13822
13823 #ifdef HAVE_PTHREADS_FINAL
13824         /* Final pthreads */
13825         pthread_attr_t attr;
13826
13827         status = pthread_attr_init(&attr);
13828         if( status ) return status;
13829
13830 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13831         if( !detach ) {
13832 #if defined( PTHREAD_CREATE_JOINABLE )
13833                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13834 #else
13835                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13836 #endif
13837
13838 #ifdef PTHREAD_CREATE_DETACHED
13839         } else {
13840                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13841 #endif
13842         }
13843         if( status ) return status;
13844 #endif
13845
13846         status = pthread_create( &t, &attr, task, NULL );
13847         if( status ) return status;
13848
13849 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13850         if( detach ) {
13851                 /* give thread a chance to complete */
13852                 /* it should remain joinable and hence detachable */
13853                 sleep( 1 );
13854
13855                 status = pthread_detach( t );
13856                 if( status ) return status;
13857         }
13858 #endif
13859
13860 #else
13861         /* Draft 4 pthreads */
13862         status = pthread_create( &t, pthread_attr_default, task, NULL );
13863         if( status ) return status;
13864
13865         if( detach ) {
13866                 /* give thread a chance to complete */
13867                 /* it should remain joinable and hence detachable */
13868                 sleep( 1 );
13869
13870                 status = pthread_detach( &t );
13871                 if( status ) return status;
13872         }
13873 #endif
13874
13875 #ifdef HAVE_LINUX_THREADS
13876         pthread_kill_other_threads_np();
13877 #endif
13878
13879         return 0;
13880
13881 ; return 0; }
13882 EOF
13883 if { (eval echo configure:13884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13884   rm -rf conftest*
13885   ol_cv_pthread_lpthread=yes
13886 else
13887   echo "configure: failed program was:" >&5
13888   cat conftest.$ac_ext >&5
13889   rm -rf conftest*
13890   ol_cv_pthread_lpthread=no
13891 fi
13892 rm -f conftest*
13893 else
13894   cat > conftest.$ac_ext <<EOF
13895 #line 13896 "configure"
13896 #include "confdefs.h"
13897 /* pthread test headers */
13898 #include <pthread.h>
13899 #ifndef NULL
13900 #define NULL (void*)0
13901 #endif
13902
13903 static void *task(p)
13904         void *p;
13905 {
13906         return (void *) (p == NULL);
13907 }
13908
13909
13910 int main(argc, argv)
13911         int argc;
13912         char **argv;
13913 {
13914
13915         /* pthread test function */
13916         pthread_t t;
13917         int status;
13918         int detach = 1;
13919
13920 #ifdef HAVE_PTHREADS_FINAL
13921         /* Final pthreads */
13922         pthread_attr_t attr;
13923
13924         status = pthread_attr_init(&attr);
13925         if( status ) return status;
13926
13927 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13928         if( !detach ) {
13929 #if defined( PTHREAD_CREATE_JOINABLE )
13930                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13931 #else
13932                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13933 #endif
13934
13935 #ifdef PTHREAD_CREATE_DETACHED
13936         } else {
13937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13938 #endif
13939         }
13940         if( status ) return status;
13941 #endif
13942
13943         status = pthread_create( &t, &attr, task, NULL );
13944         if( status ) return status;
13945
13946 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13947         if( detach ) {
13948                 /* give thread a chance to complete */
13949                 /* it should remain joinable and hence detachable */
13950                 sleep( 1 );
13951
13952                 status = pthread_detach( t );
13953                 if( status ) return status;
13954         }
13955 #endif
13956
13957 #else
13958         /* Draft 4 pthreads */
13959         status = pthread_create( &t, pthread_attr_default, task, NULL );
13960         if( status ) return status;
13961
13962         if( detach ) {
13963                 /* give thread a chance to complete */
13964                 /* it should remain joinable and hence detachable */
13965                 sleep( 1 );
13966
13967                 status = pthread_detach( &t );
13968                 if( status ) return status;
13969         }
13970 #endif
13971
13972 #ifdef HAVE_LINUX_THREADS
13973         pthread_kill_other_threads_np();
13974 #endif
13975
13976         return 0;
13977
13978 }
13979
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13982 then
13983   ol_cv_pthread_lpthread=yes
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -fr conftest*
13988   ol_cv_pthread_lpthread=no
13989 fi
13990 rm -fr conftest*
13991 fi
13992
13993
13994                 # restore the LIBS
13995                 LIBS="$ol_LIBS"
13996         
13997 fi
13998
13999 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14000
14001         if test $ol_cv_pthread_lpthread = yes ; then
14002                 ol_link_pthreads="-lpthread"
14003                 ol_link_threads=posix
14004         fi
14005 fi
14006
14007                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14008 if test "$ol_link_threads" = no ; then
14009         # try -lc_r
14010         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14011 echo "configure:14012: checking for pthread link with -lc_r" >&5
14012 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14013   echo $ac_n "(cached) $ac_c" 1>&6
14014 else
14015   
14016                 # save the flags
14017                 ol_LIBS="$LIBS"
14018                 LIBS="-lc_r $LIBS"
14019
14020                 if test "$cross_compiling" = yes; then
14021   cat > conftest.$ac_ext <<EOF
14022 #line 14023 "configure"
14023 #include "confdefs.h"
14024 /* pthread test headers */
14025 #include <pthread.h>
14026 #ifndef NULL
14027 #define NULL (void*)0
14028 #endif
14029
14030 static void *task(p)
14031         void *p;
14032 {
14033         return (void *) (p == NULL);
14034 }
14035
14036 int main() {
14037
14038         /* pthread test function */
14039         pthread_t t;
14040         int status;
14041         int detach = 1;
14042
14043 #ifdef HAVE_PTHREADS_FINAL
14044         /* Final pthreads */
14045         pthread_attr_t attr;
14046
14047         status = pthread_attr_init(&attr);
14048         if( status ) return status;
14049
14050 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14051         if( !detach ) {
14052 #if defined( PTHREAD_CREATE_JOINABLE )
14053                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14054 #else
14055                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14056 #endif
14057
14058 #ifdef PTHREAD_CREATE_DETACHED
14059         } else {
14060                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14061 #endif
14062         }
14063         if( status ) return status;
14064 #endif
14065
14066         status = pthread_create( &t, &attr, task, NULL );
14067         if( status ) return status;
14068
14069 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14070         if( detach ) {
14071                 /* give thread a chance to complete */
14072                 /* it should remain joinable and hence detachable */
14073                 sleep( 1 );
14074
14075                 status = pthread_detach( t );
14076                 if( status ) return status;
14077         }
14078 #endif
14079
14080 #else
14081         /* Draft 4 pthreads */
14082         status = pthread_create( &t, pthread_attr_default, task, NULL );
14083         if( status ) return status;
14084
14085         if( detach ) {
14086                 /* give thread a chance to complete */
14087                 /* it should remain joinable and hence detachable */
14088                 sleep( 1 );
14089
14090                 status = pthread_detach( &t );
14091                 if( status ) return status;
14092         }
14093 #endif
14094
14095 #ifdef HAVE_LINUX_THREADS
14096         pthread_kill_other_threads_np();
14097 #endif
14098
14099         return 0;
14100
14101 ; return 0; }
14102 EOF
14103 if { (eval echo configure:14104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14104   rm -rf conftest*
14105   ol_cv_pthread_lc_r=yes
14106 else
14107   echo "configure: failed program was:" >&5
14108   cat conftest.$ac_ext >&5
14109   rm -rf conftest*
14110   ol_cv_pthread_lc_r=no
14111 fi
14112 rm -f conftest*
14113 else
14114   cat > conftest.$ac_ext <<EOF
14115 #line 14116 "configure"
14116 #include "confdefs.h"
14117 /* pthread test headers */
14118 #include <pthread.h>
14119 #ifndef NULL
14120 #define NULL (void*)0
14121 #endif
14122
14123 static void *task(p)
14124         void *p;
14125 {
14126         return (void *) (p == NULL);
14127 }
14128
14129
14130 int main(argc, argv)
14131         int argc;
14132         char **argv;
14133 {
14134
14135         /* pthread test function */
14136         pthread_t t;
14137         int status;
14138         int detach = 1;
14139
14140 #ifdef HAVE_PTHREADS_FINAL
14141         /* Final pthreads */
14142         pthread_attr_t attr;
14143
14144         status = pthread_attr_init(&attr);
14145         if( status ) return status;
14146
14147 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14148         if( !detach ) {
14149 #if defined( PTHREAD_CREATE_JOINABLE )
14150                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14151 #else
14152                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14153 #endif
14154
14155 #ifdef PTHREAD_CREATE_DETACHED
14156         } else {
14157                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14158 #endif
14159         }
14160         if( status ) return status;
14161 #endif
14162
14163         status = pthread_create( &t, &attr, task, NULL );
14164         if( status ) return status;
14165
14166 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14167         if( detach ) {
14168                 /* give thread a chance to complete */
14169                 /* it should remain joinable and hence detachable */
14170                 sleep( 1 );
14171
14172                 status = pthread_detach( t );
14173                 if( status ) return status;
14174         }
14175 #endif
14176
14177 #else
14178         /* Draft 4 pthreads */
14179         status = pthread_create( &t, pthread_attr_default, task, NULL );
14180         if( status ) return status;
14181
14182         if( detach ) {
14183                 /* give thread a chance to complete */
14184                 /* it should remain joinable and hence detachable */
14185                 sleep( 1 );
14186
14187                 status = pthread_detach( &t );
14188                 if( status ) return status;
14189         }
14190 #endif
14191
14192 #ifdef HAVE_LINUX_THREADS
14193         pthread_kill_other_threads_np();
14194 #endif
14195
14196         return 0;
14197
14198 }
14199
14200 EOF
14201 if { (eval echo configure:14202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14202 then
14203   ol_cv_pthread_lc_r=yes
14204 else
14205   echo "configure: failed program was:" >&5
14206   cat conftest.$ac_ext >&5
14207   rm -fr conftest*
14208   ol_cv_pthread_lc_r=no
14209 fi
14210 rm -fr conftest*
14211 fi
14212
14213
14214                 # restore the LIBS
14215                 LIBS="$ol_LIBS"
14216         
14217 fi
14218
14219 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14220
14221         if test $ol_cv_pthread_lc_r = yes ; then
14222                 ol_link_pthreads="-lc_r"
14223                 ol_link_threads=posix
14224         fi
14225 fi
14226
14227
14228                 # Pthread try link: -threads (ol_cv_pthread_threads)
14229 if test "$ol_link_threads" = no ; then
14230         # try -threads
14231         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14232 echo "configure:14233: checking for pthread link with -threads" >&5
14233 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14234   echo $ac_n "(cached) $ac_c" 1>&6
14235 else
14236   
14237                 # save the flags
14238                 ol_LIBS="$LIBS"
14239                 LIBS="-threads $LIBS"
14240
14241                 if test "$cross_compiling" = yes; then
14242   cat > conftest.$ac_ext <<EOF
14243 #line 14244 "configure"
14244 #include "confdefs.h"
14245 /* pthread test headers */
14246 #include <pthread.h>
14247 #ifndef NULL
14248 #define NULL (void*)0
14249 #endif
14250
14251 static void *task(p)
14252         void *p;
14253 {
14254         return (void *) (p == NULL);
14255 }
14256
14257 int main() {
14258
14259         /* pthread test function */
14260         pthread_t t;
14261         int status;
14262         int detach = 1;
14263
14264 #ifdef HAVE_PTHREADS_FINAL
14265         /* Final pthreads */
14266         pthread_attr_t attr;
14267
14268         status = pthread_attr_init(&attr);
14269         if( status ) return status;
14270
14271 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14272         if( !detach ) {
14273 #if defined( PTHREAD_CREATE_JOINABLE )
14274                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14275 #else
14276                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14277 #endif
14278
14279 #ifdef PTHREAD_CREATE_DETACHED
14280         } else {
14281                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14282 #endif
14283         }
14284         if( status ) return status;
14285 #endif
14286
14287         status = pthread_create( &t, &attr, task, NULL );
14288         if( status ) return status;
14289
14290 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14291         if( detach ) {
14292                 /* give thread a chance to complete */
14293                 /* it should remain joinable and hence detachable */
14294                 sleep( 1 );
14295
14296                 status = pthread_detach( t );
14297                 if( status ) return status;
14298         }
14299 #endif
14300
14301 #else
14302         /* Draft 4 pthreads */
14303         status = pthread_create( &t, pthread_attr_default, task, NULL );
14304         if( status ) return status;
14305
14306         if( detach ) {
14307                 /* give thread a chance to complete */
14308                 /* it should remain joinable and hence detachable */
14309                 sleep( 1 );
14310
14311                 status = pthread_detach( &t );
14312                 if( status ) return status;
14313         }
14314 #endif
14315
14316 #ifdef HAVE_LINUX_THREADS
14317         pthread_kill_other_threads_np();
14318 #endif
14319
14320         return 0;
14321
14322 ; return 0; }
14323 EOF
14324 if { (eval echo configure:14325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14325   rm -rf conftest*
14326   ol_cv_pthread_threads=yes
14327 else
14328   echo "configure: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   rm -rf conftest*
14331   ol_cv_pthread_threads=no
14332 fi
14333 rm -f conftest*
14334 else
14335   cat > conftest.$ac_ext <<EOF
14336 #line 14337 "configure"
14337 #include "confdefs.h"
14338 /* pthread test headers */
14339 #include <pthread.h>
14340 #ifndef NULL
14341 #define NULL (void*)0
14342 #endif
14343
14344 static void *task(p)
14345         void *p;
14346 {
14347         return (void *) (p == NULL);
14348 }
14349
14350
14351 int main(argc, argv)
14352         int argc;
14353         char **argv;
14354 {
14355
14356         /* pthread test function */
14357         pthread_t t;
14358         int status;
14359         int detach = 1;
14360
14361 #ifdef HAVE_PTHREADS_FINAL
14362         /* Final pthreads */
14363         pthread_attr_t attr;
14364
14365         status = pthread_attr_init(&attr);
14366         if( status ) return status;
14367
14368 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14369         if( !detach ) {
14370 #if defined( PTHREAD_CREATE_JOINABLE )
14371                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14372 #else
14373                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14374 #endif
14375
14376 #ifdef PTHREAD_CREATE_DETACHED
14377         } else {
14378                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14379 #endif
14380         }
14381         if( status ) return status;
14382 #endif
14383
14384         status = pthread_create( &t, &attr, task, NULL );
14385         if( status ) return status;
14386
14387 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14388         if( detach ) {
14389                 /* give thread a chance to complete */
14390                 /* it should remain joinable and hence detachable */
14391                 sleep( 1 );
14392
14393                 status = pthread_detach( t );
14394                 if( status ) return status;
14395         }
14396 #endif
14397
14398 #else
14399         /* Draft 4 pthreads */
14400         status = pthread_create( &t, pthread_attr_default, task, NULL );
14401         if( status ) return status;
14402
14403         if( detach ) {
14404                 /* give thread a chance to complete */
14405                 /* it should remain joinable and hence detachable */
14406                 sleep( 1 );
14407
14408                 status = pthread_detach( &t );
14409                 if( status ) return status;
14410         }
14411 #endif
14412
14413 #ifdef HAVE_LINUX_THREADS
14414         pthread_kill_other_threads_np();
14415 #endif
14416
14417         return 0;
14418
14419 }
14420
14421 EOF
14422 if { (eval echo configure:14423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14423 then
14424   ol_cv_pthread_threads=yes
14425 else
14426   echo "configure: failed program was:" >&5
14427   cat conftest.$ac_ext >&5
14428   rm -fr conftest*
14429   ol_cv_pthread_threads=no
14430 fi
14431 rm -fr conftest*
14432 fi
14433
14434
14435                 # restore the LIBS
14436                 LIBS="$ol_LIBS"
14437         
14438 fi
14439
14440 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14441
14442         if test $ol_cv_pthread_threads = yes ; then
14443                 ol_link_pthreads="-threads"
14444                 ol_link_threads=posix
14445         fi
14446 fi
14447
14448
14449                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14450 if test "$ol_link_threads" = no ; then
14451         # try -lpthreads -lmach -lexc -lc_r
14452         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14453 echo "configure:14454: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14454 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14455   echo $ac_n "(cached) $ac_c" 1>&6
14456 else
14457   
14458                 # save the flags
14459                 ol_LIBS="$LIBS"
14460                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14461
14462                 if test "$cross_compiling" = yes; then
14463   cat > conftest.$ac_ext <<EOF
14464 #line 14465 "configure"
14465 #include "confdefs.h"
14466 /* pthread test headers */
14467 #include <pthread.h>
14468 #ifndef NULL
14469 #define NULL (void*)0
14470 #endif
14471
14472 static void *task(p)
14473         void *p;
14474 {
14475         return (void *) (p == NULL);
14476 }
14477
14478 int main() {
14479
14480         /* pthread test function */
14481         pthread_t t;
14482         int status;
14483         int detach = 1;
14484
14485 #ifdef HAVE_PTHREADS_FINAL
14486         /* Final pthreads */
14487         pthread_attr_t attr;
14488
14489         status = pthread_attr_init(&attr);
14490         if( status ) return status;
14491
14492 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14493         if( !detach ) {
14494 #if defined( PTHREAD_CREATE_JOINABLE )
14495                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14496 #else
14497                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14498 #endif
14499
14500 #ifdef PTHREAD_CREATE_DETACHED
14501         } else {
14502                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14503 #endif
14504         }
14505         if( status ) return status;
14506 #endif
14507
14508         status = pthread_create( &t, &attr, task, NULL );
14509         if( status ) return status;
14510
14511 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14512         if( detach ) {
14513                 /* give thread a chance to complete */
14514                 /* it should remain joinable and hence detachable */
14515                 sleep( 1 );
14516
14517                 status = pthread_detach( t );
14518                 if( status ) return status;
14519         }
14520 #endif
14521
14522 #else
14523         /* Draft 4 pthreads */
14524         status = pthread_create( &t, pthread_attr_default, task, NULL );
14525         if( status ) return status;
14526
14527         if( detach ) {
14528                 /* give thread a chance to complete */
14529                 /* it should remain joinable and hence detachable */
14530                 sleep( 1 );
14531
14532                 status = pthread_detach( &t );
14533                 if( status ) return status;
14534         }
14535 #endif
14536
14537 #ifdef HAVE_LINUX_THREADS
14538         pthread_kill_other_threads_np();
14539 #endif
14540
14541         return 0;
14542
14543 ; return 0; }
14544 EOF
14545 if { (eval echo configure:14546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14546   rm -rf conftest*
14547   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14548 else
14549   echo "configure: failed program was:" >&5
14550   cat conftest.$ac_ext >&5
14551   rm -rf conftest*
14552   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14553 fi
14554 rm -f conftest*
14555 else
14556   cat > conftest.$ac_ext <<EOF
14557 #line 14558 "configure"
14558 #include "confdefs.h"
14559 /* pthread test headers */
14560 #include <pthread.h>
14561 #ifndef NULL
14562 #define NULL (void*)0
14563 #endif
14564
14565 static void *task(p)
14566         void *p;
14567 {
14568         return (void *) (p == NULL);
14569 }
14570
14571
14572 int main(argc, argv)
14573         int argc;
14574         char **argv;
14575 {
14576
14577         /* pthread test function */
14578         pthread_t t;
14579         int status;
14580         int detach = 1;
14581
14582 #ifdef HAVE_PTHREADS_FINAL
14583         /* Final pthreads */
14584         pthread_attr_t attr;
14585
14586         status = pthread_attr_init(&attr);
14587         if( status ) return status;
14588
14589 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14590         if( !detach ) {
14591 #if defined( PTHREAD_CREATE_JOINABLE )
14592                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14593 #else
14594                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14595 #endif
14596
14597 #ifdef PTHREAD_CREATE_DETACHED
14598         } else {
14599                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14600 #endif
14601         }
14602         if( status ) return status;
14603 #endif
14604
14605         status = pthread_create( &t, &attr, task, NULL );
14606         if( status ) return status;
14607
14608 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14609         if( detach ) {
14610                 /* give thread a chance to complete */
14611                 /* it should remain joinable and hence detachable */
14612                 sleep( 1 );
14613
14614                 status = pthread_detach( t );
14615                 if( status ) return status;
14616         }
14617 #endif
14618
14619 #else
14620         /* Draft 4 pthreads */
14621         status = pthread_create( &t, pthread_attr_default, task, NULL );
14622         if( status ) return status;
14623
14624         if( detach ) {
14625                 /* give thread a chance to complete */
14626                 /* it should remain joinable and hence detachable */
14627                 sleep( 1 );
14628
14629                 status = pthread_detach( &t );
14630                 if( status ) return status;
14631         }
14632 #endif
14633
14634 #ifdef HAVE_LINUX_THREADS
14635         pthread_kill_other_threads_np();
14636 #endif
14637
14638         return 0;
14639
14640 }
14641
14642 EOF
14643 if { (eval echo configure:14644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14644 then
14645   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14646 else
14647   echo "configure: failed program was:" >&5
14648   cat conftest.$ac_ext >&5
14649   rm -fr conftest*
14650   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14651 fi
14652 rm -fr conftest*
14653 fi
14654
14655
14656                 # restore the LIBS
14657                 LIBS="$ol_LIBS"
14658         
14659 fi
14660
14661 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14662
14663         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14664                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14665                 ol_link_threads=posix
14666         fi
14667 fi
14668
14669                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14670 if test "$ol_link_threads" = no ; then
14671         # try -lpthreads -lmach -lexc
14672         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14673 echo "configure:14674: checking for pthread link with -lpthreads -lmach -lexc" >&5
14674 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14675   echo $ac_n "(cached) $ac_c" 1>&6
14676 else
14677   
14678                 # save the flags
14679                 ol_LIBS="$LIBS"
14680                 LIBS="-lpthreads -lmach -lexc $LIBS"
14681
14682                 if test "$cross_compiling" = yes; then
14683   cat > conftest.$ac_ext <<EOF
14684 #line 14685 "configure"
14685 #include "confdefs.h"
14686 /* pthread test headers */
14687 #include <pthread.h>
14688 #ifndef NULL
14689 #define NULL (void*)0
14690 #endif
14691
14692 static void *task(p)
14693         void *p;
14694 {
14695         return (void *) (p == NULL);
14696 }
14697
14698 int main() {
14699
14700         /* pthread test function */
14701         pthread_t t;
14702         int status;
14703         int detach = 1;
14704
14705 #ifdef HAVE_PTHREADS_FINAL
14706         /* Final pthreads */
14707         pthread_attr_t attr;
14708
14709         status = pthread_attr_init(&attr);
14710         if( status ) return status;
14711
14712 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14713         if( !detach ) {
14714 #if defined( PTHREAD_CREATE_JOINABLE )
14715                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14716 #else
14717                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14718 #endif
14719
14720 #ifdef PTHREAD_CREATE_DETACHED
14721         } else {
14722                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14723 #endif
14724         }
14725         if( status ) return status;
14726 #endif
14727
14728         status = pthread_create( &t, &attr, task, NULL );
14729         if( status ) return status;
14730
14731 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14732         if( detach ) {
14733                 /* give thread a chance to complete */
14734                 /* it should remain joinable and hence detachable */
14735                 sleep( 1 );
14736
14737                 status = pthread_detach( t );
14738                 if( status ) return status;
14739         }
14740 #endif
14741
14742 #else
14743         /* Draft 4 pthreads */
14744         status = pthread_create( &t, pthread_attr_default, task, NULL );
14745         if( status ) return status;
14746
14747         if( detach ) {
14748                 /* give thread a chance to complete */
14749                 /* it should remain joinable and hence detachable */
14750                 sleep( 1 );
14751
14752                 status = pthread_detach( &t );
14753                 if( status ) return status;
14754         }
14755 #endif
14756
14757 #ifdef HAVE_LINUX_THREADS
14758         pthread_kill_other_threads_np();
14759 #endif
14760
14761         return 0;
14762
14763 ; return 0; }
14764 EOF
14765 if { (eval echo configure:14766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14766   rm -rf conftest*
14767   ol_cv_pthread_lpthreads_lmach_lexc=yes
14768 else
14769   echo "configure: failed program was:" >&5
14770   cat conftest.$ac_ext >&5
14771   rm -rf conftest*
14772   ol_cv_pthread_lpthreads_lmach_lexc=no
14773 fi
14774 rm -f conftest*
14775 else
14776   cat > conftest.$ac_ext <<EOF
14777 #line 14778 "configure"
14778 #include "confdefs.h"
14779 /* pthread test headers */
14780 #include <pthread.h>
14781 #ifndef NULL
14782 #define NULL (void*)0
14783 #endif
14784
14785 static void *task(p)
14786         void *p;
14787 {
14788         return (void *) (p == NULL);
14789 }
14790
14791
14792 int main(argc, argv)
14793         int argc;
14794         char **argv;
14795 {
14796
14797         /* pthread test function */
14798         pthread_t t;
14799         int status;
14800         int detach = 1;
14801
14802 #ifdef HAVE_PTHREADS_FINAL
14803         /* Final pthreads */
14804         pthread_attr_t attr;
14805
14806         status = pthread_attr_init(&attr);
14807         if( status ) return status;
14808
14809 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14810         if( !detach ) {
14811 #if defined( PTHREAD_CREATE_JOINABLE )
14812                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14813 #else
14814                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14815 #endif
14816
14817 #ifdef PTHREAD_CREATE_DETACHED
14818         } else {
14819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14820 #endif
14821         }
14822         if( status ) return status;
14823 #endif
14824
14825         status = pthread_create( &t, &attr, task, NULL );
14826         if( status ) return status;
14827
14828 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14829         if( detach ) {
14830                 /* give thread a chance to complete */
14831                 /* it should remain joinable and hence detachable */
14832                 sleep( 1 );
14833
14834                 status = pthread_detach( t );
14835                 if( status ) return status;
14836         }
14837 #endif
14838
14839 #else
14840         /* Draft 4 pthreads */
14841         status = pthread_create( &t, pthread_attr_default, task, NULL );
14842         if( status ) return status;
14843
14844         if( detach ) {
14845                 /* give thread a chance to complete */
14846                 /* it should remain joinable and hence detachable */
14847                 sleep( 1 );
14848
14849                 status = pthread_detach( &t );
14850                 if( status ) return status;
14851         }
14852 #endif
14853
14854 #ifdef HAVE_LINUX_THREADS
14855         pthread_kill_other_threads_np();
14856 #endif
14857
14858         return 0;
14859
14860 }
14861
14862 EOF
14863 if { (eval echo configure:14864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14864 then
14865   ol_cv_pthread_lpthreads_lmach_lexc=yes
14866 else
14867   echo "configure: failed program was:" >&5
14868   cat conftest.$ac_ext >&5
14869   rm -fr conftest*
14870   ol_cv_pthread_lpthreads_lmach_lexc=no
14871 fi
14872 rm -fr conftest*
14873 fi
14874
14875
14876                 # restore the LIBS
14877                 LIBS="$ol_LIBS"
14878         
14879 fi
14880
14881 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14882
14883         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14884                 ol_link_pthreads="-lpthreads -lmach -lexc"
14885                 ol_link_threads=posix
14886         fi
14887 fi
14888
14889                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14890 if test "$ol_link_threads" = no ; then
14891         # try -lpthreads -lexc
14892         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14893 echo "configure:14894: checking for pthread link with -lpthreads -lexc" >&5
14894 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   
14898                 # save the flags
14899                 ol_LIBS="$LIBS"
14900                 LIBS="-lpthreads -lexc $LIBS"
14901
14902                 if test "$cross_compiling" = yes; then
14903   cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 /* pthread test headers */
14907 #include <pthread.h>
14908 #ifndef NULL
14909 #define NULL (void*)0
14910 #endif
14911
14912 static void *task(p)
14913         void *p;
14914 {
14915         return (void *) (p == NULL);
14916 }
14917
14918 int main() {
14919
14920         /* pthread test function */
14921         pthread_t t;
14922         int status;
14923         int detach = 1;
14924
14925 #ifdef HAVE_PTHREADS_FINAL
14926         /* Final pthreads */
14927         pthread_attr_t attr;
14928
14929         status = pthread_attr_init(&attr);
14930         if( status ) return status;
14931
14932 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14933         if( !detach ) {
14934 #if defined( PTHREAD_CREATE_JOINABLE )
14935                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14936 #else
14937                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14938 #endif
14939
14940 #ifdef PTHREAD_CREATE_DETACHED
14941         } else {
14942                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14943 #endif
14944         }
14945         if( status ) return status;
14946 #endif
14947
14948         status = pthread_create( &t, &attr, task, NULL );
14949         if( status ) return status;
14950
14951 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14952         if( detach ) {
14953                 /* give thread a chance to complete */
14954                 /* it should remain joinable and hence detachable */
14955                 sleep( 1 );
14956
14957                 status = pthread_detach( t );
14958                 if( status ) return status;
14959         }
14960 #endif
14961
14962 #else
14963         /* Draft 4 pthreads */
14964         status = pthread_create( &t, pthread_attr_default, task, NULL );
14965         if( status ) return status;
14966
14967         if( detach ) {
14968                 /* give thread a chance to complete */
14969                 /* it should remain joinable and hence detachable */
14970                 sleep( 1 );
14971
14972                 status = pthread_detach( &t );
14973                 if( status ) return status;
14974         }
14975 #endif
14976
14977 #ifdef HAVE_LINUX_THREADS
14978         pthread_kill_other_threads_np();
14979 #endif
14980
14981         return 0;
14982
14983 ; return 0; }
14984 EOF
14985 if { (eval echo configure:14986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14986   rm -rf conftest*
14987   ol_cv_pthread_lpthreads_lexc=yes
14988 else
14989   echo "configure: failed program was:" >&5
14990   cat conftest.$ac_ext >&5
14991   rm -rf conftest*
14992   ol_cv_pthread_lpthreads_lexc=no
14993 fi
14994 rm -f conftest*
14995 else
14996   cat > conftest.$ac_ext <<EOF
14997 #line 14998 "configure"
14998 #include "confdefs.h"
14999 /* pthread test headers */
15000 #include <pthread.h>
15001 #ifndef NULL
15002 #define NULL (void*)0
15003 #endif
15004
15005 static void *task(p)
15006         void *p;
15007 {
15008         return (void *) (p == NULL);
15009 }
15010
15011
15012 int main(argc, argv)
15013         int argc;
15014         char **argv;
15015 {
15016
15017         /* pthread test function */
15018         pthread_t t;
15019         int status;
15020         int detach = 1;
15021
15022 #ifdef HAVE_PTHREADS_FINAL
15023         /* Final pthreads */
15024         pthread_attr_t attr;
15025
15026         status = pthread_attr_init(&attr);
15027         if( status ) return status;
15028
15029 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15030         if( !detach ) {
15031 #if defined( PTHREAD_CREATE_JOINABLE )
15032                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15033 #else
15034                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15035 #endif
15036
15037 #ifdef PTHREAD_CREATE_DETACHED
15038         } else {
15039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15040 #endif
15041         }
15042         if( status ) return status;
15043 #endif
15044
15045         status = pthread_create( &t, &attr, task, NULL );
15046         if( status ) return status;
15047
15048 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15049         if( detach ) {
15050                 /* give thread a chance to complete */
15051                 /* it should remain joinable and hence detachable */
15052                 sleep( 1 );
15053
15054                 status = pthread_detach( t );
15055                 if( status ) return status;
15056         }
15057 #endif
15058
15059 #else
15060         /* Draft 4 pthreads */
15061         status = pthread_create( &t, pthread_attr_default, task, NULL );
15062         if( status ) return status;
15063
15064         if( detach ) {
15065                 /* give thread a chance to complete */
15066                 /* it should remain joinable and hence detachable */
15067                 sleep( 1 );
15068
15069                 status = pthread_detach( &t );
15070                 if( status ) return status;
15071         }
15072 #endif
15073
15074 #ifdef HAVE_LINUX_THREADS
15075         pthread_kill_other_threads_np();
15076 #endif
15077
15078         return 0;
15079
15080 }
15081
15082 EOF
15083 if { (eval echo configure:15084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15084 then
15085   ol_cv_pthread_lpthreads_lexc=yes
15086 else
15087   echo "configure: failed program was:" >&5
15088   cat conftest.$ac_ext >&5
15089   rm -fr conftest*
15090   ol_cv_pthread_lpthreads_lexc=no
15091 fi
15092 rm -fr conftest*
15093 fi
15094
15095
15096                 # restore the LIBS
15097                 LIBS="$ol_LIBS"
15098         
15099 fi
15100
15101 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15102
15103         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15104                 ol_link_pthreads="-lpthreads -lexc"
15105                 ol_link_threads=posix
15106         fi
15107 fi
15108
15109
15110                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15111 if test "$ol_link_threads" = no ; then
15112         # try -lpthreads
15113         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15114 echo "configure:15115: checking for pthread link with -lpthreads" >&5
15115 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15116   echo $ac_n "(cached) $ac_c" 1>&6
15117 else
15118   
15119                 # save the flags
15120                 ol_LIBS="$LIBS"
15121                 LIBS="-lpthreads $LIBS"
15122
15123                 if test "$cross_compiling" = yes; then
15124   cat > conftest.$ac_ext <<EOF
15125 #line 15126 "configure"
15126 #include "confdefs.h"
15127 /* pthread test headers */
15128 #include <pthread.h>
15129 #ifndef NULL
15130 #define NULL (void*)0
15131 #endif
15132
15133 static void *task(p)
15134         void *p;
15135 {
15136         return (void *) (p == NULL);
15137 }
15138
15139 int main() {
15140
15141         /* pthread test function */
15142         pthread_t t;
15143         int status;
15144         int detach = 1;
15145
15146 #ifdef HAVE_PTHREADS_FINAL
15147         /* Final pthreads */
15148         pthread_attr_t attr;
15149
15150         status = pthread_attr_init(&attr);
15151         if( status ) return status;
15152
15153 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15154         if( !detach ) {
15155 #if defined( PTHREAD_CREATE_JOINABLE )
15156                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15157 #else
15158                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15159 #endif
15160
15161 #ifdef PTHREAD_CREATE_DETACHED
15162         } else {
15163                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15164 #endif
15165         }
15166         if( status ) return status;
15167 #endif
15168
15169         status = pthread_create( &t, &attr, task, NULL );
15170         if( status ) return status;
15171
15172 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15173         if( detach ) {
15174                 /* give thread a chance to complete */
15175                 /* it should remain joinable and hence detachable */
15176                 sleep( 1 );
15177
15178                 status = pthread_detach( t );
15179                 if( status ) return status;
15180         }
15181 #endif
15182
15183 #else
15184         /* Draft 4 pthreads */
15185         status = pthread_create( &t, pthread_attr_default, task, NULL );
15186         if( status ) return status;
15187
15188         if( detach ) {
15189                 /* give thread a chance to complete */
15190                 /* it should remain joinable and hence detachable */
15191                 sleep( 1 );
15192
15193                 status = pthread_detach( &t );
15194                 if( status ) return status;
15195         }
15196 #endif
15197
15198 #ifdef HAVE_LINUX_THREADS
15199         pthread_kill_other_threads_np();
15200 #endif
15201
15202         return 0;
15203
15204 ; return 0; }
15205 EOF
15206 if { (eval echo configure:15207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15207   rm -rf conftest*
15208   ol_cv_pthread_lib_lpthreads=yes
15209 else
15210   echo "configure: failed program was:" >&5
15211   cat conftest.$ac_ext >&5
15212   rm -rf conftest*
15213   ol_cv_pthread_lib_lpthreads=no
15214 fi
15215 rm -f conftest*
15216 else
15217   cat > conftest.$ac_ext <<EOF
15218 #line 15219 "configure"
15219 #include "confdefs.h"
15220 /* pthread test headers */
15221 #include <pthread.h>
15222 #ifndef NULL
15223 #define NULL (void*)0
15224 #endif
15225
15226 static void *task(p)
15227         void *p;
15228 {
15229         return (void *) (p == NULL);
15230 }
15231
15232
15233 int main(argc, argv)
15234         int argc;
15235         char **argv;
15236 {
15237
15238         /* pthread test function */
15239         pthread_t t;
15240         int status;
15241         int detach = 1;
15242
15243 #ifdef HAVE_PTHREADS_FINAL
15244         /* Final pthreads */
15245         pthread_attr_t attr;
15246
15247         status = pthread_attr_init(&attr);
15248         if( status ) return status;
15249
15250 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15251         if( !detach ) {
15252 #if defined( PTHREAD_CREATE_JOINABLE )
15253                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15254 #else
15255                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15256 #endif
15257
15258 #ifdef PTHREAD_CREATE_DETACHED
15259         } else {
15260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15261 #endif
15262         }
15263         if( status ) return status;
15264 #endif
15265
15266         status = pthread_create( &t, &attr, task, NULL );
15267         if( status ) return status;
15268
15269 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15270         if( detach ) {
15271                 /* give thread a chance to complete */
15272                 /* it should remain joinable and hence detachable */
15273                 sleep( 1 );
15274
15275                 status = pthread_detach( t );
15276                 if( status ) return status;
15277         }
15278 #endif
15279
15280 #else
15281         /* Draft 4 pthreads */
15282         status = pthread_create( &t, pthread_attr_default, task, NULL );
15283         if( status ) return status;
15284
15285         if( detach ) {
15286                 /* give thread a chance to complete */
15287                 /* it should remain joinable and hence detachable */
15288                 sleep( 1 );
15289
15290                 status = pthread_detach( &t );
15291                 if( status ) return status;
15292         }
15293 #endif
15294
15295 #ifdef HAVE_LINUX_THREADS
15296         pthread_kill_other_threads_np();
15297 #endif
15298
15299         return 0;
15300
15301 }
15302
15303 EOF
15304 if { (eval echo configure:15305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15305 then
15306   ol_cv_pthread_lib_lpthreads=yes
15307 else
15308   echo "configure: failed program was:" >&5
15309   cat conftest.$ac_ext >&5
15310   rm -fr conftest*
15311   ol_cv_pthread_lib_lpthreads=no
15312 fi
15313 rm -fr conftest*
15314 fi
15315
15316
15317                 # restore the LIBS
15318                 LIBS="$ol_LIBS"
15319         
15320 fi
15321
15322 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15323
15324         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15325                 ol_link_pthreads="-lpthreads"
15326                 ol_link_threads=posix
15327         fi
15328 fi
15329
15330
15331                 if test $ol_link_threads != no ; then
15332                         cat >> confdefs.h <<\EOF
15333 #define HAVE_PTHREADS 1
15334 EOF
15335
15336
15337                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15338
15339                                                 save_CPPFLAGS="$CPPFLAGS"
15340                         save_LIBS="$LIBS"
15341                         LIBS="$LTHREAD_LIBS $LIBS"
15342
15343                                                                                                 for ac_func in sched_yield pthread_yield
15344 do
15345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15346 echo "configure:15347: checking for $ac_func" >&5
15347 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15348   echo $ac_n "(cached) $ac_c" 1>&6
15349 else
15350   cat > conftest.$ac_ext <<EOF
15351 #line 15352 "configure"
15352 #include "confdefs.h"
15353 /* System header to define __stub macros and hopefully few prototypes,
15354     which can conflict with char $ac_func(); below.  */
15355 #include <assert.h>
15356 /* Override any gcc2 internal prototype to avoid an error.  */
15357 /* We use char because int might match the return type of a gcc2
15358     builtin and then its argument prototype would still apply.  */
15359 char $ac_func();
15360 char (*f)();
15361
15362 int main() {
15363
15364 /* The GNU C library defines this for functions which it implements
15365     to always fail with ENOSYS.  Some functions are actually named
15366     something starting with __ and the normal name is an alias.  */
15367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15368 choke me
15369 #else
15370 f = $ac_func;
15371 #endif
15372
15373 ; return 0; }
15374 EOF
15375 if { (eval echo configure:15376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15376   rm -rf conftest*
15377   eval "ac_cv_func_$ac_func=yes"
15378 else
15379   echo "configure: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   rm -rf conftest*
15382   eval "ac_cv_func_$ac_func=no"
15383 fi
15384 rm -f conftest*
15385 fi
15386
15387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15388   echo "$ac_t""yes" 1>&6
15389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15390   cat >> confdefs.h <<EOF
15391 #define $ac_tr_func 1
15392 EOF
15393  
15394 else
15395   echo "$ac_t""no" 1>&6
15396 fi
15397 done
15398
15399
15400                         if test $ac_cv_func_sched_yield = no -a \
15401                                 $ac_cv_func_pthread_yield = no ; then
15402                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15403 echo "configure:15404: checking for sched_yield in -lrt" >&5
15404 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15406   echo $ac_n "(cached) $ac_c" 1>&6
15407 else
15408   ac_save_LIBS="$LIBS"
15409 LIBS="-lrt  $LIBS"
15410 cat > conftest.$ac_ext <<EOF
15411 #line 15412 "configure"
15412 #include "confdefs.h"
15413 /* Override any gcc2 internal prototype to avoid an error.  */
15414 /* We use char because int might match the return type of a gcc2
15415     builtin and then its argument prototype would still apply.  */
15416 char sched_yield();
15417
15418 int main() {
15419 sched_yield()
15420 ; return 0; }
15421 EOF
15422 if { (eval echo configure:15423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15423   rm -rf conftest*
15424   eval "ac_cv_lib_$ac_lib_var=yes"
15425 else
15426   echo "configure: failed program was:" >&5
15427   cat conftest.$ac_ext >&5
15428   rm -rf conftest*
15429   eval "ac_cv_lib_$ac_lib_var=no"
15430 fi
15431 rm -f conftest*
15432 LIBS="$ac_save_LIBS"
15433
15434 fi
15435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15436   echo "$ac_t""yes" 1>&6
15437   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15438                                         cat >> confdefs.h <<\EOF
15439 #define HAVE_SCHED_YIELD 1
15440 EOF
15441
15442                                         ac_cv_func_sched_yield=yes
15443 else
15444   echo "$ac_t""no" 1>&6
15445 ac_cv_func_sched_yield=no
15446 fi
15447
15448                         fi
15449                         if test $ac_cv_func_sched_yield = no -a \
15450                                 $ac_cv_func_pthread_yield = no ; then
15451                                                                                                 for ac_func in thr_yield
15452 do
15453 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15454 echo "configure:15455: checking for $ac_func" >&5
15455 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15456   echo $ac_n "(cached) $ac_c" 1>&6
15457 else
15458   cat > conftest.$ac_ext <<EOF
15459 #line 15460 "configure"
15460 #include "confdefs.h"
15461 /* System header to define __stub macros and hopefully few prototypes,
15462     which can conflict with char $ac_func(); below.  */
15463 #include <assert.h>
15464 /* Override any gcc2 internal prototype to avoid an error.  */
15465 /* We use char because int might match the return type of a gcc2
15466     builtin and then its argument prototype would still apply.  */
15467 char $ac_func();
15468 char (*f)();
15469
15470 int main() {
15471
15472 /* The GNU C library defines this for functions which it implements
15473     to always fail with ENOSYS.  Some functions are actually named
15474     something starting with __ and the normal name is an alias.  */
15475 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15476 choke me
15477 #else
15478 f = $ac_func;
15479 #endif
15480
15481 ; return 0; }
15482 EOF
15483 if { (eval echo configure:15484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15484   rm -rf conftest*
15485   eval "ac_cv_func_$ac_func=yes"
15486 else
15487   echo "configure: failed program was:" >&5
15488   cat conftest.$ac_ext >&5
15489   rm -rf conftest*
15490   eval "ac_cv_func_$ac_func=no"
15491 fi
15492 rm -f conftest*
15493 fi
15494
15495 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15496   echo "$ac_t""yes" 1>&6
15497     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15498   cat >> confdefs.h <<EOF
15499 #define $ac_tr_func 1
15500 EOF
15501  
15502 else
15503   echo "$ac_t""no" 1>&6
15504 fi
15505 done
15506
15507                         fi
15508                         if test $ac_cv_func_sched_yield = no -a \
15509                                 $ac_cv_func_pthread_yield = no -a \
15510                                 "$ac_cv_func_thr_yield" = no ; then
15511                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15512                         fi
15513
15514                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15515 do
15516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15517 echo "configure:15518: checking for $ac_func" >&5
15518 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15519   echo $ac_n "(cached) $ac_c" 1>&6
15520 else
15521   cat > conftest.$ac_ext <<EOF
15522 #line 15523 "configure"
15523 #include "confdefs.h"
15524 /* System header to define __stub macros and hopefully few prototypes,
15525     which can conflict with char $ac_func(); below.  */
15526 #include <assert.h>
15527 /* Override any gcc2 internal prototype to avoid an error.  */
15528 /* We use char because int might match the return type of a gcc2
15529     builtin and then its argument prototype would still apply.  */
15530 char $ac_func();
15531 char (*f)();
15532
15533 int main() {
15534
15535 /* The GNU C library defines this for functions which it implements
15536     to always fail with ENOSYS.  Some functions are actually named
15537     something starting with __ and the normal name is an alias.  */
15538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15539 choke me
15540 #else
15541 f = $ac_func;
15542 #endif
15543
15544 ; return 0; }
15545 EOF
15546 if { (eval echo configure:15547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15547   rm -rf conftest*
15548   eval "ac_cv_func_$ac_func=yes"
15549 else
15550   echo "configure: failed program was:" >&5
15551   cat conftest.$ac_ext >&5
15552   rm -rf conftest*
15553   eval "ac_cv_func_$ac_func=no"
15554 fi
15555 rm -f conftest*
15556 fi
15557
15558 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15559   echo "$ac_t""yes" 1>&6
15560     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15561   cat >> confdefs.h <<EOF
15562 #define $ac_tr_func 1
15563 EOF
15564  
15565 else
15566   echo "$ac_t""no" 1>&6
15567 fi
15568 done
15569
15570
15571                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15572 echo "configure:15573: checking for pthread_detach with <pthread.h>" >&5
15573 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15574   echo $ac_n "(cached) $ac_c" 1>&6
15575 else
15576   
15577                                                                 cat > conftest.$ac_ext <<EOF
15578 #line 15579 "configure"
15579 #include "confdefs.h"
15580
15581 #include <pthread.h>
15582 #ifndef NULL
15583 #define NULL (void*)0
15584 #endif
15585
15586 int main() {
15587 pthread_detach(NULL);
15588 ; return 0; }
15589 EOF
15590 if { (eval echo configure:15591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15591   rm -rf conftest*
15592   ol_cv_func_pthread_detach=yes
15593 else
15594   echo "configure: failed program was:" >&5
15595   cat conftest.$ac_ext >&5
15596   rm -rf conftest*
15597   ol_cv_func_pthread_detach=no
15598 fi
15599 rm -f conftest*
15600                         
15601 fi
15602
15603 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15604
15605                         if test $ol_cv_func_pthread_detach = no ; then
15606                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15607                         fi
15608
15609                         cat >> confdefs.h <<\EOF
15610 #define HAVE_PTHREAD_DETACH 1
15611 EOF
15612
15613
15614                                                 for ac_func in \
15615                                 pthread_setconcurrency \
15616                                 pthread_getconcurrency \
15617                                 thr_setconcurrency \
15618                                 thr_getconcurrency \
15619                         
15620 do
15621 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15622 echo "configure:15623: checking for $ac_func" >&5
15623 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15624   echo $ac_n "(cached) $ac_c" 1>&6
15625 else
15626   cat > conftest.$ac_ext <<EOF
15627 #line 15628 "configure"
15628 #include "confdefs.h"
15629 /* System header to define __stub macros and hopefully few prototypes,
15630     which can conflict with char $ac_func(); below.  */
15631 #include <assert.h>
15632 /* Override any gcc2 internal prototype to avoid an error.  */
15633 /* We use char because int might match the return type of a gcc2
15634     builtin and then its argument prototype would still apply.  */
15635 char $ac_func();
15636 char (*f)();
15637
15638 int main() {
15639
15640 /* The GNU C library defines this for functions which it implements
15641     to always fail with ENOSYS.  Some functions are actually named
15642     something starting with __ and the normal name is an alias.  */
15643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15644 choke me
15645 #else
15646 f = $ac_func;
15647 #endif
15648
15649 ; return 0; }
15650 EOF
15651 if { (eval echo configure:15652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15652   rm -rf conftest*
15653   eval "ac_cv_func_$ac_func=yes"
15654 else
15655   echo "configure: failed program was:" >&5
15656   cat conftest.$ac_ext >&5
15657   rm -rf conftest*
15658   eval "ac_cv_func_$ac_func=no"
15659 fi
15660 rm -f conftest*
15661 fi
15662
15663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15664   echo "$ac_t""yes" 1>&6
15665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15666   cat >> confdefs.h <<EOF
15667 #define $ac_tr_func 1
15668 EOF
15669  
15670 else
15671   echo "$ac_t""no" 1>&6
15672 fi
15673 done
15674
15675
15676                         
15677         for ac_func in pthread_kill_other_threads_np
15678 do
15679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15680 echo "configure:15681: checking for $ac_func" >&5
15681 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15682   echo $ac_n "(cached) $ac_c" 1>&6
15683 else
15684   cat > conftest.$ac_ext <<EOF
15685 #line 15686 "configure"
15686 #include "confdefs.h"
15687 /* System header to define __stub macros and hopefully few prototypes,
15688     which can conflict with char $ac_func(); below.  */
15689 #include <assert.h>
15690 /* Override any gcc2 internal prototype to avoid an error.  */
15691 /* We use char because int might match the return type of a gcc2
15692     builtin and then its argument prototype would still apply.  */
15693 char $ac_func();
15694 char (*f)();
15695
15696 int main() {
15697
15698 /* The GNU C library defines this for functions which it implements
15699     to always fail with ENOSYS.  Some functions are actually named
15700     something starting with __ and the normal name is an alias.  */
15701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15702 choke me
15703 #else
15704 f = $ac_func;
15705 #endif
15706
15707 ; return 0; }
15708 EOF
15709 if { (eval echo configure:15710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15710   rm -rf conftest*
15711   eval "ac_cv_func_$ac_func=yes"
15712 else
15713   echo "configure: failed program was:" >&5
15714   cat conftest.$ac_ext >&5
15715   rm -rf conftest*
15716   eval "ac_cv_func_$ac_func=no"
15717 fi
15718 rm -f conftest*
15719 fi
15720
15721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15722   echo "$ac_t""yes" 1>&6
15723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15724   cat >> confdefs.h <<EOF
15725 #define $ac_tr_func 1
15726 EOF
15727  
15728 else
15729   echo "$ac_t""no" 1>&6
15730 fi
15731 done
15732
15733         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15734 echo "configure:15735: checking for LinuxThreads implementation" >&5
15735 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15736   echo $ac_n "(cached) $ac_c" 1>&6
15737 else
15738   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15739 fi
15740
15741 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15742
15743                         
15744         
15745         
15746         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15747 echo "configure:15748: checking for LinuxThreads consistency" >&5
15748 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15749   echo $ac_n "(cached) $ac_c" 1>&6
15750 else
15751   
15752                 if test $ol_cv_header_linux_threads = yes -a \
15753                         $ol_cv_sys_linux_threads = yes; then
15754                         ol_cv_linux_threads=yes
15755                 elif test $ol_cv_header_linux_threads = no -a \
15756                         $ol_cv_sys_linux_threads = no; then
15757                         ol_cv_linux_threads=no
15758                 else
15759                         ol_cv_linux_threads=error
15760                 fi
15761         
15762 fi
15763
15764 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15765
15766
15767                         if test $ol_cv_linux_threads = error; then
15768                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15769                         fi
15770
15771                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15772 echo "configure:15773: checking if pthread_create() works" >&5
15773 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15774   echo $ac_n "(cached) $ac_c" 1>&6
15775 else
15776   
15777                         if test "$cross_compiling" = yes; then
15778                                 ol_cv_pthread_create_works=yes
15779 else
15780   cat > conftest.$ac_ext <<EOF
15781 #line 15782 "configure"
15782 #include "confdefs.h"
15783 /* pthread test headers */
15784 #include <pthread.h>
15785 #ifndef NULL
15786 #define NULL (void*)0
15787 #endif
15788
15789 static void *task(p)
15790         void *p;
15791 {
15792         return (void *) (p == NULL);
15793 }
15794
15795
15796 int main(argc, argv)
15797         int argc;
15798         char **argv;
15799 {
15800
15801         /* pthread test function */
15802         pthread_t t;
15803         int status;
15804         int detach = 1;
15805
15806 #ifdef HAVE_PTHREADS_FINAL
15807         /* Final pthreads */
15808         pthread_attr_t attr;
15809
15810         status = pthread_attr_init(&attr);
15811         if( status ) return status;
15812
15813 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15814         if( !detach ) {
15815 #if defined( PTHREAD_CREATE_JOINABLE )
15816                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15817 #else
15818                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15819 #endif
15820
15821 #ifdef PTHREAD_CREATE_DETACHED
15822         } else {
15823                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15824 #endif
15825         }
15826         if( status ) return status;
15827 #endif
15828
15829         status = pthread_create( &t, &attr, task, NULL );
15830         if( status ) return status;
15831
15832 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15833         if( detach ) {
15834                 /* give thread a chance to complete */
15835                 /* it should remain joinable and hence detachable */
15836                 sleep( 1 );
15837
15838                 status = pthread_detach( t );
15839                 if( status ) return status;
15840         }
15841 #endif
15842
15843 #else
15844         /* Draft 4 pthreads */
15845         status = pthread_create( &t, pthread_attr_default, task, NULL );
15846         if( status ) return status;
15847
15848         if( detach ) {
15849                 /* give thread a chance to complete */
15850                 /* it should remain joinable and hence detachable */
15851                 sleep( 1 );
15852
15853                 status = pthread_detach( &t );
15854                 if( status ) return status;
15855         }
15856 #endif
15857
15858 #ifdef HAVE_LINUX_THREADS
15859         pthread_kill_other_threads_np();
15860 #endif
15861
15862         return 0;
15863
15864 }
15865
15866 EOF
15867 if { (eval echo configure:15868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15868 then
15869   ol_cv_pthread_create_works=yes
15870 else
15871   echo "configure: failed program was:" >&5
15872   cat conftest.$ac_ext >&5
15873   rm -fr conftest*
15874   ol_cv_pthread_create_works=no
15875 fi
15876 rm -fr conftest*
15877 fi
15878
15879 fi
15880
15881 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15882
15883                         if test $ol_cv_pthread_create_works = no ; then
15884                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15885                         fi
15886
15887                                                 if test $ol_with_yielding_select = auto ; then
15888                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15889 echo "configure:15890: checking if select yields when using pthreads" >&5
15890 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15891   echo $ac_n "(cached) $ac_c" 1>&6
15892 else
15893   
15894                                 if test "$cross_compiling" = yes; then
15895   ol_cv_pthread_select_yields=cross
15896 else
15897   cat > conftest.$ac_ext <<EOF
15898 #line 15899 "configure"
15899 #include "confdefs.h"
15900
15901 #include <sys/types.h>
15902 #include <sys/time.h>
15903 #include <unistd.h>
15904 #include <pthread.h>
15905 #ifndef NULL
15906 #define NULL (void*) 0
15907 #endif
15908
15909 static int fildes[2];
15910
15911 static void *task(p)
15912         void *p;
15913 {
15914         int i;
15915         struct timeval tv;
15916
15917         fd_set rfds;
15918
15919         tv.tv_sec=10;
15920         tv.tv_usec=0;
15921
15922         FD_ZERO(&rfds);
15923         FD_SET(fildes[0], &rfds);
15924
15925         /* we're not interested in any fds */
15926         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15927
15928         if(i < 0) {
15929                 perror("select");
15930                 exit(10);
15931         }
15932
15933         exit(0); /* if we exit here, the select blocked the whole process */
15934 }
15935
15936 int main(argc, argv)
15937         int argc;
15938         char **argv;
15939 {
15940         pthread_t t;
15941
15942         /* create a pipe to select */
15943         if(pipe(&fildes[0])) {
15944                 perror("select");
15945                 exit(1);
15946         }
15947
15948 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15949         (void) pthread_setconcurrency(2);
15950 #else
15951 #ifdef HAVE_THR_SETCONCURRENCY
15952         /* Set Solaris LWP concurrency to 2 */
15953         thr_setconcurrency(2);
15954 #endif
15955 #endif
15956
15957 #if HAVE_PTHREADS_D4
15958         pthread_create(&t, pthread_attr_default, task, NULL);
15959 #else
15960         pthread_create(&t, NULL, task, NULL);
15961 #endif
15962
15963 #if HAVE_SCHED_YIELD
15964         sched_yield();  /* make sure task runs first */
15965 #else
15966 #ifdef HAVE_PTHREAD_YIELD
15967         pthread_yield();        /* make sure task runs first */
15968 #endif
15969 #endif
15970
15971         exit(2);
15972 }
15973 EOF
15974 if { (eval echo configure:15975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15975 then
15976   ol_cv_pthread_select_yields=no
15977 else
15978   echo "configure: failed program was:" >&5
15979   cat conftest.$ac_ext >&5
15980   rm -fr conftest*
15981   ol_cv_pthread_select_yields=yes
15982 fi
15983 rm -fr conftest*
15984 fi
15985
15986 fi
15987
15988 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15989
15990                                 if test $ol_cv_pthread_select_yields = cross ; then
15991                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15992                                 fi
15993
15994                                 if test $ol_cv_pthread_select_yields = yes ; then
15995                                         ol_with_yielding_select=yes
15996                                 fi
15997                         fi
15998
15999                                                 CPPFLAGS="$save_CPPFLAGS"
16000                         LIBS="$save_LIBS"
16001                 else
16002                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16003                 fi
16004         fi
16005
16006         if test $ol_with_threads = posix ; then
16007                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16008         fi
16009 fi
16010
16011 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16012         -o $ol_with_threads = mach ; then
16013
16014                 for ac_hdr in mach/cthreads.h cthreads.h
16015 do
16016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16018 echo "configure:16019: checking for $ac_hdr" >&5
16019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16020   echo $ac_n "(cached) $ac_c" 1>&6
16021 else
16022   cat > conftest.$ac_ext <<EOF
16023 #line 16024 "configure"
16024 #include "confdefs.h"
16025 #include <$ac_hdr>
16026 EOF
16027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16028 { (eval echo configure:16029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16030 if test -z "$ac_err"; then
16031   rm -rf conftest*
16032   eval "ac_cv_header_$ac_safe=yes"
16033 else
16034   echo "$ac_err" >&5
16035   echo "configure: failed program was:" >&5
16036   cat conftest.$ac_ext >&5
16037   rm -rf conftest*
16038   eval "ac_cv_header_$ac_safe=no"
16039 fi
16040 rm -f conftest*
16041 fi
16042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16043   echo "$ac_t""yes" 1>&6
16044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16045   cat >> confdefs.h <<EOF
16046 #define $ac_tr_hdr 1
16047 EOF
16048  
16049 else
16050   echo "$ac_t""no" 1>&6
16051 fi
16052 done
16053
16054         if test $ac_cv_header_mach_cthreads_h = yes ; then
16055                 ol_with_threads=found
16056
16057                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16058 echo "configure:16059: checking for cthread_fork" >&5
16059 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16060   echo $ac_n "(cached) $ac_c" 1>&6
16061 else
16062   cat > conftest.$ac_ext <<EOF
16063 #line 16064 "configure"
16064 #include "confdefs.h"
16065 /* System header to define __stub macros and hopefully few prototypes,
16066     which can conflict with char cthread_fork(); below.  */
16067 #include <assert.h>
16068 /* Override any gcc2 internal prototype to avoid an error.  */
16069 /* We use char because int might match the return type of a gcc2
16070     builtin and then its argument prototype would still apply.  */
16071 char cthread_fork();
16072 char (*f)();
16073
16074 int main() {
16075
16076 /* The GNU C library defines this for functions which it implements
16077     to always fail with ENOSYS.  Some functions are actually named
16078     something starting with __ and the normal name is an alias.  */
16079 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16080 choke me
16081 #else
16082 f = cthread_fork;
16083 #endif
16084
16085 ; return 0; }
16086 EOF
16087 if { (eval echo configure:16088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16088   rm -rf conftest*
16089   eval "ac_cv_func_cthread_fork=yes"
16090 else
16091   echo "configure: failed program was:" >&5
16092   cat conftest.$ac_ext >&5
16093   rm -rf conftest*
16094   eval "ac_cv_func_cthread_fork=no"
16095 fi
16096 rm -f conftest*
16097 fi
16098
16099 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16100   echo "$ac_t""yes" 1>&6
16101   ol_link_threads=yes
16102 else
16103   echo "$ac_t""no" 1>&6
16104 fi
16105
16106
16107                 if test $ol_link_threads = no ; then
16108                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16109 echo "configure:16110: checking for cthread_fork with -all_load" >&5
16110 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16111   echo $ac_n "(cached) $ac_c" 1>&6
16112 else
16113   
16114                                                                 save_LIBS="$LIBS"
16115                                 LIBS="-all_load $LIBS"
16116                                 cat > conftest.$ac_ext <<EOF
16117 #line 16118 "configure"
16118 #include "confdefs.h"
16119 #include <mach/cthreads.h>
16120 int main() {
16121
16122                                         cthread_fork((void *)0, (void *)0);
16123                                         
16124 ; return 0; }
16125 EOF
16126 if { (eval echo configure:16127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16127   rm -rf conftest*
16128   ol_cv_cthread_all_load=yes
16129 else
16130   echo "configure: failed program was:" >&5
16131   cat conftest.$ac_ext >&5
16132   rm -rf conftest*
16133   ol_cv_cthread_all_load=no
16134 fi
16135 rm -f conftest*
16136                                                                 LIBS="$save_LIBS"
16137                         
16138 fi
16139
16140 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16141
16142                         if test $ol_cv_cthread_all_load = yes ; then
16143                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16144                                 ol_link_threads=mach
16145                                 ol_with_threads=found
16146                         fi
16147                 fi
16148
16149         elif test $ac_cv_header_cthreads_h = yes ; then
16150                                 
16151                 ol_with_threads=found
16152  
16153                                 save_LIBS="$LIBS"
16154                 LIBS="$LIBS -lthreads"
16155                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16156 echo "configure:16157: checking for cthread_fork" >&5
16157 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16158   echo $ac_n "(cached) $ac_c" 1>&6
16159 else
16160   cat > conftest.$ac_ext <<EOF
16161 #line 16162 "configure"
16162 #include "confdefs.h"
16163 /* System header to define __stub macros and hopefully few prototypes,
16164     which can conflict with char cthread_fork(); below.  */
16165 #include <assert.h>
16166 /* Override any gcc2 internal prototype to avoid an error.  */
16167 /* We use char because int might match the return type of a gcc2
16168     builtin and then its argument prototype would still apply.  */
16169 char cthread_fork();
16170 char (*f)();
16171
16172 int main() {
16173
16174 /* The GNU C library defines this for functions which it implements
16175     to always fail with ENOSYS.  Some functions are actually named
16176     something starting with __ and the normal name is an alias.  */
16177 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16178 choke me
16179 #else
16180 f = cthread_fork;
16181 #endif
16182
16183 ; return 0; }
16184 EOF
16185 if { (eval echo configure:16186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16186   rm -rf conftest*
16187   eval "ac_cv_func_cthread_fork=yes"
16188 else
16189   echo "configure: failed program was:" >&5
16190   cat conftest.$ac_ext >&5
16191   rm -rf conftest*
16192   eval "ac_cv_func_cthread_fork=no"
16193 fi
16194 rm -f conftest*
16195 fi
16196
16197 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16198   echo "$ac_t""yes" 1>&6
16199   ol_link_threads=yes
16200 else
16201   echo "$ac_t""no" 1>&6
16202 fi
16203
16204                 LIBS="$save_LIBS"
16205
16206                 if test $ol_link_threads = yes ; then
16207                         LTHREAD_LIBS="-lthreads"
16208                         ol_link_threads=mach
16209                         ol_with_threads=found
16210                 else
16211                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16212                 fi
16213
16214         elif test $ol_with_threads = mach ; then
16215                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16216         fi
16217
16218         if test $ol_link_threads = mach ; then
16219                 cat >> confdefs.h <<\EOF
16220 #define HAVE_MACH_CTHREADS 1
16221 EOF
16222
16223         elif test $ol_with_threads = found ; then
16224                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16225         fi
16226 fi
16227
16228 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16229         -o $ol_with_threads = pth ; then
16230
16231         for ac_hdr in pth.h
16232 do
16233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16235 echo "configure:16236: checking for $ac_hdr" >&5
16236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16237   echo $ac_n "(cached) $ac_c" 1>&6
16238 else
16239   cat > conftest.$ac_ext <<EOF
16240 #line 16241 "configure"
16241 #include "confdefs.h"
16242 #include <$ac_hdr>
16243 EOF
16244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16245 { (eval echo configure:16246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16247 if test -z "$ac_err"; then
16248   rm -rf conftest*
16249   eval "ac_cv_header_$ac_safe=yes"
16250 else
16251   echo "$ac_err" >&5
16252   echo "configure: failed program was:" >&5
16253   cat conftest.$ac_ext >&5
16254   rm -rf conftest*
16255   eval "ac_cv_header_$ac_safe=no"
16256 fi
16257 rm -f conftest*
16258 fi
16259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16260   echo "$ac_t""yes" 1>&6
16261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16262   cat >> confdefs.h <<EOF
16263 #define $ac_tr_hdr 1
16264 EOF
16265  
16266 else
16267   echo "$ac_t""no" 1>&6
16268 fi
16269 done
16270
16271
16272         if test $ac_cv_header_pth_h = yes ; then
16273                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16274 echo "configure:16275: checking for pth_version in -lpth" >&5
16275 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16277   echo $ac_n "(cached) $ac_c" 1>&6
16278 else
16279   ac_save_LIBS="$LIBS"
16280 LIBS="-lpth  $LIBS"
16281 cat > conftest.$ac_ext <<EOF
16282 #line 16283 "configure"
16283 #include "confdefs.h"
16284 /* Override any gcc2 internal prototype to avoid an error.  */
16285 /* We use char because int might match the return type of a gcc2
16286     builtin and then its argument prototype would still apply.  */
16287 char pth_version();
16288
16289 int main() {
16290 pth_version()
16291 ; return 0; }
16292 EOF
16293 if { (eval echo configure:16294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16294   rm -rf conftest*
16295   eval "ac_cv_lib_$ac_lib_var=yes"
16296 else
16297   echo "configure: failed program was:" >&5
16298   cat conftest.$ac_ext >&5
16299   rm -rf conftest*
16300   eval "ac_cv_lib_$ac_lib_var=no"
16301 fi
16302 rm -f conftest*
16303 LIBS="$ac_save_LIBS"
16304
16305 fi
16306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16307   echo "$ac_t""yes" 1>&6
16308   have_pth=yes
16309 else
16310   echo "$ac_t""no" 1>&6
16311 have_pth=no
16312 fi
16313
16314
16315                 if test $have_pth = yes ; then
16316                         cat >> confdefs.h <<\EOF
16317 #define HAVE_GNU_PTH 1
16318 EOF
16319
16320                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16321                         ol_link_threads=pth
16322                         ol_with_threads=found
16323
16324                         if test $ol_with_yielding_select = auto ; then
16325                                 ol_with_yielding_select=yes
16326                         fi
16327                 fi
16328         fi
16329 fi
16330
16331 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16332         -o $ol_with_threads = lwp ; then
16333
16334                 for ac_hdr in thread.h synch.h
16335 do
16336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16338 echo "configure:16339: checking for $ac_hdr" >&5
16339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16340   echo $ac_n "(cached) $ac_c" 1>&6
16341 else
16342   cat > conftest.$ac_ext <<EOF
16343 #line 16344 "configure"
16344 #include "confdefs.h"
16345 #include <$ac_hdr>
16346 EOF
16347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16348 { (eval echo configure:16349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16350 if test -z "$ac_err"; then
16351   rm -rf conftest*
16352   eval "ac_cv_header_$ac_safe=yes"
16353 else
16354   echo "$ac_err" >&5
16355   echo "configure: failed program was:" >&5
16356   cat conftest.$ac_ext >&5
16357   rm -rf conftest*
16358   eval "ac_cv_header_$ac_safe=no"
16359 fi
16360 rm -f conftest*
16361 fi
16362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16363   echo "$ac_t""yes" 1>&6
16364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16365   cat >> confdefs.h <<EOF
16366 #define $ac_tr_hdr 1
16367 EOF
16368  
16369 else
16370   echo "$ac_t""no" 1>&6
16371 fi
16372 done
16373
16374         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16375                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16376 echo "configure:16377: checking for thr_create in -lthread" >&5
16377 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16379   echo $ac_n "(cached) $ac_c" 1>&6
16380 else
16381   ac_save_LIBS="$LIBS"
16382 LIBS="-lthread  $LIBS"
16383 cat > conftest.$ac_ext <<EOF
16384 #line 16385 "configure"
16385 #include "confdefs.h"
16386 /* Override any gcc2 internal prototype to avoid an error.  */
16387 /* We use char because int might match the return type of a gcc2
16388     builtin and then its argument prototype would still apply.  */
16389 char thr_create();
16390
16391 int main() {
16392 thr_create()
16393 ; return 0; }
16394 EOF
16395 if { (eval echo configure:16396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16396   rm -rf conftest*
16397   eval "ac_cv_lib_$ac_lib_var=yes"
16398 else
16399   echo "configure: failed program was:" >&5
16400   cat conftest.$ac_ext >&5
16401   rm -rf conftest*
16402   eval "ac_cv_lib_$ac_lib_var=no"
16403 fi
16404 rm -f conftest*
16405 LIBS="$ac_save_LIBS"
16406
16407 fi
16408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16409   echo "$ac_t""yes" 1>&6
16410   have_thr=yes
16411 else
16412   echo "$ac_t""no" 1>&6
16413 have_thr=no
16414 fi
16415
16416
16417                 if test $have_thr = yes ; then
16418                         cat >> confdefs.h <<\EOF
16419 #define HAVE_THR 1
16420 EOF
16421
16422                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16423                         ol_link_threads=thr
16424
16425                         if test $ol_with_yielding_select = auto ; then
16426                                 ol_with_yielding_select=yes
16427                         fi
16428
16429                                                 for ac_func in \
16430                                 thr_setconcurrency \
16431                                 thr_getconcurrency \
16432                         
16433 do
16434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16435 echo "configure:16436: checking for $ac_func" >&5
16436 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16437   echo $ac_n "(cached) $ac_c" 1>&6
16438 else
16439   cat > conftest.$ac_ext <<EOF
16440 #line 16441 "configure"
16441 #include "confdefs.h"
16442 /* System header to define __stub macros and hopefully few prototypes,
16443     which can conflict with char $ac_func(); below.  */
16444 #include <assert.h>
16445 /* Override any gcc2 internal prototype to avoid an error.  */
16446 /* We use char because int might match the return type of a gcc2
16447     builtin and then its argument prototype would still apply.  */
16448 char $ac_func();
16449 char (*f)();
16450
16451 int main() {
16452
16453 /* The GNU C library defines this for functions which it implements
16454     to always fail with ENOSYS.  Some functions are actually named
16455     something starting with __ and the normal name is an alias.  */
16456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16457 choke me
16458 #else
16459 f = $ac_func;
16460 #endif
16461
16462 ; return 0; }
16463 EOF
16464 if { (eval echo configure:16465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16465   rm -rf conftest*
16466   eval "ac_cv_func_$ac_func=yes"
16467 else
16468   echo "configure: failed program was:" >&5
16469   cat conftest.$ac_ext >&5
16470   rm -rf conftest*
16471   eval "ac_cv_func_$ac_func=no"
16472 fi
16473 rm -f conftest*
16474 fi
16475
16476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16477   echo "$ac_t""yes" 1>&6
16478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16479   cat >> confdefs.h <<EOF
16480 #define $ac_tr_func 1
16481 EOF
16482  
16483 else
16484   echo "$ac_t""no" 1>&6
16485 fi
16486 done
16487
16488                 fi
16489         fi
16490
16491                 for ac_hdr in lwp/lwp.h
16492 do
16493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16495 echo "configure:16496: checking for $ac_hdr" >&5
16496 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16497   echo $ac_n "(cached) $ac_c" 1>&6
16498 else
16499   cat > conftest.$ac_ext <<EOF
16500 #line 16501 "configure"
16501 #include "confdefs.h"
16502 #include <$ac_hdr>
16503 EOF
16504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16505 { (eval echo configure:16506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16507 if test -z "$ac_err"; then
16508   rm -rf conftest*
16509   eval "ac_cv_header_$ac_safe=yes"
16510 else
16511   echo "$ac_err" >&5
16512   echo "configure: failed program was:" >&5
16513   cat conftest.$ac_ext >&5
16514   rm -rf conftest*
16515   eval "ac_cv_header_$ac_safe=no"
16516 fi
16517 rm -f conftest*
16518 fi
16519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16520   echo "$ac_t""yes" 1>&6
16521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16522   cat >> confdefs.h <<EOF
16523 #define $ac_tr_hdr 1
16524 EOF
16525  
16526 else
16527   echo "$ac_t""no" 1>&6
16528 fi
16529 done
16530
16531         if test $ac_cv_header_lwp_lwp_h = yes ; then
16532                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16533 echo "configure:16534: checking for lwp_create in -llwp" >&5
16534 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16535 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16536   echo $ac_n "(cached) $ac_c" 1>&6
16537 else
16538   ac_save_LIBS="$LIBS"
16539 LIBS="-llwp  $LIBS"
16540 cat > conftest.$ac_ext <<EOF
16541 #line 16542 "configure"
16542 #include "confdefs.h"
16543 /* Override any gcc2 internal prototype to avoid an error.  */
16544 /* We use char because int might match the return type of a gcc2
16545     builtin and then its argument prototype would still apply.  */
16546 char lwp_create();
16547
16548 int main() {
16549 lwp_create()
16550 ; return 0; }
16551 EOF
16552 if { (eval echo configure:16553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16553   rm -rf conftest*
16554   eval "ac_cv_lib_$ac_lib_var=yes"
16555 else
16556   echo "configure: failed program was:" >&5
16557   cat conftest.$ac_ext >&5
16558   rm -rf conftest*
16559   eval "ac_cv_lib_$ac_lib_var=no"
16560 fi
16561 rm -f conftest*
16562 LIBS="$ac_save_LIBS"
16563
16564 fi
16565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16566   echo "$ac_t""yes" 1>&6
16567   have_lwp=yes
16568 else
16569   echo "$ac_t""no" 1>&6
16570 have_lwp=no
16571 fi
16572
16573
16574                 if test $have_lwp = yes ; then
16575                         cat >> confdefs.h <<\EOF
16576 #define HAVE_LWP 1
16577 EOF
16578
16579                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16580                         ol_link_threads=lwp
16581
16582                         if test $ol_with_yielding_select = auto ; then
16583                                 ol_with_yielding_select=no
16584                         fi
16585                 fi
16586         fi
16587 fi
16588
16589 if test $ol_with_yielding_select = yes ; then
16590         cat >> confdefs.h <<\EOF
16591 #define HAVE_YIELDING_SELECT 1
16592 EOF
16593
16594 fi
16595
16596 if test $ol_with_threads = manual ; then
16597                 ol_link_threads=yes
16598
16599         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16600
16601         for ac_hdr in pthread.h sched.h
16602 do
16603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16605 echo "configure:16606: checking for $ac_hdr" >&5
16606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16607   echo $ac_n "(cached) $ac_c" 1>&6
16608 else
16609   cat > conftest.$ac_ext <<EOF
16610 #line 16611 "configure"
16611 #include "confdefs.h"
16612 #include <$ac_hdr>
16613 EOF
16614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16615 { (eval echo configure:16616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16617 if test -z "$ac_err"; then
16618   rm -rf conftest*
16619   eval "ac_cv_header_$ac_safe=yes"
16620 else
16621   echo "$ac_err" >&5
16622   echo "configure: failed program was:" >&5
16623   cat conftest.$ac_ext >&5
16624   rm -rf conftest*
16625   eval "ac_cv_header_$ac_safe=no"
16626 fi
16627 rm -f conftest*
16628 fi
16629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16630   echo "$ac_t""yes" 1>&6
16631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16632   cat >> confdefs.h <<EOF
16633 #define $ac_tr_hdr 1
16634 EOF
16635  
16636 else
16637   echo "$ac_t""no" 1>&6
16638 fi
16639 done
16640
16641         for ac_func in sched_yield pthread_yield
16642 do
16643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16644 echo "configure:16645: checking for $ac_func" >&5
16645 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16646   echo $ac_n "(cached) $ac_c" 1>&6
16647 else
16648   cat > conftest.$ac_ext <<EOF
16649 #line 16650 "configure"
16650 #include "confdefs.h"
16651 /* System header to define __stub macros and hopefully few prototypes,
16652     which can conflict with char $ac_func(); below.  */
16653 #include <assert.h>
16654 /* Override any gcc2 internal prototype to avoid an error.  */
16655 /* We use char because int might match the return type of a gcc2
16656     builtin and then its argument prototype would still apply.  */
16657 char $ac_func();
16658 char (*f)();
16659
16660 int main() {
16661
16662 /* The GNU C library defines this for functions which it implements
16663     to always fail with ENOSYS.  Some functions are actually named
16664     something starting with __ and the normal name is an alias.  */
16665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16666 choke me
16667 #else
16668 f = $ac_func;
16669 #endif
16670
16671 ; return 0; }
16672 EOF
16673 if { (eval echo configure:16674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16674   rm -rf conftest*
16675   eval "ac_cv_func_$ac_func=yes"
16676 else
16677   echo "configure: failed program was:" >&5
16678   cat conftest.$ac_ext >&5
16679   rm -rf conftest*
16680   eval "ac_cv_func_$ac_func=no"
16681 fi
16682 rm -f conftest*
16683 fi
16684
16685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16686   echo "$ac_t""yes" 1>&6
16687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16688   cat >> confdefs.h <<EOF
16689 #define $ac_tr_func 1
16690 EOF
16691  
16692 else
16693   echo "$ac_t""no" 1>&6
16694 fi
16695 done
16696
16697         
16698         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16699 echo "configure:16700: checking for LinuxThreads pthread.h" >&5
16700 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16701   echo $ac_n "(cached) $ac_c" 1>&6
16702 else
16703   cat > conftest.$ac_ext <<EOF
16704 #line 16705 "configure"
16705 #include "confdefs.h"
16706 #include <pthread.h>
16707 EOF
16708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16709   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16710   rm -rf conftest*
16711   ol_cv_header_linux_threads=yes
16712 else
16713   rm -rf conftest*
16714   ol_cv_header_linux_threads=no
16715 fi
16716 rm -f conftest*
16717
16718                 
16719 fi
16720
16721 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16722         if test $ol_cv_header_linux_threads = yes; then
16723                 cat >> confdefs.h <<\EOF
16724 #define HAVE_LINUX_THREADS 1
16725 EOF
16726
16727         fi
16728
16729
16730         for ac_hdr in mach/cthreads.h
16731 do
16732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16734 echo "configure:16735: checking for $ac_hdr" >&5
16735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16736   echo $ac_n "(cached) $ac_c" 1>&6
16737 else
16738   cat > conftest.$ac_ext <<EOF
16739 #line 16740 "configure"
16740 #include "confdefs.h"
16741 #include <$ac_hdr>
16742 EOF
16743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16744 { (eval echo configure:16745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16746 if test -z "$ac_err"; then
16747   rm -rf conftest*
16748   eval "ac_cv_header_$ac_safe=yes"
16749 else
16750   echo "$ac_err" >&5
16751   echo "configure: failed program was:" >&5
16752   cat conftest.$ac_ext >&5
16753   rm -rf conftest*
16754   eval "ac_cv_header_$ac_safe=no"
16755 fi
16756 rm -f conftest*
16757 fi
16758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16759   echo "$ac_t""yes" 1>&6
16760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16761   cat >> confdefs.h <<EOF
16762 #define $ac_tr_hdr 1
16763 EOF
16764  
16765 else
16766   echo "$ac_t""no" 1>&6
16767 fi
16768 done
16769
16770         for ac_hdr in lwp/lwp.h
16771 do
16772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16774 echo "configure:16775: checking for $ac_hdr" >&5
16775 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16776   echo $ac_n "(cached) $ac_c" 1>&6
16777 else
16778   cat > conftest.$ac_ext <<EOF
16779 #line 16780 "configure"
16780 #include "confdefs.h"
16781 #include <$ac_hdr>
16782 EOF
16783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16784 { (eval echo configure:16785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16786 if test -z "$ac_err"; then
16787   rm -rf conftest*
16788   eval "ac_cv_header_$ac_safe=yes"
16789 else
16790   echo "$ac_err" >&5
16791   echo "configure: failed program was:" >&5
16792   cat conftest.$ac_ext >&5
16793   rm -rf conftest*
16794   eval "ac_cv_header_$ac_safe=no"
16795 fi
16796 rm -f conftest*
16797 fi
16798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16799   echo "$ac_t""yes" 1>&6
16800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16801   cat >> confdefs.h <<EOF
16802 #define $ac_tr_hdr 1
16803 EOF
16804  
16805 else
16806   echo "$ac_t""no" 1>&6
16807 fi
16808 done
16809
16810         for ac_hdr in thread.h synch.h
16811 do
16812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16814 echo "configure:16815: checking for $ac_hdr" >&5
16815 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16816   echo $ac_n "(cached) $ac_c" 1>&6
16817 else
16818   cat > conftest.$ac_ext <<EOF
16819 #line 16820 "configure"
16820 #include "confdefs.h"
16821 #include <$ac_hdr>
16822 EOF
16823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16824 { (eval echo configure:16825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16826 if test -z "$ac_err"; then
16827   rm -rf conftest*
16828   eval "ac_cv_header_$ac_safe=yes"
16829 else
16830   echo "$ac_err" >&5
16831   echo "configure: failed program was:" >&5
16832   cat conftest.$ac_ext >&5
16833   rm -rf conftest*
16834   eval "ac_cv_header_$ac_safe=no"
16835 fi
16836 rm -f conftest*
16837 fi
16838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16839   echo "$ac_t""yes" 1>&6
16840     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16841   cat >> confdefs.h <<EOF
16842 #define $ac_tr_hdr 1
16843 EOF
16844  
16845 else
16846   echo "$ac_t""no" 1>&6
16847 fi
16848 done
16849
16850 fi
16851
16852 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16853                         cat >> confdefs.h <<\EOF
16854 #define REENTRANT 1
16855 EOF
16856
16857         cat >> confdefs.h <<\EOF
16858 #define _REENTRANT 1
16859 EOF
16860
16861         cat >> confdefs.h <<\EOF
16862 #define THREAD_SAFE 1
16863 EOF
16864
16865         cat >> confdefs.h <<\EOF
16866 #define _THREAD_SAFE 1
16867 EOF
16868
16869         cat >> confdefs.h <<\EOF
16870 #define THREADSAFE 1
16871 EOF
16872
16873         cat >> confdefs.h <<\EOF
16874 #define _THREADSAFE 1
16875 EOF
16876
16877         cat >> confdefs.h <<\EOF
16878 #define _SGI_MP_SOURCE 1
16879 EOF
16880
16881
16882                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16883 echo "configure:16884: checking for thread specific errno" >&5
16884 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16885   echo $ac_n "(cached) $ac_c" 1>&6
16886 else
16887   
16888                 cat > conftest.$ac_ext <<EOF
16889 #line 16890 "configure"
16890 #include "confdefs.h"
16891 #include <errno.h>
16892 int main() {
16893 errno = 0;
16894 ; return 0; }
16895 EOF
16896 if { (eval echo configure:16897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16897   rm -rf conftest*
16898   ol_cv_errno_thread_specific=yes
16899 else
16900   echo "configure: failed program was:" >&5
16901   cat conftest.$ac_ext >&5
16902   rm -rf conftest*
16903   ol_cv_errno_thread_specific=no
16904 fi
16905 rm -f conftest*
16906         
16907 fi
16908
16909 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16910
16911                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16912 echo "configure:16913: checking for thread specific h_errno" >&5
16913 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16914   echo $ac_n "(cached) $ac_c" 1>&6
16915 else
16916   
16917                 cat > conftest.$ac_ext <<EOF
16918 #line 16919 "configure"
16919 #include "confdefs.h"
16920 #include <netdb.h>
16921 int main() {
16922 h_errno = 0;
16923 ; return 0; }
16924 EOF
16925 if { (eval echo configure:16926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16926   rm -rf conftest*
16927   ol_cv_h_errno_thread_specific=yes
16928 else
16929   echo "configure: failed program was:" >&5
16930   cat conftest.$ac_ext >&5
16931   rm -rf conftest*
16932   ol_cv_h_errno_thread_specific=no
16933 fi
16934 rm -f conftest*
16935         
16936 fi
16937
16938 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16939
16940         if test $ol_cv_errno_thread_specific != yes \
16941                 -o $ol_cv_h_errno_thread_specific != yes ; then
16942                 LIBS="$LTHREAD_LIBS $LIBS"
16943                 LTHREAD_LIBS=""
16944         fi
16945
16946 fi  
16947
16948 if test $ol_link_threads = no ; then
16949         if test $ol_with_threads = yes ; then
16950                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16951         fi
16952
16953         if test $ol_with_threads = auto ; then
16954                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16955                 ol_with_threads=no
16956         fi
16957
16958         cat >> confdefs.h <<\EOF
16959 #define NO_THREADS 1
16960 EOF
16961
16962         LTHREAD_LIBS=""
16963 fi
16964
16965 if test $ol_link_threads != no ; then
16966         cat >> confdefs.h <<\EOF
16967 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16968 EOF
16969
16970 fi
16971
16972 ol_link_ldbm=no 
16973
16974 if test $ol_with_ldbm_api = auto \
16975         -o $ol_with_ldbm_api = berkeley \
16976         -o $ol_with_ldbm_api = bcompat ; then
16977
16978         if test $ol_with_ldbm_api = bcompat; then \
16979                 for ac_hdr in db_185.h db.h
16980 do
16981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16983 echo "configure:16984: checking for $ac_hdr" >&5
16984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16985   echo $ac_n "(cached) $ac_c" 1>&6
16986 else
16987   cat > conftest.$ac_ext <<EOF
16988 #line 16989 "configure"
16989 #include "confdefs.h"
16990 #include <$ac_hdr>
16991 EOF
16992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16993 { (eval echo configure:16994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16995 if test -z "$ac_err"; then
16996   rm -rf conftest*
16997   eval "ac_cv_header_$ac_safe=yes"
16998 else
16999   echo "$ac_err" >&5
17000   echo "configure: failed program was:" >&5
17001   cat conftest.$ac_ext >&5
17002   rm -rf conftest*
17003   eval "ac_cv_header_$ac_safe=no"
17004 fi
17005 rm -f conftest*
17006 fi
17007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17008   echo "$ac_t""yes" 1>&6
17009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17010   cat >> confdefs.h <<EOF
17011 #define $ac_tr_hdr 1
17012 EOF
17013  
17014 else
17015   echo "$ac_t""no" 1>&6
17016 fi
17017 done
17018
17019 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17020         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17021 echo "configure:17022: checking if Berkeley DB header compatibility" >&5
17022 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17023   echo $ac_n "(cached) $ac_c" 1>&6
17024 else
17025   
17026                 cat > conftest.$ac_ext <<EOF
17027 #line 17028 "configure"
17028 #include "confdefs.h"
17029
17030 #if HAVE_DB_185_H
17031 #       include <db_185.h>
17032 #else
17033 #       include <db.h>
17034 #endif
17035
17036  /* this check could be improved */
17037 #ifndef DB_VERSION_MAJOR
17038 #       define DB_VERSION_MAJOR 1
17039 #endif
17040
17041 #if DB_VERSION_MAJOR == 1 
17042         __db_version_1
17043 #endif
17044
17045 EOF
17046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17047   egrep "__db_version_1" >/dev/null 2>&1; then
17048   rm -rf conftest*
17049   ol_cv_header_db1=yes
17050 else
17051   rm -rf conftest*
17052   ol_cv_header_db1=no
17053 fi
17054 rm -f conftest*
17055
17056 fi
17057
17058 echo "$ac_t""$ol_cv_header_db1" 1>&6
17059
17060         if test $ol_cv_header_db1 = yes ; then
17061                 ol_cv_lib_db=no
17062 if test $ol_cv_lib_db = no ; then
17063         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17064 echo "configure:17065: checking for Berkeley DB link (default)" >&5
17065 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17066   echo $ac_n "(cached) $ac_c" 1>&6
17067 else
17068   
17069         ol_DB_LIB=
17070         ol_LIBS=$LIBS
17071         LIBS="$ol_DB_LIB $LIBS"
17072
17073         cat > conftest.$ac_ext <<EOF
17074 #line 17075 "configure"
17075 #include "confdefs.h"
17076
17077 #ifdef HAVE_DB_185_H
17078 # include <db_185.h>
17079 #else
17080 # include <db.h>
17081 #endif
17082
17083 #ifndef DB_VERSION_MAJOR
17084 # define DB_VERSION_MAJOR 1
17085 #endif
17086
17087 #ifndef NULL
17088 #define NULL ((void*)0)
17089 #endif
17090
17091 int main() {
17092
17093 #if DB_VERSION_MAJOR > 1
17094         {
17095                 char *version;
17096                 int major, minor, patch;
17097
17098                 version = db_version( &major, &minor, &patch );
17099
17100                 if( major != DB_VERSION_MAJOR ||
17101                         minor < DB_VERSION_MINOR )
17102                 {
17103                         printf("Berkeley DB version mismatch\n"
17104                                 "\texpected: %s\n\tgot: %s\n",
17105                                 DB_VERSION_STRING, version);
17106                         return 1;
17107                 }
17108         }
17109 #endif
17110
17111 #if DB_VERSION_MAJOR > 2
17112         db_env_create( NULL, 0 );
17113 #elif DB_VERSION_MAJOR > 1
17114         db_appexit( NULL );
17115 #else
17116         (void) dbopen( NULL, 0, 0, 0, NULL);
17117 #endif
17118
17119 ; return 0; }
17120 EOF
17121 if { (eval echo configure:17122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17122   rm -rf conftest*
17123   ol_cv_db_none=yes
17124 else
17125   echo "configure: failed program was:" >&5
17126   cat conftest.$ac_ext >&5
17127   rm -rf conftest*
17128   ol_cv_db_none=no
17129 fi
17130 rm -f conftest*
17131
17132         LIBS="$ol_LIBS"
17133
17134 fi
17135
17136 echo "$ac_t""$ol_cv_db_none" 1>&6
17137
17138         if test $ol_cv_db_none = yes ; then
17139                 ol_cv_lib_db=yes
17140         fi
17141 fi
17142
17143 if test $ol_cv_lib_db = no ; then
17144         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17145 echo "configure:17146: checking for Berkeley DB link (-ldb4)" >&5
17146 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17147   echo $ac_n "(cached) $ac_c" 1>&6
17148 else
17149   
17150         ol_DB_LIB=-ldb4
17151         ol_LIBS=$LIBS
17152         LIBS="$ol_DB_LIB $LIBS"
17153
17154         cat > conftest.$ac_ext <<EOF
17155 #line 17156 "configure"
17156 #include "confdefs.h"
17157
17158 #ifdef HAVE_DB_185_H
17159 # include <db_185.h>
17160 #else
17161 # include <db.h>
17162 #endif
17163
17164 #ifndef DB_VERSION_MAJOR
17165 # define DB_VERSION_MAJOR 1
17166 #endif
17167
17168 #ifndef NULL
17169 #define NULL ((void*)0)
17170 #endif
17171
17172 int main() {
17173
17174 #if DB_VERSION_MAJOR > 1
17175         {
17176                 char *version;
17177                 int major, minor, patch;
17178
17179                 version = db_version( &major, &minor, &patch );
17180
17181                 if( major != DB_VERSION_MAJOR ||
17182                         minor < DB_VERSION_MINOR )
17183                 {
17184                         printf("Berkeley DB version mismatch\n"
17185                                 "\texpected: %s\n\tgot: %s\n",
17186                                 DB_VERSION_STRING, version);
17187                         return 1;
17188                 }
17189         }
17190 #endif
17191
17192 #if DB_VERSION_MAJOR > 2
17193         db_env_create( NULL, 0 );
17194 #elif DB_VERSION_MAJOR > 1
17195         db_appexit( NULL );
17196 #else
17197         (void) dbopen( NULL, 0, 0, 0, NULL);
17198 #endif
17199
17200 ; return 0; }
17201 EOF
17202 if { (eval echo configure:17203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17203   rm -rf conftest*
17204   ol_cv_db_db4=yes
17205 else
17206   echo "configure: failed program was:" >&5
17207   cat conftest.$ac_ext >&5
17208   rm -rf conftest*
17209   ol_cv_db_db4=no
17210 fi
17211 rm -f conftest*
17212
17213         LIBS="$ol_LIBS"
17214
17215 fi
17216
17217 echo "$ac_t""$ol_cv_db_db4" 1>&6
17218
17219         if test $ol_cv_db_db4 = yes ; then
17220                 ol_cv_lib_db=-ldb4
17221         fi
17222 fi
17223
17224 if test $ol_cv_lib_db = no ; then
17225         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17226 echo "configure:17227: checking for Berkeley DB link (-ldb)" >&5
17227 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17228   echo $ac_n "(cached) $ac_c" 1>&6
17229 else
17230   
17231         ol_DB_LIB=-ldb
17232         ol_LIBS=$LIBS
17233         LIBS="$ol_DB_LIB $LIBS"
17234
17235         cat > conftest.$ac_ext <<EOF
17236 #line 17237 "configure"
17237 #include "confdefs.h"
17238
17239 #ifdef HAVE_DB_185_H
17240 # include <db_185.h>
17241 #else
17242 # include <db.h>
17243 #endif
17244
17245 #ifndef DB_VERSION_MAJOR
17246 # define DB_VERSION_MAJOR 1
17247 #endif
17248
17249 #ifndef NULL
17250 #define NULL ((void*)0)
17251 #endif
17252
17253 int main() {
17254
17255 #if DB_VERSION_MAJOR > 1
17256         {
17257                 char *version;
17258                 int major, minor, patch;
17259
17260                 version = db_version( &major, &minor, &patch );
17261
17262                 if( major != DB_VERSION_MAJOR ||
17263                         minor < DB_VERSION_MINOR )
17264                 {
17265                         printf("Berkeley DB version mismatch\n"
17266                                 "\texpected: %s\n\tgot: %s\n",
17267                                 DB_VERSION_STRING, version);
17268                         return 1;
17269                 }
17270         }
17271 #endif
17272
17273 #if DB_VERSION_MAJOR > 2
17274         db_env_create( NULL, 0 );
17275 #elif DB_VERSION_MAJOR > 1
17276         db_appexit( NULL );
17277 #else
17278         (void) dbopen( NULL, 0, 0, 0, NULL);
17279 #endif
17280
17281 ; return 0; }
17282 EOF
17283 if { (eval echo configure:17284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17284   rm -rf conftest*
17285   ol_cv_db_db=yes
17286 else
17287   echo "configure: failed program was:" >&5
17288   cat conftest.$ac_ext >&5
17289   rm -rf conftest*
17290   ol_cv_db_db=no
17291 fi
17292 rm -f conftest*
17293
17294         LIBS="$ol_LIBS"
17295
17296 fi
17297
17298 echo "$ac_t""$ol_cv_db_db" 1>&6
17299
17300         if test $ol_cv_db_db = yes ; then
17301                 ol_cv_lib_db=-ldb
17302         fi
17303 fi
17304
17305 if test $ol_cv_lib_db = no ; then
17306         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17307 echo "configure:17308: checking for Berkeley DB link (-ldb3)" >&5
17308 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17309   echo $ac_n "(cached) $ac_c" 1>&6
17310 else
17311   
17312         ol_DB_LIB=-ldb3
17313         ol_LIBS=$LIBS
17314         LIBS="$ol_DB_LIB $LIBS"
17315
17316         cat > conftest.$ac_ext <<EOF
17317 #line 17318 "configure"
17318 #include "confdefs.h"
17319
17320 #ifdef HAVE_DB_185_H
17321 # include <db_185.h>
17322 #else
17323 # include <db.h>
17324 #endif
17325
17326 #ifndef DB_VERSION_MAJOR
17327 # define DB_VERSION_MAJOR 1
17328 #endif
17329
17330 #ifndef NULL
17331 #define NULL ((void*)0)
17332 #endif
17333
17334 int main() {
17335
17336 #if DB_VERSION_MAJOR > 1
17337         {
17338                 char *version;
17339                 int major, minor, patch;
17340
17341                 version = db_version( &major, &minor, &patch );
17342
17343                 if( major != DB_VERSION_MAJOR ||
17344                         minor < DB_VERSION_MINOR )
17345                 {
17346                         printf("Berkeley DB version mismatch\n"
17347                                 "\texpected: %s\n\tgot: %s\n",
17348                                 DB_VERSION_STRING, version);
17349                         return 1;
17350                 }
17351         }
17352 #endif
17353
17354 #if DB_VERSION_MAJOR > 2
17355         db_env_create( NULL, 0 );
17356 #elif DB_VERSION_MAJOR > 1
17357         db_appexit( NULL );
17358 #else
17359         (void) dbopen( NULL, 0, 0, 0, NULL);
17360 #endif
17361
17362 ; return 0; }
17363 EOF
17364 if { (eval echo configure:17365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17365   rm -rf conftest*
17366   ol_cv_db_db3=yes
17367 else
17368   echo "configure: failed program was:" >&5
17369   cat conftest.$ac_ext >&5
17370   rm -rf conftest*
17371   ol_cv_db_db3=no
17372 fi
17373 rm -f conftest*
17374
17375         LIBS="$ol_LIBS"
17376
17377 fi
17378
17379 echo "$ac_t""$ol_cv_db_db3" 1>&6
17380
17381         if test $ol_cv_db_db3 = yes ; then
17382                 ol_cv_lib_db=-ldb3
17383         fi
17384 fi
17385
17386 if test $ol_cv_lib_db = no ; then
17387         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17388 echo "configure:17389: checking for Berkeley DB link (-ldb2)" >&5
17389 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17390   echo $ac_n "(cached) $ac_c" 1>&6
17391 else
17392   
17393         ol_DB_LIB=-ldb2
17394         ol_LIBS=$LIBS
17395         LIBS="$ol_DB_LIB $LIBS"
17396
17397         cat > conftest.$ac_ext <<EOF
17398 #line 17399 "configure"
17399 #include "confdefs.h"
17400
17401 #ifdef HAVE_DB_185_H
17402 # include <db_185.h>
17403 #else
17404 # include <db.h>
17405 #endif
17406
17407 #ifndef DB_VERSION_MAJOR
17408 # define DB_VERSION_MAJOR 1
17409 #endif
17410
17411 #ifndef NULL
17412 #define NULL ((void*)0)
17413 #endif
17414
17415 int main() {
17416
17417 #if DB_VERSION_MAJOR > 1
17418         {
17419                 char *version;
17420                 int major, minor, patch;
17421
17422                 version = db_version( &major, &minor, &patch );
17423
17424                 if( major != DB_VERSION_MAJOR ||
17425                         minor < DB_VERSION_MINOR )
17426                 {
17427                         printf("Berkeley DB version mismatch\n"
17428                                 "\texpected: %s\n\tgot: %s\n",
17429                                 DB_VERSION_STRING, version);
17430                         return 1;
17431                 }
17432         }
17433 #endif
17434
17435 #if DB_VERSION_MAJOR > 2
17436         db_env_create( NULL, 0 );
17437 #elif DB_VERSION_MAJOR > 1
17438         db_appexit( NULL );
17439 #else
17440         (void) dbopen( NULL, 0, 0, 0, NULL);
17441 #endif
17442
17443 ; return 0; }
17444 EOF
17445 if { (eval echo configure:17446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17446   rm -rf conftest*
17447   ol_cv_db_db2=yes
17448 else
17449   echo "configure: failed program was:" >&5
17450   cat conftest.$ac_ext >&5
17451   rm -rf conftest*
17452   ol_cv_db_db2=no
17453 fi
17454 rm -f conftest*
17455
17456         LIBS="$ol_LIBS"
17457
17458 fi
17459
17460 echo "$ac_t""$ol_cv_db_db2" 1>&6
17461
17462         if test $ol_cv_db_db2 = yes ; then
17463                 ol_cv_lib_db=-ldb2
17464         fi
17465 fi
17466
17467 if test $ol_cv_lib_db = no ; then
17468         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17469 echo "configure:17470: checking for Berkeley DB link (-ldb1)" >&5
17470 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17471   echo $ac_n "(cached) $ac_c" 1>&6
17472 else
17473   
17474         ol_DB_LIB=-ldb1
17475         ol_LIBS=$LIBS
17476         LIBS="$ol_DB_LIB $LIBS"
17477
17478         cat > conftest.$ac_ext <<EOF
17479 #line 17480 "configure"
17480 #include "confdefs.h"
17481
17482 #ifdef HAVE_DB_185_H
17483 # include <db_185.h>
17484 #else
17485 # include <db.h>
17486 #endif
17487
17488 #ifndef DB_VERSION_MAJOR
17489 # define DB_VERSION_MAJOR 1
17490 #endif
17491
17492 #ifndef NULL
17493 #define NULL ((void*)0)
17494 #endif
17495
17496 int main() {
17497
17498 #if DB_VERSION_MAJOR > 1
17499         {
17500                 char *version;
17501                 int major, minor, patch;
17502
17503                 version = db_version( &major, &minor, &patch );
17504
17505                 if( major != DB_VERSION_MAJOR ||
17506                         minor < DB_VERSION_MINOR )
17507                 {
17508                         printf("Berkeley DB version mismatch\n"
17509                                 "\texpected: %s\n\tgot: %s\n",
17510                                 DB_VERSION_STRING, version);
17511                         return 1;
17512                 }
17513         }
17514 #endif
17515
17516 #if DB_VERSION_MAJOR > 2
17517         db_env_create( NULL, 0 );
17518 #elif DB_VERSION_MAJOR > 1
17519         db_appexit( NULL );
17520 #else
17521         (void) dbopen( NULL, 0, 0, 0, NULL);
17522 #endif
17523
17524 ; return 0; }
17525 EOF
17526 if { (eval echo configure:17527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17527   rm -rf conftest*
17528   ol_cv_db_db1=yes
17529 else
17530   echo "configure: failed program was:" >&5
17531   cat conftest.$ac_ext >&5
17532   rm -rf conftest*
17533   ol_cv_db_db1=no
17534 fi
17535 rm -f conftest*
17536
17537         LIBS="$ol_LIBS"
17538
17539 fi
17540
17541 echo "$ac_t""$ol_cv_db_db1" 1>&6
17542
17543         if test $ol_cv_db_db1 = yes ; then
17544                 ol_cv_lib_db=-ldb1
17545         fi
17546 fi
17547
17548
17549                 if test "$ol_cv_lib_db" != no ; then
17550                         ol_cv_berkeley_db=yes
17551                 fi
17552         fi
17553 fi
17554
17555         else
17556                 ol_cv_berkeley_db=no
17557 for ac_hdr in db.h
17558 do
17559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17561 echo "configure:17562: checking for $ac_hdr" >&5
17562 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17563   echo $ac_n "(cached) $ac_c" 1>&6
17564 else
17565   cat > conftest.$ac_ext <<EOF
17566 #line 17567 "configure"
17567 #include "confdefs.h"
17568 #include <$ac_hdr>
17569 EOF
17570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17571 { (eval echo configure:17572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17573 if test -z "$ac_err"; then
17574   rm -rf conftest*
17575   eval "ac_cv_header_$ac_safe=yes"
17576 else
17577   echo "$ac_err" >&5
17578   echo "configure: failed program was:" >&5
17579   cat conftest.$ac_ext >&5
17580   rm -rf conftest*
17581   eval "ac_cv_header_$ac_safe=no"
17582 fi
17583 rm -f conftest*
17584 fi
17585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17586   echo "$ac_t""yes" 1>&6
17587     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17588   cat >> confdefs.h <<EOF
17589 #define $ac_tr_hdr 1
17590 EOF
17591  
17592 else
17593   echo "$ac_t""no" 1>&6
17594 fi
17595 done
17596
17597 if test $ac_cv_header_db_h = yes; then
17598         ol_cv_lib_db=no
17599 if test $ol_cv_lib_db = no ; then
17600         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17601 echo "configure:17602: checking for Berkeley DB link (default)" >&5
17602 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17603   echo $ac_n "(cached) $ac_c" 1>&6
17604 else
17605   
17606         ol_DB_LIB=
17607         ol_LIBS=$LIBS
17608         LIBS="$ol_DB_LIB $LIBS"
17609
17610         cat > conftest.$ac_ext <<EOF
17611 #line 17612 "configure"
17612 #include "confdefs.h"
17613
17614 #ifdef HAVE_DB_185_H
17615 # include <db_185.h>
17616 #else
17617 # include <db.h>
17618 #endif
17619
17620 #ifndef DB_VERSION_MAJOR
17621 # define DB_VERSION_MAJOR 1
17622 #endif
17623
17624 #ifndef NULL
17625 #define NULL ((void*)0)
17626 #endif
17627
17628 int main() {
17629
17630 #if DB_VERSION_MAJOR > 1
17631         {
17632                 char *version;
17633                 int major, minor, patch;
17634
17635                 version = db_version( &major, &minor, &patch );
17636
17637                 if( major != DB_VERSION_MAJOR ||
17638                         minor < DB_VERSION_MINOR )
17639                 {
17640                         printf("Berkeley DB version mismatch\n"
17641                                 "\texpected: %s\n\tgot: %s\n",
17642                                 DB_VERSION_STRING, version);
17643                         return 1;
17644                 }
17645         }
17646 #endif
17647
17648 #if DB_VERSION_MAJOR > 2
17649         db_env_create( NULL, 0 );
17650 #elif DB_VERSION_MAJOR > 1
17651         db_appexit( NULL );
17652 #else
17653         (void) dbopen( NULL, 0, 0, 0, NULL);
17654 #endif
17655
17656 ; return 0; }
17657 EOF
17658 if { (eval echo configure:17659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17659   rm -rf conftest*
17660   ol_cv_db_none=yes
17661 else
17662   echo "configure: failed program was:" >&5
17663   cat conftest.$ac_ext >&5
17664   rm -rf conftest*
17665   ol_cv_db_none=no
17666 fi
17667 rm -f conftest*
17668
17669         LIBS="$ol_LIBS"
17670
17671 fi
17672
17673 echo "$ac_t""$ol_cv_db_none" 1>&6
17674
17675         if test $ol_cv_db_none = yes ; then
17676                 ol_cv_lib_db=yes
17677         fi
17678 fi
17679
17680 if test $ol_cv_lib_db = no ; then
17681         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17682 echo "configure:17683: checking for Berkeley DB link (-ldb4)" >&5
17683 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17684   echo $ac_n "(cached) $ac_c" 1>&6
17685 else
17686   
17687         ol_DB_LIB=-ldb4
17688         ol_LIBS=$LIBS
17689         LIBS="$ol_DB_LIB $LIBS"
17690
17691         cat > conftest.$ac_ext <<EOF
17692 #line 17693 "configure"
17693 #include "confdefs.h"
17694
17695 #ifdef HAVE_DB_185_H
17696 # include <db_185.h>
17697 #else
17698 # include <db.h>
17699 #endif
17700
17701 #ifndef DB_VERSION_MAJOR
17702 # define DB_VERSION_MAJOR 1
17703 #endif
17704
17705 #ifndef NULL
17706 #define NULL ((void*)0)
17707 #endif
17708
17709 int main() {
17710
17711 #if DB_VERSION_MAJOR > 1
17712         {
17713                 char *version;
17714                 int major, minor, patch;
17715
17716                 version = db_version( &major, &minor, &patch );
17717
17718                 if( major != DB_VERSION_MAJOR ||
17719                         minor < DB_VERSION_MINOR )
17720                 {
17721                         printf("Berkeley DB version mismatch\n"
17722                                 "\texpected: %s\n\tgot: %s\n",
17723                                 DB_VERSION_STRING, version);
17724                         return 1;
17725                 }
17726         }
17727 #endif
17728
17729 #if DB_VERSION_MAJOR > 2
17730         db_env_create( NULL, 0 );
17731 #elif DB_VERSION_MAJOR > 1
17732         db_appexit( NULL );
17733 #else
17734         (void) dbopen( NULL, 0, 0, 0, NULL);
17735 #endif
17736
17737 ; return 0; }
17738 EOF
17739 if { (eval echo configure:17740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17740   rm -rf conftest*
17741   ol_cv_db_db4=yes
17742 else
17743   echo "configure: failed program was:" >&5
17744   cat conftest.$ac_ext >&5
17745   rm -rf conftest*
17746   ol_cv_db_db4=no
17747 fi
17748 rm -f conftest*
17749
17750         LIBS="$ol_LIBS"
17751
17752 fi
17753
17754 echo "$ac_t""$ol_cv_db_db4" 1>&6
17755
17756         if test $ol_cv_db_db4 = yes ; then
17757                 ol_cv_lib_db=-ldb4
17758         fi
17759 fi
17760
17761 if test $ol_cv_lib_db = no ; then
17762         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17763 echo "configure:17764: checking for Berkeley DB link (-ldb)" >&5
17764 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17765   echo $ac_n "(cached) $ac_c" 1>&6
17766 else
17767   
17768         ol_DB_LIB=-ldb
17769         ol_LIBS=$LIBS
17770         LIBS="$ol_DB_LIB $LIBS"
17771
17772         cat > conftest.$ac_ext <<EOF
17773 #line 17774 "configure"
17774 #include "confdefs.h"
17775
17776 #ifdef HAVE_DB_185_H
17777 # include <db_185.h>
17778 #else
17779 # include <db.h>
17780 #endif
17781
17782 #ifndef DB_VERSION_MAJOR
17783 # define DB_VERSION_MAJOR 1
17784 #endif
17785
17786 #ifndef NULL
17787 #define NULL ((void*)0)
17788 #endif
17789
17790 int main() {
17791
17792 #if DB_VERSION_MAJOR > 1
17793         {
17794                 char *version;
17795                 int major, minor, patch;
17796
17797                 version = db_version( &major, &minor, &patch );
17798
17799                 if( major != DB_VERSION_MAJOR ||
17800                         minor < DB_VERSION_MINOR )
17801                 {
17802                         printf("Berkeley DB version mismatch\n"
17803                                 "\texpected: %s\n\tgot: %s\n",
17804                                 DB_VERSION_STRING, version);
17805                         return 1;
17806                 }
17807         }
17808 #endif
17809
17810 #if DB_VERSION_MAJOR > 2
17811         db_env_create( NULL, 0 );
17812 #elif DB_VERSION_MAJOR > 1
17813         db_appexit( NULL );
17814 #else
17815         (void) dbopen( NULL, 0, 0, 0, NULL);
17816 #endif
17817
17818 ; return 0; }
17819 EOF
17820 if { (eval echo configure:17821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17821   rm -rf conftest*
17822   ol_cv_db_db=yes
17823 else
17824   echo "configure: failed program was:" >&5
17825   cat conftest.$ac_ext >&5
17826   rm -rf conftest*
17827   ol_cv_db_db=no
17828 fi
17829 rm -f conftest*
17830
17831         LIBS="$ol_LIBS"
17832
17833 fi
17834
17835 echo "$ac_t""$ol_cv_db_db" 1>&6
17836
17837         if test $ol_cv_db_db = yes ; then
17838                 ol_cv_lib_db=-ldb
17839         fi
17840 fi
17841
17842 if test $ol_cv_lib_db = no ; then
17843         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17844 echo "configure:17845: checking for Berkeley DB link (-ldb3)" >&5
17845 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17846   echo $ac_n "(cached) $ac_c" 1>&6
17847 else
17848   
17849         ol_DB_LIB=-ldb3
17850         ol_LIBS=$LIBS
17851         LIBS="$ol_DB_LIB $LIBS"
17852
17853         cat > conftest.$ac_ext <<EOF
17854 #line 17855 "configure"
17855 #include "confdefs.h"
17856
17857 #ifdef HAVE_DB_185_H
17858 # include <db_185.h>
17859 #else
17860 # include <db.h>
17861 #endif
17862
17863 #ifndef DB_VERSION_MAJOR
17864 # define DB_VERSION_MAJOR 1
17865 #endif
17866
17867 #ifndef NULL
17868 #define NULL ((void*)0)
17869 #endif
17870
17871 int main() {
17872
17873 #if DB_VERSION_MAJOR > 1
17874         {
17875                 char *version;
17876                 int major, minor, patch;
17877
17878                 version = db_version( &major, &minor, &patch );
17879
17880                 if( major != DB_VERSION_MAJOR ||
17881                         minor < DB_VERSION_MINOR )
17882                 {
17883                         printf("Berkeley DB version mismatch\n"
17884                                 "\texpected: %s\n\tgot: %s\n",
17885                                 DB_VERSION_STRING, version);
17886                         return 1;
17887                 }
17888         }
17889 #endif
17890
17891 #if DB_VERSION_MAJOR > 2
17892         db_env_create( NULL, 0 );
17893 #elif DB_VERSION_MAJOR > 1
17894         db_appexit( NULL );
17895 #else
17896         (void) dbopen( NULL, 0, 0, 0, NULL);
17897 #endif
17898
17899 ; return 0; }
17900 EOF
17901 if { (eval echo configure:17902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17902   rm -rf conftest*
17903   ol_cv_db_db3=yes
17904 else
17905   echo "configure: failed program was:" >&5
17906   cat conftest.$ac_ext >&5
17907   rm -rf conftest*
17908   ol_cv_db_db3=no
17909 fi
17910 rm -f conftest*
17911
17912         LIBS="$ol_LIBS"
17913
17914 fi
17915
17916 echo "$ac_t""$ol_cv_db_db3" 1>&6
17917
17918         if test $ol_cv_db_db3 = yes ; then
17919                 ol_cv_lib_db=-ldb3
17920         fi
17921 fi
17922
17923 if test $ol_cv_lib_db = no ; then
17924         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17925 echo "configure:17926: checking for Berkeley DB link (-ldb2)" >&5
17926 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17927   echo $ac_n "(cached) $ac_c" 1>&6
17928 else
17929   
17930         ol_DB_LIB=-ldb2
17931         ol_LIBS=$LIBS
17932         LIBS="$ol_DB_LIB $LIBS"
17933
17934         cat > conftest.$ac_ext <<EOF
17935 #line 17936 "configure"
17936 #include "confdefs.h"
17937
17938 #ifdef HAVE_DB_185_H
17939 # include <db_185.h>
17940 #else
17941 # include <db.h>
17942 #endif
17943
17944 #ifndef DB_VERSION_MAJOR
17945 # define DB_VERSION_MAJOR 1
17946 #endif
17947
17948 #ifndef NULL
17949 #define NULL ((void*)0)
17950 #endif
17951
17952 int main() {
17953
17954 #if DB_VERSION_MAJOR > 1
17955         {
17956                 char *version;
17957                 int major, minor, patch;
17958
17959                 version = db_version( &major, &minor, &patch );
17960
17961                 if( major != DB_VERSION_MAJOR ||
17962                         minor < DB_VERSION_MINOR )
17963                 {
17964                         printf("Berkeley DB version mismatch\n"
17965                                 "\texpected: %s\n\tgot: %s\n",
17966                                 DB_VERSION_STRING, version);
17967                         return 1;
17968                 }
17969         }
17970 #endif
17971
17972 #if DB_VERSION_MAJOR > 2
17973         db_env_create( NULL, 0 );
17974 #elif DB_VERSION_MAJOR > 1
17975         db_appexit( NULL );
17976 #else
17977         (void) dbopen( NULL, 0, 0, 0, NULL);
17978 #endif
17979
17980 ; return 0; }
17981 EOF
17982 if { (eval echo configure:17983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17983   rm -rf conftest*
17984   ol_cv_db_db2=yes
17985 else
17986   echo "configure: failed program was:" >&5
17987   cat conftest.$ac_ext >&5
17988   rm -rf conftest*
17989   ol_cv_db_db2=no
17990 fi
17991 rm -f conftest*
17992
17993         LIBS="$ol_LIBS"
17994
17995 fi
17996
17997 echo "$ac_t""$ol_cv_db_db2" 1>&6
17998
17999         if test $ol_cv_db_db2 = yes ; then
18000                 ol_cv_lib_db=-ldb2
18001         fi
18002 fi
18003
18004 if test $ol_cv_lib_db = no ; then
18005         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18006 echo "configure:18007: checking for Berkeley DB link (-ldb1)" >&5
18007 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18008   echo $ac_n "(cached) $ac_c" 1>&6
18009 else
18010   
18011         ol_DB_LIB=-ldb1
18012         ol_LIBS=$LIBS
18013         LIBS="$ol_DB_LIB $LIBS"
18014
18015         cat > conftest.$ac_ext <<EOF
18016 #line 18017 "configure"
18017 #include "confdefs.h"
18018
18019 #ifdef HAVE_DB_185_H
18020 # include <db_185.h>
18021 #else
18022 # include <db.h>
18023 #endif
18024
18025 #ifndef DB_VERSION_MAJOR
18026 # define DB_VERSION_MAJOR 1
18027 #endif
18028
18029 #ifndef NULL
18030 #define NULL ((void*)0)
18031 #endif
18032
18033 int main() {
18034
18035 #if DB_VERSION_MAJOR > 1
18036         {
18037                 char *version;
18038                 int major, minor, patch;
18039
18040                 version = db_version( &major, &minor, &patch );
18041
18042                 if( major != DB_VERSION_MAJOR ||
18043                         minor < DB_VERSION_MINOR )
18044                 {
18045                         printf("Berkeley DB version mismatch\n"
18046                                 "\texpected: %s\n\tgot: %s\n",
18047                                 DB_VERSION_STRING, version);
18048                         return 1;
18049                 }
18050         }
18051 #endif
18052
18053 #if DB_VERSION_MAJOR > 2
18054         db_env_create( NULL, 0 );
18055 #elif DB_VERSION_MAJOR > 1
18056         db_appexit( NULL );
18057 #else
18058         (void) dbopen( NULL, 0, 0, 0, NULL);
18059 #endif
18060
18061 ; return 0; }
18062 EOF
18063 if { (eval echo configure:18064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18064   rm -rf conftest*
18065   ol_cv_db_db1=yes
18066 else
18067   echo "configure: failed program was:" >&5
18068   cat conftest.$ac_ext >&5
18069   rm -rf conftest*
18070   ol_cv_db_db1=no
18071 fi
18072 rm -f conftest*
18073
18074         LIBS="$ol_LIBS"
18075
18076 fi
18077
18078 echo "$ac_t""$ol_cv_db_db1" 1>&6
18079
18080         if test $ol_cv_db_db1 = yes ; then
18081                 ol_cv_lib_db=-ldb1
18082         fi
18083 fi
18084
18085
18086         if test "$ol_cv_lib_db" != no ; then
18087                 ol_cv_berkeley_db=yes
18088                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18089 echo "configure:18090: checking for Berkeley DB thread support" >&5
18090 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18091   echo $ac_n "(cached) $ac_c" 1>&6
18092 else
18093   
18094         ol_LIBS="$LIBS"
18095         if test $ol_cv_lib_db != yes ; then
18096                 LIBS="$ol_cv_lib_db"
18097         fi
18098
18099         if test "$cross_compiling" = yes; then
18100   ol_cv_berkeley_db_thread=cross
18101 else
18102   cat > conftest.$ac_ext <<EOF
18103 #line 18104 "configure"
18104 #include "confdefs.h"
18105
18106 #ifdef HAVE_DB_185_H
18107         choke me;
18108 #else
18109 #include <db.h>
18110 #endif
18111 #ifndef NULL
18112 #define NULL ((void *)0)
18113 #endif
18114 main()
18115 {
18116         int rc;
18117         u_int32_t flags = DB_CREATE |
18118 #ifdef DB_PRIVATE
18119                 DB_PRIVATE |
18120 #endif
18121                 DB_THREAD;
18122
18123 #if DB_VERSION_MAJOR > 2
18124         DB_ENV *env = NULL;
18125
18126         rc = db_env_create( &env, 0 );
18127
18128         flags |= DB_INIT_MPOOL;
18129 #ifdef DB_MPOOL_PRIVATE
18130         flags |= DB_MPOOL_PRIVATE;
18131 #endif
18132
18133         if( rc ) {
18134                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18135                 return rc;
18136         }
18137
18138 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18139         rc = env->open( env, NULL, flags, 0 );
18140 #else
18141         rc = env->open( env, NULL, NULL, flags, 0 );
18142 #endif
18143
18144         if ( rc == 0 ) {
18145                 rc = env->close( env, 0 );
18146         }
18147
18148         if( rc ) {
18149                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18150                 return rc;
18151         }
18152
18153 #else
18154         DB_ENV env;
18155         memset( &env, '\0', sizeof(env) );
18156
18157         rc = db_appinit( NULL, NULL, &env, flags );
18158
18159         if( rc == 0 ) {
18160                 db_appexit( &env );
18161         }
18162
18163         unlink("__db_mpool.share");
18164         unlink("__db_lock.share");
18165 #endif
18166
18167         return rc;
18168 }
18169 EOF
18170 if { (eval echo configure:18171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18171 then
18172   ol_cv_berkeley_db_thread=yes
18173 else
18174   echo "configure: failed program was:" >&5
18175   cat conftest.$ac_ext >&5
18176   rm -fr conftest*
18177   ol_cv_berkeley_db_thread=no
18178 fi
18179 rm -fr conftest*
18180 fi
18181
18182
18183         LIBS="$ol_LIBS"
18184
18185         if test $ol_cv_berkeley_db_thread != no ; then
18186                 cat >> confdefs.h <<\EOF
18187 #define HAVE_BERKELEY_DB_THREAD 1
18188 EOF
18189
18190         fi
18191
18192 fi
18193
18194 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18195         fi
18196 fi
18197
18198         fi
18199
18200         if test $ol_cv_berkeley_db != no ; then
18201                 cat >> confdefs.h <<\EOF
18202 #define HAVE_BERKELEY_DB 1
18203 EOF
18204
18205
18206                 ol_link_ldbm=berkeley
18207                 ol_with_ldbm_api=berkeley
18208
18209                 if test $ol_with_ldbm_type = hash ; then
18210                         cat >> confdefs.h <<\EOF
18211 #define LDBM_USE_DBHASH 1
18212 EOF
18213
18214                 else
18215                         cat >> confdefs.h <<\EOF
18216 #define LDBM_USE_DBBTREE 1
18217 EOF
18218
18219                 fi
18220
18221                                                 if test $ol_cv_lib_db != yes ; then
18222                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18223                 fi
18224         fi
18225 fi
18226
18227 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18228         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18229 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18230         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18231 echo "configure:18232: checking Berkeley DB version for BDB backend" >&5
18232 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18233   echo $ac_n "(cached) $ac_c" 1>&6
18234 else
18235   
18236         cat > conftest.$ac_ext <<EOF
18237 #line 18238 "configure"
18238 #include "confdefs.h"
18239
18240 #include <db.h>
18241
18242  /* this check could be improved */
18243 #ifndef DB_VERSION_MAJOR
18244 #       define DB_VERSION_MAJOR 1
18245 #endif
18246
18247 /* require 4.0 or later */
18248 #if DB_VERSION_MAJOR >= 4 
18249         __db_version_compat
18250 #endif
18251         
18252 EOF
18253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18254   egrep "__db_version_compat" >/dev/null 2>&1; then
18255   rm -rf conftest*
18256   ol_cv_bdb_compat=yes
18257 else
18258   rm -rf conftest*
18259   ol_cv_bdb_compat=no
18260 fi
18261 rm -f conftest*
18262
18263 fi
18264
18265 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18266
18267
18268         if test $ol_cv_bdb_compat = yes ; then
18269                 ol_enable_bdb=yes
18270         elif test $ol_enable_bdb = yes ; then
18271                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18272         else
18273                 ol_enable_bdb=no
18274         fi
18275 fi
18276
18277 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18278         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18279         ol_with_ldbm_api=none
18280 fi
18281
18282 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18283         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18284 echo "configure:18285: checking for MDBM library" >&5
18285 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18286   echo $ac_n "(cached) $ac_c" 1>&6
18287 else
18288         ol_LIBS="$LIBS"
18289         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18290 echo "configure:18291: checking for mdbm_set_chain" >&5
18291 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18292   echo $ac_n "(cached) $ac_c" 1>&6
18293 else
18294   cat > conftest.$ac_ext <<EOF
18295 #line 18296 "configure"
18296 #include "confdefs.h"
18297 /* System header to define __stub macros and hopefully few prototypes,
18298     which can conflict with char mdbm_set_chain(); below.  */
18299 #include <assert.h>
18300 /* Override any gcc2 internal prototype to avoid an error.  */
18301 /* We use char because int might match the return type of a gcc2
18302     builtin and then its argument prototype would still apply.  */
18303 char mdbm_set_chain();
18304 char (*f)();
18305
18306 int main() {
18307
18308 /* The GNU C library defines this for functions which it implements
18309     to always fail with ENOSYS.  Some functions are actually named
18310     something starting with __ and the normal name is an alias.  */
18311 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18312 choke me
18313 #else
18314 f = mdbm_set_chain;
18315 #endif
18316
18317 ; return 0; }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18320   rm -rf conftest*
18321   eval "ac_cv_func_mdbm_set_chain=yes"
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -rf conftest*
18326   eval "ac_cv_func_mdbm_set_chain=no"
18327 fi
18328 rm -f conftest*
18329 fi
18330
18331 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18332   echo "$ac_t""yes" 1>&6
18333   ol_cv_lib_mdbm=yes
18334 else
18335   echo "$ac_t""no" 1>&6
18336
18337                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18338 echo "configure:18339: checking for mdbm_set_chain in -lmdbm" >&5
18339 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18341   echo $ac_n "(cached) $ac_c" 1>&6
18342 else
18343   ac_save_LIBS="$LIBS"
18344 LIBS="-lmdbm  $LIBS"
18345 cat > conftest.$ac_ext <<EOF
18346 #line 18347 "configure"
18347 #include "confdefs.h"
18348 /* Override any gcc2 internal prototype to avoid an error.  */
18349 /* We use char because int might match the return type of a gcc2
18350     builtin and then its argument prototype would still apply.  */
18351 char mdbm_set_chain();
18352
18353 int main() {
18354 mdbm_set_chain()
18355 ; return 0; }
18356 EOF
18357 if { (eval echo configure:18358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18358   rm -rf conftest*
18359   eval "ac_cv_lib_$ac_lib_var=yes"
18360 else
18361   echo "configure: failed program was:" >&5
18362   cat conftest.$ac_ext >&5
18363   rm -rf conftest*
18364   eval "ac_cv_lib_$ac_lib_var=no"
18365 fi
18366 rm -f conftest*
18367 LIBS="$ac_save_LIBS"
18368
18369 fi
18370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18371   echo "$ac_t""yes" 1>&6
18372   ol_cv_lib_mdbm=-lmdbm
18373 else
18374   echo "$ac_t""no" 1>&6
18375 ol_cv_lib_mdbm=no
18376 fi
18377
18378         
18379 fi
18380
18381         LIBS="$ol_LIBS"
18382
18383 fi
18384
18385 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18386
18387
18388  for ac_hdr in mdbm.h
18389 do
18390 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18391 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18392 echo "configure:18393: checking for $ac_hdr" >&5
18393 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18394   echo $ac_n "(cached) $ac_c" 1>&6
18395 else
18396   cat > conftest.$ac_ext <<EOF
18397 #line 18398 "configure"
18398 #include "confdefs.h"
18399 #include <$ac_hdr>
18400 EOF
18401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18402 { (eval echo configure:18403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18404 if test -z "$ac_err"; then
18405   rm -rf conftest*
18406   eval "ac_cv_header_$ac_safe=yes"
18407 else
18408   echo "$ac_err" >&5
18409   echo "configure: failed program was:" >&5
18410   cat conftest.$ac_ext >&5
18411   rm -rf conftest*
18412   eval "ac_cv_header_$ac_safe=no"
18413 fi
18414 rm -f conftest*
18415 fi
18416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18417   echo "$ac_t""yes" 1>&6
18418     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18419   cat >> confdefs.h <<EOF
18420 #define $ac_tr_hdr 1
18421 EOF
18422  
18423 else
18424   echo "$ac_t""no" 1>&6
18425 fi
18426 done
18427
18428  echo $ac_n "checking for db""... $ac_c" 1>&6
18429 echo "configure:18430: checking for db" >&5
18430 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18431   echo $ac_n "(cached) $ac_c" 1>&6
18432 else
18433   
18434         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18435                 ol_cv_mdbm=no
18436         else
18437                 ol_cv_mdbm=yes
18438         fi
18439
18440 fi
18441
18442 echo "$ac_t""$ol_cv_mdbm" 1>&6
18443  if test $ol_cv_mdbm = yes ; then
18444         cat >> confdefs.h <<\EOF
18445 #define HAVE_MDBM 1
18446 EOF
18447
18448  fi
18449
18450
18451         if test $ol_cv_mdbm = yes ; then
18452                 ol_link_ldbm=mdbm
18453                 ol_with_ldbm_api=mdbm
18454                 if test $ol_cv_lib_mdbm != yes ; then
18455                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18456                 fi
18457         fi
18458 fi
18459
18460 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18461         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18462 echo "configure:18463: checking for GDBM library" >&5
18463 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18464   echo $ac_n "(cached) $ac_c" 1>&6
18465 else
18466         ol_LIBS="$LIBS"
18467         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18468 echo "configure:18469: checking for gdbm_open" >&5
18469 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18470   echo $ac_n "(cached) $ac_c" 1>&6
18471 else
18472   cat > conftest.$ac_ext <<EOF
18473 #line 18474 "configure"
18474 #include "confdefs.h"
18475 /* System header to define __stub macros and hopefully few prototypes,
18476     which can conflict with char gdbm_open(); below.  */
18477 #include <assert.h>
18478 /* Override any gcc2 internal prototype to avoid an error.  */
18479 /* We use char because int might match the return type of a gcc2
18480     builtin and then its argument prototype would still apply.  */
18481 char gdbm_open();
18482 char (*f)();
18483
18484 int main() {
18485
18486 /* The GNU C library defines this for functions which it implements
18487     to always fail with ENOSYS.  Some functions are actually named
18488     something starting with __ and the normal name is an alias.  */
18489 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18490 choke me
18491 #else
18492 f = gdbm_open;
18493 #endif
18494
18495 ; return 0; }
18496 EOF
18497 if { (eval echo configure:18498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18498   rm -rf conftest*
18499   eval "ac_cv_func_gdbm_open=yes"
18500 else
18501   echo "configure: failed program was:" >&5
18502   cat conftest.$ac_ext >&5
18503   rm -rf conftest*
18504   eval "ac_cv_func_gdbm_open=no"
18505 fi
18506 rm -f conftest*
18507 fi
18508
18509 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18510   echo "$ac_t""yes" 1>&6
18511   ol_cv_lib_gdbm=yes
18512 else
18513   echo "$ac_t""no" 1>&6
18514
18515                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18516 echo "configure:18517: checking for gdbm_open in -lgdbm" >&5
18517 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18519   echo $ac_n "(cached) $ac_c" 1>&6
18520 else
18521   ac_save_LIBS="$LIBS"
18522 LIBS="-lgdbm  $LIBS"
18523 cat > conftest.$ac_ext <<EOF
18524 #line 18525 "configure"
18525 #include "confdefs.h"
18526 /* Override any gcc2 internal prototype to avoid an error.  */
18527 /* We use char because int might match the return type of a gcc2
18528     builtin and then its argument prototype would still apply.  */
18529 char gdbm_open();
18530
18531 int main() {
18532 gdbm_open()
18533 ; return 0; }
18534 EOF
18535 if { (eval echo configure:18536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18536   rm -rf conftest*
18537   eval "ac_cv_lib_$ac_lib_var=yes"
18538 else
18539   echo "configure: failed program was:" >&5
18540   cat conftest.$ac_ext >&5
18541   rm -rf conftest*
18542   eval "ac_cv_lib_$ac_lib_var=no"
18543 fi
18544 rm -f conftest*
18545 LIBS="$ac_save_LIBS"
18546
18547 fi
18548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18549   echo "$ac_t""yes" 1>&6
18550   ol_cv_lib_gdbm=-lgdbm
18551 else
18552   echo "$ac_t""no" 1>&6
18553 ol_cv_lib_gdbm=no
18554 fi
18555
18556         
18557 fi
18558
18559         LIBS="$ol_LIBS"
18560
18561 fi
18562
18563 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18564
18565
18566  for ac_hdr in gdbm.h
18567 do
18568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18570 echo "configure:18571: checking for $ac_hdr" >&5
18571 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18572   echo $ac_n "(cached) $ac_c" 1>&6
18573 else
18574   cat > conftest.$ac_ext <<EOF
18575 #line 18576 "configure"
18576 #include "confdefs.h"
18577 #include <$ac_hdr>
18578 EOF
18579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18580 { (eval echo configure:18581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18582 if test -z "$ac_err"; then
18583   rm -rf conftest*
18584   eval "ac_cv_header_$ac_safe=yes"
18585 else
18586   echo "$ac_err" >&5
18587   echo "configure: failed program was:" >&5
18588   cat conftest.$ac_ext >&5
18589   rm -rf conftest*
18590   eval "ac_cv_header_$ac_safe=no"
18591 fi
18592 rm -f conftest*
18593 fi
18594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18595   echo "$ac_t""yes" 1>&6
18596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18597   cat >> confdefs.h <<EOF
18598 #define $ac_tr_hdr 1
18599 EOF
18600  
18601 else
18602   echo "$ac_t""no" 1>&6
18603 fi
18604 done
18605
18606  echo $ac_n "checking for db""... $ac_c" 1>&6
18607 echo "configure:18608: checking for db" >&5
18608 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18609   echo $ac_n "(cached) $ac_c" 1>&6
18610 else
18611   
18612         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18613                 ol_cv_gdbm=no
18614         else
18615                 ol_cv_gdbm=yes
18616         fi
18617
18618 fi
18619
18620 echo "$ac_t""$ol_cv_gdbm" 1>&6
18621  if test $ol_cv_gdbm = yes ; then
18622         cat >> confdefs.h <<\EOF
18623 #define HAVE_GDBM 1
18624 EOF
18625
18626  fi
18627
18628
18629         if test $ol_cv_gdbm = yes ; then
18630                 ol_link_ldbm=gdbm
18631                 ol_with_ldbm_api=gdbm
18632
18633                 if test $ol_cv_lib_gdbm != yes ; then
18634                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18635                 fi
18636         fi
18637 fi
18638
18639 if test $ol_with_ldbm_api = ndbm ; then
18640         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18641 echo "configure:18642: checking for NDBM library" >&5
18642 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18643   echo $ac_n "(cached) $ac_c" 1>&6
18644 else
18645         ol_LIBS="$LIBS"
18646         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18647 echo "configure:18648: checking for dbm_open" >&5
18648 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18649   echo $ac_n "(cached) $ac_c" 1>&6
18650 else
18651   cat > conftest.$ac_ext <<EOF
18652 #line 18653 "configure"
18653 #include "confdefs.h"
18654 /* System header to define __stub macros and hopefully few prototypes,
18655     which can conflict with char dbm_open(); below.  */
18656 #include <assert.h>
18657 /* Override any gcc2 internal prototype to avoid an error.  */
18658 /* We use char because int might match the return type of a gcc2
18659     builtin and then its argument prototype would still apply.  */
18660 char dbm_open();
18661 char (*f)();
18662
18663 int main() {
18664
18665 /* The GNU C library defines this for functions which it implements
18666     to always fail with ENOSYS.  Some functions are actually named
18667     something starting with __ and the normal name is an alias.  */
18668 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18669 choke me
18670 #else
18671 f = dbm_open;
18672 #endif
18673
18674 ; return 0; }
18675 EOF
18676 if { (eval echo configure:18677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18677   rm -rf conftest*
18678   eval "ac_cv_func_dbm_open=yes"
18679 else
18680   echo "configure: failed program was:" >&5
18681   cat conftest.$ac_ext >&5
18682   rm -rf conftest*
18683   eval "ac_cv_func_dbm_open=no"
18684 fi
18685 rm -f conftest*
18686 fi
18687
18688 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18689   echo "$ac_t""yes" 1>&6
18690   ol_cv_lib_ndbm=yes
18691 else
18692   echo "$ac_t""no" 1>&6
18693
18694                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18695 echo "configure:18696: checking for dbm_open in -lndbm" >&5
18696 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18698   echo $ac_n "(cached) $ac_c" 1>&6
18699 else
18700   ac_save_LIBS="$LIBS"
18701 LIBS="-lndbm  $LIBS"
18702 cat > conftest.$ac_ext <<EOF
18703 #line 18704 "configure"
18704 #include "confdefs.h"
18705 /* Override any gcc2 internal prototype to avoid an error.  */
18706 /* We use char because int might match the return type of a gcc2
18707     builtin and then its argument prototype would still apply.  */
18708 char dbm_open();
18709
18710 int main() {
18711 dbm_open()
18712 ; return 0; }
18713 EOF
18714 if { (eval echo configure:18715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18715   rm -rf conftest*
18716   eval "ac_cv_lib_$ac_lib_var=yes"
18717 else
18718   echo "configure: failed program was:" >&5
18719   cat conftest.$ac_ext >&5
18720   rm -rf conftest*
18721   eval "ac_cv_lib_$ac_lib_var=no"
18722 fi
18723 rm -f conftest*
18724 LIBS="$ac_save_LIBS"
18725
18726 fi
18727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18728   echo "$ac_t""yes" 1>&6
18729   ol_cv_lib_ndbm=-lndbm
18730 else
18731   echo "$ac_t""no" 1>&6
18732
18733                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18734 echo "configure:18735: checking for dbm_open in -ldbm" >&5
18735 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18736 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18737   echo $ac_n "(cached) $ac_c" 1>&6
18738 else
18739   ac_save_LIBS="$LIBS"
18740 LIBS="-ldbm  $LIBS"
18741 cat > conftest.$ac_ext <<EOF
18742 #line 18743 "configure"
18743 #include "confdefs.h"
18744 /* Override any gcc2 internal prototype to avoid an error.  */
18745 /* We use char because int might match the return type of a gcc2
18746     builtin and then its argument prototype would still apply.  */
18747 char dbm_open();
18748
18749 int main() {
18750 dbm_open()
18751 ; return 0; }
18752 EOF
18753 if { (eval echo configure:18754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18754   rm -rf conftest*
18755   eval "ac_cv_lib_$ac_lib_var=yes"
18756 else
18757   echo "configure: failed program was:" >&5
18758   cat conftest.$ac_ext >&5
18759   rm -rf conftest*
18760   eval "ac_cv_lib_$ac_lib_var=no"
18761 fi
18762 rm -f conftest*
18763 LIBS="$ac_save_LIBS"
18764
18765 fi
18766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18767   echo "$ac_t""yes" 1>&6
18768   ol_cv_lib_ndbm=-ldbm
18769 else
18770   echo "$ac_t""no" 1>&6
18771 ol_cv_lib_ndbm=no
18772 fi
18773                 
18774 fi
18775
18776         
18777 fi
18778
18779         LIBS="$ol_LIBS"
18780
18781 fi
18782
18783 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18784
18785
18786  for ac_hdr in ndbm.h
18787 do
18788 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18789 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18790 echo "configure:18791: checking for $ac_hdr" >&5
18791 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18792   echo $ac_n "(cached) $ac_c" 1>&6
18793 else
18794   cat > conftest.$ac_ext <<EOF
18795 #line 18796 "configure"
18796 #include "confdefs.h"
18797 #include <$ac_hdr>
18798 EOF
18799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18800 { (eval echo configure:18801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18802 if test -z "$ac_err"; then
18803   rm -rf conftest*
18804   eval "ac_cv_header_$ac_safe=yes"
18805 else
18806   echo "$ac_err" >&5
18807   echo "configure: failed program was:" >&5
18808   cat conftest.$ac_ext >&5
18809   rm -rf conftest*
18810   eval "ac_cv_header_$ac_safe=no"
18811 fi
18812 rm -f conftest*
18813 fi
18814 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18815   echo "$ac_t""yes" 1>&6
18816     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18817   cat >> confdefs.h <<EOF
18818 #define $ac_tr_hdr 1
18819 EOF
18820  
18821 else
18822   echo "$ac_t""no" 1>&6
18823 fi
18824 done
18825
18826  echo $ac_n "checking for db""... $ac_c" 1>&6
18827 echo "configure:18828: checking for db" >&5
18828 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18829   echo $ac_n "(cached) $ac_c" 1>&6
18830 else
18831   
18832         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18833                 ol_cv_ndbm=no
18834         else
18835                 ol_cv_ndbm=yes
18836         fi
18837
18838 fi
18839
18840 echo "$ac_t""$ol_cv_ndbm" 1>&6
18841  if test $ol_cv_ndbm = yes ; then
18842         cat >> confdefs.h <<\EOF
18843 #define HAVE_NDBM 1
18844 EOF
18845
18846  fi
18847
18848
18849         if test $ol_cv_ndbm = yes ; then
18850                 ol_link_ldbm=ndbm
18851                 ol_with_ldbm_api=ndbm
18852
18853                 if test $ol_cv_lib_ndbm != yes ; then
18854                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18855                 fi
18856         fi
18857 fi
18858
18859 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18860         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18861         if test $ol_enable_ldbm = yes ; then
18862                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18863         fi
18864
18865         echo "configure: warning: disabling LDBM" 1>&2
18866         ol_enable_ldbm=no
18867 fi
18868
18869 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18870         BUILD_LIBS_DYNAMIC=shared
18871         cat >> confdefs.h <<\EOF
18872 #define LDAP_LIBS_DYNAMIC 1
18873 EOF
18874
18875 else
18876         BUILD_LIBS_DYNAMIC=static
18877 fi
18878
18879 if test $ol_enable_wrappers != no ; then
18880         for ac_hdr in tcpd.h
18881 do
18882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18884 echo "configure:18885: checking for $ac_hdr" >&5
18885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18886   echo $ac_n "(cached) $ac_c" 1>&6
18887 else
18888   cat > conftest.$ac_ext <<EOF
18889 #line 18890 "configure"
18890 #include "confdefs.h"
18891 #include <$ac_hdr>
18892 EOF
18893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18894 { (eval echo configure:18895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18896 if test -z "$ac_err"; then
18897   rm -rf conftest*
18898   eval "ac_cv_header_$ac_safe=yes"
18899 else
18900   echo "$ac_err" >&5
18901   echo "configure: failed program was:" >&5
18902   cat conftest.$ac_ext >&5
18903   rm -rf conftest*
18904   eval "ac_cv_header_$ac_safe=no"
18905 fi
18906 rm -f conftest*
18907 fi
18908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18909   echo "$ac_t""yes" 1>&6
18910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18911   cat >> confdefs.h <<EOF
18912 #define $ac_tr_hdr 1
18913 EOF
18914  
18915                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18916 echo "configure:18917: checking for TCP wrappers library" >&5
18917                 save_LIBS="$LIBS"
18918                 LIBS="$LIBS -lwrap"
18919                 cat > conftest.$ac_ext <<EOF
18920 #line 18921 "configure"
18921 #include "confdefs.h"
18922
18923 #include <tcpd.h>
18924 int allow_severity = 0;
18925 int deny_severity  = 0;
18926
18927 struct request_info *req;
18928                 
18929 int main() {
18930
18931 hosts_access(req)
18932                 
18933 ; return 0; }
18934 EOF
18935 if { (eval echo configure:18936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18936   rm -rf conftest*
18937   echo "$ac_t""-lwrap" 1>&6
18938                 have_wrappers=yes
18939                 LIBS="$save_LIBS"
18940 else
18941   echo "configure: failed program was:" >&5
18942   cat conftest.$ac_ext >&5
18943   rm -rf conftest*
18944   
18945                                 LIBS="$LIBS -lnsl"
18946                 cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949
18950 #include <tcpd.h>
18951 int allow_severity = 0;
18952 int deny_severity  = 0;
18953
18954 struct request_info *req;
18955                 
18956 int main() {
18957
18958 hosts_access(req)
18959                 
18960 ; return 0; }
18961 EOF
18962 if { (eval echo configure:18963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18963   rm -rf conftest*
18964   echo "$ac_t""-lwrap -lnsl" 1>&6
18965                 have_wrappers=yes
18966                 LIBS="$save_LIBS -lnsl"
18967 else
18968   echo "configure: failed program was:" >&5
18969   cat conftest.$ac_ext >&5
18970   rm -rf conftest*
18971   
18972                 echo "$ac_t""no" 1>&6
18973                 have_wrappers=no
18974                 LIBS=$save_LIBS
18975 fi
18976 rm -f conftest*
18977 fi
18978 rm -f conftest*
18979 else
18980   echo "$ac_t""no" 1>&6
18981 have_wrappers=no
18982 fi
18983 done
18984
18985
18986         if test $have_wrappers = yes ; then
18987                 cat >> confdefs.h <<\EOF
18988 #define HAVE_TCPD 1
18989 EOF
18990
18991                 WRAP_LIBS="-lwrap"
18992         elif test $ol_enable_wrappers = yes ; then
18993                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18994         else
18995                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18996                 WRAP_LIBS=""
18997         fi
18998 fi
18999
19000 if test $ol_enable_syslog != no ; then
19001         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19002 echo "configure:19003: checking for openlog" >&5
19003 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19004   echo $ac_n "(cached) $ac_c" 1>&6
19005 else
19006   cat > conftest.$ac_ext <<EOF
19007 #line 19008 "configure"
19008 #include "confdefs.h"
19009 /* System header to define __stub macros and hopefully few prototypes,
19010     which can conflict with char openlog(); below.  */
19011 #include <assert.h>
19012 /* Override any gcc2 internal prototype to avoid an error.  */
19013 /* We use char because int might match the return type of a gcc2
19014     builtin and then its argument prototype would still apply.  */
19015 char openlog();
19016 char (*f)();
19017
19018 int main() {
19019
19020 /* The GNU C library defines this for functions which it implements
19021     to always fail with ENOSYS.  Some functions are actually named
19022     something starting with __ and the normal name is an alias.  */
19023 #if defined (__stub_openlog) || defined (__stub___openlog)
19024 choke me
19025 #else
19026 f = openlog;
19027 #endif
19028
19029 ; return 0; }
19030 EOF
19031 if { (eval echo configure:19032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19032   rm -rf conftest*
19033   eval "ac_cv_func_openlog=yes"
19034 else
19035   echo "configure: failed program was:" >&5
19036   cat conftest.$ac_ext >&5
19037   rm -rf conftest*
19038   eval "ac_cv_func_openlog=no"
19039 fi
19040 rm -f conftest*
19041 fi
19042
19043 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19044   echo "$ac_t""yes" 1>&6
19045   :
19046 else
19047   echo "$ac_t""no" 1>&6
19048 fi
19049
19050         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19051                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19052         fi
19053         ol_enable_syslog=$ac_cv_func_openlog
19054 fi
19055
19056
19057 ol_link_sql=no
19058 if test $ol_enable_sql != no ; then
19059         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19060 echo "configure:19061: checking for SQLDriverConnect in -liodbc" >&5
19061 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19063   echo $ac_n "(cached) $ac_c" 1>&6
19064 else
19065   ac_save_LIBS="$LIBS"
19066 LIBS="-liodbc  $LIBS"
19067 cat > conftest.$ac_ext <<EOF
19068 #line 19069 "configure"
19069 #include "confdefs.h"
19070 /* Override any gcc2 internal prototype to avoid an error.  */
19071 /* We use char because int might match the return type of a gcc2
19072     builtin and then its argument prototype would still apply.  */
19073 char SQLDriverConnect();
19074
19075 int main() {
19076 SQLDriverConnect()
19077 ; return 0; }
19078 EOF
19079 if { (eval echo configure:19080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19080   rm -rf conftest*
19081   eval "ac_cv_lib_$ac_lib_var=yes"
19082 else
19083   echo "configure: failed program was:" >&5
19084   cat conftest.$ac_ext >&5
19085   rm -rf conftest*
19086   eval "ac_cv_lib_$ac_lib_var=no"
19087 fi
19088 rm -f conftest*
19089 LIBS="$ac_save_LIBS"
19090
19091 fi
19092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19093   echo "$ac_t""yes" 1>&6
19094   have_iodbc=yes
19095 else
19096   echo "$ac_t""no" 1>&6
19097 have_iodbc=no
19098 fi
19099
19100         if test $have_iodbc = yes ; then
19101                 ol_link_sql="-liodbc"
19102         else
19103                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19104 echo "configure:19105: checking for SQLDriverConnect in -lodbc" >&5
19105 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19107   echo $ac_n "(cached) $ac_c" 1>&6
19108 else
19109   ac_save_LIBS="$LIBS"
19110 LIBS="-lodbc  $LIBS"
19111 cat > conftest.$ac_ext <<EOF
19112 #line 19113 "configure"
19113 #include "confdefs.h"
19114 /* Override any gcc2 internal prototype to avoid an error.  */
19115 /* We use char because int might match the return type of a gcc2
19116     builtin and then its argument prototype would still apply.  */
19117 char SQLDriverConnect();
19118
19119 int main() {
19120 SQLDriverConnect()
19121 ; return 0; }
19122 EOF
19123 if { (eval echo configure:19124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19124   rm -rf conftest*
19125   eval "ac_cv_lib_$ac_lib_var=yes"
19126 else
19127   echo "configure: failed program was:" >&5
19128   cat conftest.$ac_ext >&5
19129   rm -rf conftest*
19130   eval "ac_cv_lib_$ac_lib_var=no"
19131 fi
19132 rm -f conftest*
19133 LIBS="$ac_save_LIBS"
19134
19135 fi
19136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19137   echo "$ac_t""yes" 1>&6
19138   have_odbc=yes
19139 else
19140   echo "$ac_t""no" 1>&6
19141 have_odbc=no
19142 fi
19143
19144                 if test $have_odbc = yes ; then
19145                         ol_link_sql="-lodbc"
19146                 fi
19147         fi
19148
19149         if test $ol_link_sql != no ; then
19150                 SLAPD_SQL_LIBS="$ol_link_sql"
19151
19152         elif test $ol_enable_sql != auto ; then
19153                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19154         fi
19155 fi
19156
19157 ol_link_termcap=no
19158 for ac_hdr in termcap.h ncurses.h
19159 do
19160 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19161 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19162 echo "configure:19163: checking for $ac_hdr" >&5
19163 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19164   echo $ac_n "(cached) $ac_c" 1>&6
19165 else
19166   cat > conftest.$ac_ext <<EOF
19167 #line 19168 "configure"
19168 #include "confdefs.h"
19169 #include <$ac_hdr>
19170 EOF
19171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19172 { (eval echo configure:19173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19174 if test -z "$ac_err"; then
19175   rm -rf conftest*
19176   eval "ac_cv_header_$ac_safe=yes"
19177 else
19178   echo "$ac_err" >&5
19179   echo "configure: failed program was:" >&5
19180   cat conftest.$ac_ext >&5
19181   rm -rf conftest*
19182   eval "ac_cv_header_$ac_safe=no"
19183 fi
19184 rm -f conftest*
19185 fi
19186 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19187   echo "$ac_t""yes" 1>&6
19188     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19189   cat >> confdefs.h <<EOF
19190 #define $ac_tr_hdr 1
19191 EOF
19192  
19193 else
19194   echo "$ac_t""no" 1>&6
19195 fi
19196 done
19197
19198
19199 if test $ol_link_termcap = no ; then
19200         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19201 echo "configure:19202: checking for tputs in -ltermcap" >&5
19202 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19203 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19204   echo $ac_n "(cached) $ac_c" 1>&6
19205 else
19206   ac_save_LIBS="$LIBS"
19207 LIBS="-ltermcap  $LIBS"
19208 cat > conftest.$ac_ext <<EOF
19209 #line 19210 "configure"
19210 #include "confdefs.h"
19211 /* Override any gcc2 internal prototype to avoid an error.  */
19212 /* We use char because int might match the return type of a gcc2
19213     builtin and then its argument prototype would still apply.  */
19214 char tputs();
19215
19216 int main() {
19217 tputs()
19218 ; return 0; }
19219 EOF
19220 if { (eval echo configure:19221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19221   rm -rf conftest*
19222   eval "ac_cv_lib_$ac_lib_var=yes"
19223 else
19224   echo "configure: failed program was:" >&5
19225   cat conftest.$ac_ext >&5
19226   rm -rf conftest*
19227   eval "ac_cv_lib_$ac_lib_var=no"
19228 fi
19229 rm -f conftest*
19230 LIBS="$ac_save_LIBS"
19231
19232 fi
19233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19234   echo "$ac_t""yes" 1>&6
19235   have_termcap=yes
19236 else
19237   echo "$ac_t""no" 1>&6
19238 have_termcap=no
19239 fi
19240
19241         if test $have_termcap = yes ; then
19242                 cat >> confdefs.h <<\EOF
19243 #define HAVE_TERMCAP 1
19244 EOF
19245
19246                 ol_link_termcap=yes
19247                 TERMCAP_LIBS=-ltermcap
19248         fi
19249 fi
19250
19251 if test $ol_link_termcap = no ; then
19252         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19253 echo "configure:19254: checking for initscr in -lncurses" >&5
19254 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19256   echo $ac_n "(cached) $ac_c" 1>&6
19257 else
19258   ac_save_LIBS="$LIBS"
19259 LIBS="-lncurses  $LIBS"
19260 cat > conftest.$ac_ext <<EOF
19261 #line 19262 "configure"
19262 #include "confdefs.h"
19263 /* Override any gcc2 internal prototype to avoid an error.  */
19264 /* We use char because int might match the return type of a gcc2
19265     builtin and then its argument prototype would still apply.  */
19266 char initscr();
19267
19268 int main() {
19269 initscr()
19270 ; return 0; }
19271 EOF
19272 if { (eval echo configure:19273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19273   rm -rf conftest*
19274   eval "ac_cv_lib_$ac_lib_var=yes"
19275 else
19276   echo "configure: failed program was:" >&5
19277   cat conftest.$ac_ext >&5
19278   rm -rf conftest*
19279   eval "ac_cv_lib_$ac_lib_var=no"
19280 fi
19281 rm -f conftest*
19282 LIBS="$ac_save_LIBS"
19283
19284 fi
19285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19286   echo "$ac_t""yes" 1>&6
19287   have_ncurses=yes
19288 else
19289   echo "$ac_t""no" 1>&6
19290 have_ncurses=no
19291 fi
19292
19293         if test $have_ncurses = yes ; then
19294                 cat >> confdefs.h <<\EOF
19295 #define HAVE_NCURSES 1
19296 EOF
19297
19298                 ol_link_termcap=yes
19299                 TERMCAP_LIBS=-lncurses
19300         fi
19301 fi
19302
19303 if test $ol_link_termcap = no ; then
19304         cat >> confdefs.h <<\EOF
19305 #define NO_TERMCAP 1
19306 EOF
19307
19308         TERMCAP_LIBS=
19309 fi
19310
19311 ol_link_sasl=no
19312 ol_link_spasswd=no
19313 if test $ol_with_cyrus_sasl != no ; then
19314         for ac_hdr in sasl/sasl.h sasl.h
19315 do
19316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19318 echo "configure:19319: checking for $ac_hdr" >&5
19319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19320   echo $ac_n "(cached) $ac_c" 1>&6
19321 else
19322   cat > conftest.$ac_ext <<EOF
19323 #line 19324 "configure"
19324 #include "confdefs.h"
19325 #include <$ac_hdr>
19326 EOF
19327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19328 { (eval echo configure:19329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19330 if test -z "$ac_err"; then
19331   rm -rf conftest*
19332   eval "ac_cv_header_$ac_safe=yes"
19333 else
19334   echo "$ac_err" >&5
19335   echo "configure: failed program was:" >&5
19336   cat conftest.$ac_ext >&5
19337   rm -rf conftest*
19338   eval "ac_cv_header_$ac_safe=no"
19339 fi
19340 rm -f conftest*
19341 fi
19342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19343   echo "$ac_t""yes" 1>&6
19344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19345   cat >> confdefs.h <<EOF
19346 #define $ac_tr_hdr 1
19347 EOF
19348  
19349 else
19350   echo "$ac_t""no" 1>&6
19351 fi
19352 done
19353
19354
19355         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19356                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19357 echo "configure:19358: checking for sasl_client_init in -lsasl2" >&5
19358 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19360   echo $ac_n "(cached) $ac_c" 1>&6
19361 else
19362   ac_save_LIBS="$LIBS"
19363 LIBS="-lsasl2  $LIBS"
19364 cat > conftest.$ac_ext <<EOF
19365 #line 19366 "configure"
19366 #include "confdefs.h"
19367 /* Override any gcc2 internal prototype to avoid an error.  */
19368 /* We use char because int might match the return type of a gcc2
19369     builtin and then its argument prototype would still apply.  */
19370 char sasl_client_init();
19371
19372 int main() {
19373 sasl_client_init()
19374 ; return 0; }
19375 EOF
19376 if { (eval echo configure:19377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19377   rm -rf conftest*
19378   eval "ac_cv_lib_$ac_lib_var=yes"
19379 else
19380   echo "configure: failed program was:" >&5
19381   cat conftest.$ac_ext >&5
19382   rm -rf conftest*
19383   eval "ac_cv_lib_$ac_lib_var=no"
19384 fi
19385 rm -f conftest*
19386 LIBS="$ac_save_LIBS"
19387
19388 fi
19389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19390   echo "$ac_t""yes" 1>&6
19391   ol_link_sasl="-lsasl2"
19392 else
19393   echo "$ac_t""no" 1>&6
19394 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19395 echo "configure:19396: checking for sasl_client_init in -lsasl" >&5
19396 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19397 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19398   echo $ac_n "(cached) $ac_c" 1>&6
19399 else
19400   ac_save_LIBS="$LIBS"
19401 LIBS="-lsasl  $LIBS"
19402 cat > conftest.$ac_ext <<EOF
19403 #line 19404 "configure"
19404 #include "confdefs.h"
19405 /* Override any gcc2 internal prototype to avoid an error.  */
19406 /* We use char because int might match the return type of a gcc2
19407     builtin and then its argument prototype would still apply.  */
19408 char sasl_client_init();
19409
19410 int main() {
19411 sasl_client_init()
19412 ; return 0; }
19413 EOF
19414 if { (eval echo configure:19415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19415   rm -rf conftest*
19416   eval "ac_cv_lib_$ac_lib_var=yes"
19417 else
19418   echo "configure: failed program was:" >&5
19419   cat conftest.$ac_ext >&5
19420   rm -rf conftest*
19421   eval "ac_cv_lib_$ac_lib_var=no"
19422 fi
19423 rm -f conftest*
19424 LIBS="$ac_save_LIBS"
19425
19426 fi
19427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19428   echo "$ac_t""yes" 1>&6
19429   ol_link_sasl="-lsasl"
19430 else
19431   echo "$ac_t""no" 1>&6
19432 fi
19433
19434 fi
19435
19436         fi
19437
19438         if test $ol_link_sasl = no ; then
19439                 if test $ol_with_cyrus_sasl != auto ; then
19440                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19441                 else
19442                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19443                         echo "configure: warning: SASL authentication not supported!" 1>&2
19444                         if test $ol_link_tls = no ; then
19445                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19446                         fi
19447                 fi
19448         else
19449                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19450 echo "configure:19451: checking Cyrus SASL library version" >&5
19451 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19452   echo $ac_n "(cached) $ac_c" 1>&6
19453 else
19454   
19455         cat > conftest.$ac_ext <<EOF
19456 #line 19457 "configure"
19457 #include "confdefs.h"
19458
19459 #ifdef HAVE_SASL_SASL_H
19460 #include <sasl/sasl.h>
19461 #else
19462 #include <sasl.h>
19463 #endif
19464
19465 /* require 2.1.3 or later */
19466 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19467         char *__sasl_compat = "1.5.x okay";
19468 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19469         __sasl_compat "2.2+ or better okay (we guess)";
19470 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19471         && SASL_VERSION_STEP >=3
19472         __sasl_compat = "2.1.3+ or better okay";
19473 #endif
19474         
19475 EOF
19476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19477   egrep "__sasl_compat" >/dev/null 2>&1; then
19478   rm -rf conftest*
19479   ol_cv_sasl_compat=yes
19480 else
19481   rm -rf conftest*
19482   ol_cv_sasl_compat=no
19483 fi
19484 rm -f conftest*
19485
19486 fi
19487
19488 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19489
19490                 if test $ol_cv_sasl_compat = no ; then
19491                         ol_link_sasl=no
19492                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19493                 fi
19494
19495                 cat >> confdefs.h <<\EOF
19496 #define HAVE_CYRUS_SASL 1
19497 EOF
19498
19499                 SASL_LIBS="$ol_link_sasl"
19500                 if test $ol_enable_spasswd != no ; then
19501                         ol_link_spasswd=yes
19502                 fi
19503         fi
19504
19505 else
19506         echo "configure: warning: SASL authentication not supported!" 1>&2
19507         if test $ol_link_tls = no ; then
19508                 echo "configure: warning: Strong authentication not supported!" 1>&2
19509         fi
19510 fi
19511
19512 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19513         dev=no
19514         if test -r /dev/urandom ; then
19515                 dev="/dev/urandom";
19516         elif test -r /idev/urandom ; then
19517                 dev="/idev/urandom";
19518         elif test -r /dev/srandom ; then
19519                 dev="/dev/srandom";
19520         elif test -r /dev/random ; then
19521                 dev="/dev/random";
19522         elif test -r /idev/random ; then
19523                 dev="/idev/random";
19524         fi
19525
19526         if test $dev != no ; then
19527                 cat >> confdefs.h <<EOF
19528 #define URANDOM_DEVICE "$dev"
19529 EOF
19530
19531         fi
19532 fi
19533
19534 ol_link_fetch=no
19535 if test $ol_with_fetch != no ; then
19536         ol_LIBS=$LIBS
19537 LIBS="-lfetch -lcom_err $LIBS"
19538 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19539 echo "configure:19540: checking fetch(3) library" >&5
19540 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19541   echo $ac_n "(cached) $ac_c" 1>&6
19542 else
19543   
19544         cat > conftest.$ac_ext <<EOF
19545 #line 19546 "configure"
19546 #include "confdefs.h"
19547
19548 #include <sys/param.h>
19549 #include <stdio.h>
19550 #include <fetch.h>
19551 int main() {
19552 struct url *u = fetchParseURL("file:///"); 
19553 ; return 0; }
19554 EOF
19555 if { (eval echo configure:19556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19556   rm -rf conftest*
19557   ol_cv_lib_fetch=yes
19558 else
19559   echo "configure: failed program was:" >&5
19560   cat conftest.$ac_ext >&5
19561   rm -rf conftest*
19562   ol_cv_lib_fetch=no
19563 fi
19564 rm -f conftest*
19565 fi
19566
19567 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19568 LIBS=$ol_LIBS
19569 if test $ol_cv_lib_fetch != no ; then
19570         ol_link_fetch="-lfetch -lcom_err"
19571         cat >> confdefs.h <<\EOF
19572 #define HAVE_FETCH 1
19573 EOF
19574
19575 fi
19576
19577
19578         if test $ol_cv_lib_fetch != no ; then
19579                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19580                 ol_link_fetch=freebsd
19581
19582         elif test $ol_with_fetch != auto ; then
19583                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19584         fi 
19585 fi
19586
19587 ol_link_readline=no
19588 if test $ol_with_readline != no ; then
19589         for ac_hdr in readline/readline.h readline/history.h
19590 do
19591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19593 echo "configure:19594: checking for $ac_hdr" >&5
19594 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19595   echo $ac_n "(cached) $ac_c" 1>&6
19596 else
19597   cat > conftest.$ac_ext <<EOF
19598 #line 19599 "configure"
19599 #include "confdefs.h"
19600 #include <$ac_hdr>
19601 EOF
19602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19603 { (eval echo configure:19604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19605 if test -z "$ac_err"; then
19606   rm -rf conftest*
19607   eval "ac_cv_header_$ac_safe=yes"
19608 else
19609   echo "$ac_err" >&5
19610   echo "configure: failed program was:" >&5
19611   cat conftest.$ac_ext >&5
19612   rm -rf conftest*
19613   eval "ac_cv_header_$ac_safe=no"
19614 fi
19615 rm -f conftest*
19616 fi
19617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19618   echo "$ac_t""yes" 1>&6
19619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19620   cat >> confdefs.h <<EOF
19621 #define $ac_tr_hdr 1
19622 EOF
19623  
19624 else
19625   echo "$ac_t""no" 1>&6
19626 fi
19627 done
19628
19629
19630         if test $ac_cv_header_readline_readline_h = yes ; then
19631                 save_LIBS="$LIBS"
19632                 LIBS="$TERMCAP_LIBS $LIBS"
19633                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19634 echo "configure:19635: checking for readline in -lreadline" >&5
19635 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19637   echo $ac_n "(cached) $ac_c" 1>&6
19638 else
19639   ac_save_LIBS="$LIBS"
19640 LIBS="-lreadline  $LIBS"
19641 cat > conftest.$ac_ext <<EOF
19642 #line 19643 "configure"
19643 #include "confdefs.h"
19644 /* Override any gcc2 internal prototype to avoid an error.  */
19645 /* We use char because int might match the return type of a gcc2
19646     builtin and then its argument prototype would still apply.  */
19647 char readline();
19648
19649 int main() {
19650 readline()
19651 ; return 0; }
19652 EOF
19653 if { (eval echo configure:19654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19654   rm -rf conftest*
19655   eval "ac_cv_lib_$ac_lib_var=yes"
19656 else
19657   echo "configure: failed program was:" >&5
19658   cat conftest.$ac_ext >&5
19659   rm -rf conftest*
19660   eval "ac_cv_lib_$ac_lib_var=no"
19661 fi
19662 rm -f conftest*
19663 LIBS="$ac_save_LIBS"
19664
19665 fi
19666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19667   echo "$ac_t""yes" 1>&6
19668   have_readline=yes
19669 else
19670   echo "$ac_t""no" 1>&6
19671 have_readline=no
19672 fi
19673
19674                 LIBS="$save_LIBS"
19675                         
19676                 if test $have_readline = yes ; then
19677                         ol_with_readline=found
19678                         ol_link_readline=yes
19679
19680                         READLINE_LIBS="-lreadline"
19681                 fi
19682         fi
19683 fi
19684
19685 if test $ol_link_readline = yes ; then
19686         cat >> confdefs.h <<\EOF
19687 #define HAVE_READLINE 1
19688 EOF
19689
19690 fi
19691
19692
19693 if test $ol_enable_crypt != no ; then
19694         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19695 echo "configure:19696: checking for crypt" >&5
19696 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19697   echo $ac_n "(cached) $ac_c" 1>&6
19698 else
19699   cat > conftest.$ac_ext <<EOF
19700 #line 19701 "configure"
19701 #include "confdefs.h"
19702 /* System header to define __stub macros and hopefully few prototypes,
19703     which can conflict with char crypt(); below.  */
19704 #include <assert.h>
19705 /* Override any gcc2 internal prototype to avoid an error.  */
19706 /* We use char because int might match the return type of a gcc2
19707     builtin and then its argument prototype would still apply.  */
19708 char crypt();
19709 char (*f)();
19710
19711 int main() {
19712
19713 /* The GNU C library defines this for functions which it implements
19714     to always fail with ENOSYS.  Some functions are actually named
19715     something starting with __ and the normal name is an alias.  */
19716 #if defined (__stub_crypt) || defined (__stub___crypt)
19717 choke me
19718 #else
19719 f = crypt;
19720 #endif
19721
19722 ; return 0; }
19723 EOF
19724 if { (eval echo configure:19725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19725   rm -rf conftest*
19726   eval "ac_cv_func_crypt=yes"
19727 else
19728   echo "configure: failed program was:" >&5
19729   cat conftest.$ac_ext >&5
19730   rm -rf conftest*
19731   eval "ac_cv_func_crypt=no"
19732 fi
19733 rm -f conftest*
19734 fi
19735
19736 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19737   echo "$ac_t""yes" 1>&6
19738   have_crypt=yes
19739 else
19740   echo "$ac_t""no" 1>&6
19741
19742                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19743 echo "configure:19744: checking for crypt in -lcrypt" >&5
19744 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19746   echo $ac_n "(cached) $ac_c" 1>&6
19747 else
19748   ac_save_LIBS="$LIBS"
19749 LIBS="-lcrypt  $LIBS"
19750 cat > conftest.$ac_ext <<EOF
19751 #line 19752 "configure"
19752 #include "confdefs.h"
19753 /* Override any gcc2 internal prototype to avoid an error.  */
19754 /* We use char because int might match the return type of a gcc2
19755     builtin and then its argument prototype would still apply.  */
19756 char crypt();
19757
19758 int main() {
19759 crypt()
19760 ; return 0; }
19761 EOF
19762 if { (eval echo configure:19763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19763   rm -rf conftest*
19764   eval "ac_cv_lib_$ac_lib_var=yes"
19765 else
19766   echo "configure: failed program was:" >&5
19767   cat conftest.$ac_ext >&5
19768   rm -rf conftest*
19769   eval "ac_cv_lib_$ac_lib_var=no"
19770 fi
19771 rm -f conftest*
19772 LIBS="$ac_save_LIBS"
19773
19774 fi
19775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19776   echo "$ac_t""yes" 1>&6
19777   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19778                         have_crypt=yes
19779 else
19780   echo "$ac_t""no" 1>&6
19781 have_crypt=no
19782 fi
19783
19784 fi
19785
19786
19787         if test $have_crypt = yes ; then
19788                 cat >> confdefs.h <<\EOF
19789 #define HAVE_CRYPT 1
19790 EOF
19791
19792         else
19793                 echo "configure: warning: could not find crypt" 1>&2
19794                 if test $ol_enable_crypt = yes ; then
19795                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19796                 fi
19797
19798                 echo "configure: warning: disabling crypt support" 1>&2
19799                 ol_enable_crypt=no
19800         fi
19801 fi
19802
19803 if test $ol_enable_proctitle != no ; then
19804         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19805 echo "configure:19806: checking for setproctitle" >&5
19806 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19807   echo $ac_n "(cached) $ac_c" 1>&6
19808 else
19809   cat > conftest.$ac_ext <<EOF
19810 #line 19811 "configure"
19811 #include "confdefs.h"
19812 /* System header to define __stub macros and hopefully few prototypes,
19813     which can conflict with char setproctitle(); below.  */
19814 #include <assert.h>
19815 /* Override any gcc2 internal prototype to avoid an error.  */
19816 /* We use char because int might match the return type of a gcc2
19817     builtin and then its argument prototype would still apply.  */
19818 char setproctitle();
19819 char (*f)();
19820
19821 int main() {
19822
19823 /* The GNU C library defines this for functions which it implements
19824     to always fail with ENOSYS.  Some functions are actually named
19825     something starting with __ and the normal name is an alias.  */
19826 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19827 choke me
19828 #else
19829 f = setproctitle;
19830 #endif
19831
19832 ; return 0; }
19833 EOF
19834 if { (eval echo configure:19835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19835   rm -rf conftest*
19836   eval "ac_cv_func_setproctitle=yes"
19837 else
19838   echo "configure: failed program was:" >&5
19839   cat conftest.$ac_ext >&5
19840   rm -rf conftest*
19841   eval "ac_cv_func_setproctitle=no"
19842 fi
19843 rm -f conftest*
19844 fi
19845
19846 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19847   echo "$ac_t""yes" 1>&6
19848   have_setproctitle=yes
19849 else
19850   echo "$ac_t""no" 1>&6
19851
19852                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19853 echo "configure:19854: checking for setproctitle in -lutil" >&5
19854 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19855 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19856   echo $ac_n "(cached) $ac_c" 1>&6
19857 else
19858   ac_save_LIBS="$LIBS"
19859 LIBS="-lutil  $LIBS"
19860 cat > conftest.$ac_ext <<EOF
19861 #line 19862 "configure"
19862 #include "confdefs.h"
19863 /* Override any gcc2 internal prototype to avoid an error.  */
19864 /* We use char because int might match the return type of a gcc2
19865     builtin and then its argument prototype would still apply.  */
19866 char setproctitle();
19867
19868 int main() {
19869 setproctitle()
19870 ; return 0; }
19871 EOF
19872 if { (eval echo configure:19873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19873   rm -rf conftest*
19874   eval "ac_cv_lib_$ac_lib_var=yes"
19875 else
19876   echo "configure: failed program was:" >&5
19877   cat conftest.$ac_ext >&5
19878   rm -rf conftest*
19879   eval "ac_cv_lib_$ac_lib_var=no"
19880 fi
19881 rm -f conftest*
19882 LIBS="$ac_save_LIBS"
19883
19884 fi
19885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19886   echo "$ac_t""yes" 1>&6
19887   have_setproctitle=yes
19888                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19889 else
19890   echo "$ac_t""no" 1>&6
19891 have_setproctitle=no
19892                         LIBOBJS="$LIBOBJS setproctitle.o"
19893                         LIBSRCS="$LIBSRCS setproctitle.c"
19894 fi
19895
19896 fi
19897
19898
19899         if test $have_setproctitle = yes ; then
19900                 cat >> confdefs.h <<\EOF
19901 #define HAVE_SETPROCTITLE 1
19902 EOF
19903
19904         fi
19905 fi
19906
19907 if test $ol_enable_slp != no ; then
19908         for ac_hdr in slp.h 
19909 do
19910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19912 echo "configure:19913: checking for $ac_hdr" >&5
19913 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19914   echo $ac_n "(cached) $ac_c" 1>&6
19915 else
19916   cat > conftest.$ac_ext <<EOF
19917 #line 19918 "configure"
19918 #include "confdefs.h"
19919 #include <$ac_hdr>
19920 EOF
19921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19922 { (eval echo configure:19923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19924 if test -z "$ac_err"; then
19925   rm -rf conftest*
19926   eval "ac_cv_header_$ac_safe=yes"
19927 else
19928   echo "$ac_err" >&5
19929   echo "configure: failed program was:" >&5
19930   cat conftest.$ac_ext >&5
19931   rm -rf conftest*
19932   eval "ac_cv_header_$ac_safe=no"
19933 fi
19934 rm -f conftest*
19935 fi
19936 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19937   echo "$ac_t""yes" 1>&6
19938     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19939   cat >> confdefs.h <<EOF
19940 #define $ac_tr_hdr 1
19941 EOF
19942  
19943 else
19944   echo "$ac_t""no" 1>&6
19945 fi
19946 done
19947
19948
19949         if test $ac_cv_header_slp_h = yes ; then
19950                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19951 echo "configure:19952: checking for SLPOpen in -lslp" >&5
19952 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
19953 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19954   echo $ac_n "(cached) $ac_c" 1>&6
19955 else
19956   ac_save_LIBS="$LIBS"
19957 LIBS="-lslp  $LIBS"
19958 cat > conftest.$ac_ext <<EOF
19959 #line 19960 "configure"
19960 #include "confdefs.h"
19961 /* Override any gcc2 internal prototype to avoid an error.  */
19962 /* We use char because int might match the return type of a gcc2
19963     builtin and then its argument prototype would still apply.  */
19964 char SLPOpen();
19965
19966 int main() {
19967 SLPOpen()
19968 ; return 0; }
19969 EOF
19970 if { (eval echo configure:19971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19971   rm -rf conftest*
19972   eval "ac_cv_lib_$ac_lib_var=yes"
19973 else
19974   echo "configure: failed program was:" >&5
19975   cat conftest.$ac_ext >&5
19976   rm -rf conftest*
19977   eval "ac_cv_lib_$ac_lib_var=no"
19978 fi
19979 rm -f conftest*
19980 LIBS="$ac_save_LIBS"
19981
19982 fi
19983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19984   echo "$ac_t""yes" 1>&6
19985   have_slp=yes
19986 else
19987   echo "$ac_t""no" 1>&6
19988 have_slp=no
19989 fi
19990
19991                 if test $have_slp = yes ; then
19992                         cat >> confdefs.h <<\EOF
19993 #define HAVE_SLP 1
19994 EOF
19995
19996                         SLAPD_SLP_LIBS=-lslp
19997                 fi
19998
19999         elif test $ol_enable_slp = yes ; then
20000                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20001         fi
20002 fi
20003
20004 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20005 echo "configure:20006: checking for ANSI C header files" >&5
20006 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20007   echo $ac_n "(cached) $ac_c" 1>&6
20008 else
20009   cat > conftest.$ac_ext <<EOF
20010 #line 20011 "configure"
20011 #include "confdefs.h"
20012 #include <stdlib.h>
20013 #include <stdarg.h>
20014 #include <string.h>
20015 #include <float.h>
20016 EOF
20017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20018 { (eval echo configure:20019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20020 if test -z "$ac_err"; then
20021   rm -rf conftest*
20022   ac_cv_header_stdc=yes
20023 else
20024   echo "$ac_err" >&5
20025   echo "configure: failed program was:" >&5
20026   cat conftest.$ac_ext >&5
20027   rm -rf conftest*
20028   ac_cv_header_stdc=no
20029 fi
20030 rm -f conftest*
20031
20032 if test $ac_cv_header_stdc = yes; then
20033   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20034 cat > conftest.$ac_ext <<EOF
20035 #line 20036 "configure"
20036 #include "confdefs.h"
20037 #include <string.h>
20038 EOF
20039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20040   egrep "memchr" >/dev/null 2>&1; then
20041   :
20042 else
20043   rm -rf conftest*
20044   ac_cv_header_stdc=no
20045 fi
20046 rm -f conftest*
20047
20048 fi
20049
20050 if test $ac_cv_header_stdc = yes; then
20051   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20052 cat > conftest.$ac_ext <<EOF
20053 #line 20054 "configure"
20054 #include "confdefs.h"
20055 #include <stdlib.h>
20056 EOF
20057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20058   egrep "free" >/dev/null 2>&1; then
20059   :
20060 else
20061   rm -rf conftest*
20062   ac_cv_header_stdc=no
20063 fi
20064 rm -f conftest*
20065
20066 fi
20067
20068 if test $ac_cv_header_stdc = yes; then
20069   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20070 if test "$cross_compiling" = yes; then
20071   :
20072 else
20073   cat > conftest.$ac_ext <<EOF
20074 #line 20075 "configure"
20075 #include "confdefs.h"
20076 #include <ctype.h>
20077 #if ((' ' & 0x0FF) == 0x020)
20078 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20079 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20080 #else
20081 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20082  || ('j' <= (c) && (c) <= 'r') \
20083  || ('s' <= (c) && (c) <= 'z'))
20084 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20085 #endif
20086 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20087 int main () { int i; for (i = 0; i < 256; i++)
20088 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20089 exit (0); }
20090
20091 EOF
20092 if { (eval echo configure:20093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20093 then
20094   :
20095 else
20096   echo "configure: failed program was:" >&5
20097   cat conftest.$ac_ext >&5
20098   rm -fr conftest*
20099   ac_cv_header_stdc=no
20100 fi
20101 rm -fr conftest*
20102 fi
20103
20104 fi
20105 fi
20106
20107 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20108 if test $ac_cv_header_stdc = yes; then
20109   cat >> confdefs.h <<\EOF
20110 #define STDC_HEADERS 1
20111 EOF
20112
20113 fi
20114
20115 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20116 echo "configure:20117: checking for mode_t" >&5
20117 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20118   echo $ac_n "(cached) $ac_c" 1>&6
20119 else
20120   cat > conftest.$ac_ext <<EOF
20121 #line 20122 "configure"
20122 #include "confdefs.h"
20123 #include <sys/types.h>
20124 #if STDC_HEADERS
20125 #include <stdlib.h>
20126 #include <stddef.h>
20127 #endif
20128
20129 EOF
20130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20131   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20132   rm -rf conftest*
20133   eval "ac_cv_type_mode_t=yes"
20134 else
20135   rm -rf conftest*
20136   eval "ac_cv_type_mode_t=no"
20137 fi
20138 rm -f conftest*
20139
20140 fi
20141 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20142   echo "$ac_t""yes" 1>&6
20143 else
20144   echo "$ac_t""no" 1>&6
20145   cat >> confdefs.h <<EOF
20146 #define mode_t int
20147 EOF
20148
20149 fi
20150
20151 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20152 echo "configure:20153: checking for off_t" >&5
20153 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20154   echo $ac_n "(cached) $ac_c" 1>&6
20155 else
20156   cat > conftest.$ac_ext <<EOF
20157 #line 20158 "configure"
20158 #include "confdefs.h"
20159 #include <sys/types.h>
20160 #if STDC_HEADERS
20161 #include <stdlib.h>
20162 #include <stddef.h>
20163 #endif
20164
20165 EOF
20166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20167   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20168   rm -rf conftest*
20169   eval "ac_cv_type_off_t=yes"
20170 else
20171   rm -rf conftest*
20172   eval "ac_cv_type_off_t=no"
20173 fi
20174 rm -f conftest*
20175
20176 fi
20177 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20178   echo "$ac_t""yes" 1>&6
20179 else
20180   echo "$ac_t""no" 1>&6
20181   cat >> confdefs.h <<EOF
20182 #define off_t long
20183 EOF
20184
20185 fi
20186
20187 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20188 echo "configure:20189: checking for pid_t" >&5
20189 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20190   echo $ac_n "(cached) $ac_c" 1>&6
20191 else
20192   cat > conftest.$ac_ext <<EOF
20193 #line 20194 "configure"
20194 #include "confdefs.h"
20195 #include <sys/types.h>
20196 #if STDC_HEADERS
20197 #include <stdlib.h>
20198 #include <stddef.h>
20199 #endif
20200
20201 EOF
20202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20203   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20204   rm -rf conftest*
20205   eval "ac_cv_type_pid_t=yes"
20206 else
20207   rm -rf conftest*
20208   eval "ac_cv_type_pid_t=no"
20209 fi
20210 rm -f conftest*
20211
20212 fi
20213 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20214   echo "$ac_t""yes" 1>&6
20215 else
20216   echo "$ac_t""no" 1>&6
20217   cat >> confdefs.h <<EOF
20218 #define pid_t int
20219 EOF
20220
20221 fi
20222
20223 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20224 echo "configure:20225: checking for ptrdiff_t" >&5
20225 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20226   echo $ac_n "(cached) $ac_c" 1>&6
20227 else
20228   cat > conftest.$ac_ext <<EOF
20229 #line 20230 "configure"
20230 #include "confdefs.h"
20231 #include <stddef.h>
20232 int main() {
20233 ptrdiff_t p
20234 ; return 0; }
20235 EOF
20236 if { (eval echo configure:20237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20237   rm -rf conftest*
20238   am_cv_type_ptrdiff_t=yes
20239 else
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -rf conftest*
20243   am_cv_type_ptrdiff_t=no
20244 fi
20245 rm -f conftest*
20246 fi
20247
20248 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20249    if test $am_cv_type_ptrdiff_t = yes; then
20250      cat >> confdefs.h <<\EOF
20251 #define HAVE_PTRDIFF_T 1
20252 EOF
20253
20254    fi
20255
20256 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20257 echo "configure:20258: checking return type of signal handlers" >&5
20258 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20259   echo $ac_n "(cached) $ac_c" 1>&6
20260 else
20261   cat > conftest.$ac_ext <<EOF
20262 #line 20263 "configure"
20263 #include "confdefs.h"
20264 #include <sys/types.h>
20265 #include <signal.h>
20266 #ifdef signal
20267 #undef signal
20268 #endif
20269 #ifdef __cplusplus
20270 extern "C" void (*signal (int, void (*)(int)))(int);
20271 #else
20272 void (*signal ()) ();
20273 #endif
20274
20275 int main() {
20276 int i;
20277 ; return 0; }
20278 EOF
20279 if { (eval echo configure:20280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20280   rm -rf conftest*
20281   ac_cv_type_signal=void
20282 else
20283   echo "configure: failed program was:" >&5
20284   cat conftest.$ac_ext >&5
20285   rm -rf conftest*
20286   ac_cv_type_signal=int
20287 fi
20288 rm -f conftest*
20289 fi
20290
20291 echo "$ac_t""$ac_cv_type_signal" 1>&6
20292 cat >> confdefs.h <<EOF
20293 #define RETSIGTYPE $ac_cv_type_signal
20294 EOF
20295
20296
20297 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20298 echo "configure:20299: checking for size_t" >&5
20299 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20300   echo $ac_n "(cached) $ac_c" 1>&6
20301 else
20302   cat > conftest.$ac_ext <<EOF
20303 #line 20304 "configure"
20304 #include "confdefs.h"
20305 #include <sys/types.h>
20306 #if STDC_HEADERS
20307 #include <stdlib.h>
20308 #include <stddef.h>
20309 #endif
20310
20311 EOF
20312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20313   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20314   rm -rf conftest*
20315   eval "ac_cv_type_size_t=yes"
20316 else
20317   rm -rf conftest*
20318   eval "ac_cv_type_size_t=no"
20319 fi
20320 rm -f conftest*
20321
20322 fi
20323 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20324   echo "$ac_t""yes" 1>&6
20325 else
20326   echo "$ac_t""no" 1>&6
20327   cat >> confdefs.h <<EOF
20328 #define size_t unsigned
20329 EOF
20330
20331 fi
20332
20333
20334 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20335 echo "configure:20336: checking for ssize_t" >&5
20336 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20337   echo $ac_n "(cached) $ac_c" 1>&6
20338 else
20339   cat > conftest.$ac_ext <<EOF
20340 #line 20341 "configure"
20341 #include "confdefs.h"
20342 #include <sys/types.h>
20343 #if STDC_HEADERS
20344 #include <stdlib.h>
20345 #include <stddef.h>
20346 #endif
20347
20348 EOF
20349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20350   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20351   rm -rf conftest*
20352   eval "ac_cv_type_ssize_t=yes"
20353 else
20354   rm -rf conftest*
20355   eval "ac_cv_type_ssize_t=no"
20356 fi
20357 rm -f conftest*
20358
20359 fi
20360 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20361   echo "$ac_t""yes" 1>&6
20362 else
20363   echo "$ac_t""no" 1>&6
20364   cat >> confdefs.h <<EOF
20365 #define ssize_t signed int
20366 EOF
20367
20368 fi
20369
20370 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20371 echo "configure:20372: checking for caddr_t" >&5
20372 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20373   echo $ac_n "(cached) $ac_c" 1>&6
20374 else
20375   cat > conftest.$ac_ext <<EOF
20376 #line 20377 "configure"
20377 #include "confdefs.h"
20378 #include <sys/types.h>
20379 #if STDC_HEADERS
20380 #include <stdlib.h>
20381 #include <stddef.h>
20382 #endif
20383
20384 EOF
20385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20386   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20387   rm -rf conftest*
20388   eval "ac_cv_type_caddr_t=yes"
20389 else
20390   rm -rf conftest*
20391   eval "ac_cv_type_caddr_t=no"
20392 fi
20393 rm -f conftest*
20394
20395 fi
20396 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20397   echo "$ac_t""yes" 1>&6
20398 else
20399   echo "$ac_t""no" 1>&6
20400   cat >> confdefs.h <<EOF
20401 #define caddr_t char *
20402 EOF
20403
20404 fi
20405
20406
20407 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20408 echo "configure:20409: checking for socklen_t" >&5
20409 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20410   echo $ac_n "(cached) $ac_c" 1>&6
20411 else
20412   cat > conftest.$ac_ext <<EOF
20413 #line 20414 "configure"
20414 #include "confdefs.h"
20415
20416 #ifdef HAVE_SYS_TYPES_H
20417 #include <sys/types.h>
20418 #endif
20419 #ifdef HAVE_SYS_SOCKET_H
20420 #include <sys/socket.h>
20421 #endif
20422
20423 int main() {
20424 socklen_t len;
20425 ; return 0; }
20426 EOF
20427 if { (eval echo configure:20428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20428   rm -rf conftest*
20429   ol_cv_type_socklen_t=yes
20430 else
20431   echo "configure: failed program was:" >&5
20432   cat conftest.$ac_ext >&5
20433   rm -rf conftest*
20434   ol_cv_type_socklen_t=no
20435 fi
20436 rm -f conftest*
20437 fi
20438
20439 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20440   if test $ol_cv_type_socklen_t = no; then
20441     cat >> confdefs.h <<\EOF
20442 #define socklen_t int
20443 EOF
20444
20445   fi
20446  
20447 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20448 echo "configure:20449: checking for member st_blksize in aggregate type struct stat" >&5
20449 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20450   echo $ac_n "(cached) $ac_c" 1>&6
20451 else
20452   cat > conftest.$ac_ext <<EOF
20453 #line 20454 "configure"
20454 #include "confdefs.h"
20455 #include <sys/types.h>
20456 #include <sys/stat.h>
20457 int main() {
20458 struct stat foo; foo.st_blksize;
20459 ; return 0; }
20460 EOF
20461 if { (eval echo configure:20462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20462   rm -rf conftest*
20463   ac_cv_c_struct_member_st_blksize=yes
20464 else
20465   echo "configure: failed program was:" >&5
20466   cat conftest.$ac_ext >&5
20467   rm -rf conftest*
20468   ac_cv_c_struct_member_st_blksize=no
20469 fi
20470 rm -f conftest*
20471 fi
20472
20473 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20474 st_blksize="$ac_cv_c_struct_member_st_blksize"
20475 if test $ac_cv_c_struct_member_st_blksize = yes; then
20476   cat >> confdefs.h <<\EOF
20477 #define HAVE_ST_BLKSIZE 1
20478 EOF
20479
20480 fi
20481
20482 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20483 echo "configure:20484: checking whether time.h and sys/time.h may both be included" >&5
20484 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20485   echo $ac_n "(cached) $ac_c" 1>&6
20486 else
20487   cat > conftest.$ac_ext <<EOF
20488 #line 20489 "configure"
20489 #include "confdefs.h"
20490 #include <sys/types.h>
20491 #include <sys/time.h>
20492 #include <time.h>
20493 int main() {
20494 struct tm *tp;
20495 ; return 0; }
20496 EOF
20497 if { (eval echo configure:20498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20498   rm -rf conftest*
20499   ac_cv_header_time=yes
20500 else
20501   echo "configure: failed program was:" >&5
20502   cat conftest.$ac_ext >&5
20503   rm -rf conftest*
20504   ac_cv_header_time=no
20505 fi
20506 rm -f conftest*
20507 fi
20508
20509 echo "$ac_t""$ac_cv_header_time" 1>&6
20510 if test $ac_cv_header_time = yes; then
20511   cat >> confdefs.h <<\EOF
20512 #define TIME_WITH_SYS_TIME 1
20513 EOF
20514
20515 fi
20516
20517 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20518 echo "configure:20519: checking whether struct tm is in sys/time.h or time.h" >&5
20519 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20520   echo $ac_n "(cached) $ac_c" 1>&6
20521 else
20522   cat > conftest.$ac_ext <<EOF
20523 #line 20524 "configure"
20524 #include "confdefs.h"
20525 #include <sys/types.h>
20526 #include <time.h>
20527 int main() {
20528 struct tm *tp; tp->tm_sec;
20529 ; return 0; }
20530 EOF
20531 if { (eval echo configure:20532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20532   rm -rf conftest*
20533   ac_cv_struct_tm=time.h
20534 else
20535   echo "configure: failed program was:" >&5
20536   cat conftest.$ac_ext >&5
20537   rm -rf conftest*
20538   ac_cv_struct_tm=sys/time.h
20539 fi
20540 rm -f conftest*
20541 fi
20542
20543 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20544 if test $ac_cv_struct_tm = sys/time.h; then
20545   cat >> confdefs.h <<\EOF
20546 #define TM_IN_SYS_TIME 1
20547 EOF
20548
20549 fi
20550
20551 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20552 echo "configure:20553: checking for uid_t in sys/types.h" >&5
20553 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20554   echo $ac_n "(cached) $ac_c" 1>&6
20555 else
20556   cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559 #include <sys/types.h>
20560 EOF
20561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20562   egrep "uid_t" >/dev/null 2>&1; then
20563   rm -rf conftest*
20564   ac_cv_type_uid_t=yes
20565 else
20566   rm -rf conftest*
20567   ac_cv_type_uid_t=no
20568 fi
20569 rm -f conftest*
20570
20571 fi
20572
20573 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20574 if test $ac_cv_type_uid_t = no; then
20575   cat >> confdefs.h <<\EOF
20576 #define uid_t int
20577 EOF
20578
20579   cat >> confdefs.h <<\EOF
20580 #define gid_t int
20581 EOF
20582
20583 fi
20584
20585 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20586 echo "configure:20587: checking for sig_atomic_t" >&5
20587 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20588   echo $ac_n "(cached) $ac_c" 1>&6
20589 else
20590   cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593 #include <signal.h>
20594 int main() {
20595 sig_atomic_t atomic;
20596 ; return 0; }
20597 EOF
20598 if { (eval echo configure:20599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20599   rm -rf conftest*
20600   ol_cv_type_sig_atomic_t=yes
20601 else
20602   echo "configure: failed program was:" >&5
20603   cat conftest.$ac_ext >&5
20604   rm -rf conftest*
20605   ol_cv_type_sig_atomic_t=no
20606 fi
20607 rm -f conftest*
20608 fi
20609
20610 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20611   if test $ol_cv_type_sig_atomic_t = no; then
20612     cat >> confdefs.h <<\EOF
20613 #define sig_atomic_t int
20614 EOF
20615
20616   fi
20617  
20618
20619
20620 # test for pw_gecos in struct passwd
20621 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20622 echo "configure:20623: checking struct passwd for pw_gecos" >&5
20623 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20624   echo $ac_n "(cached) $ac_c" 1>&6
20625 else
20626   
20627         cat > conftest.$ac_ext <<EOF
20628 #line 20629 "configure"
20629 #include "confdefs.h"
20630 #include <pwd.h>
20631 int main() {
20632
20633         struct passwd pwd;
20634         pwd.pw_gecos = pwd.pw_name;
20635
20636 ; return 0; }
20637 EOF
20638 if { (eval echo configure:20639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20639   rm -rf conftest*
20640   ol_cv_struct_passwd_pw_gecos=yes
20641 else
20642   echo "configure: failed program was:" >&5
20643   cat conftest.$ac_ext >&5
20644   rm -rf conftest*
20645   ol_cv_struct_passwd_pw_gecos=no
20646 fi
20647 rm -f conftest*
20648 fi
20649
20650 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20651 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20652         cat >> confdefs.h <<\EOF
20653 #define HAVE_PW_GECOS 1
20654 EOF
20655
20656 fi
20657
20658 # test for pw_passwd in struct passwd
20659 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20660 echo "configure:20661: checking struct passwd for pw_passwd" >&5
20661 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20662   echo $ac_n "(cached) $ac_c" 1>&6
20663 else
20664   
20665         cat > conftest.$ac_ext <<EOF
20666 #line 20667 "configure"
20667 #include "confdefs.h"
20668 #include <pwd.h>
20669 int main() {
20670
20671         struct passwd pwd;
20672         pwd.pw_passwd = pwd.pw_name;
20673
20674 ; return 0; }
20675 EOF
20676 if { (eval echo configure:20677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20677   rm -rf conftest*
20678   ol_cv_struct_passwd_pw_passwd=yes
20679 else
20680   echo "configure: failed program was:" >&5
20681   cat conftest.$ac_ext >&5
20682   rm -rf conftest*
20683   ol_cv_struct_passwd_pw_passwd=no
20684 fi
20685 rm -f conftest*
20686 fi
20687
20688 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20689 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20690         cat >> confdefs.h <<\EOF
20691 #define HAVE_PW_PASSWD 1
20692 EOF
20693
20694 fi
20695
20696
20697 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20698 echo "configure:20699: checking if toupper() requires islower()" >&5
20699 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20700   echo $ac_n "(cached) $ac_c" 1>&6
20701 else
20702   
20703         if test "$cross_compiling" = yes; then
20704   ol_cv_c_upper_lower=safe
20705 else
20706   cat > conftest.$ac_ext <<EOF
20707 #line 20708 "configure"
20708 #include "confdefs.h"
20709
20710 #include <ctype.h>
20711 main()
20712 {
20713         if ('C' == toupper('C'))
20714                 exit(0);
20715         else
20716                 exit(1);
20717 }
20718 EOF
20719 if { (eval echo configure:20720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20720 then
20721   ol_cv_c_upper_lower=no
20722 else
20723   echo "configure: failed program was:" >&5
20724   cat conftest.$ac_ext >&5
20725   rm -fr conftest*
20726   ol_cv_c_upper_lower=yes
20727 fi
20728 rm -fr conftest*
20729 fi
20730
20731 fi
20732
20733 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20734 if test $ol_cv_c_upper_lower != no ; then
20735         cat >> confdefs.h <<\EOF
20736 #define C_UPPER_LOWER 1
20737 EOF
20738
20739 fi
20740
20741 echo $ac_n "checking for working const""... $ac_c" 1>&6
20742 echo "configure:20743: checking for working const" >&5
20743 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20744   echo $ac_n "(cached) $ac_c" 1>&6
20745 else
20746   cat > conftest.$ac_ext <<EOF
20747 #line 20748 "configure"
20748 #include "confdefs.h"
20749
20750 int main() {
20751
20752 /* Ultrix mips cc rejects this.  */
20753 typedef int charset[2]; const charset x;
20754 /* SunOS 4.1.1 cc rejects this.  */
20755 char const *const *ccp;
20756 char **p;
20757 /* NEC SVR4.0.2 mips cc rejects this.  */
20758 struct point {int x, y;};
20759 static struct point const zero = {0,0};
20760 /* AIX XL C 1.02.0.0 rejects this.
20761    It does not let you subtract one const X* pointer from another in an arm
20762    of an if-expression whose if-part is not a constant expression */
20763 const char *g = "string";
20764 ccp = &g + (g ? g-g : 0);
20765 /* HPUX 7.0 cc rejects these. */
20766 ++ccp;
20767 p = (char**) ccp;
20768 ccp = (char const *const *) p;
20769 { /* SCO 3.2v4 cc rejects this.  */
20770   char *t;
20771   char const *s = 0 ? (char *) 0 : (char const *) 0;
20772
20773   *t++ = 0;
20774 }
20775 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20776   int x[] = {25, 17};
20777   const int *foo = &x[0];
20778   ++foo;
20779 }
20780 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20781   typedef const int *iptr;
20782   iptr p = 0;
20783   ++p;
20784 }
20785 { /* AIX XL C 1.02.0.0 rejects this saying
20786      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20787   struct s { int j; const int *ap[3]; };
20788   struct s *b; b->j = 5;
20789 }
20790 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20791   const int foo = 10;
20792 }
20793
20794 ; return 0; }
20795 EOF
20796 if { (eval echo configure:20797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20797   rm -rf conftest*
20798   ac_cv_c_const=yes
20799 else
20800   echo "configure: failed program was:" >&5
20801   cat conftest.$ac_ext >&5
20802   rm -rf conftest*
20803   ac_cv_c_const=no
20804 fi
20805 rm -f conftest*
20806 fi
20807
20808 echo "$ac_t""$ac_cv_c_const" 1>&6
20809 if test $ac_cv_c_const = no; then
20810   cat >> confdefs.h <<\EOF
20811 #define const 
20812 EOF
20813
20814 fi
20815
20816 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20817 echo "configure:20818: checking if compiler understands volatile" >&5
20818 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20819   echo $ac_n "(cached) $ac_c" 1>&6
20820 else
20821   cat > conftest.$ac_ext <<EOF
20822 #line 20823 "configure"
20823 #include "confdefs.h"
20824 int x, y, z;
20825 int main() {
20826 volatile int a; int * volatile b = x ? &y : &z;
20827       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20828       *b = 0;
20829 ; return 0; }
20830 EOF
20831 if { (eval echo configure:20832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20832   rm -rf conftest*
20833   ol_cv_c_volatile=yes
20834 else
20835   echo "configure: failed program was:" >&5
20836   cat conftest.$ac_ext >&5
20837   rm -rf conftest*
20838   ol_cv_c_volatile=no
20839 fi
20840 rm -f conftest*
20841 fi
20842
20843 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20844   if test $ol_cv_c_volatile = yes; then
20845     : 
20846   else
20847     cat >> confdefs.h <<\EOF
20848 #define volatile 
20849 EOF
20850
20851   fi
20852  
20853
20854 if test $cross_compiling = yes ; then
20855         cat >> confdefs.h <<\EOF
20856 #define CROSS_COMPILING 1
20857 EOF
20858
20859 else
20860         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20861 echo "configure:20862: checking whether byte ordering is bigendian" >&5
20862 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20863   echo $ac_n "(cached) $ac_c" 1>&6
20864 else
20865   ac_cv_c_bigendian=unknown
20866 # See if sys/param.h defines the BYTE_ORDER macro.
20867 cat > conftest.$ac_ext <<EOF
20868 #line 20869 "configure"
20869 #include "confdefs.h"
20870 #include <sys/types.h>
20871 #include <sys/param.h>
20872 int main() {
20873
20874 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20875  bogus endian macros
20876 #endif
20877 ; return 0; }
20878 EOF
20879 if { (eval echo configure:20880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20880   rm -rf conftest*
20881   # It does; now see whether it defined to BIG_ENDIAN or not.
20882 cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885 #include <sys/types.h>
20886 #include <sys/param.h>
20887 int main() {
20888
20889 #if BYTE_ORDER != BIG_ENDIAN
20890  not big endian
20891 #endif
20892 ; return 0; }
20893 EOF
20894 if { (eval echo configure:20895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20895   rm -rf conftest*
20896   ac_cv_c_bigendian=yes
20897 else
20898   echo "configure: failed program was:" >&5
20899   cat conftest.$ac_ext >&5
20900   rm -rf conftest*
20901   ac_cv_c_bigendian=no
20902 fi
20903 rm -f conftest*
20904 else
20905   echo "configure: failed program was:" >&5
20906   cat conftest.$ac_ext >&5
20907 fi
20908 rm -f conftest*
20909 if test $ac_cv_c_bigendian = unknown; then
20910 if test "$cross_compiling" = yes; then
20911     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20912 else
20913   cat > conftest.$ac_ext <<EOF
20914 #line 20915 "configure"
20915 #include "confdefs.h"
20916 main () {
20917   /* Are we little or big endian?  From Harbison&Steele.  */
20918   union
20919   {
20920     long l;
20921     char c[sizeof (long)];
20922   } u;
20923   u.l = 1;
20924   exit (u.c[sizeof (long) - 1] == 1);
20925 }
20926 EOF
20927 if { (eval echo configure:20928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20928 then
20929   ac_cv_c_bigendian=no
20930 else
20931   echo "configure: failed program was:" >&5
20932   cat conftest.$ac_ext >&5
20933   rm -fr conftest*
20934   ac_cv_c_bigendian=yes
20935 fi
20936 rm -fr conftest*
20937 fi
20938
20939 fi
20940 fi
20941
20942 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20943 if test $ac_cv_c_bigendian = yes; then
20944   cat >> confdefs.h <<\EOF
20945 #define WORDS_BIGENDIAN 1
20946 EOF
20947
20948 fi
20949
20950 fi
20951
20952 echo $ac_n "checking size of short""... $ac_c" 1>&6
20953 echo "configure:20954: checking size of short" >&5 
20954 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20955   echo $ac_n "(cached) $ac_c" 1>&6
20956 else
20957   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20958   cat > conftest.$ac_ext <<EOF
20959 #line 20960 "configure"
20960 #include "confdefs.h"
20961 #include "confdefs.h" 
20962 #include <sys/types.h> 
20963  
20964
20965 int main() {
20966 switch (0) case 0: case (sizeof (short) == $ac_size):;
20967 ; return 0; }
20968 EOF
20969 if { (eval echo configure:20970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20970   rm -rf conftest*
20971   ac_cv_sizeof_short=$ac_size
20972 else
20973   echo "configure: failed program was:" >&5
20974   cat conftest.$ac_ext >&5
20975 fi
20976 rm -f conftest* 
20977   if test x$ac_cv_sizeof_short != x ; then break; fi 
20978 done 
20979
20980 fi
20981  
20982 if test x$ac_cv_sizeof_short = x ; then 
20983   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20984 fi 
20985 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20986 cat >> confdefs.h <<EOF
20987 #define SIZEOF_SHORT $ac_cv_sizeof_short
20988 EOF
20989  
20990  
20991 echo $ac_n "checking size of int""... $ac_c" 1>&6
20992 echo "configure:20993: checking size of int" >&5 
20993 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20994   echo $ac_n "(cached) $ac_c" 1>&6
20995 else
20996   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20997   cat > conftest.$ac_ext <<EOF
20998 #line 20999 "configure"
20999 #include "confdefs.h"
21000 #include "confdefs.h" 
21001 #include <sys/types.h> 
21002  
21003
21004 int main() {
21005 switch (0) case 0: case (sizeof (int) == $ac_size):;
21006 ; return 0; }
21007 EOF
21008 if { (eval echo configure:21009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21009   rm -rf conftest*
21010   ac_cv_sizeof_int=$ac_size
21011 else
21012   echo "configure: failed program was:" >&5
21013   cat conftest.$ac_ext >&5
21014 fi
21015 rm -f conftest* 
21016   if test x$ac_cv_sizeof_int != x ; then break; fi 
21017 done 
21018
21019 fi
21020  
21021 if test x$ac_cv_sizeof_int = x ; then 
21022   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21023 fi 
21024 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21025 cat >> confdefs.h <<EOF
21026 #define SIZEOF_INT $ac_cv_sizeof_int
21027 EOF
21028  
21029  
21030 echo $ac_n "checking size of long""... $ac_c" 1>&6
21031 echo "configure:21032: checking size of long" >&5 
21032 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21033   echo $ac_n "(cached) $ac_c" 1>&6
21034 else
21035   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21036   cat > conftest.$ac_ext <<EOF
21037 #line 21038 "configure"
21038 #include "confdefs.h"
21039 #include "confdefs.h" 
21040 #include <sys/types.h> 
21041  
21042
21043 int main() {
21044 switch (0) case 0: case (sizeof (long) == $ac_size):;
21045 ; return 0; }
21046 EOF
21047 if { (eval echo configure:21048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21048   rm -rf conftest*
21049   ac_cv_sizeof_long=$ac_size
21050 else
21051   echo "configure: failed program was:" >&5
21052   cat conftest.$ac_ext >&5
21053 fi
21054 rm -f conftest* 
21055   if test x$ac_cv_sizeof_long != x ; then break; fi 
21056 done 
21057
21058 fi
21059  
21060 if test x$ac_cv_sizeof_long = x ; then 
21061   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21062 fi 
21063 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21064 cat >> confdefs.h <<EOF
21065 #define SIZEOF_LONG $ac_cv_sizeof_long
21066 EOF
21067  
21068
21069
21070 if test "$ac_cv_sizeof_int" -lt 4 ; then
21071         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21072
21073         cat >> confdefs.h <<\EOF
21074 #define LBER_INT_T long
21075 EOF
21076
21077 else
21078         cat >> confdefs.h <<\EOF
21079 #define LBER_INT_T int
21080 EOF
21081
21082 fi
21083
21084 cat >> confdefs.h <<\EOF
21085 #define LBER_LEN_T long
21086 EOF
21087
21088 cat >> confdefs.h <<\EOF
21089 #define LBER_SOCKET_T int
21090 EOF
21091
21092 cat >> confdefs.h <<\EOF
21093 #define LBER_TAG_T long
21094 EOF
21095
21096
21097 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21098 echo "configure:21099: checking for 8-bit clean memcmp" >&5
21099 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21100   echo $ac_n "(cached) $ac_c" 1>&6
21101 else
21102   if test "$cross_compiling" = yes; then
21103   ac_cv_func_memcmp_clean=no
21104 else
21105   cat > conftest.$ac_ext <<EOF
21106 #line 21107 "configure"
21107 #include "confdefs.h"
21108
21109 main()
21110 {
21111   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21112   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21113 }
21114
21115 EOF
21116 if { (eval echo configure:21117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21117 then
21118   ac_cv_func_memcmp_clean=yes
21119 else
21120   echo "configure: failed program was:" >&5
21121   cat conftest.$ac_ext >&5
21122   rm -fr conftest*
21123   ac_cv_func_memcmp_clean=no
21124 fi
21125 rm -fr conftest*
21126 fi
21127
21128 fi
21129
21130 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21131 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21132
21133 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21134 echo "configure:21135: checking for strftime" >&5
21135 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21136   echo $ac_n "(cached) $ac_c" 1>&6
21137 else
21138   cat > conftest.$ac_ext <<EOF
21139 #line 21140 "configure"
21140 #include "confdefs.h"
21141 /* System header to define __stub macros and hopefully few prototypes,
21142     which can conflict with char strftime(); below.  */
21143 #include <assert.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 char (*f)();
21149
21150 int main() {
21151
21152 /* The GNU C library defines this for functions which it implements
21153     to always fail with ENOSYS.  Some functions are actually named
21154     something starting with __ and the normal name is an alias.  */
21155 #if defined (__stub_strftime) || defined (__stub___strftime)
21156 choke me
21157 #else
21158 f = strftime;
21159 #endif
21160
21161 ; return 0; }
21162 EOF
21163 if { (eval echo configure:21164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21164   rm -rf conftest*
21165   eval "ac_cv_func_strftime=yes"
21166 else
21167   echo "configure: failed program was:" >&5
21168   cat conftest.$ac_ext >&5
21169   rm -rf conftest*
21170   eval "ac_cv_func_strftime=no"
21171 fi
21172 rm -f conftest*
21173 fi
21174
21175 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21176   echo "$ac_t""yes" 1>&6
21177   cat >> confdefs.h <<\EOF
21178 #define HAVE_STRFTIME 1
21179 EOF
21180
21181 else
21182   echo "$ac_t""no" 1>&6
21183 # strftime is in -lintl on SCO UNIX.
21184 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21185 echo "configure:21186: checking for strftime in -lintl" >&5
21186 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21188   echo $ac_n "(cached) $ac_c" 1>&6
21189 else
21190   ac_save_LIBS="$LIBS"
21191 LIBS="-lintl  $LIBS"
21192 cat > conftest.$ac_ext <<EOF
21193 #line 21194 "configure"
21194 #include "confdefs.h"
21195 /* Override any gcc2 internal prototype to avoid an error.  */
21196 /* We use char because int might match the return type of a gcc2
21197     builtin and then its argument prototype would still apply.  */
21198 char strftime();
21199
21200 int main() {
21201 strftime()
21202 ; return 0; }
21203 EOF
21204 if { (eval echo configure:21205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21205   rm -rf conftest*
21206   eval "ac_cv_lib_$ac_lib_var=yes"
21207 else
21208   echo "configure: failed program was:" >&5
21209   cat conftest.$ac_ext >&5
21210   rm -rf conftest*
21211   eval "ac_cv_lib_$ac_lib_var=no"
21212 fi
21213 rm -f conftest*
21214 LIBS="$ac_save_LIBS"
21215
21216 fi
21217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21218   echo "$ac_t""yes" 1>&6
21219   cat >> confdefs.h <<\EOF
21220 #define HAVE_STRFTIME 1
21221 EOF
21222
21223 LIBS="-lintl $LIBS"
21224 else
21225   echo "$ac_t""no" 1>&6
21226 fi
21227
21228 fi
21229
21230
21231 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21232 echo "configure:21233: checking for inet_aton()" >&5
21233 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21234   echo $ac_n "(cached) $ac_c" 1>&6
21235 else
21236   cat > conftest.$ac_ext <<EOF
21237 #line 21238 "configure"
21238 #include "confdefs.h"
21239
21240 #ifdef HAVE_SYS_TYPES_H
21241 #       include <sys/types.h>
21242 #endif
21243 #ifdef HAVE_SYS_SOCKET_H
21244 #       include <sys/socket.h>
21245 #       ifdef HAVE_SYS_SELECT_H
21246 #               include <sys/select.h>
21247 #       endif
21248 #       include <netinet/in.h>
21249 #       ifdef HAVE_ARPA_INET_H
21250 #               include <arpa/inet.h>
21251 #       endif
21252 #endif
21253
21254 int main() {
21255 struct in_addr in;
21256 int rc = inet_aton( "255.255.255.255", &in );
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   ol_cv_func_inet_aton=yes
21262 else
21263   echo "configure: failed program was:" >&5
21264   cat conftest.$ac_ext >&5
21265   rm -rf conftest*
21266   ol_cv_func_inet_aton=no
21267 fi
21268 rm -f conftest*
21269 fi
21270
21271 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21272   if test $ol_cv_func_inet_aton != no; then
21273     cat >> confdefs.h <<\EOF
21274 #define HAVE_INET_ATON 1
21275 EOF
21276
21277   fi
21278  
21279
21280 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21281 echo "configure:21282: checking for _spawnlp" >&5
21282 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21283   echo $ac_n "(cached) $ac_c" 1>&6
21284 else
21285   cat > conftest.$ac_ext <<EOF
21286 #line 21287 "configure"
21287 #include "confdefs.h"
21288 /* System header to define __stub macros and hopefully few prototypes,
21289     which can conflict with char _spawnlp(); below.  */
21290 #include <assert.h>
21291 /* Override any gcc2 internal prototype to avoid an error.  */
21292 /* We use char because int might match the return type of a gcc2
21293     builtin and then its argument prototype would still apply.  */
21294 char _spawnlp();
21295 char (*f)();
21296
21297 int main() {
21298
21299 /* The GNU C library defines this for functions which it implements
21300     to always fail with ENOSYS.  Some functions are actually named
21301     something starting with __ and the normal name is an alias.  */
21302 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21303 choke me
21304 #else
21305 f = _spawnlp;
21306 #endif
21307
21308 ; return 0; }
21309 EOF
21310 if { (eval echo configure:21311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21311   rm -rf conftest*
21312   eval "ac_cv_func__spawnlp=yes"
21313 else
21314   echo "configure: failed program was:" >&5
21315   cat conftest.$ac_ext >&5
21316   rm -rf conftest*
21317   eval "ac_cv_func__spawnlp=no"
21318 fi
21319 rm -f conftest*
21320 fi
21321
21322 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21323   echo "$ac_t""yes" 1>&6
21324   cat >> confdefs.h <<\EOF
21325 #define HAVE_SPAWNLP 1
21326 EOF
21327
21328 else
21329   echo "$ac_t""no" 1>&6
21330 fi
21331
21332
21333 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21334 echo "configure:21335: checking for _snprintf" >&5
21335 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21336   echo $ac_n "(cached) $ac_c" 1>&6
21337 else
21338   cat > conftest.$ac_ext <<EOF
21339 #line 21340 "configure"
21340 #include "confdefs.h"
21341 /* System header to define __stub macros and hopefully few prototypes,
21342     which can conflict with char _snprintf(); below.  */
21343 #include <assert.h>
21344 /* Override any gcc2 internal prototype to avoid an error.  */
21345 /* We use char because int might match the return type of a gcc2
21346     builtin and then its argument prototype would still apply.  */
21347 char _snprintf();
21348 char (*f)();
21349
21350 int main() {
21351
21352 /* The GNU C library defines this for functions which it implements
21353     to always fail with ENOSYS.  Some functions are actually named
21354     something starting with __ and the normal name is an alias.  */
21355 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21356 choke me
21357 #else
21358 f = _snprintf;
21359 #endif
21360
21361 ; return 0; }
21362 EOF
21363 if { (eval echo configure:21364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21364   rm -rf conftest*
21365   eval "ac_cv_func__snprintf=yes"
21366 else
21367   echo "configure: failed program was:" >&5
21368   cat conftest.$ac_ext >&5
21369   rm -rf conftest*
21370   eval "ac_cv_func__snprintf=no"
21371 fi
21372 rm -f conftest*
21373 fi
21374
21375 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21376   echo "$ac_t""yes" 1>&6
21377   ac_cv_func_snprintf=yes
21378         cat >> confdefs.h <<\EOF
21379 #define snprintf _snprintf
21380 EOF
21381
21382
21383 else
21384   echo "$ac_t""no" 1>&6
21385 fi
21386
21387
21388 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21389 echo "configure:21390: checking for _vsnprintf" >&5
21390 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21391   echo $ac_n "(cached) $ac_c" 1>&6
21392 else
21393   cat > conftest.$ac_ext <<EOF
21394 #line 21395 "configure"
21395 #include "confdefs.h"
21396 /* System header to define __stub macros and hopefully few prototypes,
21397     which can conflict with char _vsnprintf(); below.  */
21398 #include <assert.h>
21399 /* Override any gcc2 internal prototype to avoid an error.  */
21400 /* We use char because int might match the return type of a gcc2
21401     builtin and then its argument prototype would still apply.  */
21402 char _vsnprintf();
21403 char (*f)();
21404
21405 int main() {
21406
21407 /* The GNU C library defines this for functions which it implements
21408     to always fail with ENOSYS.  Some functions are actually named
21409     something starting with __ and the normal name is an alias.  */
21410 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21411 choke me
21412 #else
21413 f = _vsnprintf;
21414 #endif
21415
21416 ; return 0; }
21417 EOF
21418 if { (eval echo configure:21419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21419   rm -rf conftest*
21420   eval "ac_cv_func__vsnprintf=yes"
21421 else
21422   echo "configure: failed program was:" >&5
21423   cat conftest.$ac_ext >&5
21424   rm -rf conftest*
21425   eval "ac_cv_func__vsnprintf=no"
21426 fi
21427 rm -f conftest*
21428 fi
21429
21430 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21431   echo "$ac_t""yes" 1>&6
21432   ac_cv_func_vsnprintf=yes
21433         cat >> confdefs.h <<\EOF
21434 #define vsnprintf _vsnprintf
21435 EOF
21436
21437
21438 else
21439   echo "$ac_t""no" 1>&6
21440 fi
21441
21442
21443 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21444 echo "configure:21445: checking for vprintf" >&5
21445 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21446   echo $ac_n "(cached) $ac_c" 1>&6
21447 else
21448   cat > conftest.$ac_ext <<EOF
21449 #line 21450 "configure"
21450 #include "confdefs.h"
21451 /* System header to define __stub macros and hopefully few prototypes,
21452     which can conflict with char vprintf(); below.  */
21453 #include <assert.h>
21454 /* Override any gcc2 internal prototype to avoid an error.  */
21455 /* We use char because int might match the return type of a gcc2
21456     builtin and then its argument prototype would still apply.  */
21457 char vprintf();
21458 char (*f)();
21459
21460 int main() {
21461
21462 /* The GNU C library defines this for functions which it implements
21463     to always fail with ENOSYS.  Some functions are actually named
21464     something starting with __ and the normal name is an alias.  */
21465 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21466 choke me
21467 #else
21468 f = vprintf;
21469 #endif
21470
21471 ; return 0; }
21472 EOF
21473 if { (eval echo configure:21474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21474   rm -rf conftest*
21475   eval "ac_cv_func_vprintf=yes"
21476 else
21477   echo "configure: failed program was:" >&5
21478   cat conftest.$ac_ext >&5
21479   rm -rf conftest*
21480   eval "ac_cv_func_vprintf=no"
21481 fi
21482 rm -f conftest*
21483 fi
21484
21485 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21486   echo "$ac_t""yes" 1>&6
21487   cat >> confdefs.h <<\EOF
21488 #define HAVE_VPRINTF 1
21489 EOF
21490
21491 else
21492   echo "$ac_t""no" 1>&6
21493 fi
21494
21495 if test "$ac_cv_func_vprintf" != yes; then
21496 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21497 echo "configure:21498: checking for _doprnt" >&5
21498 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21499   echo $ac_n "(cached) $ac_c" 1>&6
21500 else
21501   cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 /* System header to define __stub macros and hopefully few prototypes,
21505     which can conflict with char _doprnt(); below.  */
21506 #include <assert.h>
21507 /* Override any gcc2 internal prototype to avoid an error.  */
21508 /* We use char because int might match the return type of a gcc2
21509     builtin and then its argument prototype would still apply.  */
21510 char _doprnt();
21511 char (*f)();
21512
21513 int main() {
21514
21515 /* The GNU C library defines this for functions which it implements
21516     to always fail with ENOSYS.  Some functions are actually named
21517     something starting with __ and the normal name is an alias.  */
21518 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21519 choke me
21520 #else
21521 f = _doprnt;
21522 #endif
21523
21524 ; return 0; }
21525 EOF
21526 if { (eval echo configure:21527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21527   rm -rf conftest*
21528   eval "ac_cv_func__doprnt=yes"
21529 else
21530   echo "configure: failed program was:" >&5
21531   cat conftest.$ac_ext >&5
21532   rm -rf conftest*
21533   eval "ac_cv_func__doprnt=no"
21534 fi
21535 rm -f conftest*
21536 fi
21537
21538 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21539   echo "$ac_t""yes" 1>&6
21540   cat >> confdefs.h <<\EOF
21541 #define HAVE_DOPRNT 1
21542 EOF
21543
21544 else
21545   echo "$ac_t""no" 1>&6
21546 fi
21547
21548 fi
21549
21550
21551 if test $ac_cv_func_vprintf = yes ; then
21552                 for ac_func in vsnprintf vsprintf
21553 do
21554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21555 echo "configure:21556: checking for $ac_func" >&5
21556 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21557   echo $ac_n "(cached) $ac_c" 1>&6
21558 else
21559   cat > conftest.$ac_ext <<EOF
21560 #line 21561 "configure"
21561 #include "confdefs.h"
21562 /* System header to define __stub macros and hopefully few prototypes,
21563     which can conflict with char $ac_func(); below.  */
21564 #include <assert.h>
21565 /* Override any gcc2 internal prototype to avoid an error.  */
21566 /* We use char because int might match the return type of a gcc2
21567     builtin and then its argument prototype would still apply.  */
21568 char $ac_func();
21569 char (*f)();
21570
21571 int main() {
21572
21573 /* The GNU C library defines this for functions which it implements
21574     to always fail with ENOSYS.  Some functions are actually named
21575     something starting with __ and the normal name is an alias.  */
21576 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21577 choke me
21578 #else
21579 f = $ac_func;
21580 #endif
21581
21582 ; return 0; }
21583 EOF
21584 if { (eval echo configure:21585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21585   rm -rf conftest*
21586   eval "ac_cv_func_$ac_func=yes"
21587 else
21588   echo "configure: failed program was:" >&5
21589   cat conftest.$ac_ext >&5
21590   rm -rf conftest*
21591   eval "ac_cv_func_$ac_func=no"
21592 fi
21593 rm -f conftest*
21594 fi
21595
21596 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21597   echo "$ac_t""yes" 1>&6
21598     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21599   cat >> confdefs.h <<EOF
21600 #define $ac_tr_func 1
21601 EOF
21602  
21603 else
21604   echo "$ac_t""no" 1>&6
21605 fi
21606 done
21607
21608 fi
21609
21610 for ac_func in \
21611         bcopy                   \
21612         closesocket             \
21613         chroot                  \
21614         endgrent                \
21615         endpwent                \
21616         fcntl                   \
21617         flock                   \
21618         getdtablesize   \
21619         getgrgid                \
21620         gethostname             \
21621         getpass                 \
21622         getpassphrase   \
21623         getpwuid                \
21624         getpwnam                \
21625         getspnam                \
21626         gettimeofday    \
21627         initgroups              \
21628         lockf                   \
21629         memcpy                  \
21630         memmove                 \
21631         mkstemp                 \
21632         mktemp                  \
21633         pipe                    \
21634         read                    \
21635         recv                    \
21636         recvfrom                \
21637         recvmsg                 \
21638         setpwfile               \
21639         setgid                  \
21640         setegid                 \
21641         setsid                  \
21642         setuid                  \
21643         seteuid                 \
21644         sigaction               \
21645         signal                  \
21646         sigset                  \
21647         strdup                  \
21648         strerror                \
21649         strpbrk                 \
21650         strrchr                 \
21651         strsep                  \
21652         strstr                  \
21653         strtol                  \
21654         strtoul                 \
21655         strspn                  \
21656         sysconf                 \
21657         usleep                  \
21658         waitpid                 \
21659         wait4                   \
21660         write                   \
21661         send                    \
21662         sendto                  \
21663
21664 do
21665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21666 echo "configure:21667: checking for $ac_func" >&5
21667 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21668   echo $ac_n "(cached) $ac_c" 1>&6
21669 else
21670   cat > conftest.$ac_ext <<EOF
21671 #line 21672 "configure"
21672 #include "confdefs.h"
21673 /* System header to define __stub macros and hopefully few prototypes,
21674     which can conflict with char $ac_func(); below.  */
21675 #include <assert.h>
21676 /* Override any gcc2 internal prototype to avoid an error.  */
21677 /* We use char because int might match the return type of a gcc2
21678     builtin and then its argument prototype would still apply.  */
21679 char $ac_func();
21680 char (*f)();
21681
21682 int main() {
21683
21684 /* The GNU C library defines this for functions which it implements
21685     to always fail with ENOSYS.  Some functions are actually named
21686     something starting with __ and the normal name is an alias.  */
21687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21688 choke me
21689 #else
21690 f = $ac_func;
21691 #endif
21692
21693 ; return 0; }
21694 EOF
21695 if { (eval echo configure:21696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21696   rm -rf conftest*
21697   eval "ac_cv_func_$ac_func=yes"
21698 else
21699   echo "configure: failed program was:" >&5
21700   cat conftest.$ac_ext >&5
21701   rm -rf conftest*
21702   eval "ac_cv_func_$ac_func=no"
21703 fi
21704 rm -f conftest*
21705 fi
21706
21707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21708   echo "$ac_t""yes" 1>&6
21709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21710   cat >> confdefs.h <<EOF
21711 #define $ac_tr_func 1
21712 EOF
21713  
21714 else
21715   echo "$ac_t""no" 1>&6
21716 fi
21717 done
21718
21719
21720 for ac_func in getopt
21721 do
21722 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21723 echo "configure:21724: checking for $ac_func" >&5
21724 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21725   echo $ac_n "(cached) $ac_c" 1>&6
21726 else
21727   cat > conftest.$ac_ext <<EOF
21728 #line 21729 "configure"
21729 #include "confdefs.h"
21730 /* System header to define __stub macros and hopefully few prototypes,
21731     which can conflict with char $ac_func(); below.  */
21732 #include <assert.h>
21733 /* Override any gcc2 internal prototype to avoid an error.  */
21734 /* We use char because int might match the return type of a gcc2
21735     builtin and then its argument prototype would still apply.  */
21736 char $ac_func();
21737 char (*f)();
21738
21739 int main() {
21740
21741 /* The GNU C library defines this for functions which it implements
21742     to always fail with ENOSYS.  Some functions are actually named
21743     something starting with __ and the normal name is an alias.  */
21744 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21745 choke me
21746 #else
21747 f = $ac_func;
21748 #endif
21749
21750 ; return 0; }
21751 EOF
21752 if { (eval echo configure:21753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21753   rm -rf conftest*
21754   eval "ac_cv_func_$ac_func=yes"
21755 else
21756   echo "configure: failed program was:" >&5
21757   cat conftest.$ac_ext >&5
21758   rm -rf conftest*
21759   eval "ac_cv_func_$ac_func=no"
21760 fi
21761 rm -f conftest*
21762 fi
21763
21764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21765   echo "$ac_t""yes" 1>&6
21766     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21767   cat >> confdefs.h <<EOF
21768 #define $ac_tr_func 1
21769 EOF
21770  
21771 else
21772   echo "$ac_t""no" 1>&6
21773 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21774 fi
21775 done
21776
21777
21778
21779 if test "$ac_cv_func_getopt" != yes; then
21780         LIBSRCS="$LIBSRCS getopt.c"
21781 fi
21782
21783 # Check Configuration
21784 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21785 echo "configure:21786: checking declaration of sys_errlist" >&5
21786 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21787   echo $ac_n "(cached) $ac_c" 1>&6
21788 else
21789   
21790         cat > conftest.$ac_ext <<EOF
21791 #line 21792 "configure"
21792 #include "confdefs.h"
21793
21794 #include <stdio.h>
21795 #include <sys/types.h>
21796 #include <errno.h>
21797 #ifdef WINNT
21798 #include <stdlib.h>
21799 #endif 
21800 int main() {
21801 char *c = (char *) *sys_errlist
21802 ; return 0; }
21803 EOF
21804 if { (eval echo configure:21805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21805   rm -rf conftest*
21806   ol_cv_dcl_sys_errlist=yes
21807         ol_cv_have_sys_errlist=yes
21808 else
21809   echo "configure: failed program was:" >&5
21810   cat conftest.$ac_ext >&5
21811   rm -rf conftest*
21812   ol_cv_dcl_sys_errlist=no
21813 fi
21814 rm -f conftest*
21815 fi
21816
21817 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21818 #
21819 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21820 if test $ol_cv_dcl_sys_errlist = no ; then
21821         cat >> confdefs.h <<\EOF
21822 #define DECL_SYS_ERRLIST 1
21823 EOF
21824
21825
21826         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21827 echo "configure:21828: checking existence of sys_errlist" >&5
21828 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21829   echo $ac_n "(cached) $ac_c" 1>&6
21830 else
21831   
21832                 cat > conftest.$ac_ext <<EOF
21833 #line 21834 "configure"
21834 #include "confdefs.h"
21835 #include <errno.h>
21836 int main() {
21837 char *c = (char *) *sys_errlist
21838 ; return 0; }
21839 EOF
21840 if { (eval echo configure:21841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21841   rm -rf conftest*
21842   ol_cv_have_sys_errlist=yes
21843 else
21844   echo "configure: failed program was:" >&5
21845   cat conftest.$ac_ext >&5
21846   rm -rf conftest*
21847   ol_cv_have_sys_errlist=no
21848 fi
21849 rm -f conftest*
21850 fi
21851
21852 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21853 fi
21854 if test $ol_cv_have_sys_errlist = yes ; then
21855         cat >> confdefs.h <<\EOF
21856 #define HAVE_SYS_ERRLIST 1
21857 EOF
21858
21859 fi
21860
21861
21862
21863 if test "$ol_enable_debug" != no ; then
21864         cat >> confdefs.h <<\EOF
21865 #define LDAP_DEBUG 1
21866 EOF
21867
21868 fi
21869 if test "$ol_enable_syslog" = yes ; then
21870         cat >> confdefs.h <<\EOF
21871 #define LDAP_SYSLOG 1
21872 EOF
21873
21874 fi
21875 if test "$ol_enable_cache" = no ; then
21876         cat >> confdefs.h <<\EOF
21877 #define LDAP_NOCACHE 1
21878 EOF
21879
21880 fi
21881 if test "$ol_link_kbind" != no ; then
21882         cat >> confdefs.h <<\EOF
21883 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21884 EOF
21885
21886 fi
21887 if test "$ol_enable_proctitle" != no ; then
21888         cat >> confdefs.h <<\EOF
21889 #define LDAP_PROCTITLE 1
21890 EOF
21891
21892 fi
21893 if test "$ol_enable_referrals" != no ; then
21894         cat >> confdefs.h <<\EOF
21895 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21896 EOF
21897
21898 fi
21899 if test "$ol_enable_local" != no; then
21900         cat >> confdefs.h <<\EOF
21901 #define LDAP_PF_LOCAL 1
21902 EOF
21903
21904 fi
21905 if test "$ol_link_ipv6" != no; then
21906         cat >> confdefs.h <<\EOF
21907 #define LDAP_PF_INET6 1
21908 EOF
21909
21910 fi
21911 if test "$ol_enable_cleartext" != no ; then
21912         cat >> confdefs.h <<\EOF
21913 #define SLAPD_CLEARTEXT 1
21914 EOF
21915
21916 fi
21917 if test "$ol_enable_crypt" != no ; then
21918         cat >> confdefs.h <<\EOF
21919 #define SLAPD_CRYPT 1
21920 EOF
21921
21922 fi
21923 if test "$ol_link_kpasswd" != no ; then
21924         cat >> confdefs.h <<\EOF
21925 #define SLAPD_KPASSWD 1
21926 EOF
21927
21928 fi
21929 if test "$ol_link_spasswd" != no ; then
21930         cat >> confdefs.h <<\EOF
21931 #define SLAPD_SPASSWD 1
21932 EOF
21933
21934 fi
21935 if test "$ol_enable_phonetic" != no ; then
21936         cat >> confdefs.h <<\EOF
21937 #define SLAPD_PHONETIC 1
21938 EOF
21939
21940 fi
21941 if test "$ol_enable_rlookups" != no ; then
21942         cat >> confdefs.h <<\EOF
21943 #define SLAPD_RLOOKUPS 1
21944 EOF
21945
21946 fi
21947 if test "$ol_enable_aci" != no ; then
21948         cat >> confdefs.h <<\EOF
21949 #define SLAPD_ACI_ENABLED 1
21950 EOF
21951
21952 fi
21953
21954 if test "$ol_link_modules" != no ; then
21955         cat >> confdefs.h <<\EOF
21956 #define SLAPD_MODULES 1
21957 EOF
21958
21959         BUILD_SLAPD=yes
21960         SLAPD_MODULES_LDFLAGS="-dlopen self"
21961 fi
21962
21963 if test "$ol_enable_bdb" != no ; then
21964         cat >> confdefs.h <<\EOF
21965 #define SLAPD_BDB 1
21966 EOF
21967
21968         BUILD_SLAPD=yes
21969         BUILD_BDB=yes
21970         if test "$ol_with_bdb_module" != static ; then
21971                 cat >> confdefs.h <<\EOF
21972 #define SLAPD_BDB_DYNAMIC 1
21973 EOF
21974
21975                 BUILD_BDB=mod
21976                 BUILD_BDB_DYNAMIC=shared
21977                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21978         else
21979                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21980         fi
21981 fi
21982
21983 if test "$ol_link_dnssrv" != no ; then
21984         cat >> confdefs.h <<\EOF
21985 #define SLAPD_DNSSRV 1
21986 EOF
21987
21988         BUILD_SLAPD=yes
21989         BUILD_DNSSRV=yes
21990         if test "$ol_with_dnssrv_module" != static ; then
21991                 cat >> confdefs.h <<\EOF
21992 #define SLAPD_DNSSRV_DYNAMIC 1
21993 EOF
21994
21995                 BUILD_DNSSRV=mod
21996                 BUILD_DNSSRV_DYNAMIC=shared
21997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21998         else
21999                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22000         fi
22001 fi
22002
22003 if test "$ol_enable_ldap" != no ; then
22004         cat >> confdefs.h <<\EOF
22005 #define SLAPD_LDAP 1
22006 EOF
22007
22008         BUILD_SLAPD=yes
22009         BUILD_LDAP=yes
22010         if test "$ol_with_ldap_module" != static ; then
22011                 cat >> confdefs.h <<\EOF
22012 #define SLAPD_LDAP_DYNAMIC 1
22013 EOF
22014
22015                 BUILD_LDAP=mod
22016                 BUILD_LDAP_DYNAMIC=shared
22017                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22018         else
22019                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22020         fi
22021 fi
22022
22023 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22024         cat >> confdefs.h <<\EOF
22025 #define SLAPD_LDBM 1
22026 EOF
22027
22028         BUILD_SLAPD=yes
22029         BUILD_LDBM=yes
22030         LDBM_LIB="-lldbm"
22031         if test "$ol_with_ldbm_module" != static ; then
22032                 cat >> confdefs.h <<\EOF
22033 #define SLAPD_LDBM_DYNAMIC 1
22034 EOF
22035
22036                 BUILD_LDBM=mod
22037                 BUILD_LDBM_DYNAMIC=shared
22038                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22039         else
22040                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22041         fi
22042 fi
22043
22044 if test "$ol_enable_meta" != no ; then
22045         if test "$ol_enable_ldap" = no ; then
22046                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22047         fi
22048         if test "$ol_enable_rewrite" = no ; then
22049                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22050         fi
22051         cat >> confdefs.h <<\EOF
22052 #define SLAPD_META 1
22053 EOF
22054
22055         BUILD_SLAPD=yes
22056         BUILD_META=yes
22057         BUILD_LDAP=yes
22058         BUILD_REWRITE=yes
22059         if test "$ol_with_meta_module" != static ; then
22060                 cat >> confdefs.h <<\EOF
22061 #define SLAPD_META_DYNAMIC 1
22062 EOF
22063
22064                 BUILD_META=mod
22065                 BUILD_META_DYNAMIC=shared
22066                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22067         else
22068                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22069         fi
22070 fi
22071
22072 if test "$ol_enable_monitor" != no ; then
22073         cat >> confdefs.h <<\EOF
22074 #define SLAPD_MONITOR 1
22075 EOF
22076
22077         BUILD_SLAPD=yes
22078         BUILD_MONITOR=yes
22079         if test "$ol_with_monitor_module" != static ; then
22080                 cat >> confdefs.h <<\EOF
22081 #define SLAPD_MONITOR_DYNAMIC 1
22082 EOF
22083
22084                 BUILD_MONITOR=mod
22085                 BUILD_MONITOR_DYNAMIC=shared
22086                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22087         else
22088                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22089         fi
22090 fi
22091
22092 if test "$ol_enable_null" != no ; then
22093         cat >> confdefs.h <<\EOF
22094 #define SLAPD_NULL 1
22095 EOF
22096
22097         BUILD_SLAPD=yes
22098         BUILD_NULL=yes
22099         if test "$ol_with_null_module" != static ; then
22100                 cat >> confdefs.h <<\EOF
22101 #define SLAPD_NULL_DYNAMIC 1
22102 EOF
22103
22104                 BUILD_NULL=mod
22105                 BUILD_NULL_DYNAMIC=shared
22106                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22107         else
22108                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22109         fi
22110 fi
22111
22112 if test "$ol_enable_passwd" != no ; then
22113         cat >> confdefs.h <<\EOF
22114 #define SLAPD_PASSWD 1
22115 EOF
22116
22117         BUILD_SLAPD=yes
22118         BUILD_PASSWD=yes
22119         if test "$ol_with_passwd_module" != static ; then
22120                 cat >> confdefs.h <<\EOF
22121 #define SLAPD_PASSWD_DYNAMIC 1
22122 EOF
22123
22124                 BUILD_PASSWD=mod
22125                 BUILD_PASSWD_DYNAMIC=shared
22126                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22127         else
22128                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22129         fi
22130 fi
22131
22132 if test "$ol_link_perl" != no ; then
22133         cat >> confdefs.h <<\EOF
22134 #define SLAPD_PERL 1
22135 EOF
22136
22137         BUILD_SLAPD=yes
22138         BUILD_PERL=yes
22139         if test "$ol_with_perl_module" != static ; then
22140                 cat >> confdefs.h <<\EOF
22141 #define SLAPD_PERL_DYNAMIC 1
22142 EOF
22143
22144                 BUILD_PERL=mod
22145                 BUILD_PERL_DYNAMIC=shared
22146                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22147         else
22148                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22149         fi
22150 fi
22151
22152 if test "$ol_enable_shell" != no ; then
22153         cat >> confdefs.h <<\EOF
22154 #define SLAPD_SHELL 1
22155 EOF
22156
22157         BUILD_SLAPD=yes
22158         BUILD_SHELL=yes
22159         if test "$ol_with_shell_module" != static ; then
22160                 cat >> confdefs.h <<\EOF
22161 #define SLAPD_SHELL_DYNAMIC 1
22162 EOF
22163
22164                 BUILD_SHELL=mod
22165                 BUILD_SHELL_DYNAMIC=shared
22166                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22167         else
22168                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22169         fi
22170 fi
22171
22172 if test "$ol_link_sql" != no ; then
22173         cat >> confdefs.h <<\EOF
22174 #define SLAPD_SQL 1
22175 EOF
22176
22177         BUILD_SLAPD=yes
22178         BUILD_SQL=yes
22179         if test "$ol_with_sql_module" != static; then
22180                 cat >> confdefs.h <<\EOF
22181 #define SLAPD_SQL_DYNAMIC 1
22182 EOF
22183
22184                 BUILD_SQL=mod
22185                 BUILD_SQL_DYNAMIC=shared
22186                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22187         else
22188                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22189         fi
22190 fi
22191
22192 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22193         $BUILD_SLAPD = yes ; then
22194         BUILD_SLURPD=yes
22195 fi
22196
22197 if test "$ol_enable_rewrite" != no ; then
22198         cat >> confdefs.h <<\EOF
22199 #define ENABLE_REWRITE 1
22200 EOF
22201
22202         BUILD_REWRITE=yes
22203 fi
22204
22205
22206
22207 if test "$ac_cv_mingw32" = yes ; then
22208         PLAT=NT
22209         SLAPD_MODULES_LDFLAGS=
22210 else
22211         PLAT=UNIX
22212 fi
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   
22239   
22240   
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279 # Check whether --with-xxinstall or --without-xxinstall was given.
22280 if test "${with_xxinstall+set}" = set; then
22281   withval="$with_xxinstall"
22282   :
22283 fi
22284
22285
22286
22287 trap '' 1 2 15
22288
22289 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22290
22291 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22292 # Let make expand exec_prefix.
22293 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22294
22295 # Any assignment to VPATH causes Sun make to only execute
22296 # the first set of double-colon rules, so remove it if not needed.
22297 # If there is a colon in the path, we need to keep it.
22298 if test "x$srcdir" = x.; then
22299   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22300 fi
22301
22302 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22303
22304 DEFS=-DHAVE_CONFIG_H
22305
22306 # Without the "./", some shells look in PATH for config.status.
22307 : ${CONFIG_STATUS=./config.status}
22308
22309 echo creating $CONFIG_STATUS
22310 rm -f $CONFIG_STATUS
22311 cat > $CONFIG_STATUS <<EOF
22312 #! /bin/sh
22313 # Generated automatically by configure.
22314 # Run this file to recreate the current configuration.
22315 # This directory was configured as follows,
22316 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22317 #
22318 # $0 $ac_configure_args
22319 #
22320 # Compiler output produced by configure, useful for debugging
22321 # configure, is in ./config.log if it exists.
22322
22323 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22324 for ac_option
22325 do
22326   case "\$ac_option" in
22327   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22328     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22329     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22330   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22331     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22332     exit 0 ;;
22333   -help | --help | --hel | --he | --h)
22334     echo "\$ac_cs_usage"; exit 0 ;;
22335   *) echo "\$ac_cs_usage"; exit 1 ;;
22336   esac
22337 done
22338
22339 ac_given_srcdir=$srcdir
22340 ac_given_INSTALL="$INSTALL"
22341
22342 trap 'rm -fr `echo "\
22343 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22344 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22345 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22346 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22347 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22348 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22349 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22350 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22351 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22352 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22353 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22354 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22355 include/Makefile:build/top.mk:include/Makefile.in \
22356 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22357 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22358 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22359 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22360 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22361 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22362 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22363 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22364 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22365 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22366 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22367 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22368 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22369 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22370 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22371 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22372 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22373 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22374 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22375 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22376 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22377 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22378 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22379 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22380 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22381 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22382 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22383 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22384  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22385 EOF
22386 cat >> $CONFIG_STATUS <<EOF
22387
22388 # Protect against being on the right side of a sed subst in config.status.
22389 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22390  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22391 $ac_vpsub
22392 $extrasub
22393 s%@SHELL@%$SHELL%g
22394 s%@CFLAGS@%$CFLAGS%g
22395 s%@CPPFLAGS@%$CPPFLAGS%g
22396 s%@CXXFLAGS@%$CXXFLAGS%g
22397 s%@FFLAGS@%$FFLAGS%g
22398 s%@DEFS@%$DEFS%g
22399 s%@LDFLAGS@%$LDFLAGS%g
22400 s%@LIBS@%$LIBS%g
22401 s%@exec_prefix@%$exec_prefix%g
22402 s%@prefix@%$prefix%g
22403 s%@program_transform_name@%$program_transform_name%g
22404 s%@bindir@%$bindir%g
22405 s%@sbindir@%$sbindir%g
22406 s%@libexecdir@%$libexecdir%g
22407 s%@datadir@%$datadir%g
22408 s%@sysconfdir@%$sysconfdir%g
22409 s%@sharedstatedir@%$sharedstatedir%g
22410 s%@localstatedir@%$localstatedir%g
22411 s%@libdir@%$libdir%g
22412 s%@includedir@%$includedir%g
22413 s%@oldincludedir@%$oldincludedir%g
22414 s%@infodir@%$infodir%g
22415 s%@mandir@%$mandir%g
22416 s%@host@%$host%g
22417 s%@host_alias@%$host_alias%g
22418 s%@host_cpu@%$host_cpu%g
22419 s%@host_vendor@%$host_vendor%g
22420 s%@host_os@%$host_os%g
22421 s%@target@%$target%g
22422 s%@target_alias@%$target_alias%g
22423 s%@target_cpu@%$target_cpu%g
22424 s%@target_vendor@%$target_vendor%g
22425 s%@target_os@%$target_os%g
22426 s%@build@%$build%g
22427 s%@build_alias@%$build_alias%g
22428 s%@build_cpu@%$build_cpu%g
22429 s%@build_vendor@%$build_vendor%g
22430 s%@build_os@%$build_os%g
22431 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22432 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22433 s%@INSTALL_DATA@%$INSTALL_DATA%g
22434 s%@PACKAGE@%$PACKAGE%g
22435 s%@VERSION@%$VERSION%g
22436 s%@ACLOCAL@%$ACLOCAL%g
22437 s%@AUTOCONF@%$AUTOCONF%g
22438 s%@AUTOMAKE@%$AUTOMAKE%g
22439 s%@AUTOHEADER@%$AUTOHEADER%g
22440 s%@MAKEINFO@%$MAKEINFO%g
22441 s%@install_sh@%$install_sh%g
22442 s%@AMTAR@%$AMTAR%g
22443 s%@AWK@%$AWK%g
22444 s%@AMTARFLAGS@%$AMTARFLAGS%g
22445 s%@SET_MAKE@%$SET_MAKE%g
22446 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22447 s%@top_builddir@%$top_builddir%g
22448 s%@ldap_subdir@%$ldap_subdir%g
22449 s%@CC@%$CC%g
22450 s%@AR@%$AR%g
22451 s%@LN_S@%$LN_S%g
22452 s%@OBJEXT@%$OBJEXT%g
22453 s%@EXEEXT@%$EXEEXT%g
22454 s%@ECHO@%$ECHO%g
22455 s%@RANLIB@%$RANLIB%g
22456 s%@STRIP@%$STRIP%g
22457 s%@DLLTOOL@%$DLLTOOL%g
22458 s%@AS@%$AS%g
22459 s%@OBJDUMP@%$OBJDUMP%g
22460 s%@CPP@%$CPP%g
22461 s%@LIBTOOL@%$LIBTOOL%g
22462 s%@LN_H@%$LN_H%g
22463 s%@SENDMAIL@%$SENDMAIL%g
22464 s%@EDITOR@%$EDITOR%g
22465 s%@PERLBIN@%$PERLBIN%g
22466 s%@OL_MKDEP@%$OL_MKDEP%g
22467 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22468 s%@LIBOBJS@%$LIBOBJS%g
22469 s%@LIBSRCS@%$LIBSRCS%g
22470 s%@PLAT@%$PLAT%g
22471 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22472 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22473 s%@BUILD_BDB@%$BUILD_BDB%g
22474 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22475 s%@BUILD_LDAP@%$BUILD_LDAP%g
22476 s%@BUILD_LDBM@%$BUILD_LDBM%g
22477 s%@BUILD_META@%$BUILD_META%g
22478 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22479 s%@BUILD_NULL@%$BUILD_NULL%g
22480 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22481 s%@BUILD_PERL@%$BUILD_PERL%g
22482 s%@BUILD_SHELL@%$BUILD_SHELL%g
22483 s%@BUILD_SQL@%$BUILD_SQL%g
22484 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22485 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22486 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22487 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22488 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22489 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22490 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22491 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22492 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22493 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22494 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22495 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22496 s%@LDBM_LIB@%$LDBM_LIB%g
22497 s%@LDAP_LIBS@%$LDAP_LIBS%g
22498 s%@LDIF_LIBS@%$LDIF_LIBS%g
22499 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22500 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22501 s%@LDBM_LIBS@%$LDBM_LIBS%g
22502 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22503 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22504 s%@WRAP_LIBS@%$WRAP_LIBS%g
22505 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22506 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22507 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22508 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22509 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22510 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22511 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22512 s%@KRB4_LIBS@%$KRB4_LIBS%g
22513 s%@KRB5_LIBS@%$KRB5_LIBS%g
22514 s%@READLINE_LIBS@%$READLINE_LIBS%g
22515 s%@SASL_LIBS@%$SASL_LIBS%g
22516 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22517 s%@TLS_LIBS@%$TLS_LIBS%g
22518 s%@MODULES_LIBS@%$MODULES_LIBS%g
22519 s%@AUTH_LIBS@%$AUTH_LIBS%g
22520 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22521 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22522 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22523 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22524
22525 CEOF
22526 EOF
22527
22528 cat >> $CONFIG_STATUS <<\EOF
22529
22530 # Split the substitutions into bite-sized pieces for seds with
22531 # small command number limits, like on Digital OSF/1 and HP-UX.
22532 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22533 ac_file=1 # Number of current file.
22534 ac_beg=1 # First line for current file.
22535 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22536 ac_more_lines=:
22537 ac_sed_cmds=""
22538 while $ac_more_lines; do
22539   if test $ac_beg -gt 1; then
22540     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22541   else
22542     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22543   fi
22544   if test ! -s conftest.s$ac_file; then
22545     ac_more_lines=false
22546     rm -f conftest.s$ac_file
22547   else
22548     if test -z "$ac_sed_cmds"; then
22549       ac_sed_cmds="sed -f conftest.s$ac_file"
22550     else
22551       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22552     fi
22553     ac_file=`expr $ac_file + 1`
22554     ac_beg=$ac_end
22555     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22556   fi
22557 done
22558 if test -z "$ac_sed_cmds"; then
22559   ac_sed_cmds=cat
22560 fi
22561 EOF
22562
22563 cat >> $CONFIG_STATUS <<EOF
22564
22565 CONFIG_FILES=\${CONFIG_FILES-"\
22566 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22567 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22568 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22569 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22570 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22571 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22572 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22573 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22574 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22575 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22576 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22577 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22578 include/Makefile:build/top.mk:include/Makefile.in \
22579 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22580 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22581 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22582 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22583 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22584 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22585 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22586 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22587 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22588 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22589 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22590 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22591 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22592 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22593 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22594 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22595 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22596 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22597 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22598 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22599 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22600 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22601 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22602 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22603 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22604 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22605 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22606 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22607 "}
22608 EOF
22609 cat >> $CONFIG_STATUS <<\EOF
22610 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22611   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22612   case "$ac_file" in
22613   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22614        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22615   *) ac_file_in="${ac_file}.in" ;;
22616   esac
22617
22618   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22619
22620   # Remove last slash and all that follows it.  Not all systems have dirname.
22621   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22622   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22623     # The file is in a subdirectory.
22624     test ! -d "$ac_dir" && mkdir "$ac_dir"
22625     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22626     # A "../" for each directory in $ac_dir_suffix.
22627     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22628   else
22629     ac_dir_suffix= ac_dots=
22630   fi
22631
22632   case "$ac_given_srcdir" in
22633   .)  srcdir=.
22634       if test -z "$ac_dots"; then top_srcdir=.
22635       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22636   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22637   *) # Relative path.
22638     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22639     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22640   esac
22641
22642   case "$ac_given_INSTALL" in
22643   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22644   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22645   esac
22646
22647   echo creating "$ac_file"
22648   rm -f "$ac_file"
22649   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22650   case "$ac_file" in
22651   *[Mm]akefile*) ac_comsub="1i\\
22652 # $configure_input" ;;
22653   *) ac_comsub= ;;
22654   esac
22655
22656   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22657   sed -e "$ac_comsub
22658 s%@configure_input@%$configure_input%g
22659 s%@srcdir@%$srcdir%g
22660 s%@top_srcdir@%$top_srcdir%g
22661 s%@INSTALL@%$INSTALL%g
22662 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22663 fi; done
22664 rm -f conftest.s*
22665
22666 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22667 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22668 #
22669 # ac_d sets the value in "#define NAME VALUE" lines.
22670 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22671 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22672 ac_dC='\3'
22673 ac_dD='%g'
22674 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22675 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22676 ac_uB='\([      ]\)%\1#\2define\3'
22677 ac_uC=' '
22678 ac_uD='\4%g'
22679 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22680 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22681 ac_eB='$%\1#\2define\3'
22682 ac_eC=' '
22683 ac_eD='%g'
22684
22685 if test "${CONFIG_HEADERS+set}" != set; then
22686 EOF
22687 cat >> $CONFIG_STATUS <<EOF
22688   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22689 EOF
22690 cat >> $CONFIG_STATUS <<\EOF
22691 fi
22692 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22693   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22694   case "$ac_file" in
22695   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22696        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22697   *) ac_file_in="${ac_file}.in" ;;
22698   esac
22699
22700   echo creating $ac_file
22701
22702   rm -f conftest.frag conftest.in conftest.out
22703   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22704   cat $ac_file_inputs > conftest.in
22705
22706 EOF
22707
22708 # Transform confdefs.h into a sed script conftest.vals that substitutes
22709 # the proper values into config.h.in to produce config.h.  And first:
22710 # Protect against being on the right side of a sed subst in config.status.
22711 # Protect against being in an unquoted here document in config.status.
22712 rm -f conftest.vals
22713 cat > conftest.hdr <<\EOF
22714 s/[\\&%]/\\&/g
22715 s%[\\$`]%\\&%g
22716 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22717 s%ac_d%ac_u%gp
22718 s%ac_u%ac_e%gp
22719 EOF
22720 sed -n -f conftest.hdr confdefs.h > conftest.vals
22721 rm -f conftest.hdr
22722
22723 # This sed command replaces #undef with comments.  This is necessary, for
22724 # example, in the case of _POSIX_SOURCE, which is predefined and required
22725 # on some systems where configure will not decide to define it.
22726 cat >> conftest.vals <<\EOF
22727 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22728 EOF
22729
22730 # Break up conftest.vals because some shells have a limit on
22731 # the size of here documents, and old seds have small limits too.
22732
22733 rm -f conftest.tail
22734 while :
22735 do
22736   ac_lines=`grep -c . conftest.vals`
22737   # grep -c gives empty output for an empty file on some AIX systems.
22738   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22739   # Write a limited-size here document to conftest.frag.
22740   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22741   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22742   echo 'CEOF
22743   sed -f conftest.frag conftest.in > conftest.out
22744   rm -f conftest.in
22745   mv conftest.out conftest.in
22746 ' >> $CONFIG_STATUS
22747   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22748   rm -f conftest.vals
22749   mv conftest.tail conftest.vals
22750 done
22751 rm -f conftest.vals
22752
22753 cat >> $CONFIG_STATUS <<\EOF
22754   rm -f conftest.frag conftest.h
22755   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22756   cat conftest.in >> conftest.h
22757   rm -f conftest.in
22758   if cmp -s $ac_file conftest.h 2>/dev/null; then
22759     echo "$ac_file is unchanged"
22760     rm -f conftest.h
22761   else
22762     # Remove last slash and all that follows it.  Not all systems have dirname.
22763       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22764       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22765       # The file is in a subdirectory.
22766       test ! -d "$ac_dir" && mkdir "$ac_dir"
22767     fi
22768     rm -f $ac_file
22769     mv conftest.h $ac_file
22770   fi
22771 fi; done
22772
22773 EOF
22774 cat >> $CONFIG_STATUS <<EOF
22775
22776 EOF
22777 cat >> $CONFIG_STATUS <<\EOF
22778
22779 date > stamp-h
22780 echo Please run \"make depend\" to build dependencies
22781
22782 exit 0
22783 EOF
22784 chmod +x $CONFIG_STATUS
22785 rm -fr confdefs* $ac_clean_files
22786 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22787