]> git.sur5r.net Git - openldap/blob - configure
backglue onelevel search, fixed ITS# in back-bdb duplicate-results entry
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.11 2002/08/29 02:10:40 kurt Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-ipv6           enable IPv6 support [auto]"
42 ac_help="$ac_help
43   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
44 ac_help="$ac_help
45   --enable-x-compile      enable cross compiling [no]"
46 ac_help="$ac_help
47   --with-cyrus-sasl       with Cyrus SASL support [auto]"
48 ac_help="$ac_help
49   --with-fetch            with freeBSD fetch URL support [auto]"
50 ac_help="$ac_help
51   --with-kerberos         with Kerberos support [auto]"
52 ac_help="$ac_help
53   --with-readline         with readline support [auto]"
54 ac_help="$ac_help
55   --with-threads          with threads [auto]"
56 ac_help="$ac_help
57   --with-tls              with TLS/SSL support [auto]"
58 ac_help="$ac_help
59   --with-yielding-select  with implicitly yielding select [auto]"
60 ac_help="$ac_help
61
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups of client hostnames [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [yes]"
93 ac_help="$ac_help
94     --with-bdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [no]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-monitor      enable monitor backend [no]"
117 ac_help="$ac_help
118     --with-monitor-module module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-null         enable null backend [no]"
121 ac_help="$ac_help
122     --with-null-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-passwd       enable passwd backend [no]"
125 ac_help="$ac_help
126     --with-passwd-module  module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-perl         enable perl backend [no]"
129 ac_help="$ac_help
130     --with-perl-module    module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-shell        enable shell backend [no]"
133 ac_help="$ac_help
134     --with-shell-module   module type static|dynamic [static]"
135 ac_help="$ac_help
136     --enable-sql          enable sql backend [no]"
137 ac_help="$ac_help
138     --with-sql-module     module type static|dynamic [static]"
139 ac_help="$ac_help
140
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145
146 Library Generation & Linking Options"
147 ac_help="$ac_help
148   --enable-static[=PKGS]  build static libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-shared[=PKGS]  build shared libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
153 ac_help="$ac_help
154   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
155
156 # Find the correct PATH separator.  Usually this is `:', but
157 # DJGPP uses `;' like DOS.
158 if test "X${PATH_SEPARATOR+set}" != Xset; then
159   UNAME=${UNAME-`uname 2>/dev/null`}
160   case X$UNAME in
161     *-DOS) lt_cv_sys_path_separator=';' ;;
162     *)     lt_cv_sys_path_separator=':' ;;
163   esac
164   PATH_SEPARATOR=$lt_cv_sys_path_separator
165 fi
166
167
168 # Check that we are running under the correct shell.
169 SHELL=${CONFIG_SHELL-/bin/sh}
170
171 case X$ECHO in
172 X*--fallback-echo)
173   # Remove one level of quotation (which was required for Make).
174   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
175   ;;
176 esac
177
178 echo=${ECHO-echo}
179 if test "X$1" = X--no-reexec; then
180   # Discard the --no-reexec flag, and continue.
181   shift
182 elif test "X$1" = X--fallback-echo; then
183   # Avoid inline document here, it may be left over
184   :
185 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
186   # Yippee, $echo works!
187   :
188 else
189   # Restart under the correct shell.
190   exec $SHELL "$0" --no-reexec ${1+"$@"}
191 fi
192
193 if test "X$1" = X--fallback-echo; then
194   # used as fallback echo
195   shift
196   cat <<EOF
197
198 EOF
199   exit 0
200 fi
201
202 # The HP-UX ksh and POSIX shell print the target directory to stdout
203 # if CDPATH is set.
204 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
205
206 if test -z "$ECHO"; then
207 if test "X${echo_test_string+set}" != Xset; then
208 # find a string as large as possible, as long as the shell can cope with it
209   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
210     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
211     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
212        echo_test_string="`eval $cmd`" &&
213        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
214     then
215       break
216     fi
217   done
218 fi
219
220 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
221    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
222    test "X$echo_testing_string" = "X$echo_test_string"; then
223   :
224 else
225   # The Solaris, AIX, and Digital Unix default echo programs unquote
226   # backslashes.  This makes it impossible to quote backslashes using
227   #   echo "$something" | sed 's/\\/\\\\/g'
228   #
229   # So, first we look for a working echo in the user's PATH.
230
231   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
232   for dir in $PATH /usr/ucb; do
233     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
234        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
235        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
236        test "X$echo_testing_string" = "X$echo_test_string"; then
237       echo="$dir/echo"
238       break
239     fi
240   done
241   IFS="$save_ifs"
242
243   if test "X$echo" = Xecho; then
244     # We didn't find a better echo, so look for alternatives.
245     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
246        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
247        test "X$echo_testing_string" = "X$echo_test_string"; then
248       # This shell has a builtin print -r that does the trick.
249       echo='print -r'
250     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
251          test "X$CONFIG_SHELL" != X/bin/ksh; then
252       # If we have ksh, try running configure again with it.
253       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
254       export ORIGINAL_CONFIG_SHELL
255       CONFIG_SHELL=/bin/ksh
256       export CONFIG_SHELL
257       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
258     else
259       # Try using printf.
260       echo='printf %s\n'
261       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
262          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
263          test "X$echo_testing_string" = "X$echo_test_string"; then
264         # Cool, printf works
265         :
266       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
267            test "X$echo_testing_string" = 'X\t' &&
268            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
269            test "X$echo_testing_string" = "X$echo_test_string"; then
270         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
271         export CONFIG_SHELL
272         SHELL="$CONFIG_SHELL"
273         export SHELL
274         echo="$CONFIG_SHELL $0 --fallback-echo"
275       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
276            test "X$echo_testing_string" = 'X\t' &&
277            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
278            test "X$echo_testing_string" = "X$echo_test_string"; then
279         echo="$CONFIG_SHELL $0 --fallback-echo"
280       else
281         # maybe with a smaller string...
282         prev=:
283
284         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
285           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
286           then
287             break
288           fi
289           prev="$cmd"
290         done
291
292         if test "$prev" != 'sed 50q "$0"'; then
293           echo_test_string=`eval $prev`
294           export echo_test_string
295           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
296         else
297           # Oops.  We lost completely, so just stick with echo.
298           echo=echo
299         fi
300       fi
301     fi
302   fi
303 fi
304 fi
305
306 # Copy echo and quote the copy suitably for passing to libtool from
307 # the Makefile, instead of quoting the original, which is used later.
308 ECHO=$echo
309 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
310    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
311 fi
312
313
314 ac_help="$ac_help
315   --disable-libtool-lock  avoid locking (might break parallel builds)"
316 ac_help="$ac_help
317   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
318 ac_help="$ac_help
319
320 See INSTALL file for further details."
321
322 # Initialize some variables set by options.
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 build=NONE
326 cache_file=./config.cache
327 exec_prefix=NONE
328 host=NONE
329 no_create=
330 nonopt=NONE
331 no_recursion=
332 prefix=NONE
333 program_prefix=NONE
334 program_suffix=NONE
335 program_transform_name=s,x,x,
336 silent=
337 site=
338 srcdir=
339 target=NONE
340 verbose=
341 x_includes=NONE
342 x_libraries=NONE
343 bindir='${exec_prefix}/bin'
344 sbindir='${exec_prefix}/sbin'
345 libexecdir='${exec_prefix}/libexec'
346 datadir='${prefix}/share'
347 sysconfdir='${prefix}/etc'
348 sharedstatedir='${prefix}/com'
349 localstatedir='${prefix}/var'
350 libdir='${exec_prefix}/lib'
351 includedir='${prefix}/include'
352 oldincludedir='/usr/include'
353 infodir='${prefix}/info'
354 mandir='${prefix}/man'
355
356 # Initialize some other variables.
357 subdirs=
358 MFLAGS= MAKEFLAGS=
359 SHELL=${CONFIG_SHELL-/bin/sh}
360 # Maximum number of lines to put in a shell here document.
361 ac_max_here_lines=12
362
363 ac_prev=
364 for ac_option
365 do
366
367   # If the previous option needs an argument, assign it.
368   if test -n "$ac_prev"; then
369     eval "$ac_prev=\$ac_option"
370     ac_prev=
371     continue
372   fi
373
374   case "$ac_option" in
375   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
376   *) ac_optarg= ;;
377   esac
378
379   # Accept the important Cygnus configure options, so we can diagnose typos.
380
381   case "$ac_option" in
382
383   -bindir | --bindir | --bindi | --bind | --bin | --bi)
384     ac_prev=bindir ;;
385   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
386     bindir="$ac_optarg" ;;
387
388   -build | --build | --buil | --bui | --bu)
389     ac_prev=build ;;
390   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
391     build="$ac_optarg" ;;
392
393   -cache-file | --cache-file | --cache-fil | --cache-fi \
394   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
395     ac_prev=cache_file ;;
396   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
397   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
398     cache_file="$ac_optarg" ;;
399
400   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
401     ac_prev=datadir ;;
402   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
403   | --da=*)
404     datadir="$ac_optarg" ;;
405
406   -disable-* | --disable-*)
407     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
410       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
411     fi
412     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
413     eval "enable_${ac_feature}=no" ;;
414
415   -enable-* | --enable-*)
416     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
419       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
420     fi
421     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
422     case "$ac_option" in
423       *=*) ;;
424       *) ac_optarg=yes ;;
425     esac
426     eval "enable_${ac_feature}='$ac_optarg'" ;;
427
428   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
429   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
430   | --exec | --exe | --ex)
431     ac_prev=exec_prefix ;;
432   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
433   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
434   | --exec=* | --exe=* | --ex=*)
435     exec_prefix="$ac_optarg" ;;
436
437   -gas | --gas | --ga | --g)
438     # Obsolete; use --with-gas.
439     with_gas=yes ;;
440
441   -help | --help | --hel | --he)
442     # Omit some internal or obsolete options to make the list less imposing.
443     # This message is too long to be a string in the A/UX 3.1 sh.
444     cat << EOF
445 Usage: configure [options] [host]
446 Options: [defaults in brackets after descriptions]
447 Configuration:
448   --cache-file=FILE       cache test results in FILE
449   --help                  print this message
450   --no-create             do not create output files
451   --quiet, --silent       do not print \`checking...' messages
452   --version               print the version of autoconf that created configure
453 Directory and file names:
454   --prefix=PREFIX         install architecture-independent files in PREFIX
455                           [$ac_default_prefix]
456   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
457                           [same as prefix]
458   --bindir=DIR            user executables in DIR [EPREFIX/bin]
459   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
460   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
461   --datadir=DIR           read-only architecture-independent data in DIR
462                           [PREFIX/share]
463   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
464   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
465                           [PREFIX/com]
466   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
467   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
468   --includedir=DIR        C header files in DIR [PREFIX/include]
469   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
470   --infodir=DIR           info documentation in DIR [PREFIX/info]
471   --mandir=DIR            man documentation in DIR [PREFIX/man]
472   --srcdir=DIR            find the sources in DIR [configure dir or ..]
473   --program-prefix=PREFIX prepend PREFIX to installed program names
474   --program-suffix=SUFFIX append SUFFIX to installed program names
475   --program-transform-name=PROGRAM
476                           run sed PROGRAM on installed program names
477 EOF
478     cat << EOF
479 Host type:
480   --build=BUILD           configure for building on BUILD [BUILD=HOST]
481   --host=HOST             configure for HOST [guessed]
482   --target=TARGET         configure for TARGET [TARGET=HOST]
483 Features and packages:
484   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
485   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
486   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
487   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
488   --x-includes=DIR        X include files are in DIR
489   --x-libraries=DIR       X library files are in DIR
490 EOF
491     if test -n "$ac_help"; then
492       echo "--enable and --with options recognized:$ac_help"
493     fi
494     exit 0 ;;
495
496   -host | --host | --hos | --ho)
497     ac_prev=host ;;
498   -host=* | --host=* | --hos=* | --ho=*)
499     host="$ac_optarg" ;;
500
501   -includedir | --includedir | --includedi | --included | --include \
502   | --includ | --inclu | --incl | --inc)
503     ac_prev=includedir ;;
504   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
505   | --includ=* | --inclu=* | --incl=* | --inc=*)
506     includedir="$ac_optarg" ;;
507
508   -infodir | --infodir | --infodi | --infod | --info | --inf)
509     ac_prev=infodir ;;
510   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
511     infodir="$ac_optarg" ;;
512
513   -libdir | --libdir | --libdi | --libd)
514     ac_prev=libdir ;;
515   -libdir=* | --libdir=* | --libdi=* | --libd=*)
516     libdir="$ac_optarg" ;;
517
518   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
519   | --libexe | --libex | --libe)
520     ac_prev=libexecdir ;;
521   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
522   | --libexe=* | --libex=* | --libe=*)
523     libexecdir="$ac_optarg" ;;
524
525   -localstatedir | --localstatedir | --localstatedi | --localstated \
526   | --localstate | --localstat | --localsta | --localst \
527   | --locals | --local | --loca | --loc | --lo)
528     ac_prev=localstatedir ;;
529   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
530   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
531   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
532     localstatedir="$ac_optarg" ;;
533
534   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
535     ac_prev=mandir ;;
536   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
537     mandir="$ac_optarg" ;;
538
539   -nfp | --nfp | --nf)
540     # Obsolete; use --without-fp.
541     with_fp=no ;;
542
543   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544   | --no-cr | --no-c)
545     no_create=yes ;;
546
547   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
548   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
549     no_recursion=yes ;;
550
551   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
552   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
553   | --oldin | --oldi | --old | --ol | --o)
554     ac_prev=oldincludedir ;;
555   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
556   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
557   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
558     oldincludedir="$ac_optarg" ;;
559
560   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
561     ac_prev=prefix ;;
562   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
563     prefix="$ac_optarg" ;;
564
565   -program-prefix | --program-prefix | --program-prefi | --program-pref \
566   | --program-pre | --program-pr | --program-p)
567     ac_prev=program_prefix ;;
568   -program-prefix=* | --program-prefix=* | --program-prefi=* \
569   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
570     program_prefix="$ac_optarg" ;;
571
572   -program-suffix | --program-suffix | --program-suffi | --program-suff \
573   | --program-suf | --program-su | --program-s)
574     ac_prev=program_suffix ;;
575   -program-suffix=* | --program-suffix=* | --program-suffi=* \
576   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
577     program_suffix="$ac_optarg" ;;
578
579   -program-transform-name | --program-transform-name \
580   | --program-transform-nam | --program-transform-na \
581   | --program-transform-n | --program-transform- \
582   | --program-transform | --program-transfor \
583   | --program-transfo | --program-transf \
584   | --program-trans | --program-tran \
585   | --progr-tra | --program-tr | --program-t)
586     ac_prev=program_transform_name ;;
587   -program-transform-name=* | --program-transform-name=* \
588   | --program-transform-nam=* | --program-transform-na=* \
589   | --program-transform-n=* | --program-transform-=* \
590   | --program-transform=* | --program-transfor=* \
591   | --program-transfo=* | --program-transf=* \
592   | --program-trans=* | --program-tran=* \
593   | --progr-tra=* | --program-tr=* | --program-t=*)
594     program_transform_name="$ac_optarg" ;;
595
596   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
597   | -silent | --silent | --silen | --sile | --sil)
598     silent=yes ;;
599
600   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
601     ac_prev=sbindir ;;
602   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
603   | --sbi=* | --sb=*)
604     sbindir="$ac_optarg" ;;
605
606   -sharedstatedir | --sharedstatedir | --sharedstatedi \
607   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
608   | --sharedst | --shareds | --shared | --share | --shar \
609   | --sha | --sh)
610     ac_prev=sharedstatedir ;;
611   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
612   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
613   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
614   | --sha=* | --sh=*)
615     sharedstatedir="$ac_optarg" ;;
616
617   -site | --site | --sit)
618     ac_prev=site ;;
619   -site=* | --site=* | --sit=*)
620     site="$ac_optarg" ;;
621
622   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
623     ac_prev=srcdir ;;
624   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
625     srcdir="$ac_optarg" ;;
626
627   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
628   | --syscon | --sysco | --sysc | --sys | --sy)
629     ac_prev=sysconfdir ;;
630   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
631   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
632     sysconfdir="$ac_optarg" ;;
633
634   -target | --target | --targe | --targ | --tar | --ta | --t)
635     ac_prev=target ;;
636   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
637     target="$ac_optarg" ;;
638
639   -v | -verbose | --verbose | --verbos | --verbo | --verb)
640     verbose=yes ;;
641
642   -version | --version | --versio | --versi | --vers)
643     echo "configure generated by autoconf version 2.13.1"
644     exit 0 ;;
645
646   -with-* | --with-*)
647     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
648     # Reject names that are not valid shell variable names.
649     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
650       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
651     fi
652     ac_package=`echo $ac_package| sed 's/-/_/g'`
653     case "$ac_option" in
654       *=*) ;;
655       *) ac_optarg=yes ;;
656     esac
657     eval "with_${ac_package}='$ac_optarg'" ;;
658
659   -without-* | --without-*)
660     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
661     # Reject names that are not valid shell variable names.
662     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
663       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
664     fi
665     ac_package=`echo $ac_package| sed 's/-/_/g'`
666     eval "with_${ac_package}=no" ;;
667
668   --x)
669     # Obsolete; use --with-x.
670     with_x=yes ;;
671
672   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
673   | --x-incl | --x-inc | --x-in | --x-i)
674     ac_prev=x_includes ;;
675   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
676   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
677     x_includes="$ac_optarg" ;;
678
679   -x-libraries | --x-libraries | --x-librarie | --x-librari \
680   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
681     ac_prev=x_libraries ;;
682   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
683   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
684     x_libraries="$ac_optarg" ;;
685
686   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
687     ;;
688
689   *)
690     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
691       echo "configure: warning: $ac_option: invalid host type" 1>&2
692     fi
693     if test "x$nonopt" != xNONE; then
694       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
695     fi
696     nonopt="$ac_option"
697     ;;
698
699   esac
700 done
701
702 if test -n "$ac_prev"; then
703   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
704 fi
705
706 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
707
708 # File descriptor usage:
709 # 0 standard input
710 # 1 file creation
711 # 2 errors and warnings
712 # 3 some systems may open it to /dev/tty
713 # 4 used on the Kubota Titan
714 # 6 checking for... messages and results
715 # 5 compiler messages saved in config.log
716 if test "$silent" = yes; then
717   exec 6>/dev/null
718 else
719   exec 6>&1
720 fi
721 exec 5>./config.log
722
723 echo "\
724 This file contains any messages produced by compilers while
725 running configure, to aid debugging if configure makes a mistake.
726 " 1>&5
727
728 # Strip out --no-create and --no-recursion so they do not pile up.
729 # Also quote any args containing shell metacharacters.
730 ac_configure_args=
731 for ac_arg
732 do
733   case "$ac_arg" in
734   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
735   | --no-cr | --no-c) ;;
736   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
737   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
738   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
739   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
740   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
741   esac
742 done
743
744 # NLS nuisances.
745 # Only set these to C if already set.  These must not be set unconditionally
746 # because not all systems understand e.g. LANG=C (notably SCO).
747 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
748 # Non-C LC_CTYPE values break the ctype check.
749 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
750 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
751 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
752 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
753
754 # confdefs.h avoids OS command line length limits that DEFS can exceed.
755 rm -rf conftest* confdefs.h
756 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
757 echo > confdefs.h
758
759 # A filename unique to this package, relative to the directory that
760 # configure is in, which we can look for to find out if srcdir is correct.
761 ac_unique_file=build/version.sh
762
763 # Find the source files, if location was not specified.
764 if test -z "$srcdir"; then
765   ac_srcdir_defaulted=yes
766   # Try the directory containing this script, then its parent.
767   ac_prog=$0
768   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
769   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
770   srcdir=$ac_confdir
771   if test ! -r $srcdir/$ac_unique_file; then
772     srcdir=..
773   fi
774 else
775   ac_srcdir_defaulted=no
776 fi
777 if test ! -r $srcdir/$ac_unique_file; then
778   if test "$ac_srcdir_defaulted" = yes; then
779     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
780   else
781     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
782   fi
783 fi
784 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
785
786 # Prefer explicitly selected file to automatically selected ones.
787 if test -z "$CONFIG_SITE"; then
788   if test "x$prefix" != xNONE; then
789     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
790   else
791     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
792   fi
793 fi
794 for ac_site_file in $CONFIG_SITE; do
795   if test -r "$ac_site_file"; then
796     echo "loading site script $ac_site_file"
797     . "$ac_site_file"
798   fi
799 done
800
801
802 ac_ext=c
803 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
804 ac_cpp='$CPP $CPPFLAGS'
805 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
806 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
807 cross_compiling=$ac_cv_prog_cc_cross
808
809 ac_exeext=
810 ac_objext=o
811 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
812   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
813   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
814     ac_n= ac_c='
815 ' ac_t='        '
816   else
817     ac_n=-n ac_c= ac_t=
818   fi
819 else
820   ac_n= ac_c='\c' ac_t=
821 fi
822
823
824 # set unset (borrowed from autoconf 2.49c)
825 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
826   ol_unset=unset
827 else
828   ol_unset=false
829 fi
830 # unset CDPATH
831 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
832
833 ac_aux_dir=
834 for ac_dir in build $srcdir/build; do
835   if test -f $ac_dir/install-sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install-sh -c"
838     break
839   elif test -f $ac_dir/install.sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install.sh -c"
842     break
843   elif test -f $ac_dir/shtool; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/shtool install -c"
846     break
847   fi
848 done
849 if test -z "$ac_aux_dir"; then
850   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
851 fi
852 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
853 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
854 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
855
856 eval `$ac_aux_dir/version.sh`
857 if test -z "$OL_STRING"; then
858         { echo "configure: error: could not determine version" 1>&2; exit 1; }
859 fi
860
861 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
862         ac_cv_shtool="$ac_aux_dir/shtool"
863 else
864         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
865 fi
866
867 SHTOOL="$ac_cv_shtool"
868
869 TB=`$SHTOOL echo -e %B`
870 TN=`$SHTOOL echo -e %b`
871
872 echo "Configuring $TB$OL_STRING$TN ..."
873
874
875 echo $ac_n "checking host system type""... $ac_c" 1>&6
876 echo "configure:877: checking host system type" >&5
877 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
878
879 # Make sure we can run config.sub.
880   if $ac_config_sub sun4 >/dev/null 2>&1; then :
881     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
882   fi
883
884   ac_cv_host_alias=$host
885   case "$ac_cv_host_alias" in
886   NONE)
887     case $nonopt in
888     NONE)
889       if ac_cv_host_alias=`$ac_config_guess`; then :
890       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
891       fi ;;
892     *) ac_cv_host_alias=$nonopt ;;
893     esac ;;
894   esac
895
896   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
897   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 else
901   echo $ac_n "(cached) $ac_c" 1>&6
902 fi
903
904 echo "$ac_t""$ac_cv_host" 1>&6
905
906 host=$ac_cv_host
907 host_alias=$ac_cv_host_alias
908 host_cpu=$ac_cv_host_cpu
909 host_vendor=$ac_cv_host_vendor
910 host_os=$ac_cv_host_os
911
912
913
914
915
916 echo $ac_n "checking target system type""... $ac_c" 1>&6
917 echo "configure:918: checking target system type" >&5
918 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
919
920 # Make sure we can run config.sub.
921   if $ac_config_sub sun4 >/dev/null 2>&1; then :
922     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
923   fi
924
925   ac_cv_target_alias=$target
926   case "$ac_cv_target_alias" in
927   NONE)
928     case $nonopt in
929     NONE)
930       ac_cv_target_alias=$host_alias ;;
931
932     *) ac_cv_target_alias=$nonopt ;;
933     esac ;;
934   esac
935
936   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
937   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
938   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
939   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
940 else
941   echo $ac_n "(cached) $ac_c" 1>&6
942 fi
943
944 echo "$ac_t""$ac_cv_target" 1>&6
945
946 target=$ac_cv_target
947 target_alias=$ac_cv_target_alias
948 target_cpu=$ac_cv_target_cpu
949 target_vendor=$ac_cv_target_vendor
950 target_os=$ac_cv_target_os
951
952
953
954
955
956 echo $ac_n "checking build system type""... $ac_c" 1>&6
957 echo "configure:958: checking build system type" >&5
958 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
959
960 # Make sure we can run config.sub.
961   if $ac_config_sub sun4 >/dev/null 2>&1; then :
962     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
963   fi
964
965   ac_cv_build_alias=$build
966   case "$ac_cv_build_alias" in
967   NONE)
968     case $nonopt in
969     NONE)
970       ac_cv_build_alias=$host_alias ;;
971
972     *) ac_cv_build_alias=$nonopt ;;
973     esac ;;
974   esac
975
976   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
977   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
978   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
979   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
980 else
981   echo $ac_n "(cached) $ac_c" 1>&6
982 fi
983
984 echo "$ac_t""$ac_cv_build" 1>&6
985
986 build=$ac_cv_build
987 build_alias=$ac_cv_build_alias
988 build_cpu=$ac_cv_build_cpu
989 build_vendor=$ac_cv_build_vendor
990 build_os=$ac_cv_build_os
991
992
993
994
995
996 # Do some error checking and defaulting for the host and target type.
997 # The inputs are:
998 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
999 #
1000 # The rules are:
1001 # 1. You are not allowed to specify --host, --target, and nonopt at the
1002 #    same time.
1003 # 2. Host defaults to nonopt.
1004 # 3. If nonopt is not specified, then host defaults to the current host,
1005 #    as determined by config.guess.
1006 # 4. Target and build default to nonopt.
1007 # 5. If nonopt is not specified, then target and build default to host.
1008
1009 # The aliases save the names the user supplied, while $host etc.
1010 # will get canonicalized.
1011 case $host---$target---$nonopt in
1012 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1013 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1014 esac
1015
1016 test "$host_alias" != "$target_alias" &&
1017   test "$program_prefix$program_suffix$program_transform_name" = \
1018     NONENONEs,x,x, &&
1019   program_prefix=${target_alias}-
1020
1021
1022 # Find a good install program.  We prefer a C program (faster),
1023 # so one script is as good as another.  But avoid the broken or
1024 # incompatible versions:
1025 # SysV /etc/install, /usr/sbin/install
1026 # SunOS /usr/etc/install
1027 # IRIX /sbin/install
1028 # AIX /bin/install
1029 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1030 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1031 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1032 # ./install, which can be erroneously created by make from ./install.sh.
1033 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1034 echo "configure:1035: checking for a BSD compatible install" >&5
1035 if test -z "$INSTALL"; then
1036 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1040   for ac_dir in $PATH; do
1041     # Account for people who put trailing slashes in PATH elements.
1042     case "$ac_dir/" in
1043     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1044     *)
1045       # OSF1 and SCO ODT 3.0 have their own names for install.
1046       # Don't use installbsd from OSF since it installs stuff as root
1047       # by default.
1048       for ac_prog in ginstall scoinst install; do
1049         if test -f $ac_dir/$ac_prog; then
1050           if test $ac_prog = install &&
1051             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1052             # AIX install.  It has an incompatible calling convention.
1053             :
1054           elif test $ac_prog = install &&
1055             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # program-specific install script used by HP pwplus--don't use.
1057             :
1058           else
1059             ac_cv_path_install="$ac_dir/$ac_prog -c"
1060             break 2
1061           fi
1062         fi
1063       done
1064       ;;
1065     esac
1066   done
1067   IFS="$ac_save_IFS"
1068
1069 fi
1070   if test "${ac_cv_path_install+set}" = set; then
1071     INSTALL="$ac_cv_path_install"
1072   else
1073     # As a last resort, use the slow shell script.  We don't cache a
1074     # path for INSTALL within a source directory, because that will
1075     # break other packages using the cache if that directory is
1076     # removed, or if the path is relative.
1077     INSTALL="$ac_install_sh"
1078   fi
1079 fi
1080 echo "$ac_t""$INSTALL" 1>&6
1081
1082 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1083 # It thinks the first close brace ends the variable substitution.
1084 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1085
1086 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1087
1088 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1089
1090 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether build environment is sane" >&5
1092 # Just in case
1093 sleep 1
1094 echo timestamp > conftestfile
1095 # Do `set' in a subshell so we don't clobber the current shell's
1096 # arguments.  Must try -L first in case configure is actually a
1097 # symlink; some systems play weird games with the mod time of symlinks
1098 # (eg FreeBSD returns the mod time of the symlink's containing
1099 # directory).
1100 if (
1101    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1102    if test "$*" = "X"; then
1103       # -L didn't work.
1104       set X `ls -t $srcdir/configure conftestfile`
1105    fi
1106    if test "$*" != "X $srcdir/configure conftestfile" \
1107       && test "$*" != "X conftestfile $srcdir/configure"; then
1108
1109       # If neither matched, then we have a broken ls.  This can happen
1110       # if, for instance, CONFIG_SHELL is bash and it inherits a
1111       # broken ls alias from the environment.  This has actually
1112       # happened.  Such a system could not be considered "sane".
1113       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1114 alias in your environment" 1>&2; exit 1; }
1115    fi
1116
1117    test "$2" = conftestfile
1118    )
1119 then
1120    # Ok.
1121    :
1122 else
1123    { echo "configure: error: newly created file is older than distributed files!
1124 Check your system clock" 1>&2; exit 1; }
1125 fi
1126 rm -f conftest*
1127 echo "$ac_t""yes" 1>&6
1128 if test "$program_transform_name" = s,x,x,; then
1129   program_transform_name=
1130 else
1131   # Double any \ or $.  echo might interpret backslashes.
1132   cat <<\EOF_SED > conftestsed
1133 s,\\,\\\\,g; s,\$,$$,g
1134 EOF_SED
1135   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1136   rm -f conftestsed
1137 fi
1138 test "$program_prefix" != NONE &&
1139   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1140 # Use a double $ so make ignores it.
1141 test "$program_suffix" != NONE &&
1142   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1143
1144 # sed with no file args requires a program.
1145 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1146
1147 for ac_prog in mawk gawk nawk awk
1148 do
1149 # Extract the first word of "$ac_prog", so it can be a program name with args.
1150 set dummy $ac_prog; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$AWK"; then
1157   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_AWK="$ac_prog"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 AWK="$ac_cv_prog_AWK"
1172 if test -n "$AWK"; then
1173   echo "$ac_t""$AWK" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 test -n "$AWK" && break
1179 done
1180
1181 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1182 echo "configure:1183: checking whether ${MAKE-make} sets \${MAKE}" >&5
1183 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1184 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1185   echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187   cat > conftestmake <<\EOF
1188 all:
1189         @echo 'ac_maketemp="${MAKE}"'
1190 EOF
1191 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1192 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1193 if test -n "$ac_maketemp"; then
1194   eval ac_cv_prog_make_${ac_make}_set=yes
1195 else
1196   eval ac_cv_prog_make_${ac_make}_set=no
1197 fi
1198 rm -f conftestmake
1199 fi
1200 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1201   echo "$ac_t""yes" 1>&6
1202   SET_MAKE=
1203 else
1204   echo "$ac_t""no" 1>&6
1205   SET_MAKE="MAKE=${MAKE-make}"
1206 fi
1207
1208
1209
1210 PACKAGE=$OL_PACKAGE
1211
1212 VERSION=$OL_VERSION
1213
1214 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1215   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1216 fi
1217
1218
1219
1220 missing_dir=`cd $ac_aux_dir && pwd`
1221 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1222 echo "configure:1223: checking for working aclocal" >&5
1223 # Run test in a subshell; some versions of sh will print an error if
1224 # an executable is not found, even if stderr is redirected.
1225 # Redirect stdin to placate older versions of autoconf.  Sigh.
1226 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1227    ACLOCAL=aclocal
1228    echo "$ac_t""found" 1>&6
1229 else
1230    ACLOCAL="$missing_dir/missing aclocal"
1231    echo "$ac_t""missing" 1>&6
1232 fi
1233
1234 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working autoconf" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1240    AUTOCONF=autoconf
1241    echo "$ac_t""found" 1>&6
1242 else
1243    AUTOCONF="$missing_dir/missing autoconf"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working automake" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (automake --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOMAKE=automake
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOMAKE="$missing_dir/missing automake"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working autoheader" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOHEADER=autoheader
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOHEADER="$missing_dir/missing autoheader"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working makeinfo" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1279    MAKEINFO=makeinfo
1280    echo "$ac_t""found" 1>&6
1281 else
1282    MAKEINFO="$missing_dir/missing makeinfo"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 install_sh="$missing_dir/install-sh"
1287 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1288
1289 for ac_prog in gnutar gtar tar
1290 do
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1296   echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298   if test -n "$AMTAR"; then
1299   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1300 else
1301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1302   ac_dummy="$PATH"
1303   for ac_dir in $ac_dummy; do
1304     test -z "$ac_dir" && ac_dir=.
1305     if test -f $ac_dir/$ac_word; then
1306       ac_cv_prog_AMTAR="$ac_prog"
1307       break
1308     fi
1309   done
1310   IFS="$ac_save_ifs"
1311 fi
1312 fi
1313 AMTAR="$ac_cv_prog_AMTAR"
1314 if test -n "$AMTAR"; then
1315   echo "$ac_t""$AMTAR" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320 test -n "$AMTAR" && break
1321 done
1322
1323
1324 AMTARFLAGS=
1325 if test -n "$AMTAR"; then
1326   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1327         AMTARFLAGS=o
1328   fi
1329 fi
1330
1331 cat >> confdefs.h <<EOF
1332 #define OPENLDAP_PACKAGE "$PACKAGE"
1333 EOF
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_VERSION "$VERSION"
1337 EOF
1338
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION $OL_API_INC
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1354 EOF
1355
1356
1357 OPENLDAP_LIBVERSION=$OL_API_LIB
1358
1359 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
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 ol_enable_kbind=${ol_enable_kbind-no}
1491 # OpenLDAP --enable-ipv6
1492         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1493 if test "${enable_ipv6+set}" = set; then
1494   enableval="$enable_ipv6"
1495   
1496         ol_arg=invalid
1497         for ol_val in auto yes no ; do
1498                 if test "$enableval" = "$ol_val" ; then
1499                         ol_arg="$ol_val"
1500                 fi
1501         done
1502         if test "$ol_arg" = "invalid" ; then
1503                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1504         fi
1505         ol_enable_ipv6="$ol_arg"
1506
1507 else
1508         ol_enable_ipv6="auto"
1509 fi
1510 # end --enable-ipv6
1511 # OpenLDAP --enable-local
1512         # Check whether --enable-local or --disable-local was given.
1513 if test "${enable_local+set}" = set; then
1514   enableval="$enable_local"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1524         fi
1525         ol_enable_local="$ol_arg"
1526
1527 else
1528         ol_enable_local="auto"
1529 fi
1530 # end --enable-local
1531 # OpenLDAP --enable-x_compile
1532         # Check whether --enable-x_compile or --disable-x_compile was given.
1533 if test "${enable_x_compile+set}" = set; then
1534   enableval="$enable_x_compile"
1535   
1536         ol_arg=invalid
1537         for ol_val in yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1544         fi
1545         ol_enable_x_compile="$ol_arg"
1546
1547 else
1548         ol_enable_x_compile="no"
1549 fi
1550 # end --enable-x_compile
1551
1552
1553 # OpenLDAP --with-cyrus_sasl
1554         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1555 if test "${with_cyrus_sasl+set}" = set; then
1556   withval="$with_cyrus_sasl"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no  ; do
1560                 if test "$withval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1566         fi
1567         ol_with_cyrus_sasl="$ol_arg"
1568
1569 else
1570         ol_with_cyrus_sasl="auto"
1571 fi
1572 # end --with-cyrus_sasl
1573
1574 # OpenLDAP --with-fetch
1575         # Check whether --with-fetch or --without-fetch was given.
1576 if test "${with_fetch+set}" = set; then
1577   withval="$with_fetch"
1578   
1579         ol_arg=invalid
1580         for ol_val in auto yes no  ; do
1581                 if test "$withval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1587         fi
1588         ol_with_fetch="$ol_arg"
1589
1590 else
1591         ol_with_fetch="auto"
1592 fi
1593 # end --with-fetch
1594
1595 # OpenLDAP --with-kerberos
1596         # Check whether --with-kerberos or --without-kerberos was given.
1597 if test "${with_kerberos+set}" = set; then
1598   withval="$with_kerberos"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1602                 if test "$withval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1608         fi
1609         ol_with_kerberos="$ol_arg"
1610
1611 else
1612         ol_with_kerberos="auto"
1613 fi
1614 # end --with-kerberos
1615
1616 # OpenLDAP --with-readline
1617         # Check whether --with-readline or --without-readline was given.
1618 if test "${with_readline+set}" = set; then
1619   withval="$with_readline"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto yes no  ; do
1623                 if test "$withval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1629         fi
1630         ol_with_readline="$ol_arg"
1631
1632 else
1633         ol_with_readline="auto"
1634 fi
1635 # end --with-readline
1636
1637 # OpenLDAP --with-threads
1638         # Check whether --with-threads or --without-threads was given.
1639 if test "${with_threads+set}" = set; then
1640   withval="$with_threads"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1644                 if test "$withval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1650         fi
1651         ol_with_threads="$ol_arg"
1652
1653 else
1654         ol_with_threads="auto"
1655 fi
1656 # end --with-threads
1657
1658 # OpenLDAP --with-tls
1659         # Check whether --with-tls or --without-tls was given.
1660 if test "${with_tls+set}" = set; then
1661   withval="$with_tls"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto ssleay openssl yes no  ; do
1665                 if test "$withval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1671         fi
1672         ol_with_tls="$ol_arg"
1673
1674 else
1675         ol_with_tls="auto"
1676 fi
1677 # end --with-tls
1678
1679 # OpenLDAP --with-yielding_select
1680         # Check whether --with-yielding_select or --without-yielding_select was given.
1681 if test "${with_yielding_select+set}" = set; then
1682   withval="$with_yielding_select"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no manual  ; do
1686                 if test "$withval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1692         fi
1693         ol_with_yielding_select="$ol_arg"
1694
1695 else
1696         ol_with_yielding_select="auto"
1697 fi
1698 # end --with-yielding_select
1699
1700
1701
1702 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1703 if test "${with_xxslapdoptions+set}" = set; then
1704   withval="$with_xxslapdoptions"
1705   :
1706 fi
1707
1708 # OpenLDAP --enable-slapd
1709         # Check whether --enable-slapd or --disable-slapd was given.
1710 if test "${enable_slapd+set}" = set; then
1711   enableval="$enable_slapd"
1712   
1713         ol_arg=invalid
1714         for ol_val in auto yes no ; do
1715                 if test "$enableval" = "$ol_val" ; then
1716                         ol_arg="$ol_val"
1717                 fi
1718         done
1719         if test "$ol_arg" = "invalid" ; then
1720                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1721         fi
1722         ol_enable_slapd="$ol_arg"
1723
1724 else
1725         ol_enable_slapd="yes"
1726 fi
1727 # end --enable-slapd
1728 # OpenLDAP --enable-aci
1729         # Check whether --enable-aci or --disable-aci was given.
1730 if test "${enable_aci+set}" = set; then
1731   enableval="$enable_aci"
1732   
1733         ol_arg=invalid
1734         for ol_val in auto yes no ; do
1735                 if test "$enableval" = "$ol_val" ; then
1736                         ol_arg="$ol_val"
1737                 fi
1738         done
1739         if test "$ol_arg" = "invalid" ; then
1740                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1741         fi
1742         ol_enable_aci="$ol_arg"
1743
1744 else
1745         ol_enable_aci="no"
1746 fi
1747 # end --enable-aci
1748 # OpenLDAP --enable-cleartext
1749         # Check whether --enable-cleartext or --disable-cleartext was given.
1750 if test "${enable_cleartext+set}" = set; then
1751   enableval="$enable_cleartext"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1761         fi
1762         ol_enable_cleartext="$ol_arg"
1763
1764 else
1765         ol_enable_cleartext="yes"
1766 fi
1767 # end --enable-cleartext
1768 # OpenLDAP --enable-crypt
1769         # Check whether --enable-crypt or --disable-crypt was given.
1770 if test "${enable_crypt+set}" = set; then
1771   enableval="$enable_crypt"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1781         fi
1782         ol_enable_crypt="$ol_arg"
1783
1784 else
1785         ol_enable_crypt="no"
1786 fi
1787 # end --enable-crypt
1788 # OpenLDAP --enable-dynamic
1789         # Check whether --enable-dynamic or --disable-dynamic was given.
1790 if test "${enable_dynamic+set}" = set; then
1791   enableval="$enable_dynamic"
1792   
1793         ol_arg=invalid
1794         for ol_val in auto yes no ; do
1795                 if test "$enableval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1801         fi
1802         ol_enable_dynamic="$ol_arg"
1803
1804 else
1805         ol_enable_dynamic="no"
1806 fi
1807 # end --enable-dynamic
1808 # OpenLDAP --enable-kpasswd
1809         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1810 if test "${enable_kpasswd+set}" = set; then
1811   enableval="$enable_kpasswd"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1821         fi
1822         ol_enable_kpasswd="$ol_arg"
1823
1824 else
1825         ol_enable_kpasswd="no"
1826 fi
1827 # end --enable-kpasswd
1828 # OpenLDAP --enable-lmpasswd
1829         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1830 if test "${enable_lmpasswd+set}" = set; then
1831   enableval="$enable_lmpasswd"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1841         fi
1842         ol_enable_lmpasswd="$ol_arg"
1843
1844 else
1845         ol_enable_lmpasswd="no"
1846 fi
1847 # end --enable-lmpasswd
1848 # OpenLDAP --enable-spasswd
1849         # Check whether --enable-spasswd or --disable-spasswd was given.
1850 if test "${enable_spasswd+set}" = set; then
1851   enableval="$enable_spasswd"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1861         fi
1862         ol_enable_spasswd="$ol_arg"
1863
1864 else
1865         ol_enable_spasswd="no"
1866 fi
1867 # end --enable-spasswd
1868 # OpenLDAP --enable-modules
1869         # Check whether --enable-modules or --disable-modules was given.
1870 if test "${enable_modules+set}" = set; then
1871   enableval="$enable_modules"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1881         fi
1882         ol_enable_modules="$ol_arg"
1883
1884 else
1885         ol_enable_modules="no"
1886 fi
1887 # end --enable-modules
1888 ol_enable_multimaster=${ol_enable_multimaster-no}
1889 # OpenLDAP --enable-phonetic
1890         # Check whether --enable-phonetic or --disable-phonetic was given.
1891 if test "${enable_phonetic+set}" = set; then
1892   enableval="$enable_phonetic"
1893   
1894         ol_arg=invalid
1895         for ol_val in auto yes no ; do
1896                 if test "$enableval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1902         fi
1903         ol_enable_phonetic="$ol_arg"
1904
1905 else
1906         ol_enable_phonetic="no"
1907 fi
1908 # end --enable-phonetic
1909 # OpenLDAP --enable-rewrite
1910         # Check whether --enable-rewrite or --disable-rewrite was given.
1911 if test "${enable_rewrite+set}" = set; then
1912   enableval="$enable_rewrite"
1913   
1914         ol_arg=invalid
1915         for ol_val in auto yes no ; do
1916                 if test "$enableval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1922         fi
1923         ol_enable_rewrite="$ol_arg"
1924
1925 else
1926         ol_enable_rewrite="no"
1927 fi
1928 # end --enable-rewrite
1929 # OpenLDAP --enable-rlookups
1930         # Check whether --enable-rlookups or --disable-rlookups was given.
1931 if test "${enable_rlookups+set}" = set; then
1932   enableval="$enable_rlookups"
1933   
1934         ol_arg=invalid
1935         for ol_val in auto yes no ; do
1936                 if test "$enableval" = "$ol_val" ; then
1937                         ol_arg="$ol_val"
1938                 fi
1939         done
1940         if test "$ol_arg" = "invalid" ; then
1941                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1942         fi
1943         ol_enable_rlookups="$ol_arg"
1944
1945 else
1946         ol_enable_rlookups="no"
1947 fi
1948 # end --enable-rlookups
1949 # OpenLDAP --enable-slp
1950         # Check whether --enable-slp or --disable-slp was given.
1951 if test "${enable_slp+set}" = set; then
1952   enableval="$enable_slp"
1953   
1954         ol_arg=invalid
1955         for ol_val in auto yes no ; do
1956                 if test "$enableval" = "$ol_val" ; then
1957                         ol_arg="$ol_val"
1958                 fi
1959         done
1960         if test "$ol_arg" = "invalid" ; then
1961                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1962         fi
1963         ol_enable_slp="$ol_arg"
1964
1965 else
1966         ol_enable_slp="no"
1967 fi
1968 # end --enable-slp
1969 # OpenLDAP --enable-wrappers
1970         # Check whether --enable-wrappers or --disable-wrappers was given.
1971 if test "${enable_wrappers+set}" = set; then
1972   enableval="$enable_wrappers"
1973   
1974         ol_arg=invalid
1975         for ol_val in auto yes no ; do
1976                 if test "$enableval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1982         fi
1983         ol_enable_wrappers="$ol_arg"
1984
1985 else
1986         ol_enable_wrappers="no"
1987 fi
1988 # end --enable-wrappers
1989
1990 # OpenLDAP --enable-bdb
1991         # Check whether --enable-bdb or --disable-bdb was given.
1992 if test "${enable_bdb+set}" = set; then
1993   enableval="$enable_bdb"
1994   
1995         ol_arg=invalid
1996         for ol_val in auto yes no ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2003         fi
2004         ol_enable_bdb="$ol_arg"
2005
2006 else
2007         ol_enable_bdb="yes"
2008 fi
2009 # end --enable-bdb
2010 # OpenLDAP --with-bdb_module
2011         # Check whether --with-bdb_module or --without-bdb_module was given.
2012 if test "${with_bdb_module+set}" = set; then
2013   withval="$with_bdb_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_bdb_module="$ol_arg"
2025
2026 else
2027         ol_with_bdb_module="static"
2028 fi
2029 # end --with-bdb_module
2030
2031 # OpenLDAP --enable-dnssrv
2032         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2033 if test "${enable_dnssrv+set}" = set; then
2034   enableval="$enable_dnssrv"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto yes no ; do
2038                 if test "$enableval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2044         fi
2045         ol_enable_dnssrv="$ol_arg"
2046
2047 else
2048         ol_enable_dnssrv="no"
2049 fi
2050 # end --enable-dnssrv
2051 # OpenLDAP --with-dnssrv_module
2052         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2053 if test "${with_dnssrv_module+set}" = set; then
2054   withval="$with_dnssrv_module"
2055   
2056         ol_arg=invalid
2057         for ol_val in static dynamic ; do
2058                 if test "$withval" = "$ol_val" ; then
2059                         ol_arg="$ol_val"
2060                 fi
2061         done
2062         if test "$ol_arg" = "invalid" ; then
2063                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2064         fi
2065         ol_with_dnssrv_module="$ol_arg"
2066
2067 else
2068         ol_with_dnssrv_module="static"
2069 fi
2070 # end --with-dnssrv_module
2071
2072 # OpenLDAP --enable-ldap
2073         # Check whether --enable-ldap or --disable-ldap was given.
2074 if test "${enable_ldap+set}" = set; then
2075   enableval="$enable_ldap"
2076   
2077         ol_arg=invalid
2078         for ol_val in auto yes no ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2085         fi
2086         ol_enable_ldap="$ol_arg"
2087
2088 else
2089         ol_enable_ldap="no"
2090 fi
2091 # end --enable-ldap
2092 # OpenLDAP --with-ldap_module
2093         # Check whether --with-ldap_module or --without-ldap_module was given.
2094 if test "${with_ldap_module+set}" = set; then
2095   withval="$with_ldap_module"
2096   
2097         ol_arg=invalid
2098         for ol_val in static dynamic ; do
2099                 if test "$withval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2105         fi
2106         ol_with_ldap_module="$ol_arg"
2107
2108 else
2109         ol_with_ldap_module="static"
2110 fi
2111 # end --with-ldap_module
2112
2113 # OpenLDAP --enable-ldbm
2114         # Check whether --enable-ldbm or --disable-ldbm was given.
2115 if test "${enable_ldbm+set}" = set; then
2116   enableval="$enable_ldbm"
2117   
2118         ol_arg=invalid
2119         for ol_val in auto yes no ; do
2120                 if test "$enableval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2126         fi
2127         ol_enable_ldbm="$ol_arg"
2128
2129 else
2130         ol_enable_ldbm="no"
2131 fi
2132 # end --enable-ldbm
2133 # OpenLDAP --with-ldbm_api
2134         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2135 if test "${with_ldbm_api+set}" = set; then
2136   withval="$with_ldbm_api"
2137   
2138         ol_arg=invalid
2139         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2140                 if test "$withval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2146         fi
2147         ol_with_ldbm_api="$ol_arg"
2148
2149 else
2150         ol_with_ldbm_api="auto"
2151 fi
2152 # end --with-ldbm_api
2153
2154 # OpenLDAP --with-ldbm_module
2155         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2156 if test "${with_ldbm_module+set}" = set; then
2157   withval="$with_ldbm_module"
2158   
2159         ol_arg=invalid
2160         for ol_val in static dynamic ; do
2161                 if test "$withval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2167         fi
2168         ol_with_ldbm_module="$ol_arg"
2169
2170 else
2171         ol_with_ldbm_module="static"
2172 fi
2173 # end --with-ldbm_module
2174
2175 # OpenLDAP --with-ldbm_type
2176         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2177 if test "${with_ldbm_type+set}" = set; then
2178   withval="$with_ldbm_type"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto btree hash ; do
2182                 if test "$withval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2188         fi
2189         ol_with_ldbm_type="$ol_arg"
2190
2191 else
2192         ol_with_ldbm_type="auto"
2193 fi
2194 # end --with-ldbm_type
2195
2196 # OpenLDAP --enable-meta
2197         # Check whether --enable-meta or --disable-meta was given.
2198 if test "${enable_meta+set}" = set; then
2199   enableval="$enable_meta"
2200   
2201         ol_arg=invalid
2202         for ol_val in auto yes no ; do
2203                 if test "$enableval" = "$ol_val" ; then
2204                         ol_arg="$ol_val"
2205                 fi
2206         done
2207         if test "$ol_arg" = "invalid" ; then
2208                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2209         fi
2210         ol_enable_meta="$ol_arg"
2211
2212 else
2213         ol_enable_meta="no"
2214 fi
2215 # end --enable-meta
2216 # OpenLDAP --with-meta_module
2217         # Check whether --with-meta_module or --without-meta_module was given.
2218 if test "${with_meta_module+set}" = set; then
2219   withval="$with_meta_module"
2220   
2221         ol_arg=invalid
2222         for ol_val in static dynamic ; do
2223                 if test "$withval" = "$ol_val" ; then
2224                         ol_arg="$ol_val"
2225                 fi
2226         done
2227         if test "$ol_arg" = "invalid" ; then
2228                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2229         fi
2230         ol_with_meta_module="$ol_arg"
2231
2232 else
2233         ol_with_meta_module="static"
2234 fi
2235 # end --with-meta_module
2236
2237 # OpenLDAP --enable-monitor
2238         # Check whether --enable-monitor or --disable-monitor was given.
2239 if test "${enable_monitor+set}" = set; then
2240   enableval="$enable_monitor"
2241   
2242         ol_arg=invalid
2243         for ol_val in auto yes no ; do
2244                 if test "$enableval" = "$ol_val" ; then
2245                         ol_arg="$ol_val"
2246                 fi
2247         done
2248         if test "$ol_arg" = "invalid" ; then
2249                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2250         fi
2251         ol_enable_monitor="$ol_arg"
2252
2253 else
2254         ol_enable_monitor="no"
2255 fi
2256 # end --enable-monitor
2257 # OpenLDAP --with-monitor_module
2258         # Check whether --with-monitor_module or --without-monitor_module was given.
2259 if test "${with_monitor_module+set}" = set; then
2260   withval="$with_monitor_module"
2261   
2262         ol_arg=invalid
2263         for ol_val in static dynamic ; do
2264                 if test "$withval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2270         fi
2271         ol_with_monitor_module="$ol_arg"
2272
2273 else
2274         ol_with_monitor_module="static"
2275 fi
2276 # end --with-monitor_module
2277
2278 # OpenLDAP --enable-null
2279         # Check whether --enable-null or --disable-null was given.
2280 if test "${enable_null+set}" = set; then
2281   enableval="$enable_null"
2282   
2283         ol_arg=invalid
2284         for ol_val in auto yes no ; do
2285                 if test "$enableval" = "$ol_val" ; then
2286                         ol_arg="$ol_val"
2287                 fi
2288         done
2289         if test "$ol_arg" = "invalid" ; then
2290                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2291         fi
2292         ol_enable_null="$ol_arg"
2293
2294 else
2295         ol_enable_null="no"
2296 fi
2297 # end --enable-null
2298 # OpenLDAP --with-null_module
2299         # Check whether --with-null_module or --without-null_module was given.
2300 if test "${with_null_module+set}" = set; then
2301   withval="$with_null_module"
2302   
2303         ol_arg=invalid
2304         for ol_val in static dynamic ; do
2305                 if test "$withval" = "$ol_val" ; then
2306                         ol_arg="$ol_val"
2307                 fi
2308         done
2309         if test "$ol_arg" = "invalid" ; then
2310                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2311         fi
2312         ol_with_null_module="$ol_arg"
2313
2314 else
2315         ol_with_null_module="static"
2316 fi
2317 # end --with-null_module
2318
2319 # OpenLDAP --enable-passwd
2320         # Check whether --enable-passwd or --disable-passwd was given.
2321 if test "${enable_passwd+set}" = set; then
2322   enableval="$enable_passwd"
2323   
2324         ol_arg=invalid
2325         for ol_val in auto yes no ; do
2326                 if test "$enableval" = "$ol_val" ; then
2327                         ol_arg="$ol_val"
2328                 fi
2329         done
2330         if test "$ol_arg" = "invalid" ; then
2331                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2332         fi
2333         ol_enable_passwd="$ol_arg"
2334
2335 else
2336         ol_enable_passwd="no"
2337 fi
2338 # end --enable-passwd
2339 # OpenLDAP --with-passwd_module
2340         # Check whether --with-passwd_module or --without-passwd_module was given.
2341 if test "${with_passwd_module+set}" = set; then
2342   withval="$with_passwd_module"
2343   
2344         ol_arg=invalid
2345         for ol_val in static dynamic ; do
2346                 if test "$withval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2352         fi
2353         ol_with_passwd_module="$ol_arg"
2354
2355 else
2356         ol_with_passwd_module="static"
2357 fi
2358 # end --with-passwd_module
2359
2360 # OpenLDAP --enable-perl
2361         # Check whether --enable-perl or --disable-perl was given.
2362 if test "${enable_perl+set}" = set; then
2363   enableval="$enable_perl"
2364   
2365         ol_arg=invalid
2366         for ol_val in auto yes no ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2373         fi
2374         ol_enable_perl="$ol_arg"
2375
2376 else
2377         ol_enable_perl="no"
2378 fi
2379 # end --enable-perl
2380 # OpenLDAP --with-perl_module
2381         # Check whether --with-perl_module or --without-perl_module was given.
2382 if test "${with_perl_module+set}" = set; then
2383   withval="$with_perl_module"
2384   
2385         ol_arg=invalid
2386         for ol_val in static dynamic ; do
2387                 if test "$withval" = "$ol_val" ; then
2388                         ol_arg="$ol_val"
2389                 fi
2390         done
2391         if test "$ol_arg" = "invalid" ; then
2392                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2393         fi
2394         ol_with_perl_module="$ol_arg"
2395
2396 else
2397         ol_with_perl_module="static"
2398 fi
2399 # end --with-perl_module
2400
2401 # OpenLDAP --enable-shell
2402         # Check whether --enable-shell or --disable-shell was given.
2403 if test "${enable_shell+set}" = set; then
2404   enableval="$enable_shell"
2405   
2406         ol_arg=invalid
2407         for ol_val in auto yes no ; do
2408                 if test "$enableval" = "$ol_val" ; then
2409                         ol_arg="$ol_val"
2410                 fi
2411         done
2412         if test "$ol_arg" = "invalid" ; then
2413                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2414         fi
2415         ol_enable_shell="$ol_arg"
2416
2417 else
2418         ol_enable_shell="no"
2419 fi
2420 # end --enable-shell
2421 # OpenLDAP --with-shell_module
2422         # Check whether --with-shell_module or --without-shell_module was given.
2423 if test "${with_shell_module+set}" = set; then
2424   withval="$with_shell_module"
2425   
2426         ol_arg=invalid
2427         for ol_val in static dynamic ; do
2428                 if test "$withval" = "$ol_val" ; then
2429                         ol_arg="$ol_val"
2430                 fi
2431         done
2432         if test "$ol_arg" = "invalid" ; then
2433                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2434         fi
2435         ol_with_shell_module="$ol_arg"
2436
2437 else
2438         ol_with_shell_module="static"
2439 fi
2440 # end --with-shell_module
2441
2442 # OpenLDAP --enable-sql
2443         # Check whether --enable-sql or --disable-sql was given.
2444 if test "${enable_sql+set}" = set; then
2445   enableval="$enable_sql"
2446   
2447         ol_arg=invalid
2448         for ol_val in auto yes no ; do
2449                 if test "$enableval" = "$ol_val" ; then
2450                         ol_arg="$ol_val"
2451                 fi
2452         done
2453         if test "$ol_arg" = "invalid" ; then
2454                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2455         fi
2456         ol_enable_sql="$ol_arg"
2457
2458 else
2459         ol_enable_sql="no"
2460 fi
2461 # end --enable-sql
2462 # OpenLDAP --with-sql_module
2463         # Check whether --with-sql_module or --without-sql_module was given.
2464 if test "${with_sql_module+set}" = set; then
2465   withval="$with_sql_module"
2466   
2467         ol_arg=invalid
2468         for ol_val in static dynamic ; do
2469                 if test "$withval" = "$ol_val" ; then
2470                         ol_arg="$ol_val"
2471                 fi
2472         done
2473         if test "$ol_arg" = "invalid" ; then
2474                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2475         fi
2476         ol_with_sql_module="$ol_arg"
2477
2478 else
2479         ol_with_sql_module="static"
2480 fi
2481 # end --with-sql_module
2482
2483
2484 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2485 if test "${with_xxslurpdoptions+set}" = set; then
2486   withval="$with_xxslurpdoptions"
2487   :
2488 fi
2489
2490 # OpenLDAP --enable-slurpd
2491         # Check whether --enable-slurpd or --disable-slurpd was given.
2492 if test "${enable_slurpd+set}" = set; then
2493   enableval="$enable_slurpd"
2494   
2495         ol_arg=invalid
2496         for ol_val in auto yes no ; do
2497                 if test "$enableval" = "$ol_val" ; then
2498                         ol_arg="$ol_val"
2499                 fi
2500         done
2501         if test "$ol_arg" = "invalid" ; then
2502                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2503         fi
2504         ol_enable_slurpd="$ol_arg"
2505
2506 else
2507         ol_enable_slurpd="auto"
2508 fi
2509 # end --enable-slurpd
2510
2511 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2512 if test "${with_xxliboptions+set}" = set; then
2513   withval="$with_xxliboptions"
2514   :
2515 fi
2516
2517 # Check whether --enable-static or --disable-static was given.
2518 if test "${enable_static+set}" = set; then
2519   enableval="$enable_static"
2520   p=${PACKAGE-default}
2521 case $enableval in
2522 yes) enable_static=yes ;;
2523 no) enable_static=no ;;
2524 *)
2525   enable_static=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_static=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_static=yes
2538 fi
2539
2540 # Check whether --enable-shared or --disable-shared was given.
2541 if test "${enable_shared+set}" = set; then
2542   enableval="$enable_shared"
2543   p=${PACKAGE-default}
2544 case $enableval in
2545 yes) enable_shared=yes ;;
2546 no) enable_shared=no ;;
2547 *)
2548   enable_shared=no
2549   # Look at the argument we got.  We use all the common list separators.
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2551   for pkg in $enableval; do
2552     if test "X$pkg" = "X$p"; then
2553       enable_shared=yes
2554     fi
2555   done
2556   IFS="$ac_save_ifs"
2557   ;;
2558 esac
2559 else
2560   enable_shared=yes
2561 fi
2562
2563
2564
2565 # validate options
2566 if test $ol_enable_slapd = no ; then
2567                 if test $ol_enable_bdb = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2569         fi
2570         if test $ol_enable_dnssrv = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2572         fi
2573         if test $ol_enable_ldap = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2575         fi
2576         if test $ol_enable_ldbm = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2578         fi
2579         if test $ol_enable_meta = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2581         fi
2582         if test $ol_enable_monitor = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2584         fi
2585         if test $ol_enable_null = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2587         fi
2588         if test $ol_enable_passwd = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2590         fi
2591         if test $ol_enable_perl = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2593         fi
2594         if test $ol_enable_shell = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2596         fi
2597         if test $ol_enable_sql = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2599         fi
2600         if test $ol_enable_modules = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2602         fi
2603         if test $ol_enable_multimaster = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2605         fi
2606         if test $ol_enable_wrappers = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2608         fi
2609         if test $ol_enable_phonetic = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2611         fi
2612         if test $ol_enable_rlookups = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2614         fi
2615         if test $ol_enable_aci = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2617         fi
2618         if test $ol_with_ldbm_api != auto ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2620         fi
2621         if test $ol_with_ldbm_type != auto ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2623         fi
2624         if test $ol_with_bdb_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2626         fi
2627         if test $ol_with_dnssrv_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2629         fi
2630         if test $ol_with_ldap_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2632         fi
2633         if test $ol_with_ldbm_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2635         fi
2636         if test $ol_with_meta_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2638         fi
2639         if test $ol_with_monitor_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2641         fi
2642         if test $ol_with_null_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2644         fi
2645         if test $ol_with_passwd_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2647         fi
2648         if test $ol_with_perl_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2650         fi
2651         if test $ol_with_shell_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2653         fi
2654         if test $ol_with_sql_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2656         fi
2657         if test $ol_enable_slurpd = yes ; then
2658                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2659         fi
2660         if test $ol_enable_rewrite = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2662         fi
2663
2664         # force settings to no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_ldap=no
2668         ol_enable_ldbm=no
2669         ol_enable_meta=no
2670         ol_enable_monitor=no
2671         ol_enable_null=no
2672         ol_enable_passwd=no
2673         ol_enable_perl=no
2674         ol_enable_shell=no
2675         ol_enable_sql=no
2676
2677         ol_enable_modules=no
2678         ol_enable_multimaster=no
2679         ol_enable_phonetic=no
2680         ol_enable_rlookups=no
2681         ol_enable_aci=no
2682         ol_enable_wrappers=no
2683         ol_enable_dynamic=no
2684
2685         ol_with_ldbm_api=no
2686         ol_with_ldbm_type=no
2687
2688         ol_with_bdb_module=static
2689         ol_with_dnssrv_module=static
2690         ol_with_ldap_module=static
2691         ol_with_ldbm_module=static
2692         ol_with_meta_module=static
2693         ol_with_monitor_module=static
2694         ol_with_null_module=static
2695         ol_with_passwd_module=static
2696         ol_with_perl_module=static
2697         ol_with_shell_module=static
2698         ol_with_sql_module=static
2699
2700         ol_enable_slurpd=no
2701
2702         ol_enable_rewrite=no
2703
2704 elif test $ol_enable_ldbm = no ; then
2705         
2706         if test $ol_with_ldbm_api != auto ; then
2707                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2708         fi
2709
2710         if test $ol_with_ldbm_type != auto ; then
2711                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2712         fi
2713
2714         if test $ol_with_ldbm_module != static ; then
2715                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2716         fi
2717
2718         if test $ol_enable_modules != yes -a \
2719                 $ol_enable_bdb = no -a \
2720                 $ol_enable_dnssrv = no -a \
2721                 $ol_enable_ldap = no -a \
2722                 $ol_enable_meta = no -a \
2723                 $ol_enable_monitor = no -a \
2724                 $ol_enable_null = no -a \
2725                 $ol_enable_passwd = no -a \
2726                 $ol_enable_perl = no -a \
2727                 $ol_enable_shell = no -a \
2728                 $ol_enable_sql = no ; then
2729
2730                 if test $ol_enable_slapd = yes ; then
2731                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2732                 else
2733                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2734                         ol_enable_slapd=no
2735                 fi
2736         fi
2737
2738         ol_with_ldbm_api=no
2739         ol_with_ldbm_type=no
2740         ol_with_ldbm_module=static
2741
2742         if test $ol_enable_bdb != no ; then
2743                 ol_with_ldbm_api=berkeley
2744         fi
2745
2746 else
2747                 if test $ol_with_ldbm_api = gdbm -a \
2748                 $ol_with_ldbm_type = btree ; then
2749                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2750         fi
2751         if test $ol_with_ldbm_api = mdbm -a \
2752                 $ol_with_ldbm_type = btree ; then
2753                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2754         fi
2755         if test $ol_with_ldbm_api = ndbm -a \
2756                 $ol_with_ldbm_type = btree ; then
2757                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2758         fi
2759
2760         if test $ol_enable_bdb = yes ; then
2761                 if test $ol_with_ldbm_api = auto ; then
2762                         ol_with_ldbm_api=berkeley
2763                 elif test $ol_with_ldbm_api != berkeley ; then
2764                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2765                 fi
2766
2767         elif test $ol_enable_bdb = auto ; then
2768                 if test $ol_with_ldbm_api != berkeley \
2769                         -o $ol_with_ldbm_api != auto ; then
2770                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2771                         ol_enable_bdb=no
2772                 fi
2773         fi
2774 fi
2775
2776 if test $ol_enable_slurpd = yes ; then
2777                 if test $ol_with_threads = no ; then
2778                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_lmpasswd = yes ; then
2783         if test $ol_with_tls = no ; then
2784                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2785         fi
2786 fi
2787
2788 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2789         if test $ol_with_kerberos = no ; then
2790                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2791         elif test $ol_with_kerberos = auto ; then
2792                 ol_with_kerberos=yes
2793         fi
2794
2795 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2796         if test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=no
2798         elif test $ol_with_kerberos != no ; then
2799                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2800                 ol_with_kerberos=no
2801         fi
2802 fi
2803
2804 if test $ol_enable_spasswd = yes ; then
2805         if test $ol_with_cyrus_sasl = no ; then
2806                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2807         fi
2808         ol_with_cyrus_sasl=yes
2809 fi
2810
2811 echo "$ac_t""done" 1>&6
2812
2813 LDAP_LIBS=
2814 LDIF_LIBS=
2815 LDBM_LIBS=
2816 LTHREAD_LIBS=
2817 LUTIL_LIBS=
2818
2819 SLAPD_LIBS=
2820 SLURPD_LIBS=
2821
2822 BUILD_SLAPD=no
2823 BUILD_SLURPD=no
2824
2825 BUILD_THREAD=no
2826
2827 BUILD_BDB=no
2828 BUILD_DNSSRV=no
2829 BUILD_LDAP=no
2830 BUILD_LDBM=no
2831 BUILD_META=no
2832 BUILD_MONITOR=no
2833 BUILD_NULL=no
2834 BUILD_PASSWD=no
2835 BUILD_PERL=no
2836 BUILD_SHELL=no
2837 BUILD_SQL=no
2838
2839 BUILD_BDB_DYNAMIC=static
2840 BUILD_DNSSRV_DYNAMIC=static
2841 BUILD_LDAP_DYNAMIC=static
2842 BUILD_LDBM_DYNAMIC=static
2843 BUILD_META_DYNAMIC=static
2844 BUILD_MONITOR_DYNAMIC=static
2845 BUILD_NULL_DYNAMIC=static
2846 BUILD_PASSWD_DYNAMIC=static
2847 BUILD_PERL_DYNAMIC=static
2848 BUILD_SHELL_DYNAMIC=static
2849 BUILD_SQL_DYNAMIC=static
2850
2851 SLAPD_MODULES_LDFLAGS=
2852 SLAPD_MODULES_CPPFLAGS=
2853
2854 SLAPD_STATIC_BACKENDS=
2855 SLAPD_DYNAMIC_BACKENDS=
2856
2857 SLAPD_PERL_LDFLAGS=
2858 MOD_PERL_LDFLAGS=
2859 PERL_CPPFLAGS=
2860
2861 SLAPD_SQL_LDFLAGS=
2862 SLAPD_SQL_LIBS=
2863 SLAPD_SQL_INCLUDES=
2864
2865 KRB4_LIBS=
2866 KRB5_LIBS=
2867 READLINE_LIBS=
2868 SASL_LIBS=
2869 TERMCAP_LIBS=
2870 TLS_LIBS=
2871 MODULES_LIBS=
2872 AUTH_LIBS=
2873
2874 SLAPD_SLP_LIBS=
2875
2876
2877 # Find a good install program.  We prefer a C program (faster),
2878 # so one script is as good as another.  But avoid the broken or
2879 # incompatible versions:
2880 # SysV /etc/install, /usr/sbin/install
2881 # SunOS /usr/etc/install
2882 # IRIX /sbin/install
2883 # AIX /bin/install
2884 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2885 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2886 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2887 # ./install, which can be erroneously created by make from ./install.sh.
2888 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2889 echo "configure:2890: checking for a BSD compatible install" >&5
2890 if test -z "$INSTALL"; then
2891 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2892   echo $ac_n "(cached) $ac_c" 1>&6
2893 else
2894     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2895   for ac_dir in $PATH; do
2896     # Account for people who put trailing slashes in PATH elements.
2897     case "$ac_dir/" in
2898     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2899     *)
2900       # OSF1 and SCO ODT 3.0 have their own names for install.
2901       # Don't use installbsd from OSF since it installs stuff as root
2902       # by default.
2903       for ac_prog in ginstall scoinst install; do
2904         if test -f $ac_dir/$ac_prog; then
2905           if test $ac_prog = install &&
2906             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2907             # AIX install.  It has an incompatible calling convention.
2908             :
2909           elif test $ac_prog = install &&
2910             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2911             # program-specific install script used by HP pwplus--don't use.
2912             :
2913           else
2914             ac_cv_path_install="$ac_dir/$ac_prog -c"
2915             break 2
2916           fi
2917         fi
2918       done
2919       ;;
2920     esac
2921   done
2922   IFS="$ac_save_IFS"
2923
2924 fi
2925   if test "${ac_cv_path_install+set}" = set; then
2926     INSTALL="$ac_cv_path_install"
2927   else
2928     # As a last resort, use the slow shell script.  We don't cache a
2929     # path for INSTALL within a source directory, because that will
2930     # break other packages using the cache if that directory is
2931     # removed, or if the path is relative.
2932     INSTALL="$ac_install_sh"
2933   fi
2934 fi
2935 echo "$ac_t""$INSTALL" 1>&6
2936
2937 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2938 # It thinks the first close brace ends the variable substitution.
2939 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2940
2941 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2942
2943 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2944
2945
2946 cat >> confdefs.h <<\EOF
2947 #define HAVE_MKVERSION 1
2948 EOF
2949
2950
2951
2952
2953 ol_aix_threads=no
2954 case "$target" in
2955 *-*-aix*)       if test -z "$CC" ; then
2956                 case "$ol_with_threads" in
2957                 auto | yes |  posix) ol_aix_threads=yes ;;
2958                 esac
2959         fi
2960 ;;
2961 esac
2962
2963 if test $ol_aix_threads = yes ; then
2964         if test -z "${CC}" ; then
2965                 for ac_prog in cc_r xlc_r cc
2966 do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2970 echo "configure:2971: checking for $ac_word" >&5
2971 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2972   echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974   if test -n "$CC"; then
2975   ac_cv_prog_CC="$CC" # Let the user override the test.
2976 else
2977   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2978   ac_dummy="$PATH"
2979   for ac_dir in $ac_dummy; do
2980     test -z "$ac_dir" && ac_dir=.
2981     if test -f $ac_dir/$ac_word; then
2982       ac_cv_prog_CC="$ac_prog"
2983       break
2984     fi
2985   done
2986   IFS="$ac_save_ifs"
2987 fi
2988 fi
2989 CC="$ac_cv_prog_CC"
2990 if test -n "$CC"; then
2991   echo "$ac_t""$CC" 1>&6
2992 else
2993   echo "$ac_t""no" 1>&6
2994 fi
2995
2996 test -n "$CC" && break
2997 done
2998
2999
3000                 if test "$CC" = cc ; then
3001                                                 if test $ol_with_threads != auto ; then
3002                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3003                         else
3004                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3005                         fi
3006                         ol_with_threads=no
3007                 fi
3008         fi
3009
3010         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3011                 ol_with_threads=posix
3012                 ol_cv_pthread_create=yes
3013         fi
3014 fi
3015
3016 if test -z "${CC}"; then
3017         for ac_prog in cc gcc
3018 do
3019 # Extract the first word of "$ac_prog", so it can be a program name with args.
3020 set dummy $ac_prog; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test -n "$CC"; then
3027   ac_cv_prog_CC="$CC" # Let the user override the test.
3028 else
3029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3030   ac_dummy="$PATH"
3031   for ac_dir in $ac_dummy; do
3032     test -z "$ac_dir" && ac_dir=.
3033     if test -f $ac_dir/$ac_word; then
3034       ac_cv_prog_CC="$ac_prog"
3035       break
3036     fi
3037   done
3038   IFS="$ac_save_ifs"
3039 fi
3040 fi
3041 CC="$ac_cv_prog_CC"
3042 if test -n "$CC"; then
3043   echo "$ac_t""$CC" 1>&6
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047
3048 test -n "$CC" && break
3049 done
3050 test -n "$CC" || CC="missing"
3051
3052
3053         if test "${CC}" = "missing" ; then
3054                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3055         fi
3056 fi
3057
3058 if test -z "${AR}"; then
3059         for ac_prog in ar gar
3060 do
3061 # Extract the first word of "$ac_prog", so it can be a program name with args.
3062 set dummy $ac_prog; ac_word=$2
3063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_word" >&5
3065 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3066   echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068   if test -n "$AR"; then
3069   ac_cv_prog_AR="$AR" # Let the user override the test.
3070 else
3071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3072   ac_dummy="$PATH"
3073   for ac_dir in $ac_dummy; do
3074     test -z "$ac_dir" && ac_dir=.
3075     if test -f $ac_dir/$ac_word; then
3076       ac_cv_prog_AR="$ac_prog"
3077       break
3078     fi
3079   done
3080   IFS="$ac_save_ifs"
3081 fi
3082 fi
3083 AR="$ac_cv_prog_AR"
3084 if test -n "$AR"; then
3085   echo "$ac_t""$AR" 1>&6
3086 else
3087   echo "$ac_t""no" 1>&6
3088 fi
3089
3090 test -n "$AR" && break
3091 done
3092 test -n "$AR" || AR="missing"
3093
3094
3095         if test "${AR}" = "missing" ; then
3096                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3097         fi
3098 fi
3099
3100
3101
3102 # Find the correct PATH separator.  Usually this is `:', but
3103 # DJGPP uses `;' like DOS.
3104 if test "X${PATH_SEPARATOR+set}" != Xset; then
3105   UNAME=${UNAME-`uname 2>/dev/null`}
3106   case X$UNAME in
3107     *-DOS) lt_cv_sys_path_separator=';' ;;
3108     *)     lt_cv_sys_path_separator=':' ;;
3109   esac
3110   PATH_SEPARATOR=$lt_cv_sys_path_separator
3111 fi
3112
3113 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3114 echo "configure:3115: checking for Cygwin environment" >&5
3115 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118   cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121
3122 int main() {
3123
3124 #ifndef __CYGWIN__
3125 #define __CYGWIN__ __CYGWIN32__
3126 #endif
3127 return __CYGWIN__;
3128 ; return 0; }
3129 EOF
3130 if { (eval echo configure:3131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3131   rm -rf conftest*
3132   ac_cv_cygwin=yes
3133 else
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136   rm -rf conftest*
3137   ac_cv_cygwin=no
3138 fi
3139 rm -f conftest*
3140 fi
3141
3142 echo "$ac_t""$ac_cv_cygwin" 1>&6
3143 CYGWIN=
3144 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3145 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3146 echo "configure:3147: checking for mingw32 environment" >&5
3147 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153
3154 int main() {
3155 return __MINGW32__;
3156 ; return 0; }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3159   rm -rf conftest*
3160   ac_cv_mingw32=yes
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -rf conftest*
3165   ac_cv_mingw32=no
3166 fi
3167 rm -f conftest*
3168 fi
3169
3170 echo "$ac_t""$ac_cv_mingw32" 1>&6
3171 MINGW32=
3172 test "$ac_cv_mingw32" = yes && MINGW32=yes
3173 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3174 echo "configure:3175: checking for EMX OS/2 environment" >&5
3175 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181
3182 int main() {
3183 return __EMX__;
3184 ; return 0; }
3185 EOF
3186 if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3187   rm -rf conftest*
3188   ac_cv_emxos2=yes
3189 else
3190   echo "configure: failed program was:" >&5
3191   cat conftest.$ac_ext >&5
3192   rm -rf conftest*
3193   ac_cv_emxos2=no
3194 fi
3195 rm -f conftest*
3196 fi
3197
3198 echo "$ac_t""$ac_cv_emxos2" 1>&6
3199 EMXOS2=
3200 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3201 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3202 echo "configure:3203: checking how to run the C preprocessor" >&5
3203 # On Suns, sometimes $CPP names a directory.
3204 if test -n "$CPP" && test -d "$CPP"; then
3205   CPP=
3206 fi
3207 if test -z "$CPP"; then
3208 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211     # This must be in double quotes, not single quotes, because CPP may get
3212   # substituted into the Makefile and "${CC-cc}" will confuse make.
3213   CPP="${CC-cc} -E"
3214   # On the NeXT, cc -E runs the code through the compiler's parser,
3215   # not just through cpp.
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 #include <assert.h>
3220 Syntax Error
3221 EOF
3222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3223 { (eval echo configure:3224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3225 if test -z "$ac_err"; then
3226   :
3227 else
3228   echo "$ac_err" >&5
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   CPP="${CC-cc} -E -traditional-cpp"
3233   cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 #include <assert.h>
3237 Syntax Error
3238 EOF
3239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3240 { (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3242 if test -z "$ac_err"; then
3243   :
3244 else
3245   echo "$ac_err" >&5
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   CPP="${CC-cc} -nologo -E"
3250   cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 #include <assert.h>
3254 Syntax Error
3255 EOF
3256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3257 { (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3259 if test -z "$ac_err"; then
3260   :
3261 else
3262   echo "$ac_err" >&5
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   CPP=/lib/cpp
3267 fi
3268 rm -f conftest*
3269 fi
3270 rm -f conftest*
3271 fi
3272 rm -f conftest*
3273   ac_cv_prog_CPP="$CPP"
3274 fi
3275   CPP="$ac_cv_prog_CPP"
3276 else
3277   ac_cv_prog_CPP="$CPP"
3278 fi
3279 echo "$ac_t""$CPP" 1>&6
3280
3281 # Check whether --enable-fast-install or --disable-fast-install was given.
3282 if test "${enable_fast_install+set}" = set; then
3283   enableval="$enable_fast_install"
3284   p=${PACKAGE-default}
3285 case $enableval in
3286 yes) enable_fast_install=yes ;;
3287 no) enable_fast_install=no ;;
3288 *)
3289   enable_fast_install=no
3290   # Look at the argument we got.  We use all the common list separators.
3291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3292   for pkg in $enableval; do
3293     if test "X$pkg" = "X$p"; then
3294       enable_fast_install=yes
3295     fi
3296   done
3297   IFS="$ac_save_ifs"
3298   ;;
3299 esac
3300 else
3301   enable_fast_install=yes
3302 fi
3303
3304 # Extract the first word of "gcc", so it can be a program name with args.
3305 set dummy gcc; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   if test -n "$CC"; then
3312   ac_cv_prog_CC="$CC" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_CC="gcc"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324 fi
3325 fi
3326 CC="$ac_cv_prog_CC"
3327 if test -n "$CC"; then
3328   echo "$ac_t""$CC" 1>&6
3329 else
3330   echo "$ac_t""no" 1>&6
3331 fi
3332
3333 if test -z "$CC"; then
3334   # Extract the first word of "cc", so it can be a program name with args.
3335 set dummy cc; ac_word=$2
3336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_word" >&5
3338 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   if test -n "$CC"; then
3342   ac_cv_prog_CC="$CC" # Let the user override the test.
3343 else
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345   ac_prog_rejected=no
3346   ac_dummy="$PATH"
3347   for ac_dir in $ac_dummy; do
3348     test -z "$ac_dir" && ac_dir=.
3349     if test -f $ac_dir/$ac_word; then
3350       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3351         ac_prog_rejected=yes
3352         continue
3353       fi
3354       ac_cv_prog_CC="cc"
3355       break
3356     fi
3357   done
3358   IFS="$ac_save_ifs"
3359 if test $ac_prog_rejected = yes; then
3360   # We found a bogon in the path, so make sure we never use it.
3361   set dummy $ac_cv_prog_CC
3362   shift
3363   if test $# -gt 0; then
3364     # We chose a different compiler from the bogus one.
3365     # However, it has the same basename, so the bogon will be chosen
3366     # first if we set CC to just the basename; use the full file name.
3367     shift
3368     set dummy "$ac_dir/$ac_word" "$@"
3369     shift
3370     ac_cv_prog_CC="$@"
3371   fi
3372 fi
3373 fi
3374 fi
3375 CC="$ac_cv_prog_CC"
3376 if test -n "$CC"; then
3377   echo "$ac_t""$CC" 1>&6
3378 else
3379   echo "$ac_t""no" 1>&6
3380 fi
3381
3382   if test -z "$CC"; then
3383     case "`uname -s`" in
3384     *win32* | *WIN32* | *CYGWIN*)
3385       # Extract the first word of "cl", so it can be a program name with args.
3386 set dummy cl; ac_word=$2
3387 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3388 echo "configure:3389: checking for $ac_word" >&5
3389 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   if test -n "$CC"; then
3393   ac_cv_prog_CC="$CC" # Let the user override the test.
3394 else
3395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3396   ac_dummy="$PATH"
3397   for ac_dir in $ac_dummy; do
3398     test -z "$ac_dir" && ac_dir=.
3399     if test -f $ac_dir/$ac_word; then
3400       ac_cv_prog_CC="cl"
3401       break
3402     fi
3403   done
3404   IFS="$ac_save_ifs"
3405 fi
3406 fi
3407 CC="$ac_cv_prog_CC"
3408 if test -n "$CC"; then
3409   echo "$ac_t""$CC" 1>&6
3410 else
3411   echo "$ac_t""no" 1>&6
3412 fi
3413  ;;
3414     esac
3415   fi
3416   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3417 fi
3418
3419 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3420 echo "configure:3421: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3421
3422 ac_ext=c
3423 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3424 ac_cpp='$CPP $CPPFLAGS'
3425 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3426 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3427 cross_compiling=$ac_cv_prog_cc_cross
3428
3429 cat > conftest.$ac_ext << EOF
3430
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433
3434 main(){return(0);}
3435 EOF
3436 if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3437   ac_cv_prog_cc_works=yes
3438   # If we can't run a trivial program, we are probably using a cross compiler.
3439   if (./conftest; exit) 2>/dev/null; then
3440     ac_cv_prog_cc_cross=no
3441   else
3442     ac_cv_prog_cc_cross=yes
3443   fi
3444 else
3445   echo "configure: failed program was:" >&5
3446   cat conftest.$ac_ext >&5
3447   ac_cv_prog_cc_works=no
3448 fi
3449 rm -fr conftest*
3450 ac_ext=c
3451 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3452 ac_cpp='$CPP $CPPFLAGS'
3453 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3454 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3455 cross_compiling=$ac_cv_prog_cc_cross
3456
3457 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3458 if test $ac_cv_prog_cc_works = no; then
3459   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3460 fi
3461 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3462 echo "configure:3463: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3463 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3464 cross_compiling=$ac_cv_prog_cc_cross
3465
3466 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3467 echo "configure:3468: checking whether we are using GNU C" >&5
3468 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   cat > conftest.c <<EOF
3472 #ifdef __GNUC__
3473   yes;
3474 #endif
3475 EOF
3476 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3477   ac_cv_prog_gcc=yes
3478 else
3479   ac_cv_prog_gcc=no
3480 fi
3481 fi
3482
3483 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3484
3485 if test $ac_cv_prog_gcc = yes; then
3486   GCC=yes
3487 else
3488   GCC=
3489 fi
3490
3491 ac_test_CFLAGS="${CFLAGS+set}"
3492 ac_save_CFLAGS="$CFLAGS"
3493 CFLAGS=
3494 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3495 echo "configure:3496: checking whether ${CC-cc} accepts -g" >&5
3496 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   echo 'void f(){}' > conftest.c
3500 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3501   ac_cv_prog_cc_g=yes
3502 else
3503   ac_cv_prog_cc_g=no
3504 fi
3505 rm -f conftest*
3506
3507 fi
3508
3509 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3510 if test "$ac_test_CFLAGS" = set; then
3511   CFLAGS="$ac_save_CFLAGS"
3512 elif test $ac_cv_prog_cc_g = yes; then
3513   if test "$GCC" = yes; then
3514     CFLAGS="-g -O2"
3515   else
3516     CFLAGS="-g"
3517   fi
3518 else
3519   if test "$GCC" = yes; then
3520     CFLAGS="-O2"
3521   else
3522     CFLAGS=
3523   fi
3524 fi
3525
3526 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3527 if test "${with_gnu_ld+set}" = set; then
3528   withval="$with_gnu_ld"
3529   test "$withval" = no || with_gnu_ld=yes
3530 else
3531   with_gnu_ld=no
3532 fi
3533
3534 ac_prog=ld
3535 if test "$GCC" = yes; then
3536   # Check if gcc -print-prog-name=ld gives a path.
3537   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3538 echo "configure:3539: checking for ld used by GCC" >&5
3539   case $host in
3540   *-*-mingw*)
3541     # gcc leaves a trailing carriage return which upsets mingw
3542     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3543   *)
3544     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3545   esac
3546   case $ac_prog in
3547     # Accept absolute paths.
3548     [\\/]* | [A-Za-z]:[\\/]*)
3549       re_direlt='/[^/][^/]*/\.\./'
3550       # Canonicalize the path of ld
3551       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3552       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3553         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3554       done
3555       test -z "$LD" && LD="$ac_prog"
3556       ;;
3557   "")
3558     # If it fails, then pretend we aren't using GCC.
3559     ac_prog=ld
3560     ;;
3561   *)
3562     # If it is relative, then search for the first ld in PATH.
3563     with_gnu_ld=unknown
3564     ;;
3565   esac
3566 elif test "$with_gnu_ld" = yes; then
3567   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3568 echo "configure:3569: checking for GNU ld" >&5
3569 else
3570   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3571 echo "configure:3572: checking for non-GNU ld" >&5
3572 fi
3573 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   if test -z "$LD"; then
3577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3578   for ac_dir in $PATH; do
3579     test -z "$ac_dir" && ac_dir=.
3580     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3581       lt_cv_path_LD="$ac_dir/$ac_prog"
3582       # Check to see if the program is GNU ld.  I'd rather use --version,
3583       # but apparently some GNU ld's only accept -v.
3584       # Break only if it was the GNU/non-GNU ld that we prefer.
3585       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3586         test "$with_gnu_ld" != no && break
3587       else
3588         test "$with_gnu_ld" != yes && break
3589       fi
3590     fi
3591   done
3592   IFS="$ac_save_ifs"
3593 else
3594   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3595 fi
3596 fi
3597
3598 LD="$lt_cv_path_LD"
3599 if test -n "$LD"; then
3600   echo "$ac_t""$LD" 1>&6
3601 else
3602   echo "$ac_t""no" 1>&6
3603 fi
3604 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3605 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3606 echo "configure:3607: checking if the linker ($LD) is GNU ld" >&5
3607 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3611 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3612   lt_cv_prog_gnu_ld=yes
3613 else
3614   lt_cv_prog_gnu_ld=no
3615 fi
3616 fi
3617
3618 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3619 with_gnu_ld=$lt_cv_prog_gnu_ld
3620
3621
3622 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3623 echo "configure:3624: checking for $LD option to reload object files" >&5
3624 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   lt_cv_ld_reload_flag='-r'
3628 fi
3629
3630 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3631 reload_flag=$lt_cv_ld_reload_flag
3632 test -n "$reload_flag" && reload_flag=" $reload_flag"
3633
3634 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3635 echo "configure:3636: checking for BSD-compatible nm" >&5
3636 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   if test -n "$NM"; then
3640   # Let the user override the test.
3641   lt_cv_path_NM="$NM"
3642 else
3643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3644   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3645     test -z "$ac_dir" && ac_dir=.
3646     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3647     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3648       # Check to see if the nm accepts a BSD-compat flag.
3649       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3650       #   nm: unknown option "B" ignored
3651       # Tru64's nm complains that /dev/null is an invalid object file
3652       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3653         lt_cv_path_NM="$tmp_nm -B"
3654         break
3655       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3656         lt_cv_path_NM="$tmp_nm -p"
3657         break
3658       else
3659         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3660         continue # so that we can try to find one that supports BSD flags
3661       fi
3662     fi
3663   done
3664   IFS="$ac_save_ifs"
3665   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3666 fi
3667 fi
3668
3669 NM="$lt_cv_path_NM"
3670 echo "$ac_t""$NM" 1>&6
3671
3672 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3673 echo "configure:3674: checking whether ln -s works" >&5
3674 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3675   echo $ac_n "(cached) $ac_c" 1>&6
3676 else
3677   rm -f conftestdata
3678 if ln -s X conftestdata 2>/dev/null
3679 then
3680   rm -f conftestdata
3681   ac_cv_prog_LN_S="ln -s"
3682 else
3683   ac_cv_prog_LN_S=ln
3684 fi
3685 fi
3686 LN_S="$ac_cv_prog_LN_S"
3687 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3688   echo "$ac_t""yes" 1>&6
3689 else
3690   echo "$ac_t""no" 1>&6
3691 fi
3692
3693 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3694 echo "configure:3695: checking how to recognise dependant libraries" >&5
3695 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   lt_cv_file_magic_cmd='$MAGIC_CMD'
3699 lt_cv_file_magic_test_file=
3700 lt_cv_deplibs_check_method='unknown'
3701 # Need to set the preceding variable on all platforms that support
3702 # interlibrary dependencies.
3703 # 'none' -- dependencies not supported.
3704 # `unknown' -- same as none, but documents that we really don't know.
3705 # 'pass_all' -- all dependencies passed with no checks.
3706 # 'test_compile' -- check by making test program.
3707 # 'file_magic [[regex]]' -- check by looking for files in library path
3708 # which responds to the $file_magic_cmd with a given egrep regex.
3709 # If you have `file' or equivalent on your system and you're not sure
3710 # whether `pass_all' will *always* work, you probably want this one.
3711
3712 case $host_os in
3713 aix4* | aix5*)
3714   lt_cv_deplibs_check_method=pass_all
3715   ;;
3716
3717 beos*)
3718   lt_cv_deplibs_check_method=pass_all
3719   ;;
3720
3721 bsdi4*)
3722   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3723   lt_cv_file_magic_cmd='/usr/bin/file -L'
3724   lt_cv_file_magic_test_file=/shlib/libc.so
3725   ;;
3726
3727 cygwin* | mingw* | pw32*)
3728   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3729   lt_cv_file_magic_cmd='$OBJDUMP -f'
3730   ;;
3731
3732 darwin* | rhapsody*)
3733   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3734   lt_cv_file_magic_cmd='/usr/bin/file -L'
3735   case "$host_os" in
3736   rhapsody* | darwin1.[012])
3737     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3738     ;;
3739   *) # Darwin 1.3 on
3740     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3741     ;;
3742   esac
3743   ;;
3744
3745 freebsd*)
3746   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3747     case $host_cpu in
3748     i*86 )
3749       # Not sure whether the presence of OpenBSD here was a mistake.
3750       # Let's accept both of them until this is cleared up.
3751       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3752       lt_cv_file_magic_cmd=/usr/bin/file
3753       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3754       ;;
3755     esac
3756   else
3757     lt_cv_deplibs_check_method=pass_all
3758   fi
3759   ;;
3760
3761 gnu*)
3762   lt_cv_deplibs_check_method=pass_all
3763   ;;
3764
3765 hpux10.20*|hpux11*)
3766   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3767   lt_cv_file_magic_cmd=/usr/bin/file
3768   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3769   ;;
3770
3771 irix5* | irix6*)
3772   case $host_os in
3773   irix5*)
3774     # this will be overridden with pass_all, but let us keep it just in case
3775     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3776     ;;
3777   *)
3778     case $LD in
3779     *-32|*"-32 ") libmagic=32-bit;;
3780     *-n32|*"-n32 ") libmagic=N32;;
3781     *-64|*"-64 ") libmagic=64-bit;;
3782     *) libmagic=never-match;;
3783     esac
3784     # this will be overridden with pass_all, but let us keep it just in case
3785     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3786     ;;
3787   esac
3788   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3789   lt_cv_deplibs_check_method=pass_all
3790   ;;
3791
3792 # This must be Linux ELF.
3793 linux-gnu*)
3794   case $host_cpu in
3795   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3796     lt_cv_deplibs_check_method=pass_all ;;
3797   *)
3798     # glibc up to 2.1.1 does not perform some relocations on ARM
3799     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3800   esac
3801   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3802   ;;
3803
3804 netbsd*)
3805   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3806     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3807   else
3808     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3809   fi
3810   ;;
3811
3812 newos6*)
3813   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3814   lt_cv_file_magic_cmd=/usr/bin/file
3815   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3816   ;;
3817
3818 openbsd*)
3819   lt_cv_file_magic_cmd=/usr/bin/file
3820   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3821   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3822     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3823   else
3824     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3825   fi
3826   ;;
3827
3828 osf3* | osf4* | osf5*)
3829   # this will be overridden with pass_all, but let us keep it just in case
3830   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3831   lt_cv_file_magic_test_file=/shlib/libc.so
3832   lt_cv_deplibs_check_method=pass_all
3833   ;;
3834
3835 sco3.2v5*)
3836   lt_cv_deplibs_check_method=pass_all
3837   ;;
3838
3839 solaris*)
3840   lt_cv_deplibs_check_method=pass_all
3841   lt_cv_file_magic_test_file=/lib/libc.so
3842   ;;
3843
3844 sysv5uw[78]* | sysv4*uw2*)
3845   lt_cv_deplibs_check_method=pass_all
3846   ;;
3847
3848 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3849   case $host_vendor in
3850   motorola)
3851     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]'
3852     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3853     ;;
3854   ncr)
3855     lt_cv_deplibs_check_method=pass_all
3856     ;;
3857   sequent)
3858     lt_cv_file_magic_cmd='/bin/file'
3859     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3860     ;;
3861   sni)
3862     lt_cv_file_magic_cmd='/bin/file'
3863     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3864     lt_cv_file_magic_test_file=/lib/libc.so
3865     ;;
3866   esac
3867   ;;
3868 esac
3869
3870 fi
3871
3872 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3873 file_magic_cmd=$lt_cv_file_magic_cmd
3874 deplibs_check_method=$lt_cv_deplibs_check_method
3875
3876 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3877 echo "configure:3878: checking for object suffix" >&5
3878 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   rm -f conftest*
3882 echo 'int i = 1;' > conftest.$ac_ext
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3884   for ac_file in conftest.*; do
3885     case $ac_file in
3886     *.c) ;;
3887     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3888     esac
3889   done
3890 else
3891   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3892 fi
3893 rm -f conftest*
3894 fi
3895
3896 echo "$ac_t""$ac_cv_objext" 1>&6
3897 OBJEXT=$ac_cv_objext
3898 ac_objext=$ac_cv_objext
3899
3900
3901
3902
3903 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3904 echo "configure:3905: checking for executable suffix" >&5
3905 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3909   ac_cv_exeext=.exe
3910 else
3911   rm -f conftest*
3912   echo 'int main () { return 0; }' > conftest.$ac_ext
3913   ac_cv_exeext=
3914   if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3915     for file in conftest.*; do
3916       case $file in
3917       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3918       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3919       esac
3920     done
3921   else
3922     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3923   fi
3924   rm -f conftest*
3925   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3926 fi
3927 fi
3928
3929 EXEEXT=""
3930 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3931 echo "$ac_t""${ac_cv_exeext}" 1>&6
3932 ac_exeext=$EXEEXT
3933
3934 if test $host != $build; then
3935   ac_tool_prefix=${host_alias}-
3936 else
3937   ac_tool_prefix=
3938 fi
3939
3940
3941
3942
3943 # Check for command to grab the raw symbol name followed by C symbol from nm.
3944 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3945 echo "configure:3946: checking command to parse $NM output" >&5
3946 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   
3950 # These are sane defaults that work on at least a few old systems.
3951 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3952
3953 # Character class describing NM global symbol codes.
3954 symcode='[BCDEGRST]'
3955
3956 # Regexp to match symbols that can be accessed directly from C.
3957 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3958
3959 # Transform the above into a raw symbol and a C symbol.
3960 symxfrm='\1 \2\3 \3'
3961
3962 # Transform an extracted symbol line into a proper C declaration
3963 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3964
3965 # Transform an extracted symbol line into symbol name and symbol address
3966 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'"
3967
3968 # Define system-specific variables.
3969 case $host_os in
3970 aix*)
3971   symcode='[BCDT]'
3972   ;;
3973 cygwin* | mingw* | pw32*)
3974   symcode='[ABCDGISTW]'
3975   ;;
3976 hpux*) # Its linker distinguishes data from code symbols
3977   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3978   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'"
3979   ;;
3980 irix*)
3981   symcode='[BCDEGRST]'
3982   ;;
3983 solaris* | sysv5*)
3984   symcode='[BDT]'
3985   ;;
3986 sysv4)
3987   symcode='[DFNSTU]'
3988   ;;
3989 esac
3990
3991 # Handle CRLF in mingw tool chain
3992 opt_cr=
3993 case $host_os in
3994 mingw*)
3995   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3996   ;;
3997 esac
3998
3999 # If we're using GNU nm, then use its standard symbol codes.
4000 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4001   symcode='[ABCDGISTW]'
4002 fi
4003
4004 # Try without a prefix undercore, then with it.
4005 for ac_symprfx in "" "_"; do
4006
4007   # Write the raw and C identifiers.
4008 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4009
4010   # Check to see that the pipe works correctly.
4011   pipe_works=no
4012   rm -f conftest*
4013   cat > conftest.$ac_ext <<EOF
4014 #ifdef __cplusplus
4015 extern "C" {
4016 #endif
4017 char nm_test_var;
4018 void nm_test_func(){}
4019 #ifdef __cplusplus
4020 }
4021 #endif
4022 int main(){nm_test_var='a';nm_test_func();return(0);}
4023 EOF
4024
4025   if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4026     # Now try to grab the symbols.
4027     nlist=conftest.nm
4028     if { (eval echo configure:4029: \"$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
4029       # Try sorting and uniquifying the output.
4030       if sort "$nlist" | uniq > "$nlist"T; then
4031         mv -f "$nlist"T "$nlist"
4032       else
4033         rm -f "$nlist"T
4034       fi
4035
4036       # Make sure that we snagged all the symbols we need.
4037       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4038         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4039           cat <<EOF > conftest.$ac_ext
4040 #ifdef __cplusplus
4041 extern "C" {
4042 #endif
4043
4044 EOF
4045           # Now generate the symbol file.
4046           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4047
4048           cat <<EOF >> conftest.$ac_ext
4049 #if defined (__STDC__) && __STDC__
4050 # define lt_ptr void *
4051 #else
4052 # define lt_ptr char *
4053 # define const
4054 #endif
4055
4056 /* The mapping between symbol names and symbols. */
4057 const struct {
4058   const char *name;
4059   lt_ptr address;
4060 }
4061 lt_preloaded_symbols[] =
4062 {
4063 EOF
4064           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4065           cat <<\EOF >> conftest.$ac_ext
4066   {0, (lt_ptr) 0}
4067 };
4068
4069 #ifdef __cplusplus
4070 }
4071 #endif
4072 EOF
4073           # Now try linking the two files.
4074           mv conftest.$ac_objext conftstm.$ac_objext
4075           save_LIBS="$LIBS"
4076           save_CFLAGS="$CFLAGS"
4077           LIBS="conftstm.$ac_objext"
4078           CFLAGS="$CFLAGS$no_builtin_flag"
4079           if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4080             pipe_works=yes
4081           fi
4082           LIBS="$save_LIBS"
4083           CFLAGS="$save_CFLAGS"
4084         else
4085           echo "cannot find nm_test_func in $nlist" >&5
4086         fi
4087       else
4088         echo "cannot find nm_test_var in $nlist" >&5
4089       fi
4090     else
4091       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4092     fi
4093   else
4094     echo "$progname: failed program was:" >&5
4095     cat conftest.$ac_ext >&5
4096   fi
4097   rm -f conftest* conftst*
4098
4099   # Do not use the global_symbol_pipe unless it works.
4100   if test "$pipe_works" = yes; then
4101     break
4102   else
4103     lt_cv_sys_global_symbol_pipe=
4104   fi
4105 done
4106
4107 fi
4108
4109 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4110 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4111   global_symbol_to_cdecl=
4112   global_symbol_to_c_name_address=
4113 else
4114   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4115   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4116 fi
4117 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4118 then
4119   echo "$ac_t""failed" 1>&6
4120 else
4121   echo "$ac_t""ok" 1>&6
4122 fi
4123
4124 for ac_hdr in dlfcn.h
4125 do
4126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_hdr" >&5
4129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <$ac_hdr>
4136 EOF
4137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4138 { (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4140 if test -z "$ac_err"; then
4141   rm -rf conftest*
4142   eval "ac_cv_header_$ac_safe=yes"
4143 else
4144   echo "$ac_err" >&5
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4155   cat >> confdefs.h <<EOF
4156 #define $ac_tr_hdr 1
4157 EOF
4158  
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162 done
4163
4164
4165
4166
4167
4168 # Only perform the check for file, if the check method requires it
4169 case $deplibs_check_method in
4170 file_magic*)
4171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4173 echo "configure:4174: checking for ${ac_tool_prefix}file" >&5
4174 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   case $MAGIC_CMD in
4178   /*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4180   ;;
4181   ?:/*)
4182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4183   ;;
4184   *)
4185   ac_save_MAGIC_CMD="$MAGIC_CMD"
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="/usr/bin:$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/${ac_tool_prefix}file; then
4191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4192       if test -n "$file_magic_test_file"; then
4193         case $deplibs_check_method in
4194         "file_magic "*)
4195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4198             egrep "$file_magic_regex" > /dev/null; then
4199             :
4200           else
4201             cat <<EOF 1>&2
4202
4203 *** Warning: the command libtool uses to detect shared libraries,
4204 *** $file_magic_cmd, produces output that libtool cannot recognize.
4205 *** The result is that libtool may fail to recognize shared libraries
4206 *** as such.  This will affect the creation of libtool libraries that
4207 *** depend on shared libraries, but programs linked with such libtool
4208 *** libraries will work regardless of this problem.  Nevertheless, you
4209 *** may want to report the problem to your system manager and/or to
4210 *** bug-libtool@gnu.org
4211
4212 EOF
4213           fi ;;
4214         esac
4215       fi
4216       break
4217     fi
4218   done
4219   IFS="$ac_save_ifs"
4220   MAGIC_CMD="$ac_save_MAGIC_CMD"
4221   ;;
4222 esac
4223 fi
4224
4225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4226 if test -n "$MAGIC_CMD"; then
4227   echo "$ac_t""$MAGIC_CMD" 1>&6
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231
4232 if test -z "$lt_cv_path_MAGIC_CMD"; then
4233   if test -n "$ac_tool_prefix"; then
4234     echo $ac_n "checking for file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298
4299   fi
4300   ;;
4301 esac
4302
4303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_word" >&5
4307 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   if test -n "$RANLIB"; then
4311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4312 else
4313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4314   ac_dummy="$PATH"
4315   for ac_dir in $ac_dummy; do
4316     test -z "$ac_dir" && ac_dir=.
4317     if test -f $ac_dir/$ac_word; then
4318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4319       break
4320     fi
4321   done
4322   IFS="$ac_save_ifs"
4323 fi
4324 fi
4325 RANLIB="$ac_cv_prog_RANLIB"
4326 if test -n "$RANLIB"; then
4327   echo "$ac_t""$RANLIB" 1>&6
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331
4332
4333 if test -z "$ac_cv_prog_RANLIB"; then
4334 if test -n "$ac_tool_prefix"; then
4335   # Extract the first word of "ranlib", so it can be a program name with args.
4336 set dummy ranlib; ac_word=$2
4337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_word" >&5
4339 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4340   echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342   if test -n "$RANLIB"; then
4343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4344 else
4345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4346   ac_dummy="$PATH"
4347   for ac_dir in $ac_dummy; do
4348     test -z "$ac_dir" && ac_dir=.
4349     if test -f $ac_dir/$ac_word; then
4350       ac_cv_prog_RANLIB="ranlib"
4351       break
4352     fi
4353   done
4354   IFS="$ac_save_ifs"
4355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4356 fi
4357 fi
4358 RANLIB="$ac_cv_prog_RANLIB"
4359 if test -n "$RANLIB"; then
4360   echo "$ac_t""$RANLIB" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365 else
4366   RANLIB=":"
4367 fi
4368 fi
4369
4370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4371 set dummy ${ac_tool_prefix}strip; ac_word=$2
4372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_word" >&5
4374 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   if test -n "$STRIP"; then
4378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4379 else
4380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4381   ac_dummy="$PATH"
4382   for ac_dir in $ac_dummy; do
4383     test -z "$ac_dir" && ac_dir=.
4384     if test -f $ac_dir/$ac_word; then
4385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4386       break
4387     fi
4388   done
4389   IFS="$ac_save_ifs"
4390 fi
4391 fi
4392 STRIP="$ac_cv_prog_STRIP"
4393 if test -n "$STRIP"; then
4394   echo "$ac_t""$STRIP" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400 if test -z "$ac_cv_prog_STRIP"; then
4401 if test -n "$ac_tool_prefix"; then
4402   # Extract the first word of "strip", so it can be a program name with args.
4403 set dummy strip; ac_word=$2
4404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_word" >&5
4406 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   if test -n "$STRIP"; then
4410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4411 else
4412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4413   ac_dummy="$PATH"
4414   for ac_dir in $ac_dummy; do
4415     test -z "$ac_dir" && ac_dir=.
4416     if test -f $ac_dir/$ac_word; then
4417       ac_cv_prog_STRIP="strip"
4418       break
4419     fi
4420   done
4421   IFS="$ac_save_ifs"
4422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4423 fi
4424 fi
4425 STRIP="$ac_cv_prog_STRIP"
4426 if test -n "$STRIP"; then
4427   echo "$ac_t""$STRIP" 1>&6
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 else
4433   STRIP=":"
4434 fi
4435 fi
4436
4437
4438 enable_dlopen=yes
4439 enable_win32_dll=yes
4440
4441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4442 if test "${enable_libtool_lock+set}" = set; then
4443   enableval="$enable_libtool_lock"
4444   :
4445 fi
4446
4447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4448
4449 # Some flags need to be propagated to the compiler or linker for good
4450 # libtool support.
4451 case $host in
4452 *-*-irix6*)
4453   # Find out which ABI we are using.
4454   echo '#line 4455 "configure"' > conftest.$ac_ext
4455   if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456     case `/usr/bin/file conftest.$ac_objext` in
4457     *32-bit*)
4458       LD="${LD-ld} -32"
4459       ;;
4460     *N32*)
4461       LD="${LD-ld} -n32"
4462       ;;
4463     *64-bit*)
4464       LD="${LD-ld} -64"
4465       ;;
4466     esac
4467   fi
4468   rm -rf conftest*
4469   ;;
4470
4471 *-*-sco3.2v5*)
4472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4473   SAVE_CFLAGS="$CFLAGS"
4474   CFLAGS="$CFLAGS -belf"
4475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4476 echo "configure:4477: checking whether the C compiler needs -belf" >&5
4477 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481      ac_ext=c
4482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4486 cross_compiling=$ac_cv_prog_cc_cross
4487
4488      cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491
4492 int main() {
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497   rm -rf conftest*
4498   lt_cv_cc_needs_belf=yes
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=no
4504 fi
4505 rm -f conftest*
4506      ac_ext=c
4507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4508 ac_cpp='$CPP $CPPFLAGS'
4509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4511 cross_compiling=$ac_cv_prog_cc_cross
4512
4513 fi
4514
4515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4518     CFLAGS="$SAVE_CFLAGS"
4519   fi
4520   ;;
4521
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$DLLTOOL"; then
4531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 DLLTOOL="$ac_cv_prog_DLLTOOL"
4546 if test -n "$DLLTOOL"; then
4547   echo "$ac_t""$DLLTOOL" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_DLLTOOL"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "dlltool", so it can be a program name with args.
4556 set dummy dlltool; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$DLLTOOL"; then
4563   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_DLLTOOL="dlltool"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4576 fi
4577 fi
4578 DLLTOOL="$ac_cv_prog_DLLTOOL"
4579 if test -n "$DLLTOOL"; then
4580   echo "$ac_t""$DLLTOOL" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   DLLTOOL="false"
4587 fi
4588 fi
4589
4590   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}as; ac_word=$2
4592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_word" >&5
4594 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   if test -n "$AS"; then
4598   ac_cv_prog_AS="$AS" # Let the user override the test.
4599 else
4600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4601   ac_dummy="$PATH"
4602   for ac_dir in $ac_dummy; do
4603     test -z "$ac_dir" && ac_dir=.
4604     if test -f $ac_dir/$ac_word; then
4605       ac_cv_prog_AS="${ac_tool_prefix}as"
4606       break
4607     fi
4608   done
4609   IFS="$ac_save_ifs"
4610 fi
4611 fi
4612 AS="$ac_cv_prog_AS"
4613 if test -n "$AS"; then
4614   echo "$ac_t""$AS" 1>&6
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619
4620 if test -z "$ac_cv_prog_AS"; then
4621 if test -n "$ac_tool_prefix"; then
4622   # Extract the first word of "as", so it can be a program name with args.
4623 set dummy as; ac_word=$2
4624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_word" >&5
4626 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   if test -n "$AS"; then
4630   ac_cv_prog_AS="$AS" # Let the user override the test.
4631 else
4632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4633   ac_dummy="$PATH"
4634   for ac_dir in $ac_dummy; do
4635     test -z "$ac_dir" && ac_dir=.
4636     if test -f $ac_dir/$ac_word; then
4637       ac_cv_prog_AS="as"
4638       break
4639     fi
4640   done
4641   IFS="$ac_save_ifs"
4642   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4643 fi
4644 fi
4645 AS="$ac_cv_prog_AS"
4646 if test -n "$AS"; then
4647   echo "$ac_t""$AS" 1>&6
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651
4652 else
4653   AS="false"
4654 fi
4655 fi
4656
4657   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4658 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_word" >&5
4661 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   if test -n "$OBJDUMP"; then
4665   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4666 else
4667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4668   ac_dummy="$PATH"
4669   for ac_dir in $ac_dummy; do
4670     test -z "$ac_dir" && ac_dir=.
4671     if test -f $ac_dir/$ac_word; then
4672       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4673       break
4674     fi
4675   done
4676   IFS="$ac_save_ifs"
4677 fi
4678 fi
4679 OBJDUMP="$ac_cv_prog_OBJDUMP"
4680 if test -n "$OBJDUMP"; then
4681   echo "$ac_t""$OBJDUMP" 1>&6
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686
4687 if test -z "$ac_cv_prog_OBJDUMP"; then
4688 if test -n "$ac_tool_prefix"; then
4689   # Extract the first word of "objdump", so it can be a program name with args.
4690 set dummy objdump; ac_word=$2
4691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4692 echo "configure:4693: checking for $ac_word" >&5
4693 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   if test -n "$OBJDUMP"; then
4697   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4698 else
4699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4700   ac_dummy="$PATH"
4701   for ac_dir in $ac_dummy; do
4702     test -z "$ac_dir" && ac_dir=.
4703     if test -f $ac_dir/$ac_word; then
4704       ac_cv_prog_OBJDUMP="objdump"
4705       break
4706     fi
4707   done
4708   IFS="$ac_save_ifs"
4709   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4710 fi
4711 fi
4712 OBJDUMP="$ac_cv_prog_OBJDUMP"
4713 if test -n "$OBJDUMP"; then
4714   echo "$ac_t""$OBJDUMP" 1>&6
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719 else
4720   OBJDUMP="false"
4721 fi
4722 fi
4723
4724
4725   # recent cygwin and mingw systems supply a stub DllMain which the user
4726   # can override, but on older systems we have to supply one
4727   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4728 echo "configure:4729: checking if libtool should supply DllMain function" >&5
4729 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4738       DllMain (0, 0, 0);
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   lt_cv_need_dllmain=no
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=yes
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4754
4755   case $host/$CC in
4756   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4757     # old mingw systems require "-dll" to link a DLL, while more recent ones
4758     # require "-mdll"
4759     SAVE_CFLAGS="$CFLAGS"
4760     CFLAGS="$CFLAGS -mdll"
4761     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4762 echo "configure:4763: checking how to link DLLs" >&5
4763 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   lt_cv_cc_dll_switch=-mdll
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-dll
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4787     CFLAGS="$SAVE_CFLAGS" ;;
4788   *-*-cygwin* | *-*-pw32*)
4789     # cygwin systems need to pass --dll to the linker, and not link
4790     # crt.o which will require a WinMain@16 definition.
4791     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4792   esac
4793   ;;
4794   
4795 esac
4796
4797 # Sed substitution that helps us do robust quoting.  It backslashifies
4798 # metacharacters that are still active within double-quoted strings.
4799 Xsed='sed -e s/^X//'
4800 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4801
4802 # Same as above, but do not quote variable references.
4803 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4804
4805 # Sed substitution to delay expansion of an escaped shell variable in a
4806 # double_quote_subst'ed string.
4807 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4808
4809 # Constants:
4810 rm="rm -f"
4811
4812 # Global variables:
4813 default_ofile=libtool
4814 can_build_shared=yes
4815
4816 # All known linkers require a `.a' archive for static linking (except M$VC,
4817 # which needs '.lib').
4818 libext=a
4819 ltmain="$ac_aux_dir/ltmain.sh"
4820 ofile="$default_ofile"
4821 with_gnu_ld="$lt_cv_prog_gnu_ld"
4822 need_locks="$enable_libtool_lock"
4823
4824 old_CC="$CC"
4825 old_CFLAGS="$CFLAGS"
4826
4827 # Set sane defaults for various variables
4828 test -z "$AR" && AR=ar
4829 test -z "$AR_FLAGS" && AR_FLAGS=cru
4830 test -z "$AS" && AS=as
4831 test -z "$CC" && CC=cc
4832 test -z "$DLLTOOL" && DLLTOOL=dlltool
4833 test -z "$LD" && LD=ld
4834 test -z "$LN_S" && LN_S="ln -s"
4835 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4836 test -z "$NM" && NM=nm
4837 test -z "$OBJDUMP" && OBJDUMP=objdump
4838 test -z "$RANLIB" && RANLIB=:
4839 test -z "$STRIP" && STRIP=:
4840 test -z "$ac_objext" && ac_objext=o
4841
4842 if test x"$host" != x"$build"; then
4843   ac_tool_prefix=${host_alias}-
4844 else
4845   ac_tool_prefix=
4846 fi
4847
4848 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4849 case $host_os in
4850 linux-gnu*) ;;
4851 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4852 esac
4853
4854 case $host_os in
4855 aix3*)
4856   # AIX sometimes has problems with the GCC collect2 program.  For some
4857   # reason, if we set the COLLECT_NAMES environment variable, the problems
4858   # vanish in a puff of smoke.
4859   if test "X${COLLECT_NAMES+set}" != Xset; then
4860     COLLECT_NAMES=
4861     export COLLECT_NAMES
4862   fi
4863   ;;
4864 esac
4865
4866 # Determine commands to create old-style static archives.
4867 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4868 old_postinstall_cmds='chmod 644 $oldlib'
4869 old_postuninstall_cmds=
4870
4871 if test -n "$RANLIB"; then
4872   case $host_os in
4873   openbsd*)
4874     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   *)
4877     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4878     ;;
4879   esac
4880   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4881 fi
4882
4883 # Allow CC to be a program name with arguments.
4884 set dummy $CC
4885 compiler="$2"
4886
4887 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4888 echo "configure:4889: checking for objdir" >&5
4889 rm -f .libs 2>/dev/null
4890 mkdir .libs 2>/dev/null
4891 if test -d .libs; then
4892   objdir=.libs
4893 else
4894   # MS-DOS does not allow filenames that begin with a dot.
4895   objdir=_libs
4896 fi
4897 rmdir .libs 2>/dev/null
4898 echo "$ac_t""$objdir" 1>&6
4899
4900
4901 # Check whether --with-pic or --without-pic was given.
4902 if test "${with_pic+set}" = set; then
4903   withval="$with_pic"
4904   pic_mode="$withval"
4905 else
4906   pic_mode=default
4907 fi
4908
4909 test -z "$pic_mode" && pic_mode=default
4910
4911 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4912 # in isolation, and that seeing it set (from the cache) indicates that
4913 # the associated values are set (in the cache) correctly too.
4914 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4915 echo "configure:4916: checking for $compiler option to produce PIC" >&5
4916 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919    lt_cv_prog_cc_pic=
4920   lt_cv_prog_cc_shlib=
4921   lt_cv_prog_cc_wl=
4922   lt_cv_prog_cc_static=
4923   lt_cv_prog_cc_no_builtin=
4924   lt_cv_prog_cc_can_build_shared=$can_build_shared
4925
4926   if test "$GCC" = yes; then
4927     lt_cv_prog_cc_wl='-Wl,'
4928     lt_cv_prog_cc_static='-static'
4929
4930     case $host_os in
4931     aix*)
4932       # Below there is a dirty hack to force normal static linking with -ldl
4933       # The problem is because libdl dynamically linked with both libc and
4934       # libC (AIX C++ library), which obviously doesn't included in libraries
4935       # list by gcc. This cause undefined symbols with -static flags.
4936       # This hack allows C programs to be linked with "-static -ldl", but
4937       # not sure about C++ programs.
4938       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4939       ;;
4940     amigaos*)
4941       # FIXME: we need at least 68020 code to build shared libraries, but
4942       # adding the `-m68020' flag to GCC prevents building anything better,
4943       # like `-m68040'.
4944       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4945       ;;
4946     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4947       # PIC is the default for these OSes.
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       lt_cv_prog_cc_pic='-fno-common'
4953       ;;
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959     sysv4*MP*)
4960       if test -d /usr/nec; then
4961          lt_cv_prog_cc_pic=-Kconform_pic
4962       fi
4963       ;;
4964     *)
4965       lt_cv_prog_cc_pic='-fPIC'
4966       ;;
4967     esac
4968   else
4969     # PORTME Check for PIC flags for the system compiler.
4970     case $host_os in
4971     aix3* | aix4* | aix5*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       # All AIX code is PIC.
4974       if test "$host_cpu" = ia64; then
4975         # AIX 5 now supports IA64 processor
4976         lt_cv_prog_cc_static='-Bstatic'
4977       else
4978         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4979       fi
4980       ;;
4981
4982     hpux9* | hpux10* | hpux11*)
4983       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4984       lt_cv_prog_cc_wl='-Wl,'
4985       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4986       lt_cv_prog_cc_pic='+Z'
4987       ;;
4988
4989     irix5* | irix6*)
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       # PIC (with -KPIC) is the default.
4993       ;;
4994
4995     cygwin* | mingw* | pw32* | os2*)
4996       # This hack is so that the source file can tell whether it is being
4997       # built for inclusion in a dll (and should export symbols for example).
4998       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4999       ;;
5000
5001     newsos6)
5002       lt_cv_prog_cc_pic='-KPIC'
5003       lt_cv_prog_cc_static='-Bstatic'
5004       ;;
5005
5006     osf3* | osf4* | osf5*)
5007       # All OSF/1 code is PIC.
5008       lt_cv_prog_cc_wl='-Wl,'
5009       lt_cv_prog_cc_static='-non_shared'
5010       ;;
5011
5012     sco3.2v5*)
5013       lt_cv_prog_cc_pic='-Kpic'
5014       lt_cv_prog_cc_static='-dn'
5015       lt_cv_prog_cc_shlib='-belf'
5016       ;;
5017
5018     solaris*)
5019       lt_cv_prog_cc_pic='-KPIC'
5020       lt_cv_prog_cc_static='-Bstatic'
5021       lt_cv_prog_cc_wl='-Wl,'
5022       ;;
5023
5024     sunos4*)
5025       lt_cv_prog_cc_pic='-PIC'
5026       lt_cv_prog_cc_static='-Bstatic'
5027       lt_cv_prog_cc_wl='-Qoption ld '
5028       ;;
5029
5030     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5031       lt_cv_prog_cc_pic='-KPIC'
5032       lt_cv_prog_cc_static='-Bstatic'
5033       if test "x$host_vendor" = xsni; then
5034         lt_cv_prog_cc_wl='-LD'
5035       else
5036         lt_cv_prog_cc_wl='-Wl,'
5037       fi
5038       ;;
5039
5040     uts4*)
5041       lt_cv_prog_cc_pic='-pic'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       ;;
5044
5045     sysv4*MP*)
5046       if test -d /usr/nec ;then
5047         lt_cv_prog_cc_pic='-Kconform_pic'
5048         lt_cv_prog_cc_static='-Bstatic'
5049       fi
5050       ;;
5051
5052     *)
5053       lt_cv_prog_cc_can_build_shared=no
5054       ;;
5055     esac
5056   fi
5057
5058 fi
5059
5060 if test -z "$lt_cv_prog_cc_pic"; then
5061   echo "$ac_t""none" 1>&6
5062 else
5063   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5064
5065   # Check to make sure the pic_flag actually works.
5066   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5067 echo "configure:5068: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5068   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071       save_CFLAGS="$CFLAGS"
5072     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5073     cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082   rm -rf conftest*
5083         case $host_os in
5084       hpux9* | hpux10* | hpux11*)
5085         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5086         # they create non-PIC objects.  So, if there were any warnings, we
5087         # assume that PIC is not supported.
5088         if test -s conftest.err; then
5089           lt_cv_prog_cc_pic_works=no
5090         else
5091           lt_cv_prog_cc_pic_works=yes
5092         fi
5093         ;;
5094       *)
5095         lt_cv_prog_cc_pic_works=yes
5096         ;;
5097       esac
5098     
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103         lt_cv_prog_cc_pic_works=no
5104     
5105 fi
5106 rm -f conftest*
5107     CFLAGS="$save_CFLAGS"
5108   
5109 fi
5110
5111
5112   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5113     lt_cv_prog_cc_pic=
5114     lt_cv_prog_cc_can_build_shared=no
5115   else
5116     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5117   fi
5118
5119   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5120 fi
5121
5122 # Check for any special shared library compilation flags.
5123 if test -n "$lt_cv_prog_cc_shlib"; then
5124   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5125   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5126   else
5127    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5128     lt_cv_prog_cc_can_build_shared=no
5129   fi
5130 fi
5131
5132 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5134 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137     lt_cv_prog_cc_static_works=no
5138   save_LDFLAGS="$LDFLAGS"
5139   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5140   cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   lt_cv_prog_cc_static_works=yes
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154 fi
5155 rm -f conftest*
5156   LDFLAGS="$save_LDFLAGS"
5157
5158 fi
5159
5160
5161 # Belt *and* braces to stop my trousers falling down:
5162 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5163 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5164
5165 pic_flag="$lt_cv_prog_cc_pic"
5166 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5167 wl="$lt_cv_prog_cc_wl"
5168 link_static_flag="$lt_cv_prog_cc_static"
5169 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5170 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5171
5172
5173 # Check to see if options -o and -c are simultaneously supported by compiler
5174 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5175 echo "configure:5176: checking if $compiler supports -c -o file.$ac_objext" >&5
5176 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   
5180 $rm -r conftest 2>/dev/null
5181 mkdir conftest
5182 cd conftest
5183 echo "int some_variable = 0;" > conftest.$ac_ext
5184 mkdir out
5185 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5186 # that will create temporary files in the current directory regardless of
5187 # the output directory.  Thus, making CWD read-only will cause this test
5188 # to fail, enabling locking or at least warning the user not to do parallel
5189 # builds.
5190 chmod -w .
5191 save_CFLAGS="$CFLAGS"
5192 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5193 compiler_c_o=no
5194 if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5195   # The compiler can only warn and ignore the option if not recognized
5196   # So say no if there are warnings
5197   if test -s out/conftest.err; then
5198     lt_cv_compiler_c_o=no
5199   else
5200     lt_cv_compiler_c_o=yes
5201   fi
5202 else
5203   # Append any errors to the config.log.
5204   cat out/conftest.err 1>&5
5205   lt_cv_compiler_c_o=no
5206 fi
5207 CFLAGS="$save_CFLAGS"
5208 chmod u+w .
5209 $rm conftest* out/*
5210 rmdir out
5211 cd ..
5212 rmdir conftest
5213 $rm -r conftest 2>/dev/null
5214
5215 fi
5216
5217 compiler_c_o=$lt_cv_compiler_c_o
5218 echo "$ac_t""$compiler_c_o" 1>&6
5219
5220 if test x"$compiler_c_o" = x"yes"; then
5221   # Check to see if we can write to a .lo
5222   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -c -o file.lo" >&5
5224   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228   lt_cv_compiler_o_lo=no
5229   save_CFLAGS="$CFLAGS"
5230   CFLAGS="$CFLAGS -c -o conftest.lo"
5231   save_objext="$ac_objext"
5232   ac_objext=lo
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 int some_variable = 0;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243       # The compiler can only warn and ignore the option if not recognized
5244     # So say no if there are warnings
5245     if test -s conftest.err; then
5246       lt_cv_compiler_o_lo=no
5247     else
5248       lt_cv_compiler_o_lo=yes
5249     fi
5250   
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254 fi
5255 rm -f conftest*
5256   ac_objext="$save_objext"
5257   CFLAGS="$save_CFLAGS"
5258   
5259 fi
5260
5261   compiler_o_lo=$lt_cv_compiler_o_lo
5262   echo "$ac_t""$compiler_o_lo" 1>&6
5263 else
5264   compiler_o_lo=no
5265 fi
5266
5267 # Check to see if we can do hard links to lock some files if needed
5268 hard_links="nottested"
5269 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5270   # do not overwrite the value of need_locks provided by the user
5271   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5272 echo "configure:5273: checking if we can lock with hard links" >&5
5273   hard_links=yes
5274   $rm conftest*
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   touch conftest.a
5277   ln conftest.a conftest.b 2>&5 || hard_links=no
5278   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5279   echo "$ac_t""$hard_links" 1>&6
5280   if test "$hard_links" = no; then
5281     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5282     need_locks=warn
5283   fi
5284 else
5285   need_locks=no
5286 fi
5287
5288 if test "$GCC" = yes; then
5289   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5290   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5292   echo "int some_variable = 0;" > conftest.$ac_ext
5293   save_CFLAGS="$CFLAGS"
5294   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5295   compiler_rtti_exceptions=no
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       compiler_rtti_exceptions=no
5310     else
5311       compiler_rtti_exceptions=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   CFLAGS="$save_CFLAGS"
5320   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5321
5322   if test "$compiler_rtti_exceptions" = "yes"; then
5323     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5324   else
5325     no_builtin_flag=' -fno-builtin'
5326   fi
5327 fi
5328
5329 # See if the linker supports building shared libraries.
5330 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking whether the linker ($LD) supports shared libraries" >&5
5332
5333 allow_undefined_flag=
5334 no_undefined_flag=
5335 need_lib_prefix=unknown
5336 need_version=unknown
5337 # when you set need_version to no, make sure it does not cause -set_version
5338 # flags to be left without arguments
5339 archive_cmds=
5340 archive_expsym_cmds=
5341 old_archive_from_new_cmds=
5342 old_archive_from_expsyms_cmds=
5343 export_dynamic_flag_spec=
5344 whole_archive_flag_spec=
5345 thread_safe_flag_spec=
5346 hardcode_into_libs=no
5347 hardcode_libdir_flag_spec=
5348 hardcode_libdir_separator=
5349 hardcode_direct=no
5350 hardcode_minus_L=no
5351 hardcode_shlibpath_var=unsupported
5352 runpath_var=
5353 link_all_deplibs=unknown
5354 always_export_symbols=no
5355 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5356 # include_expsyms should be a list of space-separated symbols to be *always*
5357 # included in the symbol list
5358 include_expsyms=
5359 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5360 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5361 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5362 # as well as any symbol that contains `d'.
5363 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5364 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5365 # platforms (ab)use it in PIC code, but their linkers get confused if
5366 # the symbol is explicitly referenced.  Since portable code cannot
5367 # rely on this symbol name, it's probably fine to never include it in
5368 # preloaded symbol tables.
5369 extract_expsyms_cmds=
5370
5371 case $host_os in
5372 cygwin* | mingw* | pw32*)
5373   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5374   # When not using gcc, we currently assume that we are using
5375   # Microsoft Visual C++.
5376   if test "$GCC" != yes; then
5377     with_gnu_ld=no
5378   fi
5379   ;;
5380 openbsd*)
5381   with_gnu_ld=no
5382   ;;
5383 esac
5384
5385 ld_shlibs=yes
5386 if test "$with_gnu_ld" = yes; then
5387   # If archive_cmds runs LD, not CC, wlarc should be empty
5388   wlarc='${wl}'
5389
5390   # See if GNU ld supports shared libraries.
5391   case $host_os in
5392   aix3* | aix4* | aix5*)
5393     # On AIX, the GNU linker is very broken
5394     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5395     ld_shlibs=no
5396     cat <<EOF 1>&2
5397
5398 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5399 *** to be unable to reliably create shared libraries on AIX.
5400 *** Therefore, libtool is disabling shared libraries support.  If you
5401 *** really care for shared libraries, you may want to modify your PATH
5402 *** so that a non-GNU linker is found, and then restart.
5403
5404 EOF
5405     ;;
5406
5407   amigaos*)
5408     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)'
5409     hardcode_libdir_flag_spec='-L$libdir'
5410     hardcode_minus_L=yes
5411
5412     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5413     # that the semantics of dynamic libraries on AmigaOS, at least up
5414     # to version 4, is to share data among multiple programs linked
5415     # with the same dynamic library.  Since this doesn't match the
5416     # behavior of shared libraries on other platforms, we can use
5417     # them.
5418     ld_shlibs=no
5419     ;;
5420
5421   beos*)
5422     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5423       allow_undefined_flag=unsupported
5424       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5425       # support --undefined.  This deserves some investigation.  FIXME
5426       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5427     else
5428       ld_shlibs=no
5429     fi
5430     ;;
5431
5432   cygwin* | mingw* | pw32*)
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     allow_undefined_flag=unsupported
5437     always_export_symbols=yes
5438
5439     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5440       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5441       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5442       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5443       else $CC -o impgen impgen.c ; fi)~
5444       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5445
5446     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5447
5448     # cygwin and mingw dlls have different entry points and sets of symbols
5449     # to exclude.
5450     # FIXME: what about values for MSVC?
5451     dll_entry=__cygwin_dll_entry@12
5452     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5453     case $host_os in
5454     mingw*)
5455       # mingw values
5456       dll_entry=_DllMainCRTStartup@12
5457       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5458       ;;
5459     esac
5460
5461     # mingw and cygwin differ, and it's simplest to just exclude the union
5462     # of the two symbol sets.
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5464
5465     # recent cygwin and mingw systems supply a stub DllMain which the user
5466     # can override, but on older systems we have to supply one (in ltdll.c)
5467     if test "x$lt_cv_need_dllmain" = "xyes"; then
5468       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5469       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~
5470         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5471     else
5472       ltdll_obj=
5473       ltdll_cmds=
5474     fi
5475
5476     # Extract the symbol export list from an `--export-all' def file,
5477     # then regenerate the def file from the symbol export list, so that
5478     # the compiled dll only exports the symbol export list.
5479     # Be careful not to strip the DATA tag left be newer dlltools.
5480     export_symbols_cmds="$ltdll_cmds"'
5481       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5482       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5483
5484     # If the export-symbols file already is a .def file (1st line
5485     # is EXPORTS), use it as is.
5486     # If DATA tags from a recent dlltool are present, honour them!
5487     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5488         cp $export_symbols $output_objdir/$soname-def;
5489       else
5490         echo EXPORTS > $output_objdir/$soname-def;
5491         _lt_hint=1;
5492         cat $export_symbols | while read symbol; do
5493          set dummy \$symbol;
5494          case \$# in
5495            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5496            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5497          esac;
5498          _lt_hint=`expr 1 + \$_lt_hint`;
5499         done;
5500       fi~
5501       '"$ltdll_cmds"'
5502       $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~
5503       $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~
5504       $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~
5505       $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~
5506       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5507     ;;
5508
5509   netbsd*)
5510     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5511       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5512       wlarc=
5513     else
5514       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5515       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5516     fi
5517     ;;
5518
5519   solaris* | sysv5*)
5520     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5521       ld_shlibs=no
5522       cat <<EOF 1>&2
5523
5524 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5525 *** create shared libraries on Solaris systems.  Therefore, libtool
5526 *** is disabling shared libraries support.  We urge you to upgrade GNU
5527 *** binutils to release 2.9.1 or newer.  Another option is to modify
5528 *** your PATH or compiler configuration so that the native linker is
5529 *** used, and then restart.
5530
5531 EOF
5532     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5533       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5534       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5535     else
5536       ld_shlibs=no
5537     fi
5538     ;;
5539
5540   sunos4*)
5541     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5542     wlarc=
5543     hardcode_direct=yes
5544     hardcode_shlibpath_var=no
5545     ;;
5546
5547   *)
5548     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5549       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5550       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5551     else
5552       ld_shlibs=no
5553     fi
5554     ;;
5555   esac
5556
5557   if test "$ld_shlibs" = yes; then
5558     runpath_var=LD_RUN_PATH
5559     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5560     export_dynamic_flag_spec='${wl}--export-dynamic'
5561     case $host_os in
5562     cygwin* | mingw* | pw32*)
5563       # dlltool doesn't understand --whole-archive et. al.
5564       whole_archive_flag_spec=
5565       ;;
5566     *)
5567       # ancient GNU ld didn't support --whole-archive et. al.
5568       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5569         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5570       else
5571         whole_archive_flag_spec=
5572       fi
5573       ;;
5574     esac
5575   fi
5576 else
5577   # PORTME fill in a description of your system's linker (not GNU ld)
5578   case $host_os in
5579   aix3*)
5580     allow_undefined_flag=unsupported
5581     always_export_symbols=yes
5582     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'
5583     # Note: this linker hardcodes the directories in LIBPATH if there
5584     # are no directories specified by -L.
5585     hardcode_minus_L=yes
5586     if test "$GCC" = yes && test -z "$link_static_flag"; then
5587       # Neither direct hardcoding nor static linking is supported with a
5588       # broken collect2.
5589       hardcode_direct=unsupported
5590     fi
5591     ;;
5592
5593   aix4* | aix5*)
5594     if test "$host_cpu" = ia64; then
5595       # On IA64, the linker does run time linking by default, so we don't
5596       # have to do anything special.
5597       aix_use_runtimelinking=no
5598       exp_sym_flag='-Bexport'
5599       no_entry_flag=""
5600     else
5601       aix_use_runtimelinking=no
5602
5603       # Test if we are trying to use run time linking or normal
5604       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5605       # need to do runtime linking.
5606       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5607         for ld_flag in $LDFLAGS; do
5608           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5609             aix_use_runtimelinking=yes
5610             break
5611           fi
5612         done
5613       esac
5614
5615       exp_sym_flag='-bexport'
5616       no_entry_flag='-bnoentry'
5617     fi
5618
5619     # When large executables or shared objects are built, AIX ld can
5620     # have problems creating the table of contents.  If linking a library
5621     # or program results in "error TOC overflow" add -mminimal-toc to
5622     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5623     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5624
5625     hardcode_direct=yes
5626     archive_cmds=''
5627     hardcode_libdir_separator=':'
5628     if test "$GCC" = yes; then
5629       case $host_os in aix4.[012]|aix4.[012].*)
5630         collect2name=`${CC} -print-prog-name=collect2`
5631         if test -f "$collect2name" && \
5632           strings "$collect2name" | grep resolve_lib_name >/dev/null
5633         then
5634           # We have reworked collect2
5635           hardcode_direct=yes
5636         else
5637           # We have old collect2
5638           hardcode_direct=unsupported
5639           # It fails to find uninstalled libraries when the uninstalled
5640           # path is not listed in the libpath.  Setting hardcode_minus_L
5641           # to unsupported forces relinking
5642           hardcode_minus_L=yes
5643           hardcode_libdir_flag_spec='-L$libdir'
5644           hardcode_libdir_separator=
5645         fi
5646       esac
5647
5648       shared_flag='-shared'
5649     else
5650       # not using gcc
5651       if test "$host_cpu" = ia64; then
5652         shared_flag='${wl}-G'
5653       else
5654         if test "$aix_use_runtimelinking" = yes; then
5655           shared_flag='${wl}-G'
5656         else
5657           shared_flag='${wl}-bM:SRE'
5658         fi
5659       fi
5660     fi
5661
5662     # It seems that -bexpall can do strange things, so it is better to
5663     # generate a list of symbols to export.
5664     always_export_symbols=yes
5665     if test "$aix_use_runtimelinking" = yes; then
5666       # Warning - without using the other runtime loading flags (-brtl),
5667       # -berok will link without error, but may produce a broken library.
5668       allow_undefined_flag='-berok'
5669       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5670       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"
5671     else
5672       if test "$host_cpu" = ia64; then
5673         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5674         allow_undefined_flag="-z nodefs"
5675         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"
5676       else
5677         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5678         # Warning - without using the other run time loading flags,
5679         # -berok will link without error, but may produce a broken library.
5680         allow_undefined_flag='${wl}-berok'
5681         # This is a bit strange, but is similar to how AIX traditionally builds
5682         # it's shared libraries.
5683         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'
5684       fi
5685     fi
5686     ;;
5687
5688   amigaos*)
5689     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)'
5690     hardcode_libdir_flag_spec='-L$libdir'
5691     hardcode_minus_L=yes
5692     # see comment about different semantics on the GNU ld section
5693     ld_shlibs=no
5694     ;;
5695
5696   cygwin* | mingw* | pw32*)
5697     # When not using gcc, we currently assume that we are using
5698     # Microsoft Visual C++.
5699     # hardcode_libdir_flag_spec is actually meaningless, as there is
5700     # no search path for DLLs.
5701     hardcode_libdir_flag_spec=' '
5702     allow_undefined_flag=unsupported
5703     # Tell ltmain to make .lib files, not .a files.
5704     libext=lib
5705     # FIXME: Setting linknames here is a bad hack.
5706     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5707     # The linker will automatically build a .lib file if we build a DLL.
5708     old_archive_from_new_cmds='true'
5709     # FIXME: Should let the user specify the lib program.
5710     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5711     fix_srcfile_path='`cygpath -w "$srcfile"`'
5712     ;;
5713
5714   darwin* | rhapsody*)
5715     case "$host_os" in
5716     rhapsody* | darwin1.[012])
5717       allow_undefined_flag='-undefined suppress'
5718       ;;
5719     *) # Darwin 1.3 on
5720       allow_undefined_flag='-flat_namespace -undefined suppress'
5721       ;;
5722     esac
5723     # FIXME: Relying on posixy $() will cause problems for
5724     #        cross-compilation, but unfortunately the echo tests do not
5725     #        yet detect zsh echo's removal of \ escapes.
5726     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'
5727     # We need to add '_' to the symbols in $export_symbols first
5728     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5729     hardcode_direct=yes
5730     hardcode_shlibpath_var=no
5731     whole_archive_flag_spec='-all_load $convenience'
5732     ;;
5733
5734   freebsd1*)
5735     ld_shlibs=no
5736     ;;
5737
5738   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5739   # support.  Future versions do this automatically, but an explicit c++rt0.o
5740   # does not break anything, and helps significantly (at the cost of a little
5741   # extra space).
5742   freebsd2.2*)
5743     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5744     hardcode_libdir_flag_spec='-R$libdir'
5745     hardcode_direct=yes
5746     hardcode_shlibpath_var=no
5747     ;;
5748
5749   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5750   freebsd2*)
5751     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5752     hardcode_direct=yes
5753     hardcode_minus_L=yes
5754     hardcode_shlibpath_var=no
5755     ;;
5756
5757   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5758   freebsd*)
5759     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5760     hardcode_libdir_flag_spec='-R$libdir'
5761     hardcode_direct=yes
5762     hardcode_shlibpath_var=no
5763     ;;
5764
5765   hpux9* | hpux10* | hpux11*)
5766     case $host_os in
5767     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' ;;
5768     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5769     esac
5770     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5771     hardcode_libdir_separator=:
5772     hardcode_direct=yes
5773     hardcode_minus_L=yes # Not in the search PATH, but as the default
5774                          # location of the library.
5775     export_dynamic_flag_spec='${wl}-E'
5776     ;;
5777
5778   irix5* | irix6*)
5779     if test "$GCC" = yes; then
5780       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'
5781     else
5782       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'
5783     fi
5784     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5785     hardcode_libdir_separator=:
5786     link_all_deplibs=yes
5787     ;;
5788
5789   netbsd*)
5790     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5791       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5792     else
5793       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5794     fi
5795     hardcode_libdir_flag_spec='-R$libdir'
5796     hardcode_direct=yes
5797     hardcode_shlibpath_var=no
5798     ;;
5799
5800   newsos6)
5801     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5802     hardcode_direct=yes
5803     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5804     hardcode_libdir_separator=:
5805     hardcode_shlibpath_var=no
5806     ;;
5807
5808   openbsd*)
5809     hardcode_direct=yes
5810     hardcode_shlibpath_var=no
5811     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5812       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5813       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5814       export_dynamic_flag_spec='${wl}-E'
5815     else
5816       case "$host_os" in
5817       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5818         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5819         hardcode_libdir_flag_spec='-R$libdir'
5820         ;;
5821       *)
5822         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5823         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5824         ;;
5825       esac
5826     fi
5827     ;;
5828
5829   os2*)
5830     hardcode_libdir_flag_spec='-L$libdir'
5831     hardcode_minus_L=yes
5832     allow_undefined_flag=unsupported
5833     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'
5834     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5835     ;;
5836
5837   osf3*)
5838     if test "$GCC" = yes; then
5839       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5840       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'
5841     else
5842       allow_undefined_flag=' -expect_unresolved \*'
5843       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'
5844     fi
5845     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5846     hardcode_libdir_separator=:
5847     ;;
5848
5849   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5850     if test "$GCC" = yes; then
5851       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5852       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'
5853       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5854     else
5855       allow_undefined_flag=' -expect_unresolved \*'
5856       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'
5857       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5858       $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'
5859
5860       #Both c and cxx compiler support -rpath directly
5861       hardcode_libdir_flag_spec='-rpath $libdir'
5862     fi
5863     hardcode_libdir_separator=:
5864     ;;
5865
5866   sco3.2v5*)
5867     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5868     hardcode_shlibpath_var=no
5869     runpath_var=LD_RUN_PATH
5870     hardcode_runpath_var=yes
5871     export_dynamic_flag_spec='${wl}-Bexport'
5872     ;;
5873
5874   solaris*)
5875     # gcc --version < 3.0 without binutils cannot create self contained
5876     # shared libraries reliably, requiring libgcc.a to resolve some of
5877     # the object symbols generated in some cases.  Libraries that use
5878     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5879     # a copy of libgcc.a into every shared library to guarantee resolving
5880     # such symbols causes other problems:  According to Tim Van Holder
5881     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5882     # (to the application) exception stack for one thing.
5883     no_undefined_flag=' -z defs'
5884     if test "$GCC" = yes; then
5885       case `$CC --version 2>/dev/null` in
5886       [12].*)
5887         cat <<EOF 1>&2
5888
5889 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5890 *** create self contained shared libraries on Solaris systems, without
5891 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5892 *** -no-undefined support, which will at least allow you to build shared
5893 *** libraries.  However, you may find that when you link such libraries
5894 *** into an application without using GCC, you have to manually add
5895 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5896 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5897 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5898
5899 EOF
5900         no_undefined_flag=
5901         ;;
5902       esac
5903     fi
5904     # $CC -shared without GNU ld will not create a library from C++
5905     # object files and a static libstdc++, better avoid it by now
5906     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5907     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5908                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5909     hardcode_libdir_flag_spec='-R$libdir'
5910     hardcode_shlibpath_var=no
5911     case $host_os in
5912     solaris2.[0-5] | solaris2.[0-5].*) ;;
5913     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5914       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5915     esac
5916     link_all_deplibs=yes
5917     ;;
5918
5919   sunos4*)
5920     if test "x$host_vendor" = xsequent; then
5921       # Use $CC to link under sequent, because it throws in some extra .o
5922       # files that make .init and .fini sections work.
5923       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5924     else
5925       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5926     fi
5927     hardcode_libdir_flag_spec='-L$libdir'
5928     hardcode_direct=yes
5929     hardcode_minus_L=yes
5930     hardcode_shlibpath_var=no
5931     ;;
5932
5933   sysv4)
5934     if test "x$host_vendor" = xsno; then
5935       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936       hardcode_direct=yes # is this really true???
5937     else
5938       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5939       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5940     fi
5941     runpath_var='LD_RUN_PATH'
5942     hardcode_shlibpath_var=no
5943     ;;
5944
5945   sysv4.3*)
5946     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5947     hardcode_shlibpath_var=no
5948     export_dynamic_flag_spec='-Bexport'
5949     ;;
5950
5951   sysv5*)
5952     no_undefined_flag=' -z text'
5953     # $CC -shared without GNU ld will not create a library from C++
5954     # object files and a static libstdc++, better avoid it by now
5955     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5956     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5957                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5958     hardcode_libdir_flag_spec=
5959     hardcode_shlibpath_var=no
5960     runpath_var='LD_RUN_PATH'
5961     ;;
5962
5963   uts4*)
5964     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5965     hardcode_libdir_flag_spec='-L$libdir'
5966     hardcode_shlibpath_var=no
5967     ;;
5968
5969   dgux*)
5970     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5971     hardcode_libdir_flag_spec='-L$libdir'
5972     hardcode_shlibpath_var=no
5973     ;;
5974
5975   sysv4*MP*)
5976     if test -d /usr/nec; then
5977       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978       hardcode_shlibpath_var=no
5979       runpath_var=LD_RUN_PATH
5980       hardcode_runpath_var=yes
5981       ld_shlibs=yes
5982     fi
5983     ;;
5984
5985   sysv4.2uw2*)
5986     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5987     hardcode_direct=yes
5988     hardcode_minus_L=no
5989     hardcode_shlibpath_var=no
5990     hardcode_runpath_var=yes
5991     runpath_var=LD_RUN_PATH
5992     ;;
5993
5994   sysv5uw7* | unixware7*)
5995     no_undefined_flag='${wl}-z ${wl}text'
5996     if test "$GCC" = yes; then
5997       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5998     else
5999       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6000     fi
6001     runpath_var='LD_RUN_PATH'
6002     hardcode_shlibpath_var=no
6003     ;;
6004
6005   *)
6006     ld_shlibs=no
6007     ;;
6008   esac
6009 fi
6010 echo "$ac_t""$ld_shlibs" 1>&6
6011 test "$ld_shlibs" = no && can_build_shared=no
6012
6013 # Check hardcoding attributes.
6014 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6015 echo "configure:6016: checking how to hardcode library paths into programs" >&5
6016 hardcode_action=
6017 if test -n "$hardcode_libdir_flag_spec" || \
6018    test -n "$runpath_var"; then
6019
6020   # We can hardcode non-existant directories.
6021   if test "$hardcode_direct" != no &&
6022      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6023      # have to relink, otherwise we might link with an installed library
6024      # when we should be linking with a yet-to-be-installed one
6025      ## test "$hardcode_shlibpath_var" != no &&
6026      test "$hardcode_minus_L" != no; then
6027     # Linking always hardcodes the temporary library directory.
6028     hardcode_action=relink
6029   else
6030     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6031     hardcode_action=immediate
6032   fi
6033 else
6034   # We cannot hardcode anything, or else we can only hardcode existing
6035   # directories.
6036   hardcode_action=unsupported
6037 fi
6038 echo "$ac_t""$hardcode_action" 1>&6
6039
6040 striplib=
6041 old_striplib=
6042 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6043 echo "configure:6044: checking whether stripping libraries is possible" >&5
6044 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6045   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6046   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6047   echo "$ac_t""yes" 1>&6
6048 else
6049   echo "$ac_t""no" 1>&6
6050 fi
6051
6052 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6053 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6054
6055 # PORTME Fill in your ld.so characteristics
6056 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6057 echo "configure:6058: checking dynamic linker characteristics" >&5
6058 library_names_spec=
6059 libname_spec='lib$name'
6060 soname_spec=
6061 postinstall_cmds=
6062 postuninstall_cmds=
6063 finish_cmds=
6064 finish_eval=
6065 shlibpath_var=
6066 shlibpath_overrides_runpath=unknown
6067 version_type=none
6068 dynamic_linker="$host_os ld.so"
6069 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6070 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6071
6072 case $host_os in
6073 aix3*)
6074   version_type=linux
6075   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6076   shlibpath_var=LIBPATH
6077
6078   # AIX has no versioning support, so we append a major version to the name.
6079   soname_spec='${libname}${release}.so$major'
6080   ;;
6081
6082 aix4* | aix5*)
6083   version_type=linux
6084   if test "$host_cpu" = ia64; then
6085     # AIX 5 supports IA64
6086     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6087     shlibpath_var=LD_LIBRARY_PATH
6088   else
6089     # With GCC up to 2.95.x, collect2 would create an import file
6090     # for dependence libraries.  The import file would start with
6091     # the line `#! .'.  This would cause the generated library to
6092     # depend on `.', always an invalid library.  This was fixed in
6093     # development snapshots of GCC prior to 3.0.
6094     case $host_os in
6095       aix4 | aix4.[01] | aix4.[01].*)
6096         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6097              echo ' yes '
6098              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6099           :
6100         else
6101           can_build_shared=no
6102         fi
6103         ;;
6104     esac
6105     # AIX (on Power*) has no versioning support, so currently we can
6106     # not hardcode correct soname into executable. Probably we can
6107     # add versioning support to collect2, so additional links can
6108     # be useful in future.
6109     if test "$aix_use_runtimelinking" = yes; then
6110       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6111       # instead of lib<name>.a to let people know that these are not
6112       # typical AIX shared libraries.
6113       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6114     else
6115       # We preserve .a as extension for shared libraries through AIX4.2
6116       # and later when we are not doing run time linking.
6117       library_names_spec='${libname}${release}.a $libname.a'
6118       soname_spec='${libname}${release}.so$major'
6119     fi
6120     shlibpath_var=LIBPATH
6121   fi
6122   ;;
6123
6124 amigaos*)
6125   library_names_spec='$libname.ixlibrary $libname.a'
6126   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6127   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'
6128   ;;
6129
6130 beos*)
6131   library_names_spec='${libname}.so'
6132   dynamic_linker="$host_os ld.so"
6133   shlibpath_var=LIBRARY_PATH
6134   ;;
6135
6136 bsdi4*)
6137   version_type=linux
6138   need_version=no
6139   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6140   soname_spec='${libname}${release}.so$major'
6141   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6142   shlibpath_var=LD_LIBRARY_PATH
6143   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6144   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6145   export_dynamic_flag_spec=-rdynamic
6146   # the default ld.so.conf also contains /usr/contrib/lib and
6147   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6148   # libtool to hard-code these into programs
6149   ;;
6150
6151 cygwin* | mingw* | pw32*)
6152   version_type=windows
6153   need_version=no
6154   need_lib_prefix=no
6155   case $GCC,$host_os in
6156   yes,cygwin*)
6157     library_names_spec='$libname.dll.a'
6158     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6159     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6160       dldir=$destdir/`dirname \$dlpath`~
6161       test -d \$dldir || mkdir -p \$dldir~
6162       $install_prog .libs/$dlname \$dldir/$dlname'
6163     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6164       dlpath=$dir/\$dldll~
6165        $rm \$dlpath'
6166     ;;
6167   yes,mingw*)
6168     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6169     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6170     ;;
6171   yes,pw32*)
6172     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6173     ;;
6174   *)
6175     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6176     ;;
6177   esac
6178   dynamic_linker='Win32 ld.exe'
6179   # FIXME: first we should search . and the directory the executable is in
6180   shlibpath_var=PATH
6181   ;;
6182
6183 darwin* | rhapsody*)
6184   dynamic_linker="$host_os dyld"
6185   version_type=darwin
6186   need_lib_prefix=no
6187   need_version=no
6188   # FIXME: Relying on posixy $() will cause problems for
6189   #        cross-compilation, but unfortunately the echo tests do not
6190   #        yet detect zsh echo's removal of \ escapes.
6191   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)'
6192   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6193   shlibpath_overrides_runpath=yes
6194   shlibpath_var=DYLD_LIBRARY_PATH
6195   ;;
6196
6197 freebsd1*)
6198   dynamic_linker=no
6199   ;;
6200
6201 freebsd*)
6202   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6203   version_type=freebsd-$objformat
6204   case $version_type in
6205     freebsd-elf*)
6206       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6207       need_version=no
6208       need_lib_prefix=no
6209       ;;
6210     freebsd-*)
6211       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6212       need_version=yes
6213       ;;
6214   esac
6215   shlibpath_var=LD_LIBRARY_PATH
6216   case $host_os in
6217   freebsd2*)
6218     shlibpath_overrides_runpath=yes
6219     ;;
6220   *)
6221     shlibpath_overrides_runpath=no
6222     hardcode_into_libs=yes
6223     ;;
6224   esac
6225   ;;
6226
6227 gnu*)
6228   version_type=linux
6229   need_lib_prefix=no
6230   need_version=no
6231   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6232   soname_spec='${libname}${release}.so$major'
6233   shlibpath_var=LD_LIBRARY_PATH
6234   hardcode_into_libs=yes
6235   ;;
6236
6237 hpux9* | hpux10* | hpux11*)
6238   # Give a soname corresponding to the major version so that dld.sl refuses to
6239   # link against other versions.
6240   dynamic_linker="$host_os dld.sl"
6241   version_type=sunos
6242   need_lib_prefix=no
6243   need_version=no
6244   shlibpath_var=SHLIB_PATH
6245   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6246   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6247   soname_spec='${libname}${release}.sl$major'
6248   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6249   postinstall_cmds='chmod 555 $lib'
6250   ;;
6251
6252 irix5* | irix6*)
6253   version_type=irix
6254   need_lib_prefix=no
6255   need_version=no
6256   soname_spec='${libname}${release}.so$major'
6257   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6258   case $host_os in
6259   irix5*)
6260     libsuff= shlibsuff=
6261     ;;
6262   *)
6263     case $LD in # libtool.m4 will add one of these switches to LD
6264     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6265     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6266     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6267     *) libsuff= shlibsuff= libmagic=never-match;;
6268     esac
6269     ;;
6270   esac
6271   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6272   shlibpath_overrides_runpath=no
6273   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6274   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6275   ;;
6276
6277 # No shared lib support for Linux oldld, aout, or coff.
6278 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6279   dynamic_linker=no
6280   ;;
6281
6282 # This must be Linux ELF.
6283 linux-gnu*)
6284   version_type=linux
6285   need_lib_prefix=no
6286   need_version=no
6287   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6288   soname_spec='${libname}${release}.so$major'
6289   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6290   shlibpath_var=LD_LIBRARY_PATH
6291   shlibpath_overrides_runpath=no
6292   # This implies no fast_install, which is unacceptable.
6293   # Some rework will be needed to allow for fast_install
6294   # before this can be enabled.
6295   hardcode_into_libs=yes
6296
6297   # We used to test for /lib/ld.so.1 and disable shared libraries on
6298   # powerpc, because MkLinux only supported shared libraries with the
6299   # GNU dynamic linker.  Since this was broken with cross compilers,
6300   # most powerpc-linux boxes support dynamic linking these days and
6301   # people can always --disable-shared, the test was removed, and we
6302   # assume the GNU/Linux dynamic linker is in use.
6303   dynamic_linker='GNU/Linux ld.so'
6304   ;;
6305
6306 netbsd*)
6307   version_type=sunos
6308   need_lib_prefix=no
6309   need_version=no
6310   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6311     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6312     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6313     dynamic_linker='NetBSD (a.out) ld.so'
6314   else
6315     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6316     soname_spec='${libname}${release}.so$major'
6317     dynamic_linker='NetBSD ld.elf_so'
6318   fi
6319   shlibpath_var=LD_LIBRARY_PATH
6320   shlibpath_overrides_runpath=yes
6321   hardcode_into_libs=yes
6322   ;;
6323
6324 newsos6)
6325   version_type=linux
6326   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6327   shlibpath_var=LD_LIBRARY_PATH
6328   shlibpath_overrides_runpath=yes
6329   ;;
6330
6331 openbsd*)
6332   version_type=sunos
6333   need_lib_prefix=no
6334   need_version=no
6335   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6336     case "$host_os" in
6337     openbsd2.[89] | openbsd2.[89].*)
6338       shlibpath_overrides_runpath=no
6339       ;;
6340     *)
6341       shlibpath_overrides_runpath=yes
6342       ;;
6343     esac
6344   else
6345     shlibpath_overrides_runpath=yes
6346   fi
6347   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6348   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6349   shlibpath_var=LD_LIBRARY_PATH
6350   ;;
6351
6352 os2*)
6353   libname_spec='$name'
6354   need_lib_prefix=no
6355   library_names_spec='$libname.dll $libname.a'
6356   dynamic_linker='OS/2 ld.exe'
6357   shlibpath_var=LIBPATH
6358   ;;
6359
6360 osf3* | osf4* | osf5*)
6361   version_type=osf
6362   need_version=no
6363   soname_spec='${libname}${release}.so'
6364   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6365   shlibpath_var=LD_LIBRARY_PATH
6366   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6367   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6368   ;;
6369
6370 sco3.2v5*)
6371   version_type=osf
6372   soname_spec='${libname}${release}.so$major'
6373   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6374   shlibpath_var=LD_LIBRARY_PATH
6375   ;;
6376
6377 solaris*)
6378   version_type=linux
6379   need_lib_prefix=no
6380   need_version=no
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6382   soname_spec='${libname}${release}.so$major'
6383   shlibpath_var=LD_LIBRARY_PATH
6384   shlibpath_overrides_runpath=yes
6385   hardcode_into_libs=yes
6386   # ldd complains unless libraries are executable
6387   postinstall_cmds='chmod +x $lib'
6388   ;;
6389
6390 sunos4*)
6391   version_type=sunos
6392   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6393   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6394   shlibpath_var=LD_LIBRARY_PATH
6395   shlibpath_overrides_runpath=yes
6396   if test "$with_gnu_ld" = yes; then
6397     need_lib_prefix=no
6398   fi
6399   need_version=yes
6400   ;;
6401
6402 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6403   version_type=linux
6404   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6405   soname_spec='${libname}${release}.so$major'
6406   shlibpath_var=LD_LIBRARY_PATH
6407   case $host_vendor in
6408     sni)
6409       shlibpath_overrides_runpath=no
6410       ;;
6411     motorola)
6412       need_lib_prefix=no
6413       need_version=no
6414       shlibpath_overrides_runpath=no
6415       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6416       ;;
6417   esac
6418   ;;
6419
6420 uts4*)
6421   version_type=linux
6422   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6423   soname_spec='${libname}${release}.so$major'
6424   shlibpath_var=LD_LIBRARY_PATH
6425   ;;
6426
6427 dgux*)
6428   version_type=linux
6429   need_lib_prefix=no
6430   need_version=no
6431   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6432   soname_spec='${libname}${release}.so$major'
6433   shlibpath_var=LD_LIBRARY_PATH
6434   ;;
6435
6436 sysv4*MP*)
6437   if test -d /usr/nec ;then
6438     version_type=linux
6439     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6440     soname_spec='$libname.so.$major'
6441     shlibpath_var=LD_LIBRARY_PATH
6442   fi
6443   ;;
6444
6445 *)
6446   dynamic_linker=no
6447   ;;
6448 esac
6449 echo "$ac_t""$dynamic_linker" 1>&6
6450 test "$dynamic_linker" = no && can_build_shared=no
6451
6452 # Report the final consequences.
6453 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6454 echo "configure:6455: checking if libtool supports shared libraries" >&5
6455 echo "$ac_t""$can_build_shared" 1>&6
6456
6457 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6458 echo "configure:6459: checking whether to build shared libraries" >&5
6459 test "$can_build_shared" = "no" && enable_shared=no
6460
6461 # On AIX, shared libraries and static libraries use the same namespace, and
6462 # are all built from PIC.
6463 case "$host_os" in
6464 aix3*)
6465   test "$enable_shared" = yes && enable_static=no
6466   if test -n "$RANLIB"; then
6467     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6468     postinstall_cmds='$RANLIB $lib'
6469   fi
6470   ;;
6471
6472 aix4*)
6473   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6474     test "$enable_shared" = yes && enable_static=no
6475   fi
6476   ;;
6477 esac
6478 echo "$ac_t""$enable_shared" 1>&6
6479
6480 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6481 echo "configure:6482: checking whether to build static libraries" >&5
6482 # Make sure either enable_shared or enable_static is yes.
6483 test "$enable_shared" = yes || enable_static=yes
6484 echo "$ac_t""$enable_static" 1>&6
6485
6486 if test "$hardcode_action" = relink; then
6487   # Fast installation is not supported
6488   enable_fast_install=no
6489 elif test "$shlibpath_overrides_runpath" = yes ||
6490      test "$enable_shared" = no; then
6491   # Fast installation is not necessary
6492   enable_fast_install=needless
6493 fi
6494
6495 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6496 if test "$GCC" = yes; then
6497   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6498 fi
6499
6500 if test "x$enable_dlopen" != xyes; then
6501   enable_dlopen=unknown
6502   enable_dlopen_self=unknown
6503   enable_dlopen_self_static=unknown
6504 else
6505   lt_cv_dlopen=no
6506   lt_cv_dlopen_libs=
6507
6508   case $host_os in
6509   beos*)
6510     lt_cv_dlopen="load_add_on"
6511     lt_cv_dlopen_libs=
6512     lt_cv_dlopen_self=yes
6513     ;;
6514
6515   cygwin* | mingw* | pw32*)
6516     lt_cv_dlopen="LoadLibrary"
6517     lt_cv_dlopen_libs=
6518    ;;
6519
6520   *)
6521     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6522 echo "configure:6523: checking for shl_load" >&5
6523 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6524   echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526   cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6529 /* System header to define __stub macros and hopefully few prototypes,
6530     which can conflict with char shl_load(); below.  */
6531 #include <assert.h>
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 /* We use char because int might match the return type of a gcc2
6534     builtin and then its argument prototype would still apply.  */
6535 char shl_load();
6536 char (*f)();
6537
6538 int main() {
6539
6540 /* The GNU C library defines this for functions which it implements
6541     to always fail with ENOSYS.  Some functions are actually named
6542     something starting with __ and the normal name is an alias.  */
6543 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6544 choke me
6545 #else
6546 f = shl_load;
6547 #endif
6548
6549 ; return 0; }
6550 EOF
6551 if { (eval echo configure:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6552   rm -rf conftest*
6553   eval "ac_cv_func_shl_load=yes"
6554 else
6555   echo "configure: failed program was:" >&5
6556   cat conftest.$ac_ext >&5
6557   rm -rf conftest*
6558   eval "ac_cv_func_shl_load=no"
6559 fi
6560 rm -f conftest*
6561 fi
6562
6563 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6564   echo "$ac_t""yes" 1>&6
6565   lt_cv_dlopen="shl_load"
6566 else
6567   echo "$ac_t""no" 1>&6
6568 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6569 echo "configure:6570: checking for shl_load in -ldld" >&5
6570 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6572   echo $ac_n "(cached) $ac_c" 1>&6
6573 else
6574   ac_save_LIBS="$LIBS"
6575 LIBS="-ldld  $LIBS"
6576 cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* Override any gcc2 internal prototype to avoid an error.  */
6580 /* We use char because int might match the return type of a gcc2
6581     builtin and then its argument prototype would still apply.  */
6582 char shl_load();
6583
6584 int main() {
6585 shl_load()
6586 ; return 0; }
6587 EOF
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=yes"
6591 else
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   eval "ac_cv_lib_$ac_lib_var=no"
6596 fi
6597 rm -f conftest*
6598 LIBS="$ac_save_LIBS"
6599
6600 fi
6601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6602   echo "$ac_t""yes" 1>&6
6603   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6604 else
6605   echo "$ac_t""no" 1>&6
6606 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6607 echo "configure:6608: checking for dlopen" >&5
6608 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6609   echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611   cat > conftest.$ac_ext <<EOF
6612 #line 6613 "configure"
6613 #include "confdefs.h"
6614 /* System header to define __stub macros and hopefully few prototypes,
6615     which can conflict with char dlopen(); below.  */
6616 #include <assert.h>
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char dlopen();
6621 char (*f)();
6622
6623 int main() {
6624
6625 /* The GNU C library defines this for functions which it implements
6626     to always fail with ENOSYS.  Some functions are actually named
6627     something starting with __ and the normal name is an alias.  */
6628 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6629 choke me
6630 #else
6631 f = dlopen;
6632 #endif
6633
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6637   rm -rf conftest*
6638   eval "ac_cv_func_dlopen=yes"
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_func_dlopen=no"
6644 fi
6645 rm -f conftest*
6646 fi
6647
6648 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6649   echo "$ac_t""yes" 1>&6
6650   lt_cv_dlopen="dlopen"
6651 else
6652   echo "$ac_t""no" 1>&6
6653 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6654 echo "configure:6655: checking for dlopen in -ldl" >&5
6655 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   ac_save_LIBS="$LIBS"
6660 LIBS="-ldl  $LIBS"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char dlopen();
6668
6669 int main() {
6670 dlopen()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 LIBS="$ac_save_LIBS"
6684
6685 fi
6686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6689 else
6690   echo "$ac_t""no" 1>&6
6691 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6692 echo "configure:6693: checking for dlopen in -lsvld" >&5
6693 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   ac_save_LIBS="$LIBS"
6698 LIBS="-lsvld  $LIBS"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char dlopen();
6706
6707 int main() {
6708 dlopen()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 LIBS="$ac_save_LIBS"
6722
6723 fi
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6727 else
6728   echo "$ac_t""no" 1>&6
6729 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6730 echo "configure:6731: checking for dld_link in -ldld" >&5
6731 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6732 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6733   echo $ac_n "(cached) $ac_c" 1>&6
6734 else
6735   ac_save_LIBS="$LIBS"
6736 LIBS="-ldld  $LIBS"
6737 cat > conftest.$ac_ext <<EOF
6738 #line 6739 "configure"
6739 #include "confdefs.h"
6740 /* Override any gcc2 internal prototype to avoid an error.  */
6741 /* We use char because int might match the return type of a gcc2
6742     builtin and then its argument prototype would still apply.  */
6743 char dld_link();
6744
6745 int main() {
6746 dld_link()
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750   rm -rf conftest*
6751   eval "ac_cv_lib_$ac_lib_var=yes"
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_lib_$ac_lib_var=no"
6757 fi
6758 rm -f conftest*
6759 LIBS="$ac_save_LIBS"
6760
6761 fi
6762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6763   echo "$ac_t""yes" 1>&6
6764   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6765 else
6766   echo "$ac_t""no" 1>&6
6767 fi
6768
6769               
6770 fi
6771
6772             
6773 fi
6774
6775           
6776 fi
6777
6778         
6779 fi
6780
6781       
6782 fi
6783
6784     ;;
6785   esac
6786
6787   if test "x$lt_cv_dlopen" != xno; then
6788     enable_dlopen=yes
6789   else
6790     enable_dlopen=no
6791   fi
6792
6793   case $lt_cv_dlopen in
6794   dlopen)
6795     save_CPPFLAGS="$CPPFLAGS"
6796         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6797
6798     save_LDFLAGS="$LDFLAGS"
6799     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6800
6801     save_LIBS="$LIBS"
6802     LIBS="$lt_cv_dlopen_libs $LIBS"
6803
6804     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6805 echo "configure:6806: checking whether a program can dlopen itself" >&5
6806 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809           if test "$cross_compiling" = yes; then :
6810   lt_cv_dlopen_self=cross
6811 else
6812     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6813   lt_status=$lt_dlunknown
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817
6818 #if HAVE_DLFCN_H
6819 #include <dlfcn.h>
6820 #endif
6821
6822 #include <stdio.h>
6823
6824 #ifdef RTLD_GLOBAL
6825 #  define LT_DLGLOBAL           RTLD_GLOBAL
6826 #else
6827 #  ifdef DL_GLOBAL
6828 #    define LT_DLGLOBAL         DL_GLOBAL
6829 #  else
6830 #    define LT_DLGLOBAL         0
6831 #  endif
6832 #endif
6833
6834 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6835    find out it does not work in some platform. */
6836 #ifndef LT_DLLAZY_OR_NOW
6837 #  ifdef RTLD_LAZY
6838 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6839 #  else
6840 #    ifdef DL_LAZY
6841 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6842 #    else
6843 #      ifdef RTLD_NOW
6844 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6845 #      else
6846 #        ifdef DL_NOW
6847 #          define LT_DLLAZY_OR_NOW      DL_NOW
6848 #        else
6849 #          define LT_DLLAZY_OR_NOW      0
6850 #        endif
6851 #      endif
6852 #    endif
6853 #  endif
6854 #endif
6855
6856 #ifdef __cplusplus
6857 extern "C" void exit (int);
6858 #endif
6859
6860 void fnord() { int i=42;}
6861 int main ()
6862 {
6863   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6864   int status = $lt_dlunknown;
6865
6866   if (self)
6867     {
6868       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6869       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6870       /* dlclose (self); */
6871     }
6872
6873     exit (status);
6874 }
6875 EOF
6876   if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6877     (./conftest; exit; ) 2>/dev/null
6878     lt_status=$?
6879     case x$lt_status in
6880       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6881       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6882       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6883     esac
6884   else :
6885     # compilation failed
6886     lt_cv_dlopen_self=no
6887   fi
6888 fi
6889 rm -fr conftest*
6890
6891     
6892 fi
6893
6894 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6895
6896     if test "x$lt_cv_dlopen_self" = xyes; then
6897       LDFLAGS="$LDFLAGS $link_static_flag"
6898       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6899 echo "configure:6900: checking whether a statically linked program can dlopen itself" >&5
6900 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6901   echo $ac_n "(cached) $ac_c" 1>&6
6902 else
6903           if test "$cross_compiling" = yes; then :
6904   lt_cv_dlopen_self_static=cross
6905 else
6906     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6907   lt_status=$lt_dlunknown
6908   cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911
6912 #if HAVE_DLFCN_H
6913 #include <dlfcn.h>
6914 #endif
6915
6916 #include <stdio.h>
6917
6918 #ifdef RTLD_GLOBAL
6919 #  define LT_DLGLOBAL           RTLD_GLOBAL
6920 #else
6921 #  ifdef DL_GLOBAL
6922 #    define LT_DLGLOBAL         DL_GLOBAL
6923 #  else
6924 #    define LT_DLGLOBAL         0
6925 #  endif
6926 #endif
6927
6928 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6929    find out it does not work in some platform. */
6930 #ifndef LT_DLLAZY_OR_NOW
6931 #  ifdef RTLD_LAZY
6932 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6933 #  else
6934 #    ifdef DL_LAZY
6935 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6936 #    else
6937 #      ifdef RTLD_NOW
6938 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6939 #      else
6940 #        ifdef DL_NOW
6941 #          define LT_DLLAZY_OR_NOW      DL_NOW
6942 #        else
6943 #          define LT_DLLAZY_OR_NOW      0
6944 #        endif
6945 #      endif
6946 #    endif
6947 #  endif
6948 #endif
6949
6950 #ifdef __cplusplus
6951 extern "C" void exit (int);
6952 #endif
6953
6954 void fnord() { int i=42;}
6955 int main ()
6956 {
6957   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6958   int status = $lt_dlunknown;
6959
6960   if (self)
6961     {
6962       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6963       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6964       /* dlclose (self); */
6965     }
6966
6967     exit (status);
6968 }
6969 EOF
6970   if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6971     (./conftest; exit; ) 2>/dev/null
6972     lt_status=$?
6973     case x$lt_status in
6974       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6975       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6976       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6977     esac
6978   else :
6979     # compilation failed
6980     lt_cv_dlopen_self_static=no
6981   fi
6982 fi
6983 rm -fr conftest*
6984
6985       
6986 fi
6987
6988 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6989     fi
6990
6991     CPPFLAGS="$save_CPPFLAGS"
6992     LDFLAGS="$save_LDFLAGS"
6993     LIBS="$save_LIBS"
6994     ;;
6995   esac
6996
6997   case $lt_cv_dlopen_self in
6998   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6999   *) enable_dlopen_self=unknown ;;
7000   esac
7001
7002   case $lt_cv_dlopen_self_static in
7003   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7004   *) enable_dlopen_self_static=unknown ;;
7005   esac
7006 fi
7007
7008
7009 if test "$enable_shared" = yes && test "$GCC" = yes; then
7010   case $archive_cmds in
7011   *'~'*)
7012     # FIXME: we may have to deal with multi-command sequences.
7013     ;;
7014   '$CC '*)
7015     # Test whether the compiler implicitly links with -lc since on some
7016     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7017     # to ld, don't add -lc before -lgcc.
7018     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7019 echo "configure:7020: checking whether -lc should be explicitly linked in" >&5
7020     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7021   echo $ac_n "(cached) $ac_c" 1>&6
7022 else
7023   $rm conftest*
7024     echo 'static int dummy;' > conftest.$ac_ext
7025
7026     if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7027       soname=conftest
7028       lib=conftest
7029       libobjs=conftest.$ac_objext
7030       deplibs=
7031       wl=$lt_cv_prog_cc_wl
7032       compiler_flags=-v
7033       linker_flags=-v
7034       verstring=
7035       output_objdir=.
7036       libname=conftest
7037       save_allow_undefined_flag=$allow_undefined_flag
7038       allow_undefined_flag=
7039       if { (eval echo configure:7040: \"$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; }
7040       then
7041         lt_cv_archive_cmds_need_lc=no
7042       else
7043         lt_cv_archive_cmds_need_lc=yes
7044       fi
7045       allow_undefined_flag=$save_allow_undefined_flag
7046     else
7047       cat conftest.err 1>&5
7048     fi
7049 fi
7050
7051     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7052     ;;
7053   esac
7054 fi
7055 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7056
7057 # The second clause should only fire when bootstrapping the
7058 # libtool distribution, otherwise you forgot to ship ltmain.sh
7059 # with your package, and you will get complaints that there are
7060 # no rules to generate ltmain.sh.
7061 if test -f "$ltmain"; then
7062   :
7063 else
7064   # If there is no Makefile yet, we rely on a make rule to execute
7065   # `config.status --recheck' to rerun these tests and create the
7066   # libtool script then.
7067   test -f Makefile && make "$ltmain"
7068 fi
7069
7070 if test -f "$ltmain"; then
7071   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7072   $rm -f "${ofile}T"
7073
7074   echo creating $ofile
7075
7076   # Now quote all the things that may contain metacharacters while being
7077   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7078   # variables and quote the copies for generation of the libtool script.
7079   for var in echo old_CC old_CFLAGS \
7080     AR AR_FLAGS CC LD LN_S NM SHELL \
7081     reload_flag reload_cmds wl \
7082     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7083     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7084     library_names_spec soname_spec \
7085     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7086     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7087     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7088     old_striplib striplib file_magic_cmd export_symbols_cmds \
7089     deplibs_check_method allow_undefined_flag no_undefined_flag \
7090     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7091     global_symbol_to_c_name_address \
7092     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7093     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7094     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7095
7096     case $var in
7097     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7098     old_postinstall_cmds | old_postuninstall_cmds | \
7099     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7100     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7101     postinstall_cmds | postuninstall_cmds | \
7102     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7103       # Double-quote double-evaled strings.
7104       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7105       ;;
7106     *)
7107       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7108       ;;
7109     esac
7110   done
7111
7112   cat <<__EOF__ > "${ofile}T"
7113 #! $SHELL
7114
7115 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7116 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7117 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7118 #
7119 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7120 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7121 #
7122 # This program is free software; you can redistribute it and/or modify
7123 # it under the terms of the GNU General Public License as published by
7124 # the Free Software Foundation; either version 2 of the License, or
7125 # (at your option) any later version.
7126 #
7127 # This program is distributed in the hope that it will be useful, but
7128 # WITHOUT ANY WARRANTY; without even the implied warranty of
7129 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7130 # General Public License for more details.
7131 #
7132 # You should have received a copy of the GNU General Public License
7133 # along with this program; if not, write to the Free Software
7134 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7135 #
7136 # As a special exception to the GNU General Public License, if you
7137 # distribute this file as part of a program that contains a
7138 # configuration script generated by Autoconf, you may include it under
7139 # the same distribution terms that you use for the rest of that program.
7140
7141 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7142 Xsed="sed -e s/^X//"
7143
7144 # The HP-UX ksh and POSIX shell print the target directory to stdout
7145 # if CDPATH is set.
7146 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7147
7148 # ### BEGIN LIBTOOL CONFIG
7149
7150 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7151
7152 # Shell to use when invoking shell scripts.
7153 SHELL=$lt_SHELL
7154
7155 # Whether or not to build shared libraries.
7156 build_libtool_libs=$enable_shared
7157
7158 # Whether or not to build static libraries.
7159 build_old_libs=$enable_static
7160
7161 # Whether or not to add -lc for building shared libraries.
7162 build_libtool_need_lc=$need_lc
7163
7164 # Whether or not to optimize for fast installation.
7165 fast_install=$enable_fast_install
7166
7167 # The host system.
7168 host_alias=$host_alias
7169 host=$host
7170
7171 # An echo program that does not interpret backslashes.
7172 echo=$lt_echo
7173
7174 # The archiver.
7175 AR=$lt_AR
7176 AR_FLAGS=$lt_AR_FLAGS
7177
7178 # The default C compiler.
7179 CC=$lt_CC
7180
7181 # Is the compiler the GNU C compiler?
7182 with_gcc=$GCC
7183
7184 # The linker used to build libraries.
7185 LD=$lt_LD
7186
7187 # Whether we need hard or soft links.
7188 LN_S=$lt_LN_S
7189
7190 # A BSD-compatible nm program.
7191 NM=$lt_NM
7192
7193 # A symbol stripping program
7194 STRIP=$STRIP
7195
7196 # Used to examine libraries when file_magic_cmd begins "file"
7197 MAGIC_CMD=$MAGIC_CMD
7198
7199 # Used on cygwin: DLL creation program.
7200 DLLTOOL="$DLLTOOL"
7201
7202 # Used on cygwin: object dumper.
7203 OBJDUMP="$OBJDUMP"
7204
7205 # Used on cygwin: assembler.
7206 AS="$AS"
7207
7208 # The name of the directory that contains temporary libtool files.
7209 objdir=$objdir
7210
7211 # How to create reloadable object files.
7212 reload_flag=$lt_reload_flag
7213 reload_cmds=$lt_reload_cmds
7214
7215 # How to pass a linker flag through the compiler.
7216 wl=$lt_wl
7217
7218 # Object file suffix (normally "o").
7219 objext="$ac_objext"
7220
7221 # Old archive suffix (normally "a").
7222 libext="$libext"
7223
7224 # Executable file suffix (normally "").
7225 exeext="$exeext"
7226
7227 # Additional compiler flags for building library objects.
7228 pic_flag=$lt_pic_flag
7229 pic_mode=$pic_mode
7230
7231 # Does compiler simultaneously support -c and -o options?
7232 compiler_c_o=$lt_compiler_c_o
7233
7234 # Can we write directly to a .lo ?
7235 compiler_o_lo=$lt_compiler_o_lo
7236
7237 # Must we lock files when doing compilation ?
7238 need_locks=$lt_need_locks
7239
7240 # Do we need the lib prefix for modules?
7241 need_lib_prefix=$need_lib_prefix
7242
7243 # Do we need a version for libraries?
7244 need_version=$need_version
7245
7246 # Whether dlopen is supported.
7247 dlopen_support=$enable_dlopen
7248
7249 # Whether dlopen of programs is supported.
7250 dlopen_self=$enable_dlopen_self
7251
7252 # Whether dlopen of statically linked programs is supported.
7253 dlopen_self_static=$enable_dlopen_self_static
7254
7255 # Compiler flag to prevent dynamic linking.
7256 link_static_flag=$lt_link_static_flag
7257
7258 # Compiler flag to turn off builtin functions.
7259 no_builtin_flag=$lt_no_builtin_flag
7260
7261 # Compiler flag to allow reflexive dlopens.
7262 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7263
7264 # Compiler flag to generate shared objects directly from archives.
7265 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7266
7267 # Compiler flag to generate thread-safe objects.
7268 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7269
7270 # Library versioning type.
7271 version_type=$version_type
7272
7273 # Format of library name prefix.
7274 libname_spec=$lt_libname_spec
7275
7276 # List of archive names.  First name is the real one, the rest are links.
7277 # The last name is the one that the linker finds with -lNAME.
7278 library_names_spec=$lt_library_names_spec
7279
7280 # The coded name of the library, if different from the real name.
7281 soname_spec=$lt_soname_spec
7282
7283 # Commands used to build and install an old-style archive.
7284 RANLIB=$lt_RANLIB
7285 old_archive_cmds=$lt_old_archive_cmds
7286 old_postinstall_cmds=$lt_old_postinstall_cmds
7287 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7288
7289 # Create an old-style archive from a shared archive.
7290 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7291
7292 # Create a temporary old-style archive to link instead of a shared archive.
7293 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7294
7295 # Commands used to build and install a shared archive.
7296 archive_cmds=$lt_archive_cmds
7297 archive_expsym_cmds=$lt_archive_expsym_cmds
7298 postinstall_cmds=$lt_postinstall_cmds
7299 postuninstall_cmds=$lt_postuninstall_cmds
7300
7301 # Commands to strip libraries.
7302 old_striplib=$lt_old_striplib
7303 striplib=$lt_striplib
7304
7305 # Method to check whether dependent libraries are shared objects.
7306 deplibs_check_method=$lt_deplibs_check_method
7307
7308 # Command to use when deplibs_check_method == file_magic.
7309 file_magic_cmd=$lt_file_magic_cmd
7310
7311 # Flag that allows shared libraries with undefined symbols to be built.
7312 allow_undefined_flag=$lt_allow_undefined_flag
7313
7314 # Flag that forces no undefined symbols.
7315 no_undefined_flag=$lt_no_undefined_flag
7316
7317 # Commands used to finish a libtool library installation in a directory.
7318 finish_cmds=$lt_finish_cmds
7319
7320 # Same as above, but a single script fragment to be evaled but not shown.
7321 finish_eval=$lt_finish_eval
7322
7323 # Take the output of nm and produce a listing of raw symbols and C names.
7324 global_symbol_pipe=$lt_global_symbol_pipe
7325
7326 # Transform the output of nm in a proper C declaration
7327 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7328
7329 # Transform the output of nm in a C name address pair
7330 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7331
7332 # This is the shared library runtime path variable.
7333 runpath_var=$runpath_var
7334
7335 # This is the shared library path variable.
7336 shlibpath_var=$shlibpath_var
7337
7338 # Is shlibpath searched before the hard-coded library search path?
7339 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7340
7341 # How to hardcode a shared library path into an executable.
7342 hardcode_action=$hardcode_action
7343
7344 # Whether we should hardcode library paths into libraries.
7345 hardcode_into_libs=$hardcode_into_libs
7346
7347 # Flag to hardcode \$libdir into a binary during linking.
7348 # This must work even if \$libdir does not exist.
7349 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7350
7351 # Whether we need a single -rpath flag with a separated argument.
7352 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7353
7354 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7355 # resulting binary.
7356 hardcode_direct=$hardcode_direct
7357
7358 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7359 # resulting binary.
7360 hardcode_minus_L=$hardcode_minus_L
7361
7362 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7363 # the resulting binary.
7364 hardcode_shlibpath_var=$hardcode_shlibpath_var
7365
7366 # Variables whose values should be saved in libtool wrapper scripts and
7367 # restored at relink time.
7368 variables_saved_for_relink="$variables_saved_for_relink"
7369
7370 # Whether libtool must link a program against all its dependency libraries.
7371 link_all_deplibs=$link_all_deplibs
7372
7373 # Compile-time system search path for libraries
7374 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7375
7376 # Run-time system search path for libraries
7377 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7378
7379 # Fix the shell variable \$srcfile for the compiler.
7380 fix_srcfile_path="$fix_srcfile_path"
7381
7382 # Set to yes if exported symbols are required.
7383 always_export_symbols=$always_export_symbols
7384
7385 # The commands to list exported symbols.
7386 export_symbols_cmds=$lt_export_symbols_cmds
7387
7388 # The commands to extract the exported symbol list from a shared archive.
7389 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7390
7391 # Symbols that should not be listed in the preloaded symbols.
7392 exclude_expsyms=$lt_exclude_expsyms
7393
7394 # Symbols that must always be exported.
7395 include_expsyms=$lt_include_expsyms
7396
7397 # ### END LIBTOOL CONFIG
7398
7399 __EOF__
7400
7401   case $host_os in
7402   aix3*)
7403     cat <<\EOF >> "${ofile}T"
7404
7405 # AIX sometimes has problems with the GCC collect2 program.  For some
7406 # reason, if we set the COLLECT_NAMES environment variable, the problems
7407 # vanish in a puff of smoke.
7408 if test "X${COLLECT_NAMES+set}" != Xset; then
7409   COLLECT_NAMES=
7410   export COLLECT_NAMES
7411 fi
7412 EOF
7413     ;;
7414   esac
7415
7416   case $host_os in
7417   cygwin* | mingw* | pw32* | os2*)
7418     cat <<'EOF' >> "${ofile}T"
7419       # This is a source program that is used to create dlls on Windows
7420       # Don't remove nor modify the starting and closing comments
7421 # /* ltdll.c starts here */
7422 # #define WIN32_LEAN_AND_MEAN
7423 # #include <windows.h>
7424 # #undef WIN32_LEAN_AND_MEAN
7425 # #include <stdio.h>
7426 #
7427 # #ifndef __CYGWIN__
7428 # #  ifdef __CYGWIN32__
7429 # #    define __CYGWIN__ __CYGWIN32__
7430 # #  endif
7431 # #endif
7432 #
7433 # #ifdef __cplusplus
7434 # extern "C" {
7435 # #endif
7436 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7437 # #ifdef __cplusplus
7438 # }
7439 # #endif
7440 #
7441 # #ifdef __CYGWIN__
7442 # #include <cygwin/cygwin_dll.h>
7443 # DECLARE_CYGWIN_DLL( DllMain );
7444 # #endif
7445 # HINSTANCE __hDllInstance_base;
7446 #
7447 # BOOL APIENTRY
7448 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7449 # {
7450 #   __hDllInstance_base = hInst;
7451 #   return TRUE;
7452 # }
7453 # /* ltdll.c ends here */
7454         # This is a source program that is used to create import libraries
7455         # on Windows for dlls which lack them. Don't remove nor modify the
7456         # starting and closing comments
7457 # /* impgen.c starts here */
7458 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7459 #
7460 #  This file is part of GNU libtool.
7461 #
7462 #  This program is free software; you can redistribute it and/or modify
7463 #  it under the terms of the GNU General Public License as published by
7464 #  the Free Software Foundation; either version 2 of the License, or
7465 #  (at your option) any later version.
7466 #
7467 #  This program is distributed in the hope that it will be useful,
7468 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7469 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7470 #  GNU General Public License for more details.
7471 #
7472 #  You should have received a copy of the GNU General Public License
7473 #  along with this program; if not, write to the Free Software
7474 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7475 #  */
7476 #
7477 # #include <stdio.h>            /* for printf() */
7478 # #include <unistd.h>           /* for open(), lseek(), read() */
7479 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7480 # #include <string.h>           /* for strdup() */
7481 #
7482 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7483 # #ifndef O_BINARY
7484 # #define O_BINARY 0
7485 # #endif
7486 #
7487 # static unsigned int
7488 # pe_get16 (fd, offset)
7489 #      int fd;
7490 #      int offset;
7491 # {
7492 #   unsigned char b[2];
7493 #   lseek (fd, offset, SEEK_SET);
7494 #   read (fd, b, 2);
7495 #   return b[0] + (b[1]<<8);
7496 # }
7497 #
7498 # static unsigned int
7499 # pe_get32 (fd, offset)
7500 #     int fd;
7501 #     int offset;
7502 # {
7503 #   unsigned char b[4];
7504 #   lseek (fd, offset, SEEK_SET);
7505 #   read (fd, b, 4);
7506 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7507 # }
7508 #
7509 # static unsigned int
7510 # pe_as32 (ptr)
7511 #      void *ptr;
7512 # {
7513 #   unsigned char *b = ptr;
7514 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7515 # }
7516 #
7517 # int
7518 # main (argc, argv)
7519 #     int argc;
7520 #     char *argv[];
7521 # {
7522 #     int dll;
7523 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7524 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7525 #     unsigned long name_rvas, nexp;
7526 #     unsigned char *expdata, *erva;
7527 #     char *filename, *dll_name;
7528 #
7529 #     filename = argv[1];
7530 #
7531 #     dll = open(filename, O_RDONLY|O_BINARY);
7532 #     if (dll < 1)
7533 #       return 1;
7534 #
7535 #     dll_name = filename;
7536 #
7537 #     for (i=0; filename[i]; i++)
7538 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7539 #           dll_name = filename + i +1;
7540 #
7541 #     pe_header_offset = pe_get32 (dll, 0x3c);
7542 #     opthdr_ofs = pe_header_offset + 4 + 20;
7543 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7544 #
7545 #     if (num_entries < 1) /* no exports */
7546 #       return 1;
7547 #
7548 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7549 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7550 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7551 #     secptr = (pe_header_offset + 4 + 20 +
7552 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7553 #
7554 #     expptr = 0;
7555 #     for (i = 0; i < nsections; i++)
7556 #     {
7557 #       char sname[8];
7558 #       unsigned long secptr1 = secptr + 40 * i;
7559 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7560 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7561 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7562 #       lseek(dll, secptr1, SEEK_SET);
7563 #       read(dll, sname, 8);
7564 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7565 #       {
7566 #           expptr = fptr + (export_rva - vaddr);
7567 #           if (export_rva + export_size > vaddr + vsize)
7568 #               export_size = vsize - (export_rva - vaddr);
7569 #           break;
7570 #       }
7571 #     }
7572 #
7573 #     expdata = (unsigned char*)malloc(export_size);
7574 #     lseek (dll, expptr, SEEK_SET);
7575 #     read (dll, expdata, export_size);
7576 #     erva = expdata - export_rva;
7577 #
7578 #     nexp = pe_as32 (expdata+24);
7579 #     name_rvas = pe_as32 (expdata+32);
7580 #
7581 #     printf ("EXPORTS\n");
7582 #     for (i = 0; i<nexp; i++)
7583 #     {
7584 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7585 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7586 #     }
7587 #
7588 #     return 0;
7589 # }
7590 # /* impgen.c ends here */
7591
7592 EOF
7593     ;;
7594   esac
7595
7596   # We use sed instead of cat because bash on DJGPP gets confused if
7597   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7598   # text mode, it properly converts lines to CR/LF.  This bash problem
7599   # is reportedly fixed, but why not run on old versions too?
7600   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7601
7602   mv -f "${ofile}T" "$ofile" || \
7603     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7604   chmod +x "$ofile"
7605 fi
7606
7607
7608
7609
7610
7611 # This can be used to rebuild libtool when needed
7612 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7613
7614 # Always use our own libtool.
7615 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7616
7617 # Prevent multiple expansion
7618
7619
7620
7621 for ac_prog in mawk gawk nawk awk
7622 do
7623 # Extract the first word of "$ac_prog", so it can be a program name with args.
7624 set dummy $ac_prog; ac_word=$2
7625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7626 echo "configure:7627: checking for $ac_word" >&5
7627 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   if test -n "$AWK"; then
7631   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7632 else
7633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7634   ac_dummy="$PATH"
7635   for ac_dir in $ac_dummy; do
7636     test -z "$ac_dir" && ac_dir=.
7637     if test -f $ac_dir/$ac_word; then
7638       ac_cv_prog_AWK="$ac_prog"
7639       break
7640     fi
7641   done
7642   IFS="$ac_save_ifs"
7643 fi
7644 fi
7645 AWK="$ac_cv_prog_AWK"
7646 if test -n "$AWK"; then
7647   echo "$ac_t""$AWK" 1>&6
7648 else
7649   echo "$ac_t""no" 1>&6
7650 fi
7651
7652 test -n "$AWK" && break
7653 done
7654
7655 # test for ln hardlink support
7656 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7657 echo "configure:7658: checking whether ln works" >&5
7658 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7659   echo $ac_n "(cached) $ac_c" 1>&6
7660 else
7661   rm -f conftest.src conftest.dst
7662 echo "conftest" > conftest.src
7663 if ln conftest.src conftest.dst 2>/dev/null
7664 then
7665   ol_cv_prog_LN_H="ln"
7666 else
7667   ol_cv_prog_LN_H="cp"
7668 fi
7669 rm -f conftest.src conftest.dst
7670
7671 fi
7672 LN_H="$ol_cv_prog_LN_H"
7673 if test "$ol_cv_prog_LN_H" = "ln"; then
7674         echo "$ac_t""yes" 1>&6
7675 else
7676         echo "$ac_t""no" 1>&6
7677 fi
7678
7679 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7680 echo "configure:7681: checking whether ln -s works" >&5
7681 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684   rm -f conftestdata
7685 if ln -s X conftestdata 2>/dev/null
7686 then
7687   rm -f conftestdata
7688   ac_cv_prog_LN_S="ln -s"
7689 else
7690   ac_cv_prog_LN_S=ln
7691 fi
7692 fi
7693 LN_S="$ac_cv_prog_LN_S"
7694 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7695   echo "$ac_t""yes" 1>&6
7696 else
7697   echo "$ac_t""no" 1>&6
7698 fi
7699
7700
7701 # Extract the first word of "sendmail", so it can be a program name with args.
7702 set dummy sendmail; ac_word=$2
7703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7704 echo "configure:7705: checking for $ac_word" >&5
7705 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7706   echo $ac_n "(cached) $ac_c" 1>&6
7707 else
7708   case "$SENDMAIL" in
7709   /*)
7710   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7711   ;;
7712   ?:/*)
7713   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7714   ;;
7715   *)
7716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7717   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7718   for ac_dir in $ac_dummy; do 
7719     test -z "$ac_dir" && ac_dir=.
7720     if test -f $ac_dir/$ac_word; then
7721       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7722       break
7723     fi
7724   done
7725   IFS="$ac_save_ifs"
7726   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7727   ;;
7728 esac
7729 fi
7730 SENDMAIL="$ac_cv_path_SENDMAIL"
7731 if test -n "$SENDMAIL"; then
7732   echo "$ac_t""$SENDMAIL" 1>&6
7733 else
7734   echo "$ac_t""no" 1>&6
7735 fi
7736
7737 # Extract the first word of "vi", so it can be a program name with args.
7738 set dummy vi; ac_word=$2
7739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7740 echo "configure:7741: checking for $ac_word" >&5
7741 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7742   echo $ac_n "(cached) $ac_c" 1>&6
7743 else
7744   case "$EDITOR" in
7745   /*)
7746   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7747   ;;
7748   ?:/*)
7749   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7750   ;;
7751   *)
7752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7753   ac_dummy="$PATH:/usr/ucb"
7754   for ac_dir in $ac_dummy; do 
7755     test -z "$ac_dir" && ac_dir=.
7756     if test -f $ac_dir/$ac_word; then
7757       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7758       break
7759     fi
7760   done
7761   IFS="$ac_save_ifs"
7762   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7763   ;;
7764 esac
7765 fi
7766 EDITOR="$ac_cv_path_EDITOR"
7767 if test -n "$EDITOR"; then
7768   echo "$ac_t""$EDITOR" 1>&6
7769 else
7770   echo "$ac_t""no" 1>&6
7771 fi
7772
7773
7774 ol_link_perl=no
7775 if test $ol_enable_perl != no ; then
7776         # Extract the first word of "perl", so it can be a program name with args.
7777 set dummy perl; ac_word=$2
7778 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7779 echo "configure:7780: checking for $ac_word" >&5
7780 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7781   echo $ac_n "(cached) $ac_c" 1>&6
7782 else
7783   case "$PERLBIN" in
7784   /*)
7785   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7786   ;;
7787   ?:/*)
7788   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7789   ;;
7790   *)
7791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7792   ac_dummy="$PATH"
7793   for ac_dir in $ac_dummy; do 
7794     test -z "$ac_dir" && ac_dir=.
7795     if test -f $ac_dir/$ac_word; then
7796       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7797       break
7798     fi
7799   done
7800   IFS="$ac_save_ifs"
7801   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7802   ;;
7803 esac
7804 fi
7805 PERLBIN="$ac_cv_path_PERLBIN"
7806 if test -n "$PERLBIN"; then
7807   echo "$ac_t""$PERLBIN" 1>&6
7808 else
7809   echo "$ac_t""no" 1>&6
7810 fi
7811
7812
7813         if test "no$PERLBIN" = "no" ; then
7814                 if test $ol_enable_perl = yes ; then
7815                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7816                 fi
7817
7818         else
7819                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7820                 if test x"$ol_with_perl_module" = "xstatic" ; then
7821                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7822                 else
7823                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7824                 fi
7825                                 ol_link_perl=yes
7826         fi
7827 fi
7828
7829 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7830 echo "configure:7831: checking how to run the C preprocessor" >&5
7831 # On Suns, sometimes $CPP names a directory.
7832 if test -n "$CPP" && test -d "$CPP"; then
7833   CPP=
7834 fi
7835 if test -z "$CPP"; then
7836 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839     # This must be in double quotes, not single quotes, because CPP may get
7840   # substituted into the Makefile and "${CC-cc}" will confuse make.
7841   CPP="${CC-cc} -E"
7842   # On the NeXT, cc -E runs the code through the compiler's parser,
7843   # not just through cpp.
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 #include <assert.h>
7848 Syntax Error
7849 EOF
7850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7851 { (eval echo configure:7852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7853 if test -z "$ac_err"; then
7854   :
7855 else
7856   echo "$ac_err" >&5
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   CPP="${CC-cc} -E -traditional-cpp"
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 #include <assert.h>
7865 Syntax Error
7866 EOF
7867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7868 { (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7870 if test -z "$ac_err"; then
7871   :
7872 else
7873   echo "$ac_err" >&5
7874   echo "configure: failed program was:" >&5
7875   cat conftest.$ac_ext >&5
7876   rm -rf conftest*
7877   CPP="${CC-cc} -nologo -E"
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP=/lib/cpp
7895 fi
7896 rm -f conftest*
7897 fi
7898 rm -f conftest*
7899 fi
7900 rm -f conftest*
7901   ac_cv_prog_CPP="$CPP"
7902 fi
7903   CPP="$ac_cv_prog_CPP"
7904 else
7905   ac_cv_prog_CPP="$CPP"
7906 fi
7907 echo "$ac_t""$CPP" 1>&6
7908
7909
7910 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7911         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7912
7913 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7914         echo "configure: warning: programs compiled here do run here..." 1>&2
7915         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7916
7917 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7918         echo "configure: warning: programs compiled here do not run here..." 1>&2
7919         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7920 fi
7921
7922
7923 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7924 echo "configure:7925: checking for Cygwin environment" >&5
7925 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7926   echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928   cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931
7932 int main() {
7933
7934 #ifndef __CYGWIN__
7935 #define __CYGWIN__ __CYGWIN32__
7936 #endif
7937 return __CYGWIN__;
7938 ; return 0; }
7939 EOF
7940 if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7941   rm -rf conftest*
7942   ac_cv_cygwin=yes
7943 else
7944   echo "configure: failed program was:" >&5
7945   cat conftest.$ac_ext >&5
7946   rm -rf conftest*
7947   ac_cv_cygwin=no
7948 fi
7949 rm -f conftest*
7950 fi
7951
7952 echo "$ac_t""$ac_cv_cygwin" 1>&6
7953 CYGWIN=
7954 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7955 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7956 echo "configure:7957: checking for mingw32 environment" >&5
7957 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963
7964 int main() {
7965 return __MINGW32__;
7966 ; return 0; }
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7969   rm -rf conftest*
7970   ac_cv_mingw32=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   ac_cv_mingw32=no
7976 fi
7977 rm -f conftest*
7978 fi
7979
7980 echo "$ac_t""$ac_cv_mingw32" 1>&6
7981 MINGW32=
7982 test "$ac_cv_mingw32" = yes && MINGW32=yes
7983
7984
7985
7986 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7987 echo "configure:7988: checking for executable suffix" >&5
7988 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7992   ac_cv_exeext=.exe
7993 else
7994   rm -f conftest*
7995   echo 'int main () { return 0; }' > conftest.$ac_ext
7996   ac_cv_exeext=
7997   if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7998     for file in conftest.*; do
7999       case $file in
8000       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8001       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8002       esac
8003     done
8004   else
8005     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8006   fi
8007   rm -f conftest*
8008   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8009 fi
8010 fi
8011
8012 EXEEXT=""
8013 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8014 echo "$ac_t""${ac_cv_exeext}" 1>&6
8015 ac_exeext=$EXEEXT
8016
8017 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8018 echo "configure:8019: checking for object suffix" >&5
8019 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8020   echo $ac_n "(cached) $ac_c" 1>&6
8021 else
8022   rm -f conftest*
8023 echo 'int i = 1;' > conftest.$ac_ext
8024 if { (eval echo configure:8025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8025   for ac_file in conftest.*; do
8026     case $ac_file in
8027     *.c) ;;
8028     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8029     esac
8030   done
8031 else
8032   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 echo "$ac_t""$ac_cv_objext" 1>&6
8038 OBJEXT=$ac_cv_objext
8039 ac_objext=$ac_cv_objext
8040
8041
8042 cat >> confdefs.h <<EOF
8043 #define EXEEXT "${EXEEXT}"
8044 EOF
8045
8046
8047 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8048 echo "configure:8049: checking for be_app in -lbe" >&5
8049 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8051   echo $ac_n "(cached) $ac_c" 1>&6
8052 else
8053   ac_save_LIBS="$LIBS"
8054 LIBS="-lbe -lroot -lnet $LIBS"
8055 cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* Override any gcc2 internal prototype to avoid an error.  */
8059 /* We use char because int might match the return type of a gcc2
8060     builtin and then its argument prototype would still apply.  */
8061 char be_app();
8062
8063 int main() {
8064 be_app()
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068   rm -rf conftest*
8069   eval "ac_cv_lib_$ac_lib_var=yes"
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   eval "ac_cv_lib_$ac_lib_var=no"
8075 fi
8076 rm -f conftest*
8077 LIBS="$ac_save_LIBS"
8078
8079 fi
8080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8081   echo "$ac_t""yes" 1>&6
8082   LIBS="$LIBS -lbe -lroot -lnet"
8083 else
8084   echo "$ac_t""no" 1>&6
8085 :
8086 fi
8087
8088
8089
8090
8091
8092 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8093 echo "configure:8094: checking for ${CC-cc} option to accept ANSI C" >&5
8094 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   am_cv_prog_cc_stdc=no
8098 ac_save_CC="$CC"
8099 # Don't try gcc -ansi; that turns off useful extensions and
8100 # breaks some systems' header files.
8101 # AIX                   -qlanglvl=ansi
8102 # Ultrix and OSF/1      -std1
8103 # HP-UX 10.20 and later -Ae
8104 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8105 # SVR4                  -Xc -D__EXTENSIONS__
8106 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8107 do
8108   CC="$ac_save_CC $ac_arg"
8109   cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 #include <stdarg.h>
8113 #include <stdio.h>
8114 #include <sys/types.h>
8115 #include <sys/stat.h>
8116 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8117 struct buf { int x; };
8118 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8119 static char *e (p, i)
8120      char **p;
8121      int i;
8122 {
8123   return p[i];
8124 }
8125 static char *f (char * (*g) (char **, int), char **p, ...)
8126 {
8127   char *s;
8128   va_list v;
8129   va_start (v,p);
8130   s = g (p, va_arg (v,int));
8131   va_end (v);
8132   return s;
8133 }
8134 int test (int i, double x);
8135 struct s1 {int (*f) (int a);};
8136 struct s2 {int (*f) (double a);};
8137 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8138 int argc;
8139 char **argv;
8140
8141 int main() {
8142
8143 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8144
8145 ; return 0; }
8146 EOF
8147 if { (eval echo configure:8148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8148   rm -rf conftest*
8149   am_cv_prog_cc_stdc="$ac_arg"; break
8150 else
8151   echo "configure: failed program was:" >&5
8152   cat conftest.$ac_ext >&5
8153 fi
8154 rm -f conftest*
8155 done
8156 CC="$ac_save_CC"
8157
8158 fi
8159
8160 if test -z "$am_cv_prog_cc_stdc"; then
8161   echo "$ac_t""none needed" 1>&6
8162 else
8163   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8164 fi
8165 case "x$am_cv_prog_cc_stdc" in
8166   x|xno) ;;
8167   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8168 esac
8169
8170 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8171         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8172 fi
8173
8174 # test for make depend flag
8175 OL_MKDEP=
8176 OL_MKDEP_FLAGS=
8177 if test -z "${MKDEP}"; then
8178         OL_MKDEP="${CC-cc}"
8179         if test -z "${MKDEP_FLAGS}"; then
8180                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8181 echo "configure:8182: checking for ${OL_MKDEP} depend flag" >&5
8182 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8183   echo $ac_n "(cached) $ac_c" 1>&6
8184 else
8185   
8186                         ol_cv_mkdep=no
8187                         for flag in "-M" "-xM"; do
8188                                 cat > conftest.c <<EOF
8189  noCode;
8190 EOF
8191                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8192                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8193                                 then
8194                                         if test ! -f conftest."${ac_object}" ; then
8195                                                 ol_cv_mkdep=$flag
8196                                                 OL_MKDEP_FLAGS="$flag"
8197                                                 break
8198                                         fi
8199                                 fi
8200                         done
8201                         rm -f conftest*
8202                 
8203 fi
8204
8205 echo "$ac_t""$ol_cv_mkdep" 1>&6
8206         else
8207                 cc_cv_mkdep=yes
8208                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8209         fi
8210 else
8211         cc_cv_mkdep=yes
8212         OL_MKDEP="${MKDEP}"
8213         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8214 fi
8215
8216
8217
8218 if test "${ol_cv_mkdep}" = no ; then
8219         # this will soon become an error
8220         echo "configure: warning: do not know how to generate dependencies" 1>&2
8221 fi
8222
8223 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8224 echo "configure:8225: checking for afopen in -ls" >&5
8225 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8227   echo $ac_n "(cached) $ac_c" 1>&6
8228 else
8229   ac_save_LIBS="$LIBS"
8230 LIBS="-ls  $LIBS"
8231 cat > conftest.$ac_ext <<EOF
8232 #line 8233 "configure"
8233 #include "confdefs.h"
8234 /* Override any gcc2 internal prototype to avoid an error.  */
8235 /* We use char because int might match the return type of a gcc2
8236     builtin and then its argument prototype would still apply.  */
8237 char afopen();
8238
8239 int main() {
8240 afopen()
8241 ; return 0; }
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=yes"
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -rf conftest*
8250   eval "ac_cv_lib_$ac_lib_var=no"
8251 fi
8252 rm -f conftest*
8253 LIBS="$ac_save_LIBS"
8254
8255 fi
8256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8257   echo "$ac_t""yes" 1>&6
8258   
8259         AUTH_LIBS=-ls
8260         cat >> confdefs.h <<\EOF
8261 #define HAVE_AIX_SECURITY 1
8262 EOF
8263
8264
8265 else
8266   echo "$ac_t""no" 1>&6
8267 fi
8268
8269
8270
8271 ol_link_modules=no
8272 if test $ol_enable_modules != no ; then
8273         for ac_hdr in ltdl.h
8274 do
8275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8277 echo "configure:8278: checking for $ac_hdr" >&5
8278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <$ac_hdr>
8285 EOF
8286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8287 { (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8289 if test -z "$ac_err"; then
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=yes"
8292 else
8293   echo "$ac_err" >&5
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 fi
8301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_hdr 1
8306 EOF
8307  
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311 done
8312
8313
8314         if test $ac_cv_header_ltdl_h = no ; then
8315                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8316         fi
8317
8318         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8319 echo "configure:8320: checking for lt_dlinit in -lltdl" >&5
8320 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   ac_save_LIBS="$LIBS"
8325 LIBS="-lltdl  $LIBS"
8326 cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* Override any gcc2 internal prototype to avoid an error.  */
8330 /* We use char because int might match the return type of a gcc2
8331     builtin and then its argument prototype would still apply.  */
8332 char lt_dlinit();
8333
8334 int main() {
8335 lt_dlinit()
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=yes"
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_lib_$ac_lib_var=no"
8346 fi
8347 rm -f conftest*
8348 LIBS="$ac_save_LIBS"
8349
8350 fi
8351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353   
8354                 MODULES_LIBS=-lltdl
8355                 cat >> confdefs.h <<\EOF
8356 #define HAVE_LIBLTDL 1
8357 EOF
8358
8359         
8360 else
8361   echo "$ac_t""no" 1>&6
8362 fi
8363
8364
8365         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8366                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8367         fi
8368         ol_link_modules=yes
8369 else
8370         ol_with_bdb_module=static
8371         ol_with_dnssrv_module=static
8372         ol_with_ldap_module=static
8373         ol_with_ldbm_module=static
8374         ol_with_meta_module=static
8375         ol_with_monitor_module=static
8376         ol_with_null_module=static
8377         ol_with_passwd_module=static
8378         ol_with_perl_module=static
8379         ol_with_shell_module=static
8380         ol_with_sql_module=static
8381 fi
8382
8383 # test for EBCDIC
8384 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8385 echo "configure:8386: checking for EBCDIC" >&5
8386 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   
8390         cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393
8394 #if !('M' == 0xd4)
8395 #include <__ASCII__/generate_error.h>
8396 #endif
8397
8398 EOF
8399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8400 { (eval echo configure:8401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8402 if test -z "$ac_err"; then
8403   rm -rf conftest*
8404   ol_cv_cpp_ebcdic=yes
8405 else
8406   echo "$ac_err" >&5
8407   echo "configure: failed program was:" >&5
8408   cat conftest.$ac_ext >&5
8409   rm -rf conftest*
8410   ol_cv_cpp_ebcdic=no
8411 fi
8412 rm -f conftest*
8413 fi
8414
8415 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8416 if test $ol_cv_cpp_ebcdic = yes ; then
8417         cat >> confdefs.h <<\EOF
8418 #define HAVE_EBCDIC 1
8419 EOF
8420
8421 fi
8422
8423 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8424 echo "configure:8425: checking for ANSI C header files" >&5
8425 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8426   echo $ac_n "(cached) $ac_c" 1>&6
8427 else
8428   cat > conftest.$ac_ext <<EOF
8429 #line 8430 "configure"
8430 #include "confdefs.h"
8431 #include <stdlib.h>
8432 #include <stdarg.h>
8433 #include <string.h>
8434 #include <float.h>
8435 EOF
8436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8437 { (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8439 if test -z "$ac_err"; then
8440   rm -rf conftest*
8441   ol_cv_header_stdc=yes
8442 else
8443   echo "$ac_err" >&5
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -rf conftest*
8447   ol_cv_header_stdc=no
8448 fi
8449 rm -f conftest*
8450
8451 if test $ol_cv_header_stdc = yes; then
8452   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8453 cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 #include <string.h>
8457 EOF
8458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8459   egrep "memchr" >/dev/null 2>&1; then
8460   :
8461 else
8462   rm -rf conftest*
8463   ol_cv_header_stdc=no
8464 fi
8465 rm -f conftest*
8466
8467 fi
8468
8469 if test $ol_cv_header_stdc = yes; then
8470   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8471 cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 EOF
8476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8477   egrep "free" >/dev/null 2>&1; then
8478   :
8479 else
8480   rm -rf conftest*
8481   ol_cv_header_stdc=no
8482 fi
8483 rm -f conftest*
8484
8485 fi
8486
8487 if test $ol_cv_header_stdc = yes; then
8488   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8489 if test "$cross_compiling" = yes; then
8490   :
8491 else
8492   cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <ctype.h>
8496 #ifndef HAVE_EBCDIC
8497 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8498 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8499 #else
8500 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8501                 || ('j' <= (c) && (c) <= 'r') \
8502                 || ('s' <= (c) && (c) <= 'z'))
8503 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8504 #endif
8505 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8506 int main () { int i; for (i = 0; i < 256; i++)
8507 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8508 exit (0); }
8509
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8512 then
8513   :
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -fr conftest*
8518   ol_cv_header_stdc=no
8519 fi
8520 rm -fr conftest*
8521 fi
8522
8523 fi
8524 fi
8525
8526 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8527 if test $ol_cv_header_stdc = yes; then
8528   cat >> confdefs.h <<\EOF
8529 #define STDC_HEADERS 1
8530 EOF
8531
8532 fi
8533 ac_cv_header_stdc=disable
8534
8535
8536 if test $ol_cv_header_stdc != yes; then
8537         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8538 fi
8539
8540 ac_header_dirent=no
8541 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8542 do
8543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8544 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8545 echo "configure:8546: checking for $ac_hdr that defines DIR" >&5
8546 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8547   echo $ac_n "(cached) $ac_c" 1>&6
8548 else
8549   cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 #include <sys/types.h>
8553 #include <$ac_hdr>
8554 int main() {
8555 DIR *dirp = 0;
8556 ; return 0; }
8557 EOF
8558 if { (eval echo configure:8559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8559   rm -rf conftest*
8560   eval "ac_cv_header_dirent_$ac_safe=yes"
8561 else
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_header_dirent_$ac_safe=no"
8566 fi
8567 rm -f conftest*
8568 fi
8569 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8570   echo "$ac_t""yes" 1>&6
8571     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8572   cat >> confdefs.h <<EOF
8573 #define $ac_tr_hdr 1
8574 EOF
8575  ac_header_dirent=$ac_hdr; break
8576 else
8577   echo "$ac_t""no" 1>&6
8578 fi
8579 done
8580 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8581 if test $ac_header_dirent = dirent.h; then
8582 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8583 echo "configure:8584: checking for opendir in -ldir" >&5
8584 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   ac_save_LIBS="$LIBS"
8589 LIBS="-ldir  $LIBS"
8590 cat > conftest.$ac_ext <<EOF
8591 #line 8592 "configure"
8592 #include "confdefs.h"
8593 /* Override any gcc2 internal prototype to avoid an error.  */
8594 /* We use char because int might match the return type of a gcc2
8595     builtin and then its argument prototype would still apply.  */
8596 char opendir();
8597
8598 int main() {
8599 opendir()
8600 ; return 0; }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=yes"
8605 else
8606   echo "configure: failed program was:" >&5
8607   cat conftest.$ac_ext >&5
8608   rm -rf conftest*
8609   eval "ac_cv_lib_$ac_lib_var=no"
8610 fi
8611 rm -f conftest*
8612 LIBS="$ac_save_LIBS"
8613
8614 fi
8615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617   LIBS="$LIBS -ldir"
8618 else
8619   echo "$ac_t""no" 1>&6
8620 fi
8621
8622 else
8623 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8624 echo "configure:8625: checking for opendir in -lx" >&5
8625 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8627   echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629   ac_save_LIBS="$LIBS"
8630 LIBS="-lx  $LIBS"
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 /* Override any gcc2 internal prototype to avoid an error.  */
8635 /* We use char because int might match the return type of a gcc2
8636     builtin and then its argument prototype would still apply.  */
8637 char opendir();
8638
8639 int main() {
8640 opendir()
8641 ; return 0; }
8642 EOF
8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=yes"
8646 else
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   eval "ac_cv_lib_$ac_lib_var=no"
8651 fi
8652 rm -f conftest*
8653 LIBS="$ac_save_LIBS"
8654
8655 fi
8656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8657   echo "$ac_t""yes" 1>&6
8658   LIBS="$LIBS -lx"
8659 else
8660   echo "$ac_t""no" 1>&6
8661 fi
8662
8663 fi
8664
8665 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8666 echo "configure:8667: checking for sys/wait.h that is POSIX.1 compatible" >&5
8667 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <sys/types.h>
8674 #include <sys/wait.h>
8675 #ifndef WEXITSTATUS
8676 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8677 #endif
8678 #ifndef WIFEXITED
8679 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8680 #endif
8681 int main() {
8682 int s;
8683 wait (&s);
8684 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8685 ; return 0; }
8686 EOF
8687 if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8688   rm -rf conftest*
8689   ac_cv_header_sys_wait_h=yes
8690 else
8691   echo "configure: failed program was:" >&5
8692   cat conftest.$ac_ext >&5
8693   rm -rf conftest*
8694   ac_cv_header_sys_wait_h=no
8695 fi
8696 rm -f conftest*
8697 fi
8698
8699 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8700 if test $ac_cv_header_sys_wait_h = yes; then
8701   cat >> confdefs.h <<\EOF
8702 #define HAVE_SYS_WAIT_H 1
8703 EOF
8704
8705 fi
8706
8707 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8708 echo "configure:8709: checking POSIX termios" >&5
8709 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716 #include <unistd.h>
8717 #include <termios.h>
8718 int main() {
8719 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8720    tcgetattr(0, 0);
8721 ; return 0; }
8722 EOF
8723 if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8724   rm -rf conftest*
8725   am_cv_sys_posix_termios=yes
8726 else
8727   echo "configure: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   rm -rf conftest*
8730   am_cv_sys_posix_termios=no
8731 fi
8732 rm -f conftest*
8733 fi
8734
8735 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8736
8737
8738  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8739 echo "configure:8740: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8740 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8741   echo $ac_n "(cached) $ac_c" 1>&6
8742 else
8743   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8744
8745   gwinsz_in_termios_h=no
8746   if test $am_cv_sys_posix_termios = yes; then
8747     cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include <sys/types.h>
8751 #     include <termios.h>
8752 #     ifdef TIOCGWINSZ
8753         yes
8754 #     endif
8755     
8756 EOF
8757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8758   egrep "yes" >/dev/null 2>&1; then
8759   rm -rf conftest*
8760   gwinsz_in_termios_h=yes
8761 fi
8762 rm -f conftest*
8763
8764   fi
8765
8766   if test $gwinsz_in_termios_h = no; then
8767     cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <sys/types.h>
8771 #     include <sys/ioctl.h>
8772 #     ifdef TIOCGWINSZ
8773         yes
8774 #     endif
8775     
8776 EOF
8777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8778   egrep "yes" >/dev/null 2>&1; then
8779   rm -rf conftest*
8780   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8781 fi
8782 rm -f conftest*
8783
8784   fi
8785   
8786 fi
8787
8788 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8789   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8790     cat >> confdefs.h <<\EOF
8791 #define GWINSZ_IN_SYS_IOCTL 1
8792 EOF
8793
8794   fi
8795
8796 if test $am_cv_sys_posix_termios = yes ; then
8797         cat >> confdefs.h <<\EOF
8798 #define HAVE_POSIX_TERMIOS 1
8799 EOF
8800
8801 fi
8802
8803 for ac_hdr in \
8804         arpa/inet.h             \
8805         arpa/nameser.h  \
8806         assert.h                \
8807         conio.h                 \
8808         crypt.h                 \
8809         direct.h                \
8810         errno.h                 \
8811         fcntl.h                 \
8812         filio.h                 \
8813         getopt.h                \
8814         grp.h                   \
8815         io.h                    \
8816         libutil.h               \
8817         limits.h                \
8818         locale.h                \
8819         netinet/tcp.h   \
8820         malloc.h                \
8821         memory.h                \
8822         psap.h                  \
8823         pwd.h                   \
8824         process.h               \
8825         resolv.h                \
8826         sgtty.h                 \
8827         shadow.h                \
8828         stddef.h                \
8829         string.h                \
8830         strings.h               \
8831         sysexits.h              \
8832         sys/file.h              \
8833         sys/filio.h             \
8834         sys/errno.h             \
8835         sys/ioctl.h             \
8836         sys/param.h             \
8837         sys/resource.h  \
8838         sys/select.h    \
8839         sys/socket.h    \
8840         sys/syslog.h    \
8841         sys/time.h              \
8842         sys/types.h             \
8843         syslog.h                \
8844         termios.h               \
8845         unistd.h                \
8846         winsock.h               \
8847         winsock2.h              \
8848
8849 do
8850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8852 echo "configure:8853: checking for $ac_hdr" >&5
8853 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8854   echo $ac_n "(cached) $ac_c" 1>&6
8855 else
8856   cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 #include <$ac_hdr>
8860 EOF
8861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8862 { (eval echo configure:8863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8864 if test -z "$ac_err"; then
8865   rm -rf conftest*
8866   eval "ac_cv_header_$ac_safe=yes"
8867 else
8868   echo "$ac_err" >&5
8869   echo "configure: failed program was:" >&5
8870   cat conftest.$ac_ext >&5
8871   rm -rf conftest*
8872   eval "ac_cv_header_$ac_safe=no"
8873 fi
8874 rm -f conftest*
8875 fi
8876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8877   echo "$ac_t""yes" 1>&6
8878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8879   cat >> confdefs.h <<EOF
8880 #define $ac_tr_hdr 1
8881 EOF
8882  
8883 else
8884   echo "$ac_t""no" 1>&6
8885 fi
8886 done
8887
8888
8889
8890
8891 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8892 echo "configure:8893: checking for dlopen" >&5
8893 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   cat > conftest.$ac_ext <<EOF
8897 #line 8898 "configure"
8898 #include "confdefs.h"
8899 /* System header to define __stub macros and hopefully few prototypes,
8900     which can conflict with char dlopen(); below.  */
8901 #include <assert.h>
8902 /* Override any gcc2 internal prototype to avoid an error.  */
8903 /* We use char because int might match the return type of a gcc2
8904     builtin and then its argument prototype would still apply.  */
8905 char dlopen();
8906 char (*f)();
8907
8908 int main() {
8909
8910 /* The GNU C library defines this for functions which it implements
8911     to always fail with ENOSYS.  Some functions are actually named
8912     something starting with __ and the normal name is an alias.  */
8913 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8914 choke me
8915 #else
8916 f = dlopen;
8917 #endif
8918
8919 ; return 0; }
8920 EOF
8921 if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8922   rm -rf conftest*
8923   eval "ac_cv_func_dlopen=yes"
8924 else
8925   echo "configure: failed program was:" >&5
8926   cat conftest.$ac_ext >&5
8927   rm -rf conftest*
8928   eval "ac_cv_func_dlopen=no"
8929 fi
8930 rm -f conftest*
8931 fi
8932
8933 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8934   echo "$ac_t""yes" 1>&6
8935   :
8936 else
8937   echo "$ac_t""no" 1>&6
8938 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8939 echo "configure:8940: checking for dlopen in -ldl" >&5
8940 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8941 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   ac_save_LIBS="$LIBS"
8945 LIBS="-ldl  $LIBS"
8946 cat > conftest.$ac_ext <<EOF
8947 #line 8948 "configure"
8948 #include "confdefs.h"
8949 /* Override any gcc2 internal prototype to avoid an error.  */
8950 /* We use char because int might match the return type of a gcc2
8951     builtin and then its argument prototype would still apply.  */
8952 char dlopen();
8953
8954 int main() {
8955 dlopen()
8956 ; return 0; }
8957 EOF
8958 if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8959   rm -rf conftest*
8960   eval "ac_cv_lib_$ac_lib_var=yes"
8961 else
8962   echo "configure: failed program was:" >&5
8963   cat conftest.$ac_ext >&5
8964   rm -rf conftest*
8965   eval "ac_cv_lib_$ac_lib_var=no"
8966 fi
8967 rm -f conftest*
8968 LIBS="$ac_save_LIBS"
8969
8970 fi
8971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8972   echo "$ac_t""yes" 1>&6
8973     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8974     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8975   cat >> confdefs.h <<EOF
8976 #define $ac_tr_lib 1
8977 EOF
8978
8979   LIBS="-ldl $LIBS"
8980
8981 else
8982   echo "$ac_t""no" 1>&6
8983 fi
8984
8985 fi
8986
8987
8988 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8989 echo "configure:8990: checking for sigset in -lV3" >&5
8990 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8991 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8992   echo $ac_n "(cached) $ac_c" 1>&6
8993 else
8994   ac_save_LIBS="$LIBS"
8995 LIBS="-lV3  $LIBS"
8996 cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 /* Override any gcc2 internal prototype to avoid an error.  */
9000 /* We use char because int might match the return type of a gcc2
9001     builtin and then its argument prototype would still apply.  */
9002 char sigset();
9003
9004 int main() {
9005 sigset()
9006 ; return 0; }
9007 EOF
9008 if { (eval echo configure:9009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9009   rm -rf conftest*
9010   eval "ac_cv_lib_$ac_lib_var=yes"
9011 else
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -rf conftest*
9015   eval "ac_cv_lib_$ac_lib_var=no"
9016 fi
9017 rm -f conftest*
9018 LIBS="$ac_save_LIBS"
9019
9020 fi
9021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9022   echo "$ac_t""yes" 1>&6
9023     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9024     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9025   cat >> confdefs.h <<EOF
9026 #define $ac_tr_lib 1
9027 EOF
9028
9029   LIBS="-lV3 $LIBS"
9030
9031 else
9032   echo "$ac_t""no" 1>&6
9033 fi
9034
9035
9036 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9037 echo "configure:9038: checking for winsock" >&5
9038 save_LIBS="$LIBS"
9039 for curlib in ws2_32 wsock32; do
9040         LIBS="$LIBS -l$curlib"
9041         cat > conftest.$ac_ext <<EOF
9042 #line 9043 "configure"
9043 #include "confdefs.h"
9044
9045                         char socket@12();
9046                         char select@20();
9047                         char closesocket@4();
9048                         char gethostname@8();
9049                         
9050 int main() {
9051
9052                         socket@12();
9053                         select@20();
9054                         closesocket@4();
9055                         gethostname@8();
9056                         
9057 ; return 0; }
9058 EOF
9059 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9060   rm -rf conftest*
9061   have_winsock=yes
9062 else
9063   echo "configure: failed program was:" >&5
9064   cat conftest.$ac_ext >&5
9065   rm -rf conftest*
9066   have_winsock=no
9067 fi
9068 rm -f conftest*
9069
9070         if test $have_winsock = yes; then
9071                 cat >> confdefs.h <<\EOF
9072 #define HAVE_WINSOCK 1
9073 EOF
9074
9075                 ac_cv_func_socket=yes
9076                 ac_cv_func_select=yes
9077                 ac_cv_func_closesocket=yes
9078                 ac_cv_func_gethostname=yes
9079                 if test $curlib = ws2_32; then
9080                         have_winsock=winsock2
9081                         cat >> confdefs.h <<\EOF
9082 #define HAVE_WINSOCK2 1
9083 EOF
9084
9085                 fi
9086                 break
9087         fi
9088         LIBS="$save_LIBS"
9089 done
9090 echo "$ac_t""$have_winsock" 1>&6
9091
9092
9093 echo $ac_n "checking for socket""... $ac_c" 1>&6
9094 echo "configure:9095: checking for socket" >&5
9095 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9096   echo $ac_n "(cached) $ac_c" 1>&6
9097 else
9098   cat > conftest.$ac_ext <<EOF
9099 #line 9100 "configure"
9100 #include "confdefs.h"
9101 /* System header to define __stub macros and hopefully few prototypes,
9102     which can conflict with char socket(); below.  */
9103 #include <assert.h>
9104 /* Override any gcc2 internal prototype to avoid an error.  */
9105 /* We use char because int might match the return type of a gcc2
9106     builtin and then its argument prototype would still apply.  */
9107 char socket();
9108 char (*f)();
9109
9110 int main() {
9111
9112 /* The GNU C library defines this for functions which it implements
9113     to always fail with ENOSYS.  Some functions are actually named
9114     something starting with __ and the normal name is an alias.  */
9115 #if defined (__stub_socket) || defined (__stub___socket)
9116 choke me
9117 #else
9118 f = socket;
9119 #endif
9120
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   eval "ac_cv_func_socket=yes"
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_func_socket=no"
9131 fi
9132 rm -f conftest*
9133 fi
9134
9135 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9136   echo "$ac_t""yes" 1>&6
9137   :
9138 else
9139   echo "$ac_t""no" 1>&6
9140         
9141         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9142 echo "configure:9143: checking for main in -lsocket" >&5
9143 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9145   echo $ac_n "(cached) $ac_c" 1>&6
9146 else
9147   ac_save_LIBS="$LIBS"
9148 LIBS="-lsocket  $LIBS"
9149 cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152
9153 int main() {
9154 main()
9155 ; return 0; }
9156 EOF
9157 if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9158   rm -rf conftest*
9159   eval "ac_cv_lib_$ac_lib_var=yes"
9160 else
9161   echo "configure: failed program was:" >&5
9162   cat conftest.$ac_ext >&5
9163   rm -rf conftest*
9164   eval "ac_cv_lib_$ac_lib_var=no"
9165 fi
9166 rm -f conftest*
9167 LIBS="$ac_save_LIBS"
9168
9169 fi
9170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9171   echo "$ac_t""yes" 1>&6
9172     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9173     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9174   cat >> confdefs.h <<EOF
9175 #define $ac_tr_lib 1
9176 EOF
9177
9178   LIBS="-lsocket $LIBS"
9179
9180 else
9181   echo "$ac_t""no" 1>&6
9182 fi
9183
9184         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9185 echo "configure:9186: checking for main in -lnet" >&5
9186 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   ac_save_LIBS="$LIBS"
9191 LIBS="-lnet  $LIBS"
9192 cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195
9196 int main() {
9197 main()
9198 ; return 0; }
9199 EOF
9200 if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=yes"
9203 else
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=no"
9208 fi
9209 rm -f conftest*
9210 LIBS="$ac_save_LIBS"
9211
9212 fi
9213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9214   echo "$ac_t""yes" 1>&6
9215     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9216     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9217   cat >> confdefs.h <<EOF
9218 #define $ac_tr_lib 1
9219 EOF
9220
9221   LIBS="-lnet $LIBS"
9222
9223 else
9224   echo "$ac_t""no" 1>&6
9225 fi
9226
9227         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9228 echo "configure:9229: checking for main in -lnsl_s" >&5
9229 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9231   echo $ac_n "(cached) $ac_c" 1>&6
9232 else
9233   ac_save_LIBS="$LIBS"
9234 LIBS="-lnsl_s  $LIBS"
9235 cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238
9239 int main() {
9240 main()
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=yes"
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=no"
9251 fi
9252 rm -f conftest*
9253 LIBS="$ac_save_LIBS"
9254
9255 fi
9256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9259     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9260   cat >> confdefs.h <<EOF
9261 #define $ac_tr_lib 1
9262 EOF
9263
9264   LIBS="-lnsl_s $LIBS"
9265
9266 else
9267   echo "$ac_t""no" 1>&6
9268 fi
9269
9270         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9271 echo "configure:9272: checking for main in -lnsl" >&5
9272 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   ac_save_LIBS="$LIBS"
9277 LIBS="-lnsl  $LIBS"
9278 cat > conftest.$ac_ext <<EOF
9279 #line 9280 "configure"
9280 #include "confdefs.h"
9281
9282 int main() {
9283 main()
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=yes"
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=no"
9294 fi
9295 rm -f conftest*
9296 LIBS="$ac_save_LIBS"
9297
9298 fi
9299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9300   echo "$ac_t""yes" 1>&6
9301     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9303   cat >> confdefs.h <<EOF
9304 #define $ac_tr_lib 1
9305 EOF
9306
9307   LIBS="-lnsl $LIBS"
9308
9309 else
9310   echo "$ac_t""no" 1>&6
9311 fi
9312
9313         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9314 echo "configure:9315: checking for socket in -linet" >&5
9315 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   ac_save_LIBS="$LIBS"
9320 LIBS="-linet  $LIBS"
9321 cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324 /* Override any gcc2 internal prototype to avoid an error.  */
9325 /* We use char because int might match the return type of a gcc2
9326     builtin and then its argument prototype would still apply.  */
9327 char socket();
9328
9329 int main() {
9330 socket()
9331 ; return 0; }
9332 EOF
9333 if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=yes"
9336 else
9337   echo "configure: failed program was:" >&5
9338   cat conftest.$ac_ext >&5
9339   rm -rf conftest*
9340   eval "ac_cv_lib_$ac_lib_var=no"
9341 fi
9342 rm -f conftest*
9343 LIBS="$ac_save_LIBS"
9344
9345 fi
9346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9349     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9350   cat >> confdefs.h <<EOF
9351 #define $ac_tr_lib 1
9352 EOF
9353
9354   LIBS="-linet $LIBS"
9355
9356 else
9357   echo "$ac_t""no" 1>&6
9358 fi
9359
9360         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9361 echo "configure:9362: checking for main in -lgen" >&5
9362 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9364   echo $ac_n "(cached) $ac_c" 1>&6
9365 else
9366   ac_save_LIBS="$LIBS"
9367 LIBS="-lgen  $LIBS"
9368 cat > conftest.$ac_ext <<EOF
9369 #line 9370 "configure"
9370 #include "confdefs.h"
9371
9372 int main() {
9373 main()
9374 ; return 0; }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9377   rm -rf conftest*
9378   eval "ac_cv_lib_$ac_lib_var=yes"
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=no"
9384 fi
9385 rm -f conftest*
9386 LIBS="$ac_save_LIBS"
9387
9388 fi
9389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9390   echo "$ac_t""yes" 1>&6
9391     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9393   cat >> confdefs.h <<EOF
9394 #define $ac_tr_lib 1
9395 EOF
9396
9397   LIBS="-lgen $LIBS"
9398
9399 else
9400   echo "$ac_t""no" 1>&6
9401 fi
9402
9403
9404 fi
9405
9406
9407 echo $ac_n "checking for select""... $ac_c" 1>&6
9408 echo "configure:9409: checking for select" >&5
9409 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9410   echo $ac_n "(cached) $ac_c" 1>&6
9411 else
9412   cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415 /* System header to define __stub macros and hopefully few prototypes,
9416     which can conflict with char select(); below.  */
9417 #include <assert.h>
9418 /* Override any gcc2 internal prototype to avoid an error.  */
9419 /* We use char because int might match the return type of a gcc2
9420     builtin and then its argument prototype would still apply.  */
9421 char select();
9422 char (*f)();
9423
9424 int main() {
9425
9426 /* The GNU C library defines this for functions which it implements
9427     to always fail with ENOSYS.  Some functions are actually named
9428     something starting with __ and the normal name is an alias.  */
9429 #if defined (__stub_select) || defined (__stub___select)
9430 choke me
9431 #else
9432 f = select;
9433 #endif
9434
9435 ; return 0; }
9436 EOF
9437 if { (eval echo configure:9438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9438   rm -rf conftest*
9439   eval "ac_cv_func_select=yes"
9440 else
9441   echo "configure: failed program was:" >&5
9442   cat conftest.$ac_ext >&5
9443   rm -rf conftest*
9444   eval "ac_cv_func_select=no"
9445 fi
9446 rm -f conftest*
9447 fi
9448
9449 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9450   echo "$ac_t""yes" 1>&6
9451   :
9452 else
9453   echo "$ac_t""no" 1>&6
9454 { echo "configure: error: select() required." 1>&2; exit 1; }
9455 fi
9456
9457
9458 if test "${ac_cv_header_winsock_h}" != yes; then
9459                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9460 echo "configure:9461: checking types of arguments for select()" >&5
9461  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9465   echo $ac_n "(cached) $ac_c" 1>&6
9466 else
9467     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9468   echo $ac_n "(cached) $ac_c" 1>&6
9469 else
9470      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9471      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9472       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9473        cat > conftest.$ac_ext <<EOF
9474 #line 9475 "configure"
9475 #include "confdefs.h"
9476 #ifdef HAVE_SYS_TYPES_H
9477 #include <sys/types.h>
9478 #endif
9479 #ifdef HAVE_SYS_TIME_H
9480 #include <sys/time.h>
9481 #endif
9482 #ifdef HAVE_SYS_SELECT_H
9483 #include <sys/select.h>
9484 #endif
9485 #ifdef HAVE_SYS_SOCKET_H
9486 #include <sys/socket.h>
9487 #endif
9488 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);
9489 int main() {
9490
9491 ; return 0; }
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9494   rm -rf conftest*
9495           ac_not_found=no ; break 3
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   ac_not_found=yes
9501 fi
9502 rm -f conftest*
9503       done
9504      done
9505     done
9506    
9507 fi
9508   
9509 fi
9510  
9511 fi
9512  if test "$ac_not_found" = yes; then
9513   ac_cv_func_select_arg1=int 
9514   ac_cv_func_select_arg234='int *' 
9515   ac_cv_func_select_arg5='struct timeval *'
9516  fi
9517  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9518  cat >> confdefs.h <<EOF
9519 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9520 EOF
9521
9522  cat >> confdefs.h <<EOF
9523 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9524 EOF
9525
9526  cat >> confdefs.h <<EOF
9527 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9528 EOF
9529
9530
9531 fi
9532
9533
9534 for ac_hdr in regex.h 
9535 do
9536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9538 echo "configure:9539: checking for $ac_hdr" >&5
9539 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 #include <$ac_hdr>
9546 EOF
9547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9548 { (eval echo configure:9549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9550 if test -z "$ac_err"; then
9551   rm -rf conftest*
9552   eval "ac_cv_header_$ac_safe=yes"
9553 else
9554   echo "$ac_err" >&5
9555   echo "configure: failed program was:" >&5
9556   cat conftest.$ac_ext >&5
9557   rm -rf conftest*
9558   eval "ac_cv_header_$ac_safe=no"
9559 fi
9560 rm -f conftest*
9561 fi
9562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9563   echo "$ac_t""yes" 1>&6
9564     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9565   cat >> confdefs.h <<EOF
9566 #define $ac_tr_hdr 1
9567 EOF
9568  
9569 else
9570   echo "$ac_t""no" 1>&6
9571 fi
9572 done
9573
9574 if test "$ac_cv_header_regex_h" != yes ; then
9575         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9576 fi
9577
9578 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9579 echo "configure:9580: checking for library containing regfree" >&5
9580 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9581   echo $ac_n "(cached) $ac_c" 1>&6
9582 else
9583   ac_func_search_save_LIBS="$LIBS"
9584 ac_cv_search_regfree="no"
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 /* Override any gcc2 internal prototype to avoid an error.  */
9589 /* We use char because int might match the return type of a gcc2
9590     builtin and then its argument prototype would still apply.  */
9591 char regfree();
9592
9593 int main() {
9594 regfree()
9595 ; return 0; }
9596 EOF
9597 if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9598   rm -rf conftest*
9599   ac_cv_search_regfree="none required"
9600 else
9601   echo "configure: failed program was:" >&5
9602   cat conftest.$ac_ext >&5
9603 fi
9604 rm -f conftest*
9605 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9606 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9607 cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 /* Override any gcc2 internal prototype to avoid an error.  */
9611 /* We use char because int might match the return type of a gcc2
9612     builtin and then its argument prototype would still apply.  */
9613 char regfree();
9614
9615 int main() {
9616 regfree()
9617 ; return 0; }
9618 EOF
9619 if { (eval echo configure:9620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9620   rm -rf conftest*
9621   ac_cv_search_regfree="-l$ac_lib"
9622 break
9623 else
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626 fi
9627 rm -f conftest*
9628 done
9629 LIBS="$ac_func_search_save_LIBS"
9630 fi
9631
9632 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9633 if test "$ac_cv_search_regfree" != "no"; then
9634   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9635   :
9636 else :
9637   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9638 fi
9639
9640
9641 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9642 echo "configure:9643: checking for compatible POSIX regex" >&5
9643 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9644   echo $ac_n "(cached) $ac_c" 1>&6
9645 else
9646   
9647         if test "$cross_compiling" = yes; then
9648   ol_cv_c_posix_regex=cross
9649 else
9650   cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653
9654 #include <sys/types.h>
9655 #include <regex.h>
9656 static char *pattern, *string;
9657 main()
9658 {
9659         int rc;
9660         regex_t re;
9661
9662         pattern = "^A";
9663
9664         if(regcomp(&re, pattern, 0)) {
9665                 return -1;
9666         }
9667         
9668         string = "ALL MATCH";
9669         
9670         rc = regexec(&re, string, 0, (void*)0, 0);
9671
9672         regfree(&re);
9673
9674         return rc;
9675 }
9676 EOF
9677 if { (eval echo configure:9678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9678 then
9679   ol_cv_c_posix_regex=yes
9680 else
9681   echo "configure: failed program was:" >&5
9682   cat conftest.$ac_ext >&5
9683   rm -fr conftest*
9684   ol_cv_c_posix_regex=no
9685 fi
9686 rm -fr conftest*
9687 fi
9688
9689 fi
9690
9691 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9692
9693 if test "$ol_cv_c_posix_regex" = no ; then
9694         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9695 fi
9696
9697
9698 have_uuid=no
9699 for ac_hdr in sys/uuid.h
9700 do
9701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9703 echo "configure:9704: checking for $ac_hdr" >&5
9704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9705   echo $ac_n "(cached) $ac_c" 1>&6
9706 else
9707   cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 #include <$ac_hdr>
9711 EOF
9712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9713 { (eval echo configure:9714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9715 if test -z "$ac_err"; then
9716   rm -rf conftest*
9717   eval "ac_cv_header_$ac_safe=yes"
9718 else
9719   echo "$ac_err" >&5
9720   echo "configure: failed program was:" >&5
9721   cat conftest.$ac_ext >&5
9722   rm -rf conftest*
9723   eval "ac_cv_header_$ac_safe=no"
9724 fi
9725 rm -f conftest*
9726 fi
9727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9728   echo "$ac_t""yes" 1>&6
9729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9730   cat >> confdefs.h <<EOF
9731 #define $ac_tr_hdr 1
9732 EOF
9733  
9734 else
9735   echo "$ac_t""no" 1>&6
9736 fi
9737 done
9738
9739 if test $ac_cv_header_sys_uuid_h = yes ; then
9740         save_LIBS="$LIBS"
9741         
9742 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9743 echo "configure:9744: checking for library containing uuid_to_str" >&5
9744 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9745   echo $ac_n "(cached) $ac_c" 1>&6
9746 else
9747   ac_func_search_save_LIBS="$LIBS"
9748 ac_cv_search_uuid_to_str="no"
9749 cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 /* Override any gcc2 internal prototype to avoid an error.  */
9753 /* We use char because int might match the return type of a gcc2
9754     builtin and then its argument prototype would still apply.  */
9755 char uuid_to_str();
9756
9757 int main() {
9758 uuid_to_str()
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9762   rm -rf conftest*
9763   ac_cv_search_uuid_to_str="none required"
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest*
9769 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9770 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9771 cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* Override any gcc2 internal prototype to avoid an error.  */
9775 /* We use char because int might match the return type of a gcc2
9776     builtin and then its argument prototype would still apply.  */
9777 char uuid_to_str();
9778
9779 int main() {
9780 uuid_to_str()
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9784   rm -rf conftest*
9785   ac_cv_search_uuid_to_str="-l$ac_lib"
9786 break
9787 else
9788   echo "configure: failed program was:" >&5
9789   cat conftest.$ac_ext >&5
9790 fi
9791 rm -f conftest*
9792 done
9793 LIBS="$ac_func_search_save_LIBS"
9794 fi
9795
9796 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9797 if test "$ac_cv_search_uuid_to_str" != "no"; then
9798   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9799   have_uuid=yes
9800 else :
9801   :
9802 fi
9803         LIBS="$save_LIBS"
9804
9805         if test have_uuid = yes ; then
9806                 cat >> confdefs.h <<\EOF
9807 #define HAVE_UUID_TO_STR 1
9808 EOF
9809
9810
9811                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9812                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9813         fi
9814 fi
9815
9816 if test $have_uuid = no ; then
9817         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9818 echo "configure:9819: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9819         save_LIBS="$LIBS"
9820         LIBS="$LIBS -lrpcrt4"
9821         cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824
9825                 char UuidCreate@4();
9826                 char UuidToStringA@8();
9827                 
9828 int main() {
9829
9830                 UuidCreate@4();
9831                 UuidToStringA@8();
9832                 
9833 ; return 0; }
9834 EOF
9835 if { (eval echo configure:9836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9836   rm -rf conftest*
9837   need_rpcrt=yes
9838 else
9839   echo "configure: failed program was:" >&5
9840   cat conftest.$ac_ext >&5
9841   rm -rf conftest*
9842   need_rpcrt=no
9843 fi
9844 rm -f conftest*
9845         if test $need_rpcrt = yes; then
9846                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9847         fi
9848         LIBS="$save_LIBS"
9849         echo "$ac_t""$need_rpcrt" 1>&6
9850 fi
9851
9852 ol_link_dnssrv=no
9853 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9854 echo "configure:9855: checking for res_query" >&5
9855 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9856   echo $ac_n "(cached) $ac_c" 1>&6
9857 else
9858   cat > conftest.$ac_ext <<EOF
9859 #line 9860 "configure"
9860 #include "confdefs.h"
9861 /* System header to define __stub macros and hopefully few prototypes,
9862     which can conflict with char res_query(); below.  */
9863 #include <assert.h>
9864 /* Override any gcc2 internal prototype to avoid an error.  */
9865 /* We use char because int might match the return type of a gcc2
9866     builtin and then its argument prototype would still apply.  */
9867 char res_query();
9868 char (*f)();
9869
9870 int main() {
9871
9872 /* The GNU C library defines this for functions which it implements
9873     to always fail with ENOSYS.  Some functions are actually named
9874     something starting with __ and the normal name is an alias.  */
9875 #if defined (__stub_res_query) || defined (__stub___res_query)
9876 choke me
9877 #else
9878 f = res_query;
9879 #endif
9880
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   eval "ac_cv_func_res_query=yes"
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   eval "ac_cv_func_res_query=no"
9891 fi
9892 rm -f conftest*
9893 fi
9894
9895 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9896   echo "$ac_t""yes" 1>&6
9897   :
9898 else
9899   echo "$ac_t""no" 1>&6
9900 fi
9901
9902 if test $ac_cv_func_res_query = no ; then 
9903         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9904 echo "configure:9905: checking for __res_query" >&5
9905 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9906   echo $ac_n "(cached) $ac_c" 1>&6
9907 else
9908   cat > conftest.$ac_ext <<EOF
9909 #line 9910 "configure"
9910 #include "confdefs.h"
9911 /* System header to define __stub macros and hopefully few prototypes,
9912     which can conflict with char __res_query(); below.  */
9913 #include <assert.h>
9914 /* Override any gcc2 internal prototype to avoid an error.  */
9915 /* We use char because int might match the return type of a gcc2
9916     builtin and then its argument prototype would still apply.  */
9917 char __res_query();
9918 char (*f)();
9919
9920 int main() {
9921
9922 /* The GNU C library defines this for functions which it implements
9923     to always fail with ENOSYS.  Some functions are actually named
9924     something starting with __ and the normal name is an alias.  */
9925 #if defined (__stub___res_query) || defined (__stub_____res_query)
9926 choke me
9927 #else
9928 f = __res_query;
9929 #endif
9930
9931 ; return 0; }
9932 EOF
9933 if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9934   rm -rf conftest*
9935   eval "ac_cv_func___res_query=yes"
9936 else
9937   echo "configure: failed program was:" >&5
9938   cat conftest.$ac_ext >&5
9939   rm -rf conftest*
9940   eval "ac_cv_func___res_query=no"
9941 fi
9942 rm -f conftest*
9943 fi
9944
9945 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9946   echo "$ac_t""yes" 1>&6
9947   :
9948 else
9949   echo "$ac_t""no" 1>&6
9950 fi
9951
9952         ac_cv_func_res_query=$ac_cv_func___res_query
9953 fi
9954
9955 if test $ac_cv_func_res_query = no ; then 
9956         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9957 echo "configure:9958: checking for res_query in -lbind" >&5
9958 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9960   echo $ac_n "(cached) $ac_c" 1>&6
9961 else
9962   ac_save_LIBS="$LIBS"
9963 LIBS="-lbind  $LIBS"
9964 cat > conftest.$ac_ext <<EOF
9965 #line 9966 "configure"
9966 #include "confdefs.h"
9967 /* Override any gcc2 internal prototype to avoid an error.  */
9968 /* We use char because int might match the return type of a gcc2
9969     builtin and then its argument prototype would still apply.  */
9970 char res_query();
9971
9972 int main() {
9973 res_query()
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   eval "ac_cv_lib_$ac_lib_var=yes"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_lib_$ac_lib_var=no"
9984 fi
9985 rm -f conftest*
9986 LIBS="$ac_save_LIBS"
9987
9988 fi
9989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9990   echo "$ac_t""yes" 1>&6
9991     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9992     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9993   cat >> confdefs.h <<EOF
9994 #define $ac_tr_lib 1
9995 EOF
9996
9997   LIBS="-lbind $LIBS"
9998
9999 else
10000   echo "$ac_t""no" 1>&6
10001 fi
10002
10003         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10004 fi
10005
10006 if test $ac_cv_func_res_query = no ; then 
10007         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10008 echo "configure:10009: checking for __res_query in -lbind" >&5
10009 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10011   echo $ac_n "(cached) $ac_c" 1>&6
10012 else
10013   ac_save_LIBS="$LIBS"
10014 LIBS="-lbind  $LIBS"
10015 cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 /* Override any gcc2 internal prototype to avoid an error.  */
10019 /* We use char because int might match the return type of a gcc2
10020     builtin and then its argument prototype would still apply.  */
10021 char __res_query();
10022
10023 int main() {
10024 __res_query()
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10028   rm -rf conftest*
10029   eval "ac_cv_lib_$ac_lib_var=yes"
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   eval "ac_cv_lib_$ac_lib_var=no"
10035 fi
10036 rm -f conftest*
10037 LIBS="$ac_save_LIBS"
10038
10039 fi
10040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10041   echo "$ac_t""yes" 1>&6
10042     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10043     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10044   cat >> confdefs.h <<EOF
10045 #define $ac_tr_lib 1
10046 EOF
10047
10048   LIBS="-lbind $LIBS"
10049
10050 else
10051   echo "$ac_t""no" 1>&6
10052 fi
10053
10054         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10055 fi
10056
10057 if test $ac_cv_func_res_query = no ; then 
10058         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10059 echo "configure:10060: checking for res_query in -lresolv" >&5
10060 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10062   echo $ac_n "(cached) $ac_c" 1>&6
10063 else
10064   ac_save_LIBS="$LIBS"
10065 LIBS="-lresolv  $LIBS"
10066 cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069 /* Override any gcc2 internal prototype to avoid an error.  */
10070 /* We use char because int might match the return type of a gcc2
10071     builtin and then its argument prototype would still apply.  */
10072 char res_query();
10073
10074 int main() {
10075 res_query()
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=yes"
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   eval "ac_cv_lib_$ac_lib_var=no"
10086 fi
10087 rm -f conftest*
10088 LIBS="$ac_save_LIBS"
10089
10090 fi
10091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10092   echo "$ac_t""yes" 1>&6
10093     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10094     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10095   cat >> confdefs.h <<EOF
10096 #define $ac_tr_lib 1
10097 EOF
10098
10099   LIBS="-lresolv $LIBS"
10100
10101 else
10102   echo "$ac_t""no" 1>&6
10103 fi
10104
10105         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10106 fi
10107
10108 if test $ac_cv_func_res_query = no ; then 
10109         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10110 echo "configure:10111: checking for __res_query in -lresolv" >&5
10111 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10113   echo $ac_n "(cached) $ac_c" 1>&6
10114 else
10115   ac_save_LIBS="$LIBS"
10116 LIBS="-lresolv  $LIBS"
10117 cat > conftest.$ac_ext <<EOF
10118 #line 10119 "configure"
10119 #include "confdefs.h"
10120 /* Override any gcc2 internal prototype to avoid an error.  */
10121 /* We use char because int might match the return type of a gcc2
10122     builtin and then its argument prototype would still apply.  */
10123 char __res_query();
10124
10125 int main() {
10126 __res_query()
10127 ; return 0; }
10128 EOF
10129 if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10130   rm -rf conftest*
10131   eval "ac_cv_lib_$ac_lib_var=yes"
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -rf conftest*
10136   eval "ac_cv_lib_$ac_lib_var=no"
10137 fi
10138 rm -f conftest*
10139 LIBS="$ac_save_LIBS"
10140
10141 fi
10142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10143   echo "$ac_t""yes" 1>&6
10144     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10145     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10146   cat >> confdefs.h <<EOF
10147 #define $ac_tr_lib 1
10148 EOF
10149
10150   LIBS="-lresolv $LIBS"
10151
10152 else
10153   echo "$ac_t""no" 1>&6
10154 fi
10155
10156         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10157 fi
10158
10159 if test "$ac_cv_func_res_query" = yes ; then
10160         cat >> confdefs.h <<\EOF
10161 #define HAVE_RES_QUERY 1
10162 EOF
10163
10164
10165         if test $ol_enable_dnssrv != no ; then
10166                 ol_link_dnssrv=yes
10167         fi
10168 fi
10169
10170 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10171         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10172 fi
10173
10174 for ac_func in getaddrinfo gai_strerror inet_ntop 
10175 do
10176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10177 echo "configure:10178: checking for $ac_func" >&5
10178 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10179   echo $ac_n "(cached) $ac_c" 1>&6
10180 else
10181   cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184 /* System header to define __stub macros and hopefully few prototypes,
10185     which can conflict with char $ac_func(); below.  */
10186 #include <assert.h>
10187 /* Override any gcc2 internal prototype to avoid an error.  */
10188 /* We use char because int might match the return type of a gcc2
10189     builtin and then its argument prototype would still apply.  */
10190 char $ac_func();
10191 char (*f)();
10192
10193 int main() {
10194
10195 /* The GNU C library defines this for functions which it implements
10196     to always fail with ENOSYS.  Some functions are actually named
10197     something starting with __ and the normal name is an alias.  */
10198 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10199 choke me
10200 #else
10201 f = $ac_func;
10202 #endif
10203
10204 ; return 0; }
10205 EOF
10206 if { (eval echo configure:10207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10207   rm -rf conftest*
10208   eval "ac_cv_func_$ac_func=yes"
10209 else
10210   echo "configure: failed program was:" >&5
10211   cat conftest.$ac_ext >&5
10212   rm -rf conftest*
10213   eval "ac_cv_func_$ac_func=no"
10214 fi
10215 rm -f conftest*
10216 fi
10217
10218 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10219   echo "$ac_t""yes" 1>&6
10220     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10221   cat >> confdefs.h <<EOF
10222 #define $ac_tr_func 1
10223 EOF
10224  
10225 else
10226   echo "$ac_t""no" 1>&6
10227 fi
10228 done
10229
10230
10231 ol_link_ipv6=no
10232 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10233         if test $ol_enable_ipv6 = yes ; then
10234                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10235         fi
10236 elif test $ol_enable_ipv6 != no ; then
10237         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10238 echo "configure:10239: checking INET6_ADDRSTRLEN" >&5
10239 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10240   echo $ac_n "(cached) $ac_c" 1>&6
10241 else
10242   
10243                 cat > conftest.$ac_ext <<EOF
10244 #line 10245 "configure"
10245 #include "confdefs.h"
10246
10247 #                       include <netinet/in.h>
10248 #                       ifdef INET6_ADDRSTRLEN
10249                                 __has_inet6_addrstrlen__;
10250 #                       endif
10251                 
10252 EOF
10253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10254   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10255   rm -rf conftest*
10256   ol_cv_inet6_addrstrlen=yes
10257 else
10258   rm -rf conftest*
10259   ol_cv_inet6_addrstrlen=no
10260 fi
10261 rm -f conftest*
10262
10263 fi
10264
10265 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10266
10267
10268         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10269 echo "configure:10270: checking struct sockaddr_storage" >&5
10270 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10271   echo $ac_n "(cached) $ac_c" 1>&6
10272 else
10273   
10274                 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277
10278 #include <sys/types.h>
10279 #include <sys/socket.h>
10280
10281 int main() {
10282
10283                         struct sockaddr_storage ss;
10284
10285 ; return 0; }
10286 EOF
10287 if { (eval echo configure:10288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10288   rm -rf conftest*
10289   ol_cv_struct_sockaddr_storage=yes
10290 else
10291   echo "configure: failed program was:" >&5
10292   cat conftest.$ac_ext >&5
10293   rm -rf conftest*
10294   ol_cv_struct_sockaddr_storage=no
10295 fi
10296 rm -f conftest*
10297 fi
10298
10299 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10300
10301         if test $ol_cv_inet6_addrstrlen = yes \
10302                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10303                 ol_link_ipv6=yes
10304         elif test $ol_enable_ipv6 = yes \
10305                         -a $ol_cv_inet6_addrstrlen = no ; then
10306                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10307         elif test $ol_enable_ipv6 = yes \
10308                         -a $ol_cv_struct_sockaddr_storage = no ; then
10309                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10310         fi
10311 fi
10312
10313 if test $ol_enable_local != no ; then
10314         for ac_hdr in sys/un.h 
10315 do
10316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10318 echo "configure:10319: checking for $ac_hdr" >&5
10319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 #include <$ac_hdr>
10326 EOF
10327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10328 { (eval echo configure:10329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10330 if test -z "$ac_err"; then
10331   rm -rf conftest*
10332   eval "ac_cv_header_$ac_safe=yes"
10333 else
10334   echo "$ac_err" >&5
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   eval "ac_cv_header_$ac_safe=no"
10339 fi
10340 rm -f conftest*
10341 fi
10342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10343   echo "$ac_t""yes" 1>&6
10344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10345   cat >> confdefs.h <<EOF
10346 #define $ac_tr_hdr 1
10347 EOF
10348  
10349 else
10350   echo "$ac_t""no" 1>&6
10351 fi
10352 done
10353
10354
10355         if test $ol_enable_local = auto ; then
10356                 ol_enable_local=$ac_cv_header_sys_un_h
10357         elif test $ac_cv_header_sys_un_h = no ; then
10358                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10359         fi
10360 fi
10361
10362 ol_link_kbind=no
10363 ol_link_kpasswd=no
10364 ol_link_krb5=no
10365 ol_link_krb4=no
10366
10367 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10368         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10369         -o $ol_with_kerberos = k425 ; then
10370
10371         for ac_hdr in krb5.h
10372 do
10373 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10374 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10375 echo "configure:10376: checking for $ac_hdr" >&5
10376 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 #include <$ac_hdr>
10383 EOF
10384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10385 { (eval echo configure:10386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10387 if test -z "$ac_err"; then
10388   rm -rf conftest*
10389   eval "ac_cv_header_$ac_safe=yes"
10390 else
10391   echo "$ac_err" >&5
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   eval "ac_cv_header_$ac_safe=no"
10396 fi
10397 rm -f conftest*
10398 fi
10399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10400   echo "$ac_t""yes" 1>&6
10401     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10402   cat >> confdefs.h <<EOF
10403 #define $ac_tr_hdr 1
10404 EOF
10405  
10406 else
10407   echo "$ac_t""no" 1>&6
10408 fi
10409 done
10410
10411
10412         if test $ac_cv_header_krb5_h = yes ; then
10413                                 for ac_hdr in heim_err.h
10414 do
10415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10417 echo "configure:10418: checking for $ac_hdr" >&5
10418 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10419   echo $ac_n "(cached) $ac_c" 1>&6
10420 else
10421   cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424 #include <$ac_hdr>
10425 EOF
10426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10427 { (eval echo configure:10428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10429 if test -z "$ac_err"; then
10430   rm -rf conftest*
10431   eval "ac_cv_header_$ac_safe=yes"
10432 else
10433   echo "$ac_err" >&5
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_header_$ac_safe=no"
10438 fi
10439 rm -f conftest*
10440 fi
10441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10444   cat >> confdefs.h <<EOF
10445 #define $ac_tr_hdr 1
10446 EOF
10447  
10448 else
10449   echo "$ac_t""no" 1>&6
10450 fi
10451 done
10452
10453                 if test $ac_cv_header_heim_err_h = yes ; then
10454                         krb5_impl=heimdal
10455                 else
10456                         krb5_impl=mit
10457                 fi
10458
10459                 if test $krb5_impl = mit; then
10460                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10461 echo "configure:10462: checking for main in -lk5crypto" >&5
10462 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10464   echo $ac_n "(cached) $ac_c" 1>&6
10465 else
10466   ac_save_LIBS="$LIBS"
10467 LIBS="-lk5crypto  $LIBS"
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471
10472 int main() {
10473 main()
10474 ; return 0; }
10475 EOF
10476 if { (eval echo configure:10477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10477   rm -rf conftest*
10478   eval "ac_cv_lib_$ac_lib_var=yes"
10479 else
10480   echo "configure: failed program was:" >&5
10481   cat conftest.$ac_ext >&5
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=no"
10484 fi
10485 rm -f conftest*
10486 LIBS="$ac_save_LIBS"
10487
10488 fi
10489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10490   echo "$ac_t""yes" 1>&6
10491   krb5crypto=k5crypto
10492 else
10493   echo "$ac_t""no" 1>&6
10494 krb5crypto=crypto
10495 fi
10496
10497
10498                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10499 echo "configure:10500: checking for main in -lkrb5" >&5
10500 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10501 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10502   echo $ac_n "(cached) $ac_c" 1>&6
10503 else
10504   ac_save_LIBS="$LIBS"
10505 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10506 cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509
10510 int main() {
10511 main()
10512 ; return 0; }
10513 EOF
10514 if { (eval echo configure:10515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10515   rm -rf conftest*
10516   eval "ac_cv_lib_$ac_lib_var=yes"
10517 else
10518   echo "configure: failed program was:" >&5
10519   cat conftest.$ac_ext >&5
10520   rm -rf conftest*
10521   eval "ac_cv_lib_$ac_lib_var=no"
10522 fi
10523 rm -f conftest*
10524 LIBS="$ac_save_LIBS"
10525
10526 fi
10527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10528   echo "$ac_t""yes" 1>&6
10529   have_krb5=yes
10530                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10531 else
10532   echo "$ac_t""no" 1>&6
10533 have_krb5=no
10534 fi
10535
10536
10537                 elif test $krb5_impl = heimdal; then
10538                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10539 echo "configure:10540: checking for main in -ldes" >&5
10540 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10541 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10542   echo $ac_n "(cached) $ac_c" 1>&6
10543 else
10544   ac_save_LIBS="$LIBS"
10545 LIBS="-ldes  $LIBS"
10546 cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549
10550 int main() {
10551 main()
10552 ; return 0; }
10553 EOF
10554 if { (eval echo configure:10555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10555   rm -rf conftest*
10556   eval "ac_cv_lib_$ac_lib_var=yes"
10557 else
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=no"
10562 fi
10563 rm -f conftest*
10564 LIBS="$ac_save_LIBS"
10565
10566 fi
10567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569   krb5crypto=des
10570 else
10571   echo "$ac_t""no" 1>&6
10572 krb5crypto=crypto
10573 fi
10574
10575
10576                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10577 echo "configure:10578: checking for main in -lkrb5" >&5
10578 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10580   echo $ac_n "(cached) $ac_c" 1>&6
10581 else
10582   ac_save_LIBS="$LIBS"
10583 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10584 cat > conftest.$ac_ext <<EOF
10585 #line 10586 "configure"
10586 #include "confdefs.h"
10587
10588 int main() {
10589 main()
10590 ; return 0; }
10591 EOF
10592 if { (eval echo configure:10593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10593   rm -rf conftest*
10594   eval "ac_cv_lib_$ac_lib_var=yes"
10595 else
10596   echo "configure: failed program was:" >&5
10597   cat conftest.$ac_ext >&5
10598   rm -rf conftest*
10599   eval "ac_cv_lib_$ac_lib_var=no"
10600 fi
10601 rm -f conftest*
10602 LIBS="$ac_save_LIBS"
10603
10604 fi
10605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10606   echo "$ac_t""yes" 1>&6
10607   have_krb5=yes
10608                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10609 else
10610   echo "$ac_t""no" 1>&6
10611 have_krb5=no
10612 fi
10613
10614
10615                         cat >> confdefs.h <<\EOF
10616 #define HAVE_HEIMDAL_KERBEROS 1
10617 EOF
10618
10619
10620                 else
10621                         have_krb5=no
10622                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10623                 fi
10624
10625                 if test $have_krb5 = yes ; then
10626                         ol_link_krb5=yes
10627
10628                         cat >> confdefs.h <<\EOF
10629 #define HAVE_KRB5 1
10630 EOF
10631
10632
10633                         if test $ol_enable_kpasswd != no ; then
10634                                 ol_link_kpasswd=yes;
10635                         fi
10636
10637                         if test $ol_with_kerberos = k5only ; then
10638                                 ol_with_kerberos=found
10639                         fi
10640
10641                 elif test $ol_with_kerberos != auto ; then
10642                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10643                 fi
10644
10645         fi
10646 fi
10647
10648 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10649         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10650
10651         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10652 do
10653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10655 echo "configure:10656: checking for $ac_hdr" >&5
10656 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10657   echo $ac_n "(cached) $ac_c" 1>&6
10658 else
10659   cat > conftest.$ac_ext <<EOF
10660 #line 10661 "configure"
10661 #include "confdefs.h"
10662 #include <$ac_hdr>
10663 EOF
10664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10665 { (eval echo configure:10666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10667 if test -z "$ac_err"; then
10668   rm -rf conftest*
10669   eval "ac_cv_header_$ac_safe=yes"
10670 else
10671   echo "$ac_err" >&5
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_header_$ac_safe=no"
10676 fi
10677 rm -f conftest*
10678 fi
10679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10680   echo "$ac_t""yes" 1>&6
10681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10682   cat >> confdefs.h <<EOF
10683 #define $ac_tr_hdr 1
10684 EOF
10685  
10686 else
10687   echo "$ac_t""no" 1>&6
10688 fi
10689 done
10690
10691
10692         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10693                 if test $krb5_impl = mit; then
10694                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10695 echo "configure:10696: checking for main in -lkrb4" >&5
10696 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   ac_save_LIBS="$LIBS"
10701 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10702 cat > conftest.$ac_ext <<EOF
10703 #line 10704 "configure"
10704 #include "confdefs.h"
10705
10706 int main() {
10707 main()
10708 ; return 0; }
10709 EOF
10710 if { (eval echo configure:10711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10711   rm -rf conftest*
10712   eval "ac_cv_lib_$ac_lib_var=yes"
10713 else
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_lib_$ac_lib_var=no"
10718 fi
10719 rm -f conftest*
10720 LIBS="$ac_save_LIBS"
10721
10722 fi
10723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725   have_k425=yes
10726                                 KRB4_LIBS="-lkrb4 -ldes425"
10727 else
10728   echo "$ac_t""no" 1>&6
10729 have_k425=no
10730 fi
10731
10732
10733                 elif test $krb5_impl = heimdal; then
10734                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10735 echo "configure:10736: checking for main in -lkrb4" >&5
10736 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   ac_save_LIBS="$LIBS"
10741 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745
10746 int main() {
10747 main()
10748 ; return 0; }
10749 EOF
10750 if { (eval echo configure:10751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10751   rm -rf conftest*
10752   eval "ac_cv_lib_$ac_lib_var=yes"
10753 else
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=no"
10758 fi
10759 rm -f conftest*
10760 LIBS="$ac_save_LIBS"
10761
10762 fi
10763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10764   echo "$ac_t""yes" 1>&6
10765   have_k425=yes
10766                                 KRB4_LIBS="-lkrb4"
10767 else
10768   echo "$ac_t""no" 1>&6
10769 have_k425=no
10770 fi
10771
10772
10773                 else
10774                         have_425=no
10775                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10776                 fi
10777
10778                 if test $have_k425 = yes ; then
10779                         ol_with_kerberos=found
10780                         ol_link_krb4=yes
10781
10782                         cat >> confdefs.h <<\EOF
10783 #define HAVE_KRB425 1
10784 EOF
10785
10786                         cat >> confdefs.h <<\EOF
10787 #define HAVE_KRB4 1
10788 EOF
10789
10790
10791                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10792 echo "configure:10793: checking for des_debug in Kerberos libraries" >&5
10793 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10794   echo $ac_n "(cached) $ac_c" 1>&6
10795 else
10796   
10797                                                                 save_LIBS="$LIBS"
10798                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10799                                 cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802
10803 #include <kerberosIV/krb.h>
10804 #include <kerberosIV/des.h>
10805 extern int des_debug;
10806
10807 int main() {
10808
10809 des_debug = 1;
10810
10811 ; return 0; }
10812 EOF
10813 if { (eval echo configure:10814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10814   rm -rf conftest*
10815   ol_cv_var_des_debug=yes
10816 else
10817   echo "configure: failed program was:" >&5
10818   cat conftest.$ac_ext >&5
10819   rm -rf conftest*
10820   ol_cv_var_des_debug=no
10821 fi
10822 rm -f conftest*
10823                                                                 LIBS="$save_LIBS"
10824                         
10825 fi
10826
10827 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10828
10829                         if test $ol_cv_var_des_debug = yes ; then
10830                                 cat >> confdefs.h <<\EOF
10831 #define HAVE_DES_DEBUG 1
10832 EOF
10833
10834                         fi
10835
10836                         LIBS="$save_LIBS"
10837                 fi
10838         fi
10839 fi
10840
10841 if test $ol_link_krb5 = yes ; then
10842         ol_with_kerberos=found
10843 fi
10844
10845 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10846         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10847
10848         for ac_hdr in krb.h des.h krb-archaeology.h 
10849 do
10850 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10851 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10852 echo "configure:10853: checking for $ac_hdr" >&5
10853 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10854   echo $ac_n "(cached) $ac_c" 1>&6
10855 else
10856   cat > conftest.$ac_ext <<EOF
10857 #line 10858 "configure"
10858 #include "confdefs.h"
10859 #include <$ac_hdr>
10860 EOF
10861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10862 { (eval echo configure:10863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10864 if test -z "$ac_err"; then
10865   rm -rf conftest*
10866   eval "ac_cv_header_$ac_safe=yes"
10867 else
10868   echo "$ac_err" >&5
10869   echo "configure: failed program was:" >&5
10870   cat conftest.$ac_ext >&5
10871   rm -rf conftest*
10872   eval "ac_cv_header_$ac_safe=no"
10873 fi
10874 rm -f conftest*
10875 fi
10876 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10877   echo "$ac_t""yes" 1>&6
10878     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10879   cat >> confdefs.h <<EOF
10880 #define $ac_tr_hdr 1
10881 EOF
10882  
10883 else
10884   echo "$ac_t""no" 1>&6
10885 fi
10886 done
10887
10888
10889         if test $ac_cv_header_krb_h = yes ; then
10890                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10891 echo "configure:10892: checking for main in -lkrb" >&5
10892 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10894   echo $ac_n "(cached) $ac_c" 1>&6
10895 else
10896   ac_save_LIBS="$LIBS"
10897 LIBS="-lkrb -ldes $LIBS"
10898 cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901
10902 int main() {
10903 main()
10904 ; return 0; }
10905 EOF
10906 if { (eval echo configure:10907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10907   rm -rf conftest*
10908   eval "ac_cv_lib_$ac_lib_var=yes"
10909 else
10910   echo "configure: failed program was:" >&5
10911   cat conftest.$ac_ext >&5
10912   rm -rf conftest*
10913   eval "ac_cv_lib_$ac_lib_var=no"
10914 fi
10915 rm -f conftest*
10916 LIBS="$ac_save_LIBS"
10917
10918 fi
10919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10920   echo "$ac_t""yes" 1>&6
10921   have_k4=yes
10922 else
10923   echo "$ac_t""no" 1>&6
10924 have_k4=no
10925 fi
10926
10927
10928                 if test $have_k4 = yes ; then
10929                         ol_with_kerberos=found
10930                         ol_link_krb4=yes
10931
10932                         cat >> confdefs.h <<\EOF
10933 #define HAVE_KRB4 1
10934 EOF
10935
10936
10937                         KRB4_LIBS="-lkrb -ldes"
10938
10939                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10940                                 cat >> confdefs.h <<\EOF
10941 #define HAVE_KTH_KERBEROS 1
10942 EOF
10943
10944                         fi
10945                 fi
10946         fi
10947 fi
10948
10949 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10950         ol_link_kpasswd=yes
10951 fi
10952
10953 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10954         ol_link_kbind=yes
10955
10956 elif test $ol_enable_kbind = yes ; then
10957         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10958 fi
10959
10960 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10961         cat >> confdefs.h <<\EOF
10962 #define HAVE_KERBEROS 1
10963 EOF
10964
10965
10966 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10967         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10968 fi
10969
10970 ol_link_tls=no
10971 if test $ol_with_tls != no ; then
10972         for ac_hdr in openssl/ssl.h ssl.h
10973 do
10974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10976 echo "configure:10977: checking for $ac_hdr" >&5
10977 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 #include <$ac_hdr>
10984 EOF
10985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10986 { (eval echo configure:10987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10988 if test -z "$ac_err"; then
10989   rm -rf conftest*
10990   eval "ac_cv_header_$ac_safe=yes"
10991 else
10992   echo "$ac_err" >&5
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -rf conftest*
10996   eval "ac_cv_header_$ac_safe=no"
10997 fi
10998 rm -f conftest*
10999 fi
11000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11001   echo "$ac_t""yes" 1>&6
11002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11003   cat >> confdefs.h <<EOF
11004 #define $ac_tr_hdr 1
11005 EOF
11006  
11007 else
11008   echo "$ac_t""no" 1>&6
11009 fi
11010 done
11011
11012         
11013         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11014                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11015 echo "configure:11016: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11016 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11018   echo $ac_n "(cached) $ac_c" 1>&6
11019 else
11020   ac_save_LIBS="$LIBS"
11021 LIBS="-lssl -lcrypto $LIBS"
11022 cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 /* Override any gcc2 internal prototype to avoid an error.  */
11026 /* We use char because int might match the return type of a gcc2
11027     builtin and then its argument prototype would still apply.  */
11028 char SSLeay_add_ssl_algorithms();
11029
11030 int main() {
11031 SSLeay_add_ssl_algorithms()
11032 ; return 0; }
11033 EOF
11034 if { (eval echo configure:11035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11035   rm -rf conftest*
11036   eval "ac_cv_lib_$ac_lib_var=yes"
11037 else
11038   echo "configure: failed program was:" >&5
11039   cat conftest.$ac_ext >&5
11040   rm -rf conftest*
11041   eval "ac_cv_lib_$ac_lib_var=no"
11042 fi
11043 rm -f conftest*
11044 LIBS="$ac_save_LIBS"
11045
11046 fi
11047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11048   echo "$ac_t""yes" 1>&6
11049   have_ssleay=yes
11050                         need_rsaref=no
11051 else
11052   echo "$ac_t""no" 1>&6
11053 have_ssleay=no
11054 fi
11055
11056                         
11057                 if test $have_ssleay = no ; then
11058                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11059 echo "configure:11060: checking for SSL_library_init in -lssl" >&5
11060 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11062   echo $ac_n "(cached) $ac_c" 1>&6
11063 else
11064   ac_save_LIBS="$LIBS"
11065 LIBS="-lssl -lcrypto $LIBS"
11066 cat > conftest.$ac_ext <<EOF
11067 #line 11068 "configure"
11068 #include "confdefs.h"
11069 /* Override any gcc2 internal prototype to avoid an error.  */
11070 /* We use char because int might match the return type of a gcc2
11071     builtin and then its argument prototype would still apply.  */
11072 char SSL_library_init();
11073
11074 int main() {
11075 SSL_library_init()
11076 ; return 0; }
11077 EOF
11078 if { (eval echo configure:11079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11079   rm -rf conftest*
11080   eval "ac_cv_lib_$ac_lib_var=yes"
11081 else
11082   echo "configure: failed program was:" >&5
11083   cat conftest.$ac_ext >&5
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=no"
11086 fi
11087 rm -f conftest*
11088 LIBS="$ac_save_LIBS"
11089
11090 fi
11091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093   have_ssleay=yes
11094                                 need_rsaref=no
11095 else
11096   echo "$ac_t""no" 1>&6
11097 have_ssleay=no
11098 fi
11099
11100                 fi
11101
11102                 if test $have_ssleay = no ; then
11103                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11104 echo "configure:11105: checking for ssl3_accept in -lssl" >&5
11105 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   ac_save_LIBS="$LIBS"
11110 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11111 cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char ssl3_accept();
11118
11119 int main() {
11120 ssl3_accept()
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=no"
11131 fi
11132 rm -f conftest*
11133 LIBS="$ac_save_LIBS"
11134
11135 fi
11136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   have_ssleay=yes
11139                                 need_rsaref=yes
11140 else
11141   echo "$ac_t""no" 1>&6
11142 have_ssleay=no
11143 fi
11144
11145                 fi
11146
11147                 if test $have_ssleay = yes ; then
11148                         ol_with_tls=found
11149                         ol_link_tls=yes
11150
11151                         cat >> confdefs.h <<\EOF
11152 #define HAVE_SSLEAY 1
11153 EOF
11154
11155
11156                         if test $need_rsaref = yes; then
11157                                 cat >> confdefs.h <<\EOF
11158 #define HAVE_RSAREF 1
11159 EOF
11160
11161
11162                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11163                         else
11164                                 TLS_LIBS="-lssl -lcrypto"
11165                         fi
11166                 fi
11167         fi
11168
11169 else
11170         echo "configure: warning: TLS data protection not supported!" 1>&2
11171 fi
11172
11173 if test $ol_link_tls = yes ; then
11174         cat >> confdefs.h <<\EOF
11175 #define HAVE_TLS 1
11176 EOF
11177
11178
11179 elif test $ol_with_tls = auto ; then
11180         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11181         echo "configure: warning: TLS data protection not supported!" 1>&2
11182
11183 elif test $ol_with_tls != no ; then
11184         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11185 fi
11186
11187 if test $ol_enable_lmpasswd != no; then
11188         if test $ol_link_tls != yes ; then
11189                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11190         fi
11191
11192         cat >> confdefs.h <<\EOF
11193 #define SLAPD_LMHASH 1
11194 EOF
11195
11196 fi
11197
11198 for ac_func in \
11199         ctime_r                 \
11200         gethostbyname_r gethostbyaddr_r \
11201
11202 do
11203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11204 echo "configure:11205: checking for $ac_func" >&5
11205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   cat > conftest.$ac_ext <<EOF
11209 #line 11210 "configure"
11210 #include "confdefs.h"
11211 /* System header to define __stub macros and hopefully few prototypes,
11212     which can conflict with char $ac_func(); below.  */
11213 #include <assert.h>
11214 /* Override any gcc2 internal prototype to avoid an error.  */
11215 /* We use char because int might match the return type of a gcc2
11216     builtin and then its argument prototype would still apply.  */
11217 char $ac_func();
11218 char (*f)();
11219
11220 int main() {
11221
11222 /* The GNU C library defines this for functions which it implements
11223     to always fail with ENOSYS.  Some functions are actually named
11224     something starting with __ and the normal name is an alias.  */
11225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11226 choke me
11227 #else
11228 f = $ac_func;
11229 #endif
11230
11231 ; return 0; }
11232 EOF
11233 if { (eval echo configure:11234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11234   rm -rf conftest*
11235   eval "ac_cv_func_$ac_func=yes"
11236 else
11237   echo "configure: failed program was:" >&5
11238   cat conftest.$ac_ext >&5
11239   rm -rf conftest*
11240   eval "ac_cv_func_$ac_func=no"
11241 fi
11242 rm -f conftest*
11243 fi
11244
11245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11246   echo "$ac_t""yes" 1>&6
11247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11248   cat >> confdefs.h <<EOF
11249 #define $ac_tr_func 1
11250 EOF
11251  
11252 else
11253   echo "$ac_t""no" 1>&6
11254 fi
11255 done
11256
11257
11258 if test "$ac_cv_func_ctime_r" = no ; then
11259         ol_cv_func_ctime_r_nargs=0
11260 else
11261         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11262 echo "configure:11263: checking number of arguments of ctime_r" >&5
11263 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 #include <time.h>
11270 int main() {
11271 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11272 ; return 0; }
11273 EOF
11274 if { (eval echo configure:11275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11275   rm -rf conftest*
11276   ol_cv_func_ctime_r_nargs3=yes
11277 else
11278   echo "configure: failed program was:" >&5
11279   cat conftest.$ac_ext >&5
11280   rm -rf conftest*
11281   ol_cv_func_ctime_r_nargs3=no
11282 fi
11283 rm -f conftest*
11284
11285         cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 #include <time.h>
11289 int main() {
11290 time_t ti; char *buffer; ctime_r(&ti,buffer);
11291 ; return 0; }
11292 EOF
11293 if { (eval echo configure:11294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11294   rm -rf conftest*
11295   ol_cv_func_ctime_r_nargs2=yes
11296 else
11297   echo "configure: failed program was:" >&5
11298   cat conftest.$ac_ext >&5
11299   rm -rf conftest*
11300   ol_cv_func_ctime_r_nargs2=no
11301 fi
11302 rm -f conftest*
11303
11304         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11305                 $ol_cv_func_ctime_r_nargs2 = no ; then
11306
11307                 ol_cv_func_ctime_r_nargs=3
11308
11309         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11310                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11311
11312                 ol_cv_func_ctime_r_nargs=2
11313
11314         else
11315                 ol_cv_func_ctime_r_nargs=0
11316         fi
11317   
11318 fi
11319
11320 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11321
11322   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11323         cat >> confdefs.h <<EOF
11324 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11325 EOF
11326
11327   fi
11328
11329 fi
11330
11331 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11332         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11333 echo "configure:11334: checking number of arguments of gethostbyname_r" >&5
11334 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11335   echo $ac_n "(cached) $ac_c" 1>&6
11336 else
11337   cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340 #include <sys/types.h>
11341 #include <sys/socket.h>
11342 #include <netinet/in.h>
11343 #include <netdb.h>
11344 #define BUFSIZE (sizeof(struct hostent)+10)
11345 int main() {
11346 struct hostent hent; char buffer[BUFSIZE];
11347                 int bufsize=BUFSIZE;int h_errno;
11348                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11349                         buffer, bufsize, &h_errno);
11350 ; return 0; }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11353   rm -rf conftest*
11354   ol_cv_func_gethostbyname_r_nargs5=yes
11355 else
11356   echo "configure: failed program was:" >&5
11357   cat conftest.$ac_ext >&5
11358   rm -rf conftest*
11359   ol_cv_func_gethostbyname_r_nargs5=no
11360 fi
11361 rm -f conftest*
11362
11363         cat > conftest.$ac_ext <<EOF
11364 #line 11365 "configure"
11365 #include "confdefs.h"
11366 #include <sys/types.h>
11367 #include <sys/socket.h>
11368 #include <netinet/in.h>
11369 #include <netdb.h>
11370 #define BUFSIZE (sizeof(struct hostent)+10)
11371 int main() {
11372 struct hostent hent;struct hostent *rhent;
11373                 char buffer[BUFSIZE];
11374                 int bufsize=BUFSIZE;int h_errno;
11375                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11376                         &rhent, &h_errno);
11377 ; return 0; }
11378 EOF
11379 if { (eval echo configure:11380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11380   rm -rf conftest*
11381   ol_cv_func_gethostbyname_r_nargs6=yes
11382 else
11383   echo "configure: failed program was:" >&5
11384   cat conftest.$ac_ext >&5
11385   rm -rf conftest*
11386   ol_cv_func_gethostbyname_r_nargs6=no
11387 fi
11388 rm -f conftest*
11389
11390         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11391                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11392
11393                 ol_cv_func_gethostbyname_r_nargs=5
11394
11395         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11396                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11397
11398                 ol_cv_func_gethostbyname_r_nargs=6
11399
11400         else
11401                 ol_cv_func_gethostbyname_r_nargs=0
11402         fi
11403   
11404 fi
11405
11406 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11407   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11408         cat >> confdefs.h <<EOF
11409 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11410 EOF
11411
11412   fi
11413
11414 else
11415         ol_cv_func_gethostbyname_r_nargs=0
11416 fi
11417  
11418 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11419         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11420 echo "configure:11421: checking number of arguments of gethostbyaddr_r" >&5
11421 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11422   echo $ac_n "(cached) $ac_c" 1>&6
11423 else
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; char buffer[BUFSIZE]; 
11434             struct in_addr add;
11435             size_t alen=sizeof(struct in_addr);
11436             int bufsize=BUFSIZE;int h_errno;
11437                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11438                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11439 ; return 0; }
11440 EOF
11441 if { (eval echo configure:11442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11442   rm -rf conftest*
11443   ol_cv_func_gethostbyaddr_r_nargs7=yes
11444 else
11445   echo "configure: failed program was:" >&5
11446   cat conftest.$ac_ext >&5
11447   rm -rf conftest*
11448   ol_cv_func_gethostbyaddr_r_nargs7=no
11449 fi
11450 rm -f conftest*
11451
11452         cat > conftest.$ac_ext <<EOF
11453 #line 11454 "configure"
11454 #include "confdefs.h"
11455 #include <sys/types.h>
11456 #include <sys/socket.h>
11457 #include <netinet/in.h>
11458 #include <netdb.h>
11459 #define BUFSIZE (sizeof(struct hostent)+10)
11460 int main() {
11461 struct hostent hent;
11462                 struct hostent *rhent; char buffer[BUFSIZE]; 
11463                 struct in_addr add;
11464                 size_t alen=sizeof(struct in_addr);
11465                 int bufsize=BUFSIZE;int h_errno;
11466                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11467                         alen, AF_INET, &hent, buffer, bufsize, 
11468                         &rhent, &h_errno);
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11472   rm -rf conftest*
11473   ol_cv_func_gethostbyaddr_r_nargs8=yes
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   ol_cv_func_gethostbyaddr_r_nargs8=no
11479 fi
11480 rm -f conftest*
11481
11482         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11483                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11484
11485                 ol_cv_func_gethostbyaddr_r_nargs=7
11486
11487         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11488                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11489
11490                 ol_cv_func_gethostbyaddr_r_nargs=8
11491
11492         else
11493                 ol_cv_func_gethostbyaddr_r_nargs=0
11494         fi
11495   
11496 fi
11497
11498 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11499   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11500     cat >> confdefs.h <<EOF
11501 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11502 EOF
11503
11504   fi
11505
11506 else
11507         ol_cv_func_gethostbyaddr_r_nargs=0
11508 fi
11509
11510 if test "$ac_cv_func_ctime_r" = yes \
11511         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11512         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11513         -a "$ac_cv_func_gethostbyname_r" = yes \
11514         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11515         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11516         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11517         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11518         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11519         ; then
11520  
11521         cat >> confdefs.h <<\EOF
11522 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11523 EOF
11524
11525 fi
11526
11527 ol_link_threads=no
11528
11529 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11530         -o $ol_with_threads = nt ; then
11531
11532         
11533         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11534 echo "configure:11535: checking for _beginthread" >&5
11535 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11536   echo $ac_n "(cached) $ac_c" 1>&6
11537 else
11538   cat > conftest.$ac_ext <<EOF
11539 #line 11540 "configure"
11540 #include "confdefs.h"
11541 /* System header to define __stub macros and hopefully few prototypes,
11542     which can conflict with char _beginthread(); below.  */
11543 #include <assert.h>
11544 /* Override any gcc2 internal prototype to avoid an error.  */
11545 /* We use char because int might match the return type of a gcc2
11546     builtin and then its argument prototype would still apply.  */
11547 char _beginthread();
11548 char (*f)();
11549
11550 int main() {
11551
11552 /* The GNU C library defines this for functions which it implements
11553     to always fail with ENOSYS.  Some functions are actually named
11554     something starting with __ and the normal name is an alias.  */
11555 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11556 choke me
11557 #else
11558 f = _beginthread;
11559 #endif
11560
11561 ; return 0; }
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11564   rm -rf conftest*
11565   eval "ac_cv_func__beginthread=yes"
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   eval "ac_cv_func__beginthread=no"
11571 fi
11572 rm -f conftest*
11573 fi
11574
11575 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11576   echo "$ac_t""yes" 1>&6
11577   :
11578 else
11579   echo "$ac_t""no" 1>&6
11580 fi
11581
11582
11583         if test $ac_cv_func__beginthread = yes ; then
11584                 cat >> confdefs.h <<\EOF
11585 #define HAVE_NT_THREADS 1
11586 EOF
11587
11588                 ol_cv_nt_threads=yes
11589         fi
11590
11591
11592         if test "$ol_cv_nt_threads" = yes ; then
11593                 ol_link_threads=nt
11594                 ol_with_threads=found
11595                 ol_with_yielding_select=yes
11596
11597                 cat >> confdefs.h <<\EOF
11598 #define HAVE_NT_SERVICE_MANAGER 1
11599 EOF
11600
11601                 cat >> confdefs.h <<\EOF
11602 #define HAVE_NT_EVENT_LOG 1
11603 EOF
11604
11605         fi
11606
11607         if test $ol_with_threads = nt ; then
11608                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11609         fi
11610 fi
11611
11612 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11613         -o $ol_with_threads = posix ; then
11614
11615         for ac_hdr in pthread.h
11616 do
11617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11619 echo "configure:11620: checking for $ac_hdr" >&5
11620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11621   echo $ac_n "(cached) $ac_c" 1>&6
11622 else
11623   cat > conftest.$ac_ext <<EOF
11624 #line 11625 "configure"
11625 #include "confdefs.h"
11626 #include <$ac_hdr>
11627 EOF
11628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11629 { (eval echo configure:11630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11631 if test -z "$ac_err"; then
11632   rm -rf conftest*
11633   eval "ac_cv_header_$ac_safe=yes"
11634 else
11635   echo "$ac_err" >&5
11636   echo "configure: failed program was:" >&5
11637   cat conftest.$ac_ext >&5
11638   rm -rf conftest*
11639   eval "ac_cv_header_$ac_safe=no"
11640 fi
11641 rm -f conftest*
11642 fi
11643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11644   echo "$ac_t""yes" 1>&6
11645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11646   cat >> confdefs.h <<EOF
11647 #define $ac_tr_hdr 1
11648 EOF
11649  
11650 else
11651   echo "$ac_t""no" 1>&6
11652 fi
11653 done
11654
11655
11656         if test $ac_cv_header_pthread_h = yes ; then
11657                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11658 echo "configure:11659: checking POSIX thread version" >&5
11659 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11660   echo $ac_n "(cached) $ac_c" 1>&6
11661 else
11662   
11663         cat > conftest.$ac_ext <<EOF
11664 #line 11665 "configure"
11665 #include "confdefs.h"
11666
11667 #               include <pthread.h>
11668                 /* this check could be improved */
11669 #               ifdef PTHREAD_ONCE_INIT
11670                         pthread_version_final;
11671 #               endif
11672         
11673 EOF
11674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11675   egrep "pthread_version_final" >/dev/null 2>&1; then
11676   rm -rf conftest*
11677   ol_pthread_final=yes
11678 else
11679   rm -rf conftest*
11680   ol_pthread_final=no
11681 fi
11682 rm -f conftest*
11683
11684
11685         cat > conftest.$ac_ext <<EOF
11686 #line 11687 "configure"
11687 #include "confdefs.h"
11688
11689 #               include <pthread.h>
11690                 /* this check could be improved */
11691 #               ifdef pthread_once_init
11692                         pthread_version_draft4;
11693 #               endif
11694         
11695 EOF
11696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11697   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11698   rm -rf conftest*
11699   ol_pthread_draft4=yes
11700 else
11701   rm -rf conftest*
11702   ol_pthread_draft4=no
11703 fi
11704 rm -f conftest*
11705
11706
11707         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11708                 ol_cv_pthread_version=final
11709         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11710                 ol_cv_pthread_version=draft4
11711         else
11712                 ol_cv_pthread_version=unknown
11713         fi
11714
11715 fi
11716
11717 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11718
11719
11720                 if test $ol_cv_pthread_version = final ; then
11721                         cat >> confdefs.h <<\EOF
11722 #define HAVE_PTHREADS_FINAL 1
11723 EOF
11724
11725                 elif test $ol_cv_pthread_version = draft4 ; then
11726                         cat >> confdefs.h <<\EOF
11727 #define HAVE_PTHREADS_D4 1
11728 EOF
11729
11730                 else
11731                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11732                 fi
11733
11734                 # consider threads found
11735                 ol_with_threads=found
11736
11737                 
11738         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11739 echo "configure:11740: checking for LinuxThreads pthread.h" >&5
11740 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11741   echo $ac_n "(cached) $ac_c" 1>&6
11742 else
11743   cat > conftest.$ac_ext <<EOF
11744 #line 11745 "configure"
11745 #include "confdefs.h"
11746 #include <pthread.h>
11747 EOF
11748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11749   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11750   rm -rf conftest*
11751   ol_cv_header_linux_threads=yes
11752 else
11753   rm -rf conftest*
11754   ol_cv_header_linux_threads=no
11755 fi
11756 rm -f conftest*
11757
11758                 
11759 fi
11760
11761 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11762         if test $ol_cv_header_linux_threads = yes; then
11763                 cat >> confdefs.h <<\EOF
11764 #define HAVE_LINUX_THREADS 1
11765 EOF
11766
11767         fi
11768
11769                 
11770         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11771 echo "configure:11772: checking for GNU Pth pthread.h" >&5
11772 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11773   echo $ac_n "(cached) $ac_c" 1>&6
11774 else
11775   cat > conftest.$ac_ext <<EOF
11776 #line 11777 "configure"
11777 #include "confdefs.h"
11778 #include <pthread.h>
11779 #ifdef _POSIX_THREAD_IS_GNU_PTH
11780         __gnu_pth__;
11781 #endif
11782
11783 EOF
11784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11785   egrep "__gnu_pth__" >/dev/null 2>&1; then
11786   rm -rf conftest*
11787   ol_cv_header_gnu_pth_pthread_h=yes
11788 else
11789   rm -rf conftest*
11790   ol_cv_header_gnu_pth_pthread_h=no
11791 fi
11792 rm -f conftest*
11793
11794                 
11795 fi
11796
11797 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11798
11799
11800                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11801                         for ac_hdr in sched.h
11802 do
11803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11805 echo "configure:11806: checking for $ac_hdr" >&5
11806 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11807   echo $ac_n "(cached) $ac_c" 1>&6
11808 else
11809   cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <$ac_hdr>
11813 EOF
11814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11815 { (eval echo configure:11816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11817 if test -z "$ac_err"; then
11818   rm -rf conftest*
11819   eval "ac_cv_header_$ac_safe=yes"
11820 else
11821   echo "$ac_err" >&5
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   eval "ac_cv_header_$ac_safe=no"
11826 fi
11827 rm -f conftest*
11828 fi
11829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11830   echo "$ac_t""yes" 1>&6
11831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11832   cat >> confdefs.h <<EOF
11833 #define $ac_tr_hdr 1
11834 EOF
11835  
11836 else
11837   echo "$ac_t""no" 1>&6
11838 fi
11839 done
11840
11841                 fi
11842
11843                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11844                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11845 echo "configure:11846: checking for pthread_create in default libraries" >&5
11846 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11847   echo $ac_n "(cached) $ac_c" 1>&6
11848 else
11849   
11850                 if test "$cross_compiling" = yes; then
11851   cat > conftest.$ac_ext <<EOF
11852 #line 11853 "configure"
11853 #include "confdefs.h"
11854 /* pthread test headers */
11855 #include <pthread.h>
11856 #ifndef NULL
11857 #define NULL (void*)0
11858 #endif
11859
11860 static void *task(p)
11861         void *p;
11862 {
11863         return (void *) (p == NULL);
11864 }
11865
11866 int main() {
11867
11868         /* pthread test function */
11869         pthread_t t;
11870         int status;
11871         int detach = 1;
11872
11873 #ifdef HAVE_PTHREADS_FINAL
11874         /* Final pthreads */
11875         pthread_attr_t attr;
11876
11877         status = pthread_attr_init(&attr);
11878         if( status ) return status;
11879
11880 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11881         if( !detach ) {
11882 #if defined( PTHREAD_CREATE_JOINABLE )
11883                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11884 #else
11885                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11886 #endif
11887
11888 #ifdef PTHREAD_CREATE_DETACHED
11889         } else {
11890                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11891 #endif
11892         }
11893         if( status ) return status;
11894 #endif
11895
11896         status = pthread_create( &t, &attr, task, NULL );
11897         if( status ) return status;
11898
11899 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11900         if( detach ) {
11901                 /* give thread a chance to complete */
11902                 /* it should remain joinable and hence detachable */
11903                 sleep( 1 );
11904
11905                 status = pthread_detach( t );
11906                 if( status ) return status;
11907         }
11908 #endif
11909
11910 #else
11911         /* Draft 4 pthreads */
11912         status = pthread_create( &t, pthread_attr_default, task, NULL );
11913         if( status ) return status;
11914
11915         if( detach ) {
11916                 /* give thread a chance to complete */
11917                 /* it should remain joinable and hence detachable */
11918                 sleep( 1 );
11919
11920                 status = pthread_detach( &t );
11921                 if( status ) return status;
11922         }
11923 #endif
11924
11925 #ifdef HAVE_LINUX_THREADS
11926         pthread_kill_other_threads_np();
11927 #endif
11928
11929         return 0;
11930
11931 ; return 0; }
11932 EOF
11933 if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11934   rm -rf conftest*
11935   ol_cv_pthread_create=yes
11936 else
11937   echo "configure: failed program was:" >&5
11938   cat conftest.$ac_ext >&5
11939   rm -rf conftest*
11940   ol_cv_pthread_create=no
11941 fi
11942 rm -f conftest*
11943 else
11944   cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 /* pthread test headers */
11948 #include <pthread.h>
11949 #ifndef NULL
11950 #define NULL (void*)0
11951 #endif
11952
11953 static void *task(p)
11954         void *p;
11955 {
11956         return (void *) (p == NULL);
11957 }
11958
11959
11960 int main(argc, argv)
11961         int argc;
11962         char **argv;
11963 {
11964
11965         /* pthread test function */
11966         pthread_t t;
11967         int status;
11968         int detach = 1;
11969
11970 #ifdef HAVE_PTHREADS_FINAL
11971         /* Final pthreads */
11972         pthread_attr_t attr;
11973
11974         status = pthread_attr_init(&attr);
11975         if( status ) return status;
11976
11977 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11978         if( !detach ) {
11979 #if defined( PTHREAD_CREATE_JOINABLE )
11980                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11981 #else
11982                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11983 #endif
11984
11985 #ifdef PTHREAD_CREATE_DETACHED
11986         } else {
11987                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11988 #endif
11989         }
11990         if( status ) return status;
11991 #endif
11992
11993         status = pthread_create( &t, &attr, task, NULL );
11994         if( status ) return status;
11995
11996 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11997         if( detach ) {
11998                 /* give thread a chance to complete */
11999                 /* it should remain joinable and hence detachable */
12000                 sleep( 1 );
12001
12002                 status = pthread_detach( t );
12003                 if( status ) return status;
12004         }
12005 #endif
12006
12007 #else
12008         /* Draft 4 pthreads */
12009         status = pthread_create( &t, pthread_attr_default, task, NULL );
12010         if( status ) return status;
12011
12012         if( detach ) {
12013                 /* give thread a chance to complete */
12014                 /* it should remain joinable and hence detachable */
12015                 sleep( 1 );
12016
12017                 status = pthread_detach( &t );
12018                 if( status ) return status;
12019         }
12020 #endif
12021
12022 #ifdef HAVE_LINUX_THREADS
12023         pthread_kill_other_threads_np();
12024 #endif
12025
12026         return 0;
12027
12028 }
12029
12030 EOF
12031 if { (eval echo configure:12032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12032 then
12033   ol_cv_pthread_create=yes
12034 else
12035   echo "configure: failed program was:" >&5
12036   cat conftest.$ac_ext >&5
12037   rm -fr conftest*
12038   ol_cv_pthread_create=no
12039 fi
12040 rm -fr conftest*
12041 fi
12042
12043 fi
12044
12045 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12046
12047                 if test $ol_cv_pthread_create != no ; then
12048                         ol_link_threads=posix
12049                         ol_link_pthreads=""
12050                 fi
12051                 
12052                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12053 if test "$ol_link_threads" = no ; then
12054         # try -kthread
12055         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12056 echo "configure:12057: checking for pthread link with -kthread" >&5
12057 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12058   echo $ac_n "(cached) $ac_c" 1>&6
12059 else
12060   
12061                 # save the flags
12062                 ol_LIBS="$LIBS"
12063                 LIBS="-kthread $LIBS"
12064
12065                 if test "$cross_compiling" = yes; then
12066   cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069 /* pthread test headers */
12070 #include <pthread.h>
12071 #ifndef NULL
12072 #define NULL (void*)0
12073 #endif
12074
12075 static void *task(p)
12076         void *p;
12077 {
12078         return (void *) (p == NULL);
12079 }
12080
12081 int main() {
12082
12083         /* pthread test function */
12084         pthread_t t;
12085         int status;
12086         int detach = 1;
12087
12088 #ifdef HAVE_PTHREADS_FINAL
12089         /* Final pthreads */
12090         pthread_attr_t attr;
12091
12092         status = pthread_attr_init(&attr);
12093         if( status ) return status;
12094
12095 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12096         if( !detach ) {
12097 #if defined( PTHREAD_CREATE_JOINABLE )
12098                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12099 #else
12100                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12101 #endif
12102
12103 #ifdef PTHREAD_CREATE_DETACHED
12104         } else {
12105                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12106 #endif
12107         }
12108         if( status ) return status;
12109 #endif
12110
12111         status = pthread_create( &t, &attr, task, NULL );
12112         if( status ) return status;
12113
12114 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12115         if( detach ) {
12116                 /* give thread a chance to complete */
12117                 /* it should remain joinable and hence detachable */
12118                 sleep( 1 );
12119
12120                 status = pthread_detach( t );
12121                 if( status ) return status;
12122         }
12123 #endif
12124
12125 #else
12126         /* Draft 4 pthreads */
12127         status = pthread_create( &t, pthread_attr_default, task, NULL );
12128         if( status ) return status;
12129
12130         if( detach ) {
12131                 /* give thread a chance to complete */
12132                 /* it should remain joinable and hence detachable */
12133                 sleep( 1 );
12134
12135                 status = pthread_detach( &t );
12136                 if( status ) return status;
12137         }
12138 #endif
12139
12140 #ifdef HAVE_LINUX_THREADS
12141         pthread_kill_other_threads_np();
12142 #endif
12143
12144         return 0;
12145
12146 ; return 0; }
12147 EOF
12148 if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12149   rm -rf conftest*
12150   ol_cv_pthread_kthread=yes
12151 else
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -rf conftest*
12155   ol_cv_pthread_kthread=no
12156 fi
12157 rm -f conftest*
12158 else
12159   cat > conftest.$ac_ext <<EOF
12160 #line 12161 "configure"
12161 #include "confdefs.h"
12162 /* pthread test headers */
12163 #include <pthread.h>
12164 #ifndef NULL
12165 #define NULL (void*)0
12166 #endif
12167
12168 static void *task(p)
12169         void *p;
12170 {
12171         return (void *) (p == NULL);
12172 }
12173
12174
12175 int main(argc, argv)
12176         int argc;
12177         char **argv;
12178 {
12179
12180         /* pthread test function */
12181         pthread_t t;
12182         int status;
12183         int detach = 1;
12184
12185 #ifdef HAVE_PTHREADS_FINAL
12186         /* Final pthreads */
12187         pthread_attr_t attr;
12188
12189         status = pthread_attr_init(&attr);
12190         if( status ) return status;
12191
12192 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12193         if( !detach ) {
12194 #if defined( PTHREAD_CREATE_JOINABLE )
12195                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12196 #else
12197                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12198 #endif
12199
12200 #ifdef PTHREAD_CREATE_DETACHED
12201         } else {
12202                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12203 #endif
12204         }
12205         if( status ) return status;
12206 #endif
12207
12208         status = pthread_create( &t, &attr, task, NULL );
12209         if( status ) return status;
12210
12211 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12212         if( detach ) {
12213                 /* give thread a chance to complete */
12214                 /* it should remain joinable and hence detachable */
12215                 sleep( 1 );
12216
12217                 status = pthread_detach( t );
12218                 if( status ) return status;
12219         }
12220 #endif
12221
12222 #else
12223         /* Draft 4 pthreads */
12224         status = pthread_create( &t, pthread_attr_default, task, NULL );
12225         if( status ) return status;
12226
12227         if( detach ) {
12228                 /* give thread a chance to complete */
12229                 /* it should remain joinable and hence detachable */
12230                 sleep( 1 );
12231
12232                 status = pthread_detach( &t );
12233                 if( status ) return status;
12234         }
12235 #endif
12236
12237 #ifdef HAVE_LINUX_THREADS
12238         pthread_kill_other_threads_np();
12239 #endif
12240
12241         return 0;
12242
12243 }
12244
12245 EOF
12246 if { (eval echo configure:12247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12247 then
12248   ol_cv_pthread_kthread=yes
12249 else
12250   echo "configure: failed program was:" >&5
12251   cat conftest.$ac_ext >&5
12252   rm -fr conftest*
12253   ol_cv_pthread_kthread=no
12254 fi
12255 rm -fr conftest*
12256 fi
12257
12258
12259                 # restore the LIBS
12260                 LIBS="$ol_LIBS"
12261         
12262 fi
12263
12264 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12265
12266         if test $ol_cv_pthread_kthread = yes ; then
12267                 ol_link_pthreads="-kthread"
12268                 ol_link_threads=posix
12269         fi
12270 fi
12271
12272                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12273 if test "$ol_link_threads" = no ; then
12274         # try -pthread
12275         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12276 echo "configure:12277: checking for pthread link with -pthread" >&5
12277 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12278   echo $ac_n "(cached) $ac_c" 1>&6
12279 else
12280   
12281                 # save the flags
12282                 ol_LIBS="$LIBS"
12283                 LIBS="-pthread $LIBS"
12284
12285                 if test "$cross_compiling" = yes; then
12286   cat > conftest.$ac_ext <<EOF
12287 #line 12288 "configure"
12288 #include "confdefs.h"
12289 /* pthread test headers */
12290 #include <pthread.h>
12291 #ifndef NULL
12292 #define NULL (void*)0
12293 #endif
12294
12295 static void *task(p)
12296         void *p;
12297 {
12298         return (void *) (p == NULL);
12299 }
12300
12301 int main() {
12302
12303         /* pthread test function */
12304         pthread_t t;
12305         int status;
12306         int detach = 1;
12307
12308 #ifdef HAVE_PTHREADS_FINAL
12309         /* Final pthreads */
12310         pthread_attr_t attr;
12311
12312         status = pthread_attr_init(&attr);
12313         if( status ) return status;
12314
12315 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12316         if( !detach ) {
12317 #if defined( PTHREAD_CREATE_JOINABLE )
12318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12319 #else
12320                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12321 #endif
12322
12323 #ifdef PTHREAD_CREATE_DETACHED
12324         } else {
12325                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12326 #endif
12327         }
12328         if( status ) return status;
12329 #endif
12330
12331         status = pthread_create( &t, &attr, task, NULL );
12332         if( status ) return status;
12333
12334 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12335         if( detach ) {
12336                 /* give thread a chance to complete */
12337                 /* it should remain joinable and hence detachable */
12338                 sleep( 1 );
12339
12340                 status = pthread_detach( t );
12341                 if( status ) return status;
12342         }
12343 #endif
12344
12345 #else
12346         /* Draft 4 pthreads */
12347         status = pthread_create( &t, pthread_attr_default, task, NULL );
12348         if( status ) return status;
12349
12350         if( detach ) {
12351                 /* give thread a chance to complete */
12352                 /* it should remain joinable and hence detachable */
12353                 sleep( 1 );
12354
12355                 status = pthread_detach( &t );
12356                 if( status ) return status;
12357         }
12358 #endif
12359
12360 #ifdef HAVE_LINUX_THREADS
12361         pthread_kill_other_threads_np();
12362 #endif
12363
12364         return 0;
12365
12366 ; return 0; }
12367 EOF
12368 if { (eval echo configure:12369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12369   rm -rf conftest*
12370   ol_cv_pthread_pthread=yes
12371 else
12372   echo "configure: failed program was:" >&5
12373   cat conftest.$ac_ext >&5
12374   rm -rf conftest*
12375   ol_cv_pthread_pthread=no
12376 fi
12377 rm -f conftest*
12378 else
12379   cat > conftest.$ac_ext <<EOF
12380 #line 12381 "configure"
12381 #include "confdefs.h"
12382 /* pthread test headers */
12383 #include <pthread.h>
12384 #ifndef NULL
12385 #define NULL (void*)0
12386 #endif
12387
12388 static void *task(p)
12389         void *p;
12390 {
12391         return (void *) (p == NULL);
12392 }
12393
12394
12395 int main(argc, argv)
12396         int argc;
12397         char **argv;
12398 {
12399
12400         /* pthread test function */
12401         pthread_t t;
12402         int status;
12403         int detach = 1;
12404
12405 #ifdef HAVE_PTHREADS_FINAL
12406         /* Final pthreads */
12407         pthread_attr_t attr;
12408
12409         status = pthread_attr_init(&attr);
12410         if( status ) return status;
12411
12412 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12413         if( !detach ) {
12414 #if defined( PTHREAD_CREATE_JOINABLE )
12415                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12416 #else
12417                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12418 #endif
12419
12420 #ifdef PTHREAD_CREATE_DETACHED
12421         } else {
12422                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12423 #endif
12424         }
12425         if( status ) return status;
12426 #endif
12427
12428         status = pthread_create( &t, &attr, task, NULL );
12429         if( status ) return status;
12430
12431 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12432         if( detach ) {
12433                 /* give thread a chance to complete */
12434                 /* it should remain joinable and hence detachable */
12435                 sleep( 1 );
12436
12437                 status = pthread_detach( t );
12438                 if( status ) return status;
12439         }
12440 #endif
12441
12442 #else
12443         /* Draft 4 pthreads */
12444         status = pthread_create( &t, pthread_attr_default, task, NULL );
12445         if( status ) return status;
12446
12447         if( detach ) {
12448                 /* give thread a chance to complete */
12449                 /* it should remain joinable and hence detachable */
12450                 sleep( 1 );
12451
12452                 status = pthread_detach( &t );
12453                 if( status ) return status;
12454         }
12455 #endif
12456
12457 #ifdef HAVE_LINUX_THREADS
12458         pthread_kill_other_threads_np();
12459 #endif
12460
12461         return 0;
12462
12463 }
12464
12465 EOF
12466 if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12467 then
12468   ol_cv_pthread_pthread=yes
12469 else
12470   echo "configure: failed program was:" >&5
12471   cat conftest.$ac_ext >&5
12472   rm -fr conftest*
12473   ol_cv_pthread_pthread=no
12474 fi
12475 rm -fr conftest*
12476 fi
12477
12478
12479                 # restore the LIBS
12480                 LIBS="$ol_LIBS"
12481         
12482 fi
12483
12484 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12485
12486         if test $ol_cv_pthread_pthread = yes ; then
12487                 ol_link_pthreads="-pthread"
12488                 ol_link_threads=posix
12489         fi
12490 fi
12491
12492                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12493 if test "$ol_link_threads" = no ; then
12494         # try -pthreads
12495         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12496 echo "configure:12497: checking for pthread link with -pthreads" >&5
12497 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12498   echo $ac_n "(cached) $ac_c" 1>&6
12499 else
12500   
12501                 # save the flags
12502                 ol_LIBS="$LIBS"
12503                 LIBS="-pthreads $LIBS"
12504
12505                 if test "$cross_compiling" = yes; then
12506   cat > conftest.$ac_ext <<EOF
12507 #line 12508 "configure"
12508 #include "confdefs.h"
12509 /* pthread test headers */
12510 #include <pthread.h>
12511 #ifndef NULL
12512 #define NULL (void*)0
12513 #endif
12514
12515 static void *task(p)
12516         void *p;
12517 {
12518         return (void *) (p == NULL);
12519 }
12520
12521 int main() {
12522
12523         /* pthread test function */
12524         pthread_t t;
12525         int status;
12526         int detach = 1;
12527
12528 #ifdef HAVE_PTHREADS_FINAL
12529         /* Final pthreads */
12530         pthread_attr_t attr;
12531
12532         status = pthread_attr_init(&attr);
12533         if( status ) return status;
12534
12535 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12536         if( !detach ) {
12537 #if defined( PTHREAD_CREATE_JOINABLE )
12538                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12539 #else
12540                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12541 #endif
12542
12543 #ifdef PTHREAD_CREATE_DETACHED
12544         } else {
12545                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12546 #endif
12547         }
12548         if( status ) return status;
12549 #endif
12550
12551         status = pthread_create( &t, &attr, task, NULL );
12552         if( status ) return status;
12553
12554 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12555         if( detach ) {
12556                 /* give thread a chance to complete */
12557                 /* it should remain joinable and hence detachable */
12558                 sleep( 1 );
12559
12560                 status = pthread_detach( t );
12561                 if( status ) return status;
12562         }
12563 #endif
12564
12565 #else
12566         /* Draft 4 pthreads */
12567         status = pthread_create( &t, pthread_attr_default, task, NULL );
12568         if( status ) return status;
12569
12570         if( detach ) {
12571                 /* give thread a chance to complete */
12572                 /* it should remain joinable and hence detachable */
12573                 sleep( 1 );
12574
12575                 status = pthread_detach( &t );
12576                 if( status ) return status;
12577         }
12578 #endif
12579
12580 #ifdef HAVE_LINUX_THREADS
12581         pthread_kill_other_threads_np();
12582 #endif
12583
12584         return 0;
12585
12586 ; return 0; }
12587 EOF
12588 if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12589   rm -rf conftest*
12590   ol_cv_pthread_pthreads=yes
12591 else
12592   echo "configure: failed program was:" >&5
12593   cat conftest.$ac_ext >&5
12594   rm -rf conftest*
12595   ol_cv_pthread_pthreads=no
12596 fi
12597 rm -f conftest*
12598 else
12599   cat > conftest.$ac_ext <<EOF
12600 #line 12601 "configure"
12601 #include "confdefs.h"
12602 /* pthread test headers */
12603 #include <pthread.h>
12604 #ifndef NULL
12605 #define NULL (void*)0
12606 #endif
12607
12608 static void *task(p)
12609         void *p;
12610 {
12611         return (void *) (p == NULL);
12612 }
12613
12614
12615 int main(argc, argv)
12616         int argc;
12617         char **argv;
12618 {
12619
12620         /* pthread test function */
12621         pthread_t t;
12622         int status;
12623         int detach = 1;
12624
12625 #ifdef HAVE_PTHREADS_FINAL
12626         /* Final pthreads */
12627         pthread_attr_t attr;
12628
12629         status = pthread_attr_init(&attr);
12630         if( status ) return status;
12631
12632 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12633         if( !detach ) {
12634 #if defined( PTHREAD_CREATE_JOINABLE )
12635                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12636 #else
12637                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12638 #endif
12639
12640 #ifdef PTHREAD_CREATE_DETACHED
12641         } else {
12642                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12643 #endif
12644         }
12645         if( status ) return status;
12646 #endif
12647
12648         status = pthread_create( &t, &attr, task, NULL );
12649         if( status ) return status;
12650
12651 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12652         if( detach ) {
12653                 /* give thread a chance to complete */
12654                 /* it should remain joinable and hence detachable */
12655                 sleep( 1 );
12656
12657                 status = pthread_detach( t );
12658                 if( status ) return status;
12659         }
12660 #endif
12661
12662 #else
12663         /* Draft 4 pthreads */
12664         status = pthread_create( &t, pthread_attr_default, task, NULL );
12665         if( status ) return status;
12666
12667         if( detach ) {
12668                 /* give thread a chance to complete */
12669                 /* it should remain joinable and hence detachable */
12670                 sleep( 1 );
12671
12672                 status = pthread_detach( &t );
12673                 if( status ) return status;
12674         }
12675 #endif
12676
12677 #ifdef HAVE_LINUX_THREADS
12678         pthread_kill_other_threads_np();
12679 #endif
12680
12681         return 0;
12682
12683 }
12684
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12687 then
12688   ol_cv_pthread_pthreads=yes
12689 else
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -fr conftest*
12693   ol_cv_pthread_pthreads=no
12694 fi
12695 rm -fr conftest*
12696 fi
12697
12698
12699                 # restore the LIBS
12700                 LIBS="$ol_LIBS"
12701         
12702 fi
12703
12704 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12705
12706         if test $ol_cv_pthread_pthreads = yes ; then
12707                 ol_link_pthreads="-pthreads"
12708                 ol_link_threads=posix
12709         fi
12710 fi
12711
12712                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12713 if test "$ol_link_threads" = no ; then
12714         # try -mthreads
12715         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12716 echo "configure:12717: checking for pthread link with -mthreads" >&5
12717 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12718   echo $ac_n "(cached) $ac_c" 1>&6
12719 else
12720   
12721                 # save the flags
12722                 ol_LIBS="$LIBS"
12723                 LIBS="-mthreads $LIBS"
12724
12725                 if test "$cross_compiling" = yes; then
12726   cat > conftest.$ac_ext <<EOF
12727 #line 12728 "configure"
12728 #include "confdefs.h"
12729 /* pthread test headers */
12730 #include <pthread.h>
12731 #ifndef NULL
12732 #define NULL (void*)0
12733 #endif
12734
12735 static void *task(p)
12736         void *p;
12737 {
12738         return (void *) (p == NULL);
12739 }
12740
12741 int main() {
12742
12743         /* pthread test function */
12744         pthread_t t;
12745         int status;
12746         int detach = 1;
12747
12748 #ifdef HAVE_PTHREADS_FINAL
12749         /* Final pthreads */
12750         pthread_attr_t attr;
12751
12752         status = pthread_attr_init(&attr);
12753         if( status ) return status;
12754
12755 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12756         if( !detach ) {
12757 #if defined( PTHREAD_CREATE_JOINABLE )
12758                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12759 #else
12760                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12761 #endif
12762
12763 #ifdef PTHREAD_CREATE_DETACHED
12764         } else {
12765                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12766 #endif
12767         }
12768         if( status ) return status;
12769 #endif
12770
12771         status = pthread_create( &t, &attr, task, NULL );
12772         if( status ) return status;
12773
12774 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12775         if( detach ) {
12776                 /* give thread a chance to complete */
12777                 /* it should remain joinable and hence detachable */
12778                 sleep( 1 );
12779
12780                 status = pthread_detach( t );
12781                 if( status ) return status;
12782         }
12783 #endif
12784
12785 #else
12786         /* Draft 4 pthreads */
12787         status = pthread_create( &t, pthread_attr_default, task, NULL );
12788         if( status ) return status;
12789
12790         if( detach ) {
12791                 /* give thread a chance to complete */
12792                 /* it should remain joinable and hence detachable */
12793                 sleep( 1 );
12794
12795                 status = pthread_detach( &t );
12796                 if( status ) return status;
12797         }
12798 #endif
12799
12800 #ifdef HAVE_LINUX_THREADS
12801         pthread_kill_other_threads_np();
12802 #endif
12803
12804         return 0;
12805
12806 ; return 0; }
12807 EOF
12808 if { (eval echo configure:12809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12809   rm -rf conftest*
12810   ol_cv_pthread_mthreads=yes
12811 else
12812   echo "configure: failed program was:" >&5
12813   cat conftest.$ac_ext >&5
12814   rm -rf conftest*
12815   ol_cv_pthread_mthreads=no
12816 fi
12817 rm -f conftest*
12818 else
12819   cat > conftest.$ac_ext <<EOF
12820 #line 12821 "configure"
12821 #include "confdefs.h"
12822 /* pthread test headers */
12823 #include <pthread.h>
12824 #ifndef NULL
12825 #define NULL (void*)0
12826 #endif
12827
12828 static void *task(p)
12829         void *p;
12830 {
12831         return (void *) (p == NULL);
12832 }
12833
12834
12835 int main(argc, argv)
12836         int argc;
12837         char **argv;
12838 {
12839
12840         /* pthread test function */
12841         pthread_t t;
12842         int status;
12843         int detach = 1;
12844
12845 #ifdef HAVE_PTHREADS_FINAL
12846         /* Final pthreads */
12847         pthread_attr_t attr;
12848
12849         status = pthread_attr_init(&attr);
12850         if( status ) return status;
12851
12852 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12853         if( !detach ) {
12854 #if defined( PTHREAD_CREATE_JOINABLE )
12855                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12856 #else
12857                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12858 #endif
12859
12860 #ifdef PTHREAD_CREATE_DETACHED
12861         } else {
12862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12863 #endif
12864         }
12865         if( status ) return status;
12866 #endif
12867
12868         status = pthread_create( &t, &attr, task, NULL );
12869         if( status ) return status;
12870
12871 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12872         if( detach ) {
12873                 /* give thread a chance to complete */
12874                 /* it should remain joinable and hence detachable */
12875                 sleep( 1 );
12876
12877                 status = pthread_detach( t );
12878                 if( status ) return status;
12879         }
12880 #endif
12881
12882 #else
12883         /* Draft 4 pthreads */
12884         status = pthread_create( &t, pthread_attr_default, task, NULL );
12885         if( status ) return status;
12886
12887         if( detach ) {
12888                 /* give thread a chance to complete */
12889                 /* it should remain joinable and hence detachable */
12890                 sleep( 1 );
12891
12892                 status = pthread_detach( &t );
12893                 if( status ) return status;
12894         }
12895 #endif
12896
12897 #ifdef HAVE_LINUX_THREADS
12898         pthread_kill_other_threads_np();
12899 #endif
12900
12901         return 0;
12902
12903 }
12904
12905 EOF
12906 if { (eval echo configure:12907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12907 then
12908   ol_cv_pthread_mthreads=yes
12909 else
12910   echo "configure: failed program was:" >&5
12911   cat conftest.$ac_ext >&5
12912   rm -fr conftest*
12913   ol_cv_pthread_mthreads=no
12914 fi
12915 rm -fr conftest*
12916 fi
12917
12918
12919                 # restore the LIBS
12920                 LIBS="$ol_LIBS"
12921         
12922 fi
12923
12924 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12925
12926         if test $ol_cv_pthread_mthreads = yes ; then
12927                 ol_link_pthreads="-mthreads"
12928                 ol_link_threads=posix
12929         fi
12930 fi
12931
12932                 # Pthread try link: -thread (ol_cv_pthread_thread)
12933 if test "$ol_link_threads" = no ; then
12934         # try -thread
12935         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12936 echo "configure:12937: checking for pthread link with -thread" >&5
12937 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12938   echo $ac_n "(cached) $ac_c" 1>&6
12939 else
12940   
12941                 # save the flags
12942                 ol_LIBS="$LIBS"
12943                 LIBS="-thread $LIBS"
12944
12945                 if test "$cross_compiling" = yes; then
12946   cat > conftest.$ac_ext <<EOF
12947 #line 12948 "configure"
12948 #include "confdefs.h"
12949 /* pthread test headers */
12950 #include <pthread.h>
12951 #ifndef NULL
12952 #define NULL (void*)0
12953 #endif
12954
12955 static void *task(p)
12956         void *p;
12957 {
12958         return (void *) (p == NULL);
12959 }
12960
12961 int main() {
12962
12963         /* pthread test function */
12964         pthread_t t;
12965         int status;
12966         int detach = 1;
12967
12968 #ifdef HAVE_PTHREADS_FINAL
12969         /* Final pthreads */
12970         pthread_attr_t attr;
12971
12972         status = pthread_attr_init(&attr);
12973         if( status ) return status;
12974
12975 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12976         if( !detach ) {
12977 #if defined( PTHREAD_CREATE_JOINABLE )
12978                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12979 #else
12980                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12981 #endif
12982
12983 #ifdef PTHREAD_CREATE_DETACHED
12984         } else {
12985                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12986 #endif
12987         }
12988         if( status ) return status;
12989 #endif
12990
12991         status = pthread_create( &t, &attr, task, NULL );
12992         if( status ) return status;
12993
12994 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12995         if( detach ) {
12996                 /* give thread a chance to complete */
12997                 /* it should remain joinable and hence detachable */
12998                 sleep( 1 );
12999
13000                 status = pthread_detach( t );
13001                 if( status ) return status;
13002         }
13003 #endif
13004
13005 #else
13006         /* Draft 4 pthreads */
13007         status = pthread_create( &t, pthread_attr_default, task, NULL );
13008         if( status ) return status;
13009
13010         if( detach ) {
13011                 /* give thread a chance to complete */
13012                 /* it should remain joinable and hence detachable */
13013                 sleep( 1 );
13014
13015                 status = pthread_detach( &t );
13016                 if( status ) return status;
13017         }
13018 #endif
13019
13020 #ifdef HAVE_LINUX_THREADS
13021         pthread_kill_other_threads_np();
13022 #endif
13023
13024         return 0;
13025
13026 ; return 0; }
13027 EOF
13028 if { (eval echo configure:13029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13029   rm -rf conftest*
13030   ol_cv_pthread_thread=yes
13031 else
13032   echo "configure: failed program was:" >&5
13033   cat conftest.$ac_ext >&5
13034   rm -rf conftest*
13035   ol_cv_pthread_thread=no
13036 fi
13037 rm -f conftest*
13038 else
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 /* pthread test headers */
13043 #include <pthread.h>
13044 #ifndef NULL
13045 #define NULL (void*)0
13046 #endif
13047
13048 static void *task(p)
13049         void *p;
13050 {
13051         return (void *) (p == NULL);
13052 }
13053
13054
13055 int main(argc, argv)
13056         int argc;
13057         char **argv;
13058 {
13059
13060         /* pthread test function */
13061         pthread_t t;
13062         int status;
13063         int detach = 1;
13064
13065 #ifdef HAVE_PTHREADS_FINAL
13066         /* Final pthreads */
13067         pthread_attr_t attr;
13068
13069         status = pthread_attr_init(&attr);
13070         if( status ) return status;
13071
13072 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13073         if( !detach ) {
13074 #if defined( PTHREAD_CREATE_JOINABLE )
13075                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13076 #else
13077                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13078 #endif
13079
13080 #ifdef PTHREAD_CREATE_DETACHED
13081         } else {
13082                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13083 #endif
13084         }
13085         if( status ) return status;
13086 #endif
13087
13088         status = pthread_create( &t, &attr, task, NULL );
13089         if( status ) return status;
13090
13091 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13092         if( detach ) {
13093                 /* give thread a chance to complete */
13094                 /* it should remain joinable and hence detachable */
13095                 sleep( 1 );
13096
13097                 status = pthread_detach( t );
13098                 if( status ) return status;
13099         }
13100 #endif
13101
13102 #else
13103         /* Draft 4 pthreads */
13104         status = pthread_create( &t, pthread_attr_default, task, NULL );
13105         if( status ) return status;
13106
13107         if( detach ) {
13108                 /* give thread a chance to complete */
13109                 /* it should remain joinable and hence detachable */
13110                 sleep( 1 );
13111
13112                 status = pthread_detach( &t );
13113                 if( status ) return status;
13114         }
13115 #endif
13116
13117 #ifdef HAVE_LINUX_THREADS
13118         pthread_kill_other_threads_np();
13119 #endif
13120
13121         return 0;
13122
13123 }
13124
13125 EOF
13126 if { (eval echo configure:13127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13127 then
13128   ol_cv_pthread_thread=yes
13129 else
13130   echo "configure: failed program was:" >&5
13131   cat conftest.$ac_ext >&5
13132   rm -fr conftest*
13133   ol_cv_pthread_thread=no
13134 fi
13135 rm -fr conftest*
13136 fi
13137
13138
13139                 # restore the LIBS
13140                 LIBS="$ol_LIBS"
13141         
13142 fi
13143
13144 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13145
13146         if test $ol_cv_pthread_thread = yes ; then
13147                 ol_link_pthreads="-thread"
13148                 ol_link_threads=posix
13149         fi
13150 fi
13151
13152
13153                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13154 if test "$ol_link_threads" = no ; then
13155         # try -lpthread -lmach -lexc -lc_r
13156         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13157 echo "configure:13158: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13158 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13159   echo $ac_n "(cached) $ac_c" 1>&6
13160 else
13161   
13162                 # save the flags
13163                 ol_LIBS="$LIBS"
13164                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13165
13166                 if test "$cross_compiling" = yes; then
13167   cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170 /* pthread test headers */
13171 #include <pthread.h>
13172 #ifndef NULL
13173 #define NULL (void*)0
13174 #endif
13175
13176 static void *task(p)
13177         void *p;
13178 {
13179         return (void *) (p == NULL);
13180 }
13181
13182 int main() {
13183
13184         /* pthread test function */
13185         pthread_t t;
13186         int status;
13187         int detach = 1;
13188
13189 #ifdef HAVE_PTHREADS_FINAL
13190         /* Final pthreads */
13191         pthread_attr_t attr;
13192
13193         status = pthread_attr_init(&attr);
13194         if( status ) return status;
13195
13196 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13197         if( !detach ) {
13198 #if defined( PTHREAD_CREATE_JOINABLE )
13199                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13200 #else
13201                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13202 #endif
13203
13204 #ifdef PTHREAD_CREATE_DETACHED
13205         } else {
13206                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13207 #endif
13208         }
13209         if( status ) return status;
13210 #endif
13211
13212         status = pthread_create( &t, &attr, task, NULL );
13213         if( status ) return status;
13214
13215 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13216         if( detach ) {
13217                 /* give thread a chance to complete */
13218                 /* it should remain joinable and hence detachable */
13219                 sleep( 1 );
13220
13221                 status = pthread_detach( t );
13222                 if( status ) return status;
13223         }
13224 #endif
13225
13226 #else
13227         /* Draft 4 pthreads */
13228         status = pthread_create( &t, pthread_attr_default, task, NULL );
13229         if( status ) return status;
13230
13231         if( detach ) {
13232                 /* give thread a chance to complete */
13233                 /* it should remain joinable and hence detachable */
13234                 sleep( 1 );
13235
13236                 status = pthread_detach( &t );
13237                 if( status ) return status;
13238         }
13239 #endif
13240
13241 #ifdef HAVE_LINUX_THREADS
13242         pthread_kill_other_threads_np();
13243 #endif
13244
13245         return 0;
13246
13247 ; return 0; }
13248 EOF
13249 if { (eval echo configure:13250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13250   rm -rf conftest*
13251   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13252 else
13253   echo "configure: failed program was:" >&5
13254   cat conftest.$ac_ext >&5
13255   rm -rf conftest*
13256   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13257 fi
13258 rm -f conftest*
13259 else
13260   cat > conftest.$ac_ext <<EOF
13261 #line 13262 "configure"
13262 #include "confdefs.h"
13263 /* pthread test headers */
13264 #include <pthread.h>
13265 #ifndef NULL
13266 #define NULL (void*)0
13267 #endif
13268
13269 static void *task(p)
13270         void *p;
13271 {
13272         return (void *) (p == NULL);
13273 }
13274
13275
13276 int main(argc, argv)
13277         int argc;
13278         char **argv;
13279 {
13280
13281         /* pthread test function */
13282         pthread_t t;
13283         int status;
13284         int detach = 1;
13285
13286 #ifdef HAVE_PTHREADS_FINAL
13287         /* Final pthreads */
13288         pthread_attr_t attr;
13289
13290         status = pthread_attr_init(&attr);
13291         if( status ) return status;
13292
13293 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13294         if( !detach ) {
13295 #if defined( PTHREAD_CREATE_JOINABLE )
13296                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13297 #else
13298                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13299 #endif
13300
13301 #ifdef PTHREAD_CREATE_DETACHED
13302         } else {
13303                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13304 #endif
13305         }
13306         if( status ) return status;
13307 #endif
13308
13309         status = pthread_create( &t, &attr, task, NULL );
13310         if( status ) return status;
13311
13312 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13313         if( detach ) {
13314                 /* give thread a chance to complete */
13315                 /* it should remain joinable and hence detachable */
13316                 sleep( 1 );
13317
13318                 status = pthread_detach( t );
13319                 if( status ) return status;
13320         }
13321 #endif
13322
13323 #else
13324         /* Draft 4 pthreads */
13325         status = pthread_create( &t, pthread_attr_default, task, NULL );
13326         if( status ) return status;
13327
13328         if( detach ) {
13329                 /* give thread a chance to complete */
13330                 /* it should remain joinable and hence detachable */
13331                 sleep( 1 );
13332
13333                 status = pthread_detach( &t );
13334                 if( status ) return status;
13335         }
13336 #endif
13337
13338 #ifdef HAVE_LINUX_THREADS
13339         pthread_kill_other_threads_np();
13340 #endif
13341
13342         return 0;
13343
13344 }
13345
13346 EOF
13347 if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13348 then
13349   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13350 else
13351   echo "configure: failed program was:" >&5
13352   cat conftest.$ac_ext >&5
13353   rm -fr conftest*
13354   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13355 fi
13356 rm -fr conftest*
13357 fi
13358
13359
13360                 # restore the LIBS
13361                 LIBS="$ol_LIBS"
13362         
13363 fi
13364
13365 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13366
13367         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13368                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13369                 ol_link_threads=posix
13370         fi
13371 fi
13372
13373                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13374 if test "$ol_link_threads" = no ; then
13375         # try -lpthread -lmach -lexc
13376         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13377 echo "configure:13378: checking for pthread link with -lpthread -lmach -lexc" >&5
13378 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13379   echo $ac_n "(cached) $ac_c" 1>&6
13380 else
13381   
13382                 # save the flags
13383                 ol_LIBS="$LIBS"
13384                 LIBS="-lpthread -lmach -lexc $LIBS"
13385
13386                 if test "$cross_compiling" = yes; then
13387   cat > conftest.$ac_ext <<EOF
13388 #line 13389 "configure"
13389 #include "confdefs.h"
13390 /* pthread test headers */
13391 #include <pthread.h>
13392 #ifndef NULL
13393 #define NULL (void*)0
13394 #endif
13395
13396 static void *task(p)
13397         void *p;
13398 {
13399         return (void *) (p == NULL);
13400 }
13401
13402 int main() {
13403
13404         /* pthread test function */
13405         pthread_t t;
13406         int status;
13407         int detach = 1;
13408
13409 #ifdef HAVE_PTHREADS_FINAL
13410         /* Final pthreads */
13411         pthread_attr_t attr;
13412
13413         status = pthread_attr_init(&attr);
13414         if( status ) return status;
13415
13416 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13417         if( !detach ) {
13418 #if defined( PTHREAD_CREATE_JOINABLE )
13419                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13420 #else
13421                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13422 #endif
13423
13424 #ifdef PTHREAD_CREATE_DETACHED
13425         } else {
13426                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13427 #endif
13428         }
13429         if( status ) return status;
13430 #endif
13431
13432         status = pthread_create( &t, &attr, task, NULL );
13433         if( status ) return status;
13434
13435 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13436         if( detach ) {
13437                 /* give thread a chance to complete */
13438                 /* it should remain joinable and hence detachable */
13439                 sleep( 1 );
13440
13441                 status = pthread_detach( t );
13442                 if( status ) return status;
13443         }
13444 #endif
13445
13446 #else
13447         /* Draft 4 pthreads */
13448         status = pthread_create( &t, pthread_attr_default, task, NULL );
13449         if( status ) return status;
13450
13451         if( detach ) {
13452                 /* give thread a chance to complete */
13453                 /* it should remain joinable and hence detachable */
13454                 sleep( 1 );
13455
13456                 status = pthread_detach( &t );
13457                 if( status ) return status;
13458         }
13459 #endif
13460
13461 #ifdef HAVE_LINUX_THREADS
13462         pthread_kill_other_threads_np();
13463 #endif
13464
13465         return 0;
13466
13467 ; return 0; }
13468 EOF
13469 if { (eval echo configure:13470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13470   rm -rf conftest*
13471   ol_cv_pthread_lpthread_lmach_lexc=yes
13472 else
13473   echo "configure: failed program was:" >&5
13474   cat conftest.$ac_ext >&5
13475   rm -rf conftest*
13476   ol_cv_pthread_lpthread_lmach_lexc=no
13477 fi
13478 rm -f conftest*
13479 else
13480   cat > conftest.$ac_ext <<EOF
13481 #line 13482 "configure"
13482 #include "confdefs.h"
13483 /* pthread test headers */
13484 #include <pthread.h>
13485 #ifndef NULL
13486 #define NULL (void*)0
13487 #endif
13488
13489 static void *task(p)
13490         void *p;
13491 {
13492         return (void *) (p == NULL);
13493 }
13494
13495
13496 int main(argc, argv)
13497         int argc;
13498         char **argv;
13499 {
13500
13501         /* pthread test function */
13502         pthread_t t;
13503         int status;
13504         int detach = 1;
13505
13506 #ifdef HAVE_PTHREADS_FINAL
13507         /* Final pthreads */
13508         pthread_attr_t attr;
13509
13510         status = pthread_attr_init(&attr);
13511         if( status ) return status;
13512
13513 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13514         if( !detach ) {
13515 #if defined( PTHREAD_CREATE_JOINABLE )
13516                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13517 #else
13518                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13519 #endif
13520
13521 #ifdef PTHREAD_CREATE_DETACHED
13522         } else {
13523                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13524 #endif
13525         }
13526         if( status ) return status;
13527 #endif
13528
13529         status = pthread_create( &t, &attr, task, NULL );
13530         if( status ) return status;
13531
13532 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13533         if( detach ) {
13534                 /* give thread a chance to complete */
13535                 /* it should remain joinable and hence detachable */
13536                 sleep( 1 );
13537
13538                 status = pthread_detach( t );
13539                 if( status ) return status;
13540         }
13541 #endif
13542
13543 #else
13544         /* Draft 4 pthreads */
13545         status = pthread_create( &t, pthread_attr_default, task, NULL );
13546         if( status ) return status;
13547
13548         if( detach ) {
13549                 /* give thread a chance to complete */
13550                 /* it should remain joinable and hence detachable */
13551                 sleep( 1 );
13552
13553                 status = pthread_detach( &t );
13554                 if( status ) return status;
13555         }
13556 #endif
13557
13558 #ifdef HAVE_LINUX_THREADS
13559         pthread_kill_other_threads_np();
13560 #endif
13561
13562         return 0;
13563
13564 }
13565
13566 EOF
13567 if { (eval echo configure:13568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13568 then
13569   ol_cv_pthread_lpthread_lmach_lexc=yes
13570 else
13571   echo "configure: failed program was:" >&5
13572   cat conftest.$ac_ext >&5
13573   rm -fr conftest*
13574   ol_cv_pthread_lpthread_lmach_lexc=no
13575 fi
13576 rm -fr conftest*
13577 fi
13578
13579
13580                 # restore the LIBS
13581                 LIBS="$ol_LIBS"
13582         
13583 fi
13584
13585 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13586
13587         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13588                 ol_link_pthreads="-lpthread -lmach -lexc"
13589                 ol_link_threads=posix
13590         fi
13591 fi
13592
13593
13594                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13595 if test "$ol_link_threads" = no ; then
13596         # try -lpthread -Wl,-woff,85
13597         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13598 echo "configure:13599: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13599 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13600   echo $ac_n "(cached) $ac_c" 1>&6
13601 else
13602   
13603                 # save the flags
13604                 ol_LIBS="$LIBS"
13605                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13606
13607                 if test "$cross_compiling" = yes; then
13608   cat > conftest.$ac_ext <<EOF
13609 #line 13610 "configure"
13610 #include "confdefs.h"
13611 /* pthread test headers */
13612 #include <pthread.h>
13613 #ifndef NULL
13614 #define NULL (void*)0
13615 #endif
13616
13617 static void *task(p)
13618         void *p;
13619 {
13620         return (void *) (p == NULL);
13621 }
13622
13623 int main() {
13624
13625         /* pthread test function */
13626         pthread_t t;
13627         int status;
13628         int detach = 1;
13629
13630 #ifdef HAVE_PTHREADS_FINAL
13631         /* Final pthreads */
13632         pthread_attr_t attr;
13633
13634         status = pthread_attr_init(&attr);
13635         if( status ) return status;
13636
13637 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13638         if( !detach ) {
13639 #if defined( PTHREAD_CREATE_JOINABLE )
13640                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13641 #else
13642                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13643 #endif
13644
13645 #ifdef PTHREAD_CREATE_DETACHED
13646         } else {
13647                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13648 #endif
13649         }
13650         if( status ) return status;
13651 #endif
13652
13653         status = pthread_create( &t, &attr, task, NULL );
13654         if( status ) return status;
13655
13656 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13657         if( detach ) {
13658                 /* give thread a chance to complete */
13659                 /* it should remain joinable and hence detachable */
13660                 sleep( 1 );
13661
13662                 status = pthread_detach( t );
13663                 if( status ) return status;
13664         }
13665 #endif
13666
13667 #else
13668         /* Draft 4 pthreads */
13669         status = pthread_create( &t, pthread_attr_default, task, NULL );
13670         if( status ) return status;
13671
13672         if( detach ) {
13673                 /* give thread a chance to complete */
13674                 /* it should remain joinable and hence detachable */
13675                 sleep( 1 );
13676
13677                 status = pthread_detach( &t );
13678                 if( status ) return status;
13679         }
13680 #endif
13681
13682 #ifdef HAVE_LINUX_THREADS
13683         pthread_kill_other_threads_np();
13684 #endif
13685
13686         return 0;
13687
13688 ; return 0; }
13689 EOF
13690 if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13691   rm -rf conftest*
13692   ol_cv_pthread_lib_lpthread_woff=yes
13693 else
13694   echo "configure: failed program was:" >&5
13695   cat conftest.$ac_ext >&5
13696   rm -rf conftest*
13697   ol_cv_pthread_lib_lpthread_woff=no
13698 fi
13699 rm -f conftest*
13700 else
13701   cat > conftest.$ac_ext <<EOF
13702 #line 13703 "configure"
13703 #include "confdefs.h"
13704 /* pthread test headers */
13705 #include <pthread.h>
13706 #ifndef NULL
13707 #define NULL (void*)0
13708 #endif
13709
13710 static void *task(p)
13711         void *p;
13712 {
13713         return (void *) (p == NULL);
13714 }
13715
13716
13717 int main(argc, argv)
13718         int argc;
13719         char **argv;
13720 {
13721
13722         /* pthread test function */
13723         pthread_t t;
13724         int status;
13725         int detach = 1;
13726
13727 #ifdef HAVE_PTHREADS_FINAL
13728         /* Final pthreads */
13729         pthread_attr_t attr;
13730
13731         status = pthread_attr_init(&attr);
13732         if( status ) return status;
13733
13734 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13735         if( !detach ) {
13736 #if defined( PTHREAD_CREATE_JOINABLE )
13737                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13738 #else
13739                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13740 #endif
13741
13742 #ifdef PTHREAD_CREATE_DETACHED
13743         } else {
13744                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13745 #endif
13746         }
13747         if( status ) return status;
13748 #endif
13749
13750         status = pthread_create( &t, &attr, task, NULL );
13751         if( status ) return status;
13752
13753 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13754         if( detach ) {
13755                 /* give thread a chance to complete */
13756                 /* it should remain joinable and hence detachable */
13757                 sleep( 1 );
13758
13759                 status = pthread_detach( t );
13760                 if( status ) return status;
13761         }
13762 #endif
13763
13764 #else
13765         /* Draft 4 pthreads */
13766         status = pthread_create( &t, pthread_attr_default, task, NULL );
13767         if( status ) return status;
13768
13769         if( detach ) {
13770                 /* give thread a chance to complete */
13771                 /* it should remain joinable and hence detachable */
13772                 sleep( 1 );
13773
13774                 status = pthread_detach( &t );
13775                 if( status ) return status;
13776         }
13777 #endif
13778
13779 #ifdef HAVE_LINUX_THREADS
13780         pthread_kill_other_threads_np();
13781 #endif
13782
13783         return 0;
13784
13785 }
13786
13787 EOF
13788 if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13789 then
13790   ol_cv_pthread_lib_lpthread_woff=yes
13791 else
13792   echo "configure: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   rm -fr conftest*
13795   ol_cv_pthread_lib_lpthread_woff=no
13796 fi
13797 rm -fr conftest*
13798 fi
13799
13800
13801                 # restore the LIBS
13802                 LIBS="$ol_LIBS"
13803         
13804 fi
13805
13806 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13807
13808         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13809                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13810                 ol_link_threads=posix
13811         fi
13812 fi
13813
13814
13815                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13816 if test "$ol_link_threads" = no ; then
13817         # try -lpthread
13818         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13819 echo "configure:13820: checking for pthread link with -lpthread" >&5
13820 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13821   echo $ac_n "(cached) $ac_c" 1>&6
13822 else
13823   
13824                 # save the flags
13825                 ol_LIBS="$LIBS"
13826                 LIBS="-lpthread $LIBS"
13827
13828                 if test "$cross_compiling" = yes; then
13829   cat > conftest.$ac_ext <<EOF
13830 #line 13831 "configure"
13831 #include "confdefs.h"
13832 /* pthread test headers */
13833 #include <pthread.h>
13834 #ifndef NULL
13835 #define NULL (void*)0
13836 #endif
13837
13838 static void *task(p)
13839         void *p;
13840 {
13841         return (void *) (p == NULL);
13842 }
13843
13844 int main() {
13845
13846         /* pthread test function */
13847         pthread_t t;
13848         int status;
13849         int detach = 1;
13850
13851 #ifdef HAVE_PTHREADS_FINAL
13852         /* Final pthreads */
13853         pthread_attr_t attr;
13854
13855         status = pthread_attr_init(&attr);
13856         if( status ) return status;
13857
13858 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13859         if( !detach ) {
13860 #if defined( PTHREAD_CREATE_JOINABLE )
13861                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13862 #else
13863                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13864 #endif
13865
13866 #ifdef PTHREAD_CREATE_DETACHED
13867         } else {
13868                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13869 #endif
13870         }
13871         if( status ) return status;
13872 #endif
13873
13874         status = pthread_create( &t, &attr, task, NULL );
13875         if( status ) return status;
13876
13877 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13878         if( detach ) {
13879                 /* give thread a chance to complete */
13880                 /* it should remain joinable and hence detachable */
13881                 sleep( 1 );
13882
13883                 status = pthread_detach( t );
13884                 if( status ) return status;
13885         }
13886 #endif
13887
13888 #else
13889         /* Draft 4 pthreads */
13890         status = pthread_create( &t, pthread_attr_default, task, NULL );
13891         if( status ) return status;
13892
13893         if( detach ) {
13894                 /* give thread a chance to complete */
13895                 /* it should remain joinable and hence detachable */
13896                 sleep( 1 );
13897
13898                 status = pthread_detach( &t );
13899                 if( status ) return status;
13900         }
13901 #endif
13902
13903 #ifdef HAVE_LINUX_THREADS
13904         pthread_kill_other_threads_np();
13905 #endif
13906
13907         return 0;
13908
13909 ; return 0; }
13910 EOF
13911 if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13912   rm -rf conftest*
13913   ol_cv_pthread_lpthread=yes
13914 else
13915   echo "configure: failed program was:" >&5
13916   cat conftest.$ac_ext >&5
13917   rm -rf conftest*
13918   ol_cv_pthread_lpthread=no
13919 fi
13920 rm -f conftest*
13921 else
13922   cat > conftest.$ac_ext <<EOF
13923 #line 13924 "configure"
13924 #include "confdefs.h"
13925 /* pthread test headers */
13926 #include <pthread.h>
13927 #ifndef NULL
13928 #define NULL (void*)0
13929 #endif
13930
13931 static void *task(p)
13932         void *p;
13933 {
13934         return (void *) (p == NULL);
13935 }
13936
13937
13938 int main(argc, argv)
13939         int argc;
13940         char **argv;
13941 {
13942
13943         /* pthread test function */
13944         pthread_t t;
13945         int status;
13946         int detach = 1;
13947
13948 #ifdef HAVE_PTHREADS_FINAL
13949         /* Final pthreads */
13950         pthread_attr_t attr;
13951
13952         status = pthread_attr_init(&attr);
13953         if( status ) return status;
13954
13955 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13956         if( !detach ) {
13957 #if defined( PTHREAD_CREATE_JOINABLE )
13958                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13959 #else
13960                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13961 #endif
13962
13963 #ifdef PTHREAD_CREATE_DETACHED
13964         } else {
13965                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13966 #endif
13967         }
13968         if( status ) return status;
13969 #endif
13970
13971         status = pthread_create( &t, &attr, task, NULL );
13972         if( status ) return status;
13973
13974 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13975         if( detach ) {
13976                 /* give thread a chance to complete */
13977                 /* it should remain joinable and hence detachable */
13978                 sleep( 1 );
13979
13980                 status = pthread_detach( t );
13981                 if( status ) return status;
13982         }
13983 #endif
13984
13985 #else
13986         /* Draft 4 pthreads */
13987         status = pthread_create( &t, pthread_attr_default, task, NULL );
13988         if( status ) return status;
13989
13990         if( detach ) {
13991                 /* give thread a chance to complete */
13992                 /* it should remain joinable and hence detachable */
13993                 sleep( 1 );
13994
13995                 status = pthread_detach( &t );
13996                 if( status ) return status;
13997         }
13998 #endif
13999
14000 #ifdef HAVE_LINUX_THREADS
14001         pthread_kill_other_threads_np();
14002 #endif
14003
14004         return 0;
14005
14006 }
14007
14008 EOF
14009 if { (eval echo configure:14010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14010 then
14011   ol_cv_pthread_lpthread=yes
14012 else
14013   echo "configure: failed program was:" >&5
14014   cat conftest.$ac_ext >&5
14015   rm -fr conftest*
14016   ol_cv_pthread_lpthread=no
14017 fi
14018 rm -fr conftest*
14019 fi
14020
14021
14022                 # restore the LIBS
14023                 LIBS="$ol_LIBS"
14024         
14025 fi
14026
14027 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14028
14029         if test $ol_cv_pthread_lpthread = yes ; then
14030                 ol_link_pthreads="-lpthread"
14031                 ol_link_threads=posix
14032         fi
14033 fi
14034
14035                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14036 if test "$ol_link_threads" = no ; then
14037         # try -lc_r
14038         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14039 echo "configure:14040: checking for pthread link with -lc_r" >&5
14040 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14041   echo $ac_n "(cached) $ac_c" 1>&6
14042 else
14043   
14044                 # save the flags
14045                 ol_LIBS="$LIBS"
14046                 LIBS="-lc_r $LIBS"
14047
14048                 if test "$cross_compiling" = yes; then
14049   cat > conftest.$ac_ext <<EOF
14050 #line 14051 "configure"
14051 #include "confdefs.h"
14052 /* pthread test headers */
14053 #include <pthread.h>
14054 #ifndef NULL
14055 #define NULL (void*)0
14056 #endif
14057
14058 static void *task(p)
14059         void *p;
14060 {
14061         return (void *) (p == NULL);
14062 }
14063
14064 int main() {
14065
14066         /* pthread test function */
14067         pthread_t t;
14068         int status;
14069         int detach = 1;
14070
14071 #ifdef HAVE_PTHREADS_FINAL
14072         /* Final pthreads */
14073         pthread_attr_t attr;
14074
14075         status = pthread_attr_init(&attr);
14076         if( status ) return status;
14077
14078 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14079         if( !detach ) {
14080 #if defined( PTHREAD_CREATE_JOINABLE )
14081                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14082 #else
14083                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14084 #endif
14085
14086 #ifdef PTHREAD_CREATE_DETACHED
14087         } else {
14088                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14089 #endif
14090         }
14091         if( status ) return status;
14092 #endif
14093
14094         status = pthread_create( &t, &attr, task, NULL );
14095         if( status ) return status;
14096
14097 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14098         if( detach ) {
14099                 /* give thread a chance to complete */
14100                 /* it should remain joinable and hence detachable */
14101                 sleep( 1 );
14102
14103                 status = pthread_detach( t );
14104                 if( status ) return status;
14105         }
14106 #endif
14107
14108 #else
14109         /* Draft 4 pthreads */
14110         status = pthread_create( &t, pthread_attr_default, task, NULL );
14111         if( status ) return status;
14112
14113         if( detach ) {
14114                 /* give thread a chance to complete */
14115                 /* it should remain joinable and hence detachable */
14116                 sleep( 1 );
14117
14118                 status = pthread_detach( &t );
14119                 if( status ) return status;
14120         }
14121 #endif
14122
14123 #ifdef HAVE_LINUX_THREADS
14124         pthread_kill_other_threads_np();
14125 #endif
14126
14127         return 0;
14128
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14132   rm -rf conftest*
14133   ol_cv_pthread_lc_r=yes
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   ol_cv_pthread_lc_r=no
14139 fi
14140 rm -f conftest*
14141 else
14142   cat > conftest.$ac_ext <<EOF
14143 #line 14144 "configure"
14144 #include "confdefs.h"
14145 /* pthread test headers */
14146 #include <pthread.h>
14147 #ifndef NULL
14148 #define NULL (void*)0
14149 #endif
14150
14151 static void *task(p)
14152         void *p;
14153 {
14154         return (void *) (p == NULL);
14155 }
14156
14157
14158 int main(argc, argv)
14159         int argc;
14160         char **argv;
14161 {
14162
14163         /* pthread test function */
14164         pthread_t t;
14165         int status;
14166         int detach = 1;
14167
14168 #ifdef HAVE_PTHREADS_FINAL
14169         /* Final pthreads */
14170         pthread_attr_t attr;
14171
14172         status = pthread_attr_init(&attr);
14173         if( status ) return status;
14174
14175 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14176         if( !detach ) {
14177 #if defined( PTHREAD_CREATE_JOINABLE )
14178                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14179 #else
14180                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14181 #endif
14182
14183 #ifdef PTHREAD_CREATE_DETACHED
14184         } else {
14185                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14186 #endif
14187         }
14188         if( status ) return status;
14189 #endif
14190
14191         status = pthread_create( &t, &attr, task, NULL );
14192         if( status ) return status;
14193
14194 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14195         if( detach ) {
14196                 /* give thread a chance to complete */
14197                 /* it should remain joinable and hence detachable */
14198                 sleep( 1 );
14199
14200                 status = pthread_detach( t );
14201                 if( status ) return status;
14202         }
14203 #endif
14204
14205 #else
14206         /* Draft 4 pthreads */
14207         status = pthread_create( &t, pthread_attr_default, task, NULL );
14208         if( status ) return status;
14209
14210         if( detach ) {
14211                 /* give thread a chance to complete */
14212                 /* it should remain joinable and hence detachable */
14213                 sleep( 1 );
14214
14215                 status = pthread_detach( &t );
14216                 if( status ) return status;
14217         }
14218 #endif
14219
14220 #ifdef HAVE_LINUX_THREADS
14221         pthread_kill_other_threads_np();
14222 #endif
14223
14224         return 0;
14225
14226 }
14227
14228 EOF
14229 if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14230 then
14231   ol_cv_pthread_lc_r=yes
14232 else
14233   echo "configure: failed program was:" >&5
14234   cat conftest.$ac_ext >&5
14235   rm -fr conftest*
14236   ol_cv_pthread_lc_r=no
14237 fi
14238 rm -fr conftest*
14239 fi
14240
14241
14242                 # restore the LIBS
14243                 LIBS="$ol_LIBS"
14244         
14245 fi
14246
14247 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14248
14249         if test $ol_cv_pthread_lc_r = yes ; then
14250                 ol_link_pthreads="-lc_r"
14251                 ol_link_threads=posix
14252         fi
14253 fi
14254
14255
14256                 # Pthread try link: -threads (ol_cv_pthread_threads)
14257 if test "$ol_link_threads" = no ; then
14258         # try -threads
14259         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14260 echo "configure:14261: checking for pthread link with -threads" >&5
14261 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   
14265                 # save the flags
14266                 ol_LIBS="$LIBS"
14267                 LIBS="-threads $LIBS"
14268
14269                 if test "$cross_compiling" = yes; then
14270   cat > conftest.$ac_ext <<EOF
14271 #line 14272 "configure"
14272 #include "confdefs.h"
14273 /* pthread test headers */
14274 #include <pthread.h>
14275 #ifndef NULL
14276 #define NULL (void*)0
14277 #endif
14278
14279 static void *task(p)
14280         void *p;
14281 {
14282         return (void *) (p == NULL);
14283 }
14284
14285 int main() {
14286
14287         /* pthread test function */
14288         pthread_t t;
14289         int status;
14290         int detach = 1;
14291
14292 #ifdef HAVE_PTHREADS_FINAL
14293         /* Final pthreads */
14294         pthread_attr_t attr;
14295
14296         status = pthread_attr_init(&attr);
14297         if( status ) return status;
14298
14299 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14300         if( !detach ) {
14301 #if defined( PTHREAD_CREATE_JOINABLE )
14302                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14303 #else
14304                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14305 #endif
14306
14307 #ifdef PTHREAD_CREATE_DETACHED
14308         } else {
14309                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14310 #endif
14311         }
14312         if( status ) return status;
14313 #endif
14314
14315         status = pthread_create( &t, &attr, task, NULL );
14316         if( status ) return status;
14317
14318 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14319         if( detach ) {
14320                 /* give thread a chance to complete */
14321                 /* it should remain joinable and hence detachable */
14322                 sleep( 1 );
14323
14324                 status = pthread_detach( t );
14325                 if( status ) return status;
14326         }
14327 #endif
14328
14329 #else
14330         /* Draft 4 pthreads */
14331         status = pthread_create( &t, pthread_attr_default, task, NULL );
14332         if( status ) return status;
14333
14334         if( detach ) {
14335                 /* give thread a chance to complete */
14336                 /* it should remain joinable and hence detachable */
14337                 sleep( 1 );
14338
14339                 status = pthread_detach( &t );
14340                 if( status ) return status;
14341         }
14342 #endif
14343
14344 #ifdef HAVE_LINUX_THREADS
14345         pthread_kill_other_threads_np();
14346 #endif
14347
14348         return 0;
14349
14350 ; return 0; }
14351 EOF
14352 if { (eval echo configure:14353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14353   rm -rf conftest*
14354   ol_cv_pthread_threads=yes
14355 else
14356   echo "configure: failed program was:" >&5
14357   cat conftest.$ac_ext >&5
14358   rm -rf conftest*
14359   ol_cv_pthread_threads=no
14360 fi
14361 rm -f conftest*
14362 else
14363   cat > conftest.$ac_ext <<EOF
14364 #line 14365 "configure"
14365 #include "confdefs.h"
14366 /* pthread test headers */
14367 #include <pthread.h>
14368 #ifndef NULL
14369 #define NULL (void*)0
14370 #endif
14371
14372 static void *task(p)
14373         void *p;
14374 {
14375         return (void *) (p == NULL);
14376 }
14377
14378
14379 int main(argc, argv)
14380         int argc;
14381         char **argv;
14382 {
14383
14384         /* pthread test function */
14385         pthread_t t;
14386         int status;
14387         int detach = 1;
14388
14389 #ifdef HAVE_PTHREADS_FINAL
14390         /* Final pthreads */
14391         pthread_attr_t attr;
14392
14393         status = pthread_attr_init(&attr);
14394         if( status ) return status;
14395
14396 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14397         if( !detach ) {
14398 #if defined( PTHREAD_CREATE_JOINABLE )
14399                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14400 #else
14401                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14402 #endif
14403
14404 #ifdef PTHREAD_CREATE_DETACHED
14405         } else {
14406                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14407 #endif
14408         }
14409         if( status ) return status;
14410 #endif
14411
14412         status = pthread_create( &t, &attr, task, NULL );
14413         if( status ) return status;
14414
14415 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14416         if( detach ) {
14417                 /* give thread a chance to complete */
14418                 /* it should remain joinable and hence detachable */
14419                 sleep( 1 );
14420
14421                 status = pthread_detach( t );
14422                 if( status ) return status;
14423         }
14424 #endif
14425
14426 #else
14427         /* Draft 4 pthreads */
14428         status = pthread_create( &t, pthread_attr_default, task, NULL );
14429         if( status ) return status;
14430
14431         if( detach ) {
14432                 /* give thread a chance to complete */
14433                 /* it should remain joinable and hence detachable */
14434                 sleep( 1 );
14435
14436                 status = pthread_detach( &t );
14437                 if( status ) return status;
14438         }
14439 #endif
14440
14441 #ifdef HAVE_LINUX_THREADS
14442         pthread_kill_other_threads_np();
14443 #endif
14444
14445         return 0;
14446
14447 }
14448
14449 EOF
14450 if { (eval echo configure:14451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14451 then
14452   ol_cv_pthread_threads=yes
14453 else
14454   echo "configure: failed program was:" >&5
14455   cat conftest.$ac_ext >&5
14456   rm -fr conftest*
14457   ol_cv_pthread_threads=no
14458 fi
14459 rm -fr conftest*
14460 fi
14461
14462
14463                 # restore the LIBS
14464                 LIBS="$ol_LIBS"
14465         
14466 fi
14467
14468 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14469
14470         if test $ol_cv_pthread_threads = yes ; then
14471                 ol_link_pthreads="-threads"
14472                 ol_link_threads=posix
14473         fi
14474 fi
14475
14476
14477                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14478 if test "$ol_link_threads" = no ; then
14479         # try -lpthreads -lmach -lexc -lc_r
14480         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14481 echo "configure:14482: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14482 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14483   echo $ac_n "(cached) $ac_c" 1>&6
14484 else
14485   
14486                 # save the flags
14487                 ol_LIBS="$LIBS"
14488                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14489
14490                 if test "$cross_compiling" = yes; then
14491   cat > conftest.$ac_ext <<EOF
14492 #line 14493 "configure"
14493 #include "confdefs.h"
14494 /* pthread test headers */
14495 #include <pthread.h>
14496 #ifndef NULL
14497 #define NULL (void*)0
14498 #endif
14499
14500 static void *task(p)
14501         void *p;
14502 {
14503         return (void *) (p == NULL);
14504 }
14505
14506 int main() {
14507
14508         /* pthread test function */
14509         pthread_t t;
14510         int status;
14511         int detach = 1;
14512
14513 #ifdef HAVE_PTHREADS_FINAL
14514         /* Final pthreads */
14515         pthread_attr_t attr;
14516
14517         status = pthread_attr_init(&attr);
14518         if( status ) return status;
14519
14520 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14521         if( !detach ) {
14522 #if defined( PTHREAD_CREATE_JOINABLE )
14523                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14524 #else
14525                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14526 #endif
14527
14528 #ifdef PTHREAD_CREATE_DETACHED
14529         } else {
14530                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14531 #endif
14532         }
14533         if( status ) return status;
14534 #endif
14535
14536         status = pthread_create( &t, &attr, task, NULL );
14537         if( status ) return status;
14538
14539 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14540         if( detach ) {
14541                 /* give thread a chance to complete */
14542                 /* it should remain joinable and hence detachable */
14543                 sleep( 1 );
14544
14545                 status = pthread_detach( t );
14546                 if( status ) return status;
14547         }
14548 #endif
14549
14550 #else
14551         /* Draft 4 pthreads */
14552         status = pthread_create( &t, pthread_attr_default, task, NULL );
14553         if( status ) return status;
14554
14555         if( detach ) {
14556                 /* give thread a chance to complete */
14557                 /* it should remain joinable and hence detachable */
14558                 sleep( 1 );
14559
14560                 status = pthread_detach( &t );
14561                 if( status ) return status;
14562         }
14563 #endif
14564
14565 #ifdef HAVE_LINUX_THREADS
14566         pthread_kill_other_threads_np();
14567 #endif
14568
14569         return 0;
14570
14571 ; return 0; }
14572 EOF
14573 if { (eval echo configure:14574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14574   rm -rf conftest*
14575   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14576 else
14577   echo "configure: failed program was:" >&5
14578   cat conftest.$ac_ext >&5
14579   rm -rf conftest*
14580   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14581 fi
14582 rm -f conftest*
14583 else
14584   cat > conftest.$ac_ext <<EOF
14585 #line 14586 "configure"
14586 #include "confdefs.h"
14587 /* pthread test headers */
14588 #include <pthread.h>
14589 #ifndef NULL
14590 #define NULL (void*)0
14591 #endif
14592
14593 static void *task(p)
14594         void *p;
14595 {
14596         return (void *) (p == NULL);
14597 }
14598
14599
14600 int main(argc, argv)
14601         int argc;
14602         char **argv;
14603 {
14604
14605         /* pthread test function */
14606         pthread_t t;
14607         int status;
14608         int detach = 1;
14609
14610 #ifdef HAVE_PTHREADS_FINAL
14611         /* Final pthreads */
14612         pthread_attr_t attr;
14613
14614         status = pthread_attr_init(&attr);
14615         if( status ) return status;
14616
14617 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14618         if( !detach ) {
14619 #if defined( PTHREAD_CREATE_JOINABLE )
14620                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14621 #else
14622                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14623 #endif
14624
14625 #ifdef PTHREAD_CREATE_DETACHED
14626         } else {
14627                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14628 #endif
14629         }
14630         if( status ) return status;
14631 #endif
14632
14633         status = pthread_create( &t, &attr, task, NULL );
14634         if( status ) return status;
14635
14636 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14637         if( detach ) {
14638                 /* give thread a chance to complete */
14639                 /* it should remain joinable and hence detachable */
14640                 sleep( 1 );
14641
14642                 status = pthread_detach( t );
14643                 if( status ) return status;
14644         }
14645 #endif
14646
14647 #else
14648         /* Draft 4 pthreads */
14649         status = pthread_create( &t, pthread_attr_default, task, NULL );
14650         if( status ) return status;
14651
14652         if( detach ) {
14653                 /* give thread a chance to complete */
14654                 /* it should remain joinable and hence detachable */
14655                 sleep( 1 );
14656
14657                 status = pthread_detach( &t );
14658                 if( status ) return status;
14659         }
14660 #endif
14661
14662 #ifdef HAVE_LINUX_THREADS
14663         pthread_kill_other_threads_np();
14664 #endif
14665
14666         return 0;
14667
14668 }
14669
14670 EOF
14671 if { (eval echo configure:14672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14672 then
14673   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14674 else
14675   echo "configure: failed program was:" >&5
14676   cat conftest.$ac_ext >&5
14677   rm -fr conftest*
14678   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14679 fi
14680 rm -fr conftest*
14681 fi
14682
14683
14684                 # restore the LIBS
14685                 LIBS="$ol_LIBS"
14686         
14687 fi
14688
14689 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14690
14691         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14692                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14693                 ol_link_threads=posix
14694         fi
14695 fi
14696
14697                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14698 if test "$ol_link_threads" = no ; then
14699         # try -lpthreads -lmach -lexc
14700         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14701 echo "configure:14702: checking for pthread link with -lpthreads -lmach -lexc" >&5
14702 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14703   echo $ac_n "(cached) $ac_c" 1>&6
14704 else
14705   
14706                 # save the flags
14707                 ol_LIBS="$LIBS"
14708                 LIBS="-lpthreads -lmach -lexc $LIBS"
14709
14710                 if test "$cross_compiling" = yes; then
14711   cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 /* pthread test headers */
14715 #include <pthread.h>
14716 #ifndef NULL
14717 #define NULL (void*)0
14718 #endif
14719
14720 static void *task(p)
14721         void *p;
14722 {
14723         return (void *) (p == NULL);
14724 }
14725
14726 int main() {
14727
14728         /* pthread test function */
14729         pthread_t t;
14730         int status;
14731         int detach = 1;
14732
14733 #ifdef HAVE_PTHREADS_FINAL
14734         /* Final pthreads */
14735         pthread_attr_t attr;
14736
14737         status = pthread_attr_init(&attr);
14738         if( status ) return status;
14739
14740 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14741         if( !detach ) {
14742 #if defined( PTHREAD_CREATE_JOINABLE )
14743                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14744 #else
14745                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14746 #endif
14747
14748 #ifdef PTHREAD_CREATE_DETACHED
14749         } else {
14750                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14751 #endif
14752         }
14753         if( status ) return status;
14754 #endif
14755
14756         status = pthread_create( &t, &attr, task, NULL );
14757         if( status ) return status;
14758
14759 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14760         if( detach ) {
14761                 /* give thread a chance to complete */
14762                 /* it should remain joinable and hence detachable */
14763                 sleep( 1 );
14764
14765                 status = pthread_detach( t );
14766                 if( status ) return status;
14767         }
14768 #endif
14769
14770 #else
14771         /* Draft 4 pthreads */
14772         status = pthread_create( &t, pthread_attr_default, task, NULL );
14773         if( status ) return status;
14774
14775         if( detach ) {
14776                 /* give thread a chance to complete */
14777                 /* it should remain joinable and hence detachable */
14778                 sleep( 1 );
14779
14780                 status = pthread_detach( &t );
14781                 if( status ) return status;
14782         }
14783 #endif
14784
14785 #ifdef HAVE_LINUX_THREADS
14786         pthread_kill_other_threads_np();
14787 #endif
14788
14789         return 0;
14790
14791 ; return 0; }
14792 EOF
14793 if { (eval echo configure:14794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14794   rm -rf conftest*
14795   ol_cv_pthread_lpthreads_lmach_lexc=yes
14796 else
14797   echo "configure: failed program was:" >&5
14798   cat conftest.$ac_ext >&5
14799   rm -rf conftest*
14800   ol_cv_pthread_lpthreads_lmach_lexc=no
14801 fi
14802 rm -f conftest*
14803 else
14804   cat > conftest.$ac_ext <<EOF
14805 #line 14806 "configure"
14806 #include "confdefs.h"
14807 /* pthread test headers */
14808 #include <pthread.h>
14809 #ifndef NULL
14810 #define NULL (void*)0
14811 #endif
14812
14813 static void *task(p)
14814         void *p;
14815 {
14816         return (void *) (p == NULL);
14817 }
14818
14819
14820 int main(argc, argv)
14821         int argc;
14822         char **argv;
14823 {
14824
14825         /* pthread test function */
14826         pthread_t t;
14827         int status;
14828         int detach = 1;
14829
14830 #ifdef HAVE_PTHREADS_FINAL
14831         /* Final pthreads */
14832         pthread_attr_t attr;
14833
14834         status = pthread_attr_init(&attr);
14835         if( status ) return status;
14836
14837 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14838         if( !detach ) {
14839 #if defined( PTHREAD_CREATE_JOINABLE )
14840                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14841 #else
14842                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14843 #endif
14844
14845 #ifdef PTHREAD_CREATE_DETACHED
14846         } else {
14847                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14848 #endif
14849         }
14850         if( status ) return status;
14851 #endif
14852
14853         status = pthread_create( &t, &attr, task, NULL );
14854         if( status ) return status;
14855
14856 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14857         if( detach ) {
14858                 /* give thread a chance to complete */
14859                 /* it should remain joinable and hence detachable */
14860                 sleep( 1 );
14861
14862                 status = pthread_detach( t );
14863                 if( status ) return status;
14864         }
14865 #endif
14866
14867 #else
14868         /* Draft 4 pthreads */
14869         status = pthread_create( &t, pthread_attr_default, task, NULL );
14870         if( status ) return status;
14871
14872         if( detach ) {
14873                 /* give thread a chance to complete */
14874                 /* it should remain joinable and hence detachable */
14875                 sleep( 1 );
14876
14877                 status = pthread_detach( &t );
14878                 if( status ) return status;
14879         }
14880 #endif
14881
14882 #ifdef HAVE_LINUX_THREADS
14883         pthread_kill_other_threads_np();
14884 #endif
14885
14886         return 0;
14887
14888 }
14889
14890 EOF
14891 if { (eval echo configure:14892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14892 then
14893   ol_cv_pthread_lpthreads_lmach_lexc=yes
14894 else
14895   echo "configure: failed program was:" >&5
14896   cat conftest.$ac_ext >&5
14897   rm -fr conftest*
14898   ol_cv_pthread_lpthreads_lmach_lexc=no
14899 fi
14900 rm -fr conftest*
14901 fi
14902
14903
14904                 # restore the LIBS
14905                 LIBS="$ol_LIBS"
14906         
14907 fi
14908
14909 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14910
14911         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14912                 ol_link_pthreads="-lpthreads -lmach -lexc"
14913                 ol_link_threads=posix
14914         fi
14915 fi
14916
14917                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14918 if test "$ol_link_threads" = no ; then
14919         # try -lpthreads -lexc
14920         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14921 echo "configure:14922: checking for pthread link with -lpthreads -lexc" >&5
14922 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14923   echo $ac_n "(cached) $ac_c" 1>&6
14924 else
14925   
14926                 # save the flags
14927                 ol_LIBS="$LIBS"
14928                 LIBS="-lpthreads -lexc $LIBS"
14929
14930                 if test "$cross_compiling" = yes; then
14931   cat > conftest.$ac_ext <<EOF
14932 #line 14933 "configure"
14933 #include "confdefs.h"
14934 /* pthread test headers */
14935 #include <pthread.h>
14936 #ifndef NULL
14937 #define NULL (void*)0
14938 #endif
14939
14940 static void *task(p)
14941         void *p;
14942 {
14943         return (void *) (p == NULL);
14944 }
14945
14946 int main() {
14947
14948         /* pthread test function */
14949         pthread_t t;
14950         int status;
14951         int detach = 1;
14952
14953 #ifdef HAVE_PTHREADS_FINAL
14954         /* Final pthreads */
14955         pthread_attr_t attr;
14956
14957         status = pthread_attr_init(&attr);
14958         if( status ) return status;
14959
14960 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14961         if( !detach ) {
14962 #if defined( PTHREAD_CREATE_JOINABLE )
14963                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14964 #else
14965                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14966 #endif
14967
14968 #ifdef PTHREAD_CREATE_DETACHED
14969         } else {
14970                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14971 #endif
14972         }
14973         if( status ) return status;
14974 #endif
14975
14976         status = pthread_create( &t, &attr, task, NULL );
14977         if( status ) return status;
14978
14979 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14980         if( detach ) {
14981                 /* give thread a chance to complete */
14982                 /* it should remain joinable and hence detachable */
14983                 sleep( 1 );
14984
14985                 status = pthread_detach( t );
14986                 if( status ) return status;
14987         }
14988 #endif
14989
14990 #else
14991         /* Draft 4 pthreads */
14992         status = pthread_create( &t, pthread_attr_default, task, NULL );
14993         if( status ) return status;
14994
14995         if( detach ) {
14996                 /* give thread a chance to complete */
14997                 /* it should remain joinable and hence detachable */
14998                 sleep( 1 );
14999
15000                 status = pthread_detach( &t );
15001                 if( status ) return status;
15002         }
15003 #endif
15004
15005 #ifdef HAVE_LINUX_THREADS
15006         pthread_kill_other_threads_np();
15007 #endif
15008
15009         return 0;
15010
15011 ; return 0; }
15012 EOF
15013 if { (eval echo configure:15014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15014   rm -rf conftest*
15015   ol_cv_pthread_lpthreads_lexc=yes
15016 else
15017   echo "configure: failed program was:" >&5
15018   cat conftest.$ac_ext >&5
15019   rm -rf conftest*
15020   ol_cv_pthread_lpthreads_lexc=no
15021 fi
15022 rm -f conftest*
15023 else
15024   cat > conftest.$ac_ext <<EOF
15025 #line 15026 "configure"
15026 #include "confdefs.h"
15027 /* pthread test headers */
15028 #include <pthread.h>
15029 #ifndef NULL
15030 #define NULL (void*)0
15031 #endif
15032
15033 static void *task(p)
15034         void *p;
15035 {
15036         return (void *) (p == NULL);
15037 }
15038
15039
15040 int main(argc, argv)
15041         int argc;
15042         char **argv;
15043 {
15044
15045         /* pthread test function */
15046         pthread_t t;
15047         int status;
15048         int detach = 1;
15049
15050 #ifdef HAVE_PTHREADS_FINAL
15051         /* Final pthreads */
15052         pthread_attr_t attr;
15053
15054         status = pthread_attr_init(&attr);
15055         if( status ) return status;
15056
15057 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15058         if( !detach ) {
15059 #if defined( PTHREAD_CREATE_JOINABLE )
15060                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15061 #else
15062                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15063 #endif
15064
15065 #ifdef PTHREAD_CREATE_DETACHED
15066         } else {
15067                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15068 #endif
15069         }
15070         if( status ) return status;
15071 #endif
15072
15073         status = pthread_create( &t, &attr, task, NULL );
15074         if( status ) return status;
15075
15076 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15077         if( detach ) {
15078                 /* give thread a chance to complete */
15079                 /* it should remain joinable and hence detachable */
15080                 sleep( 1 );
15081
15082                 status = pthread_detach( t );
15083                 if( status ) return status;
15084         }
15085 #endif
15086
15087 #else
15088         /* Draft 4 pthreads */
15089         status = pthread_create( &t, pthread_attr_default, task, NULL );
15090         if( status ) return status;
15091
15092         if( detach ) {
15093                 /* give thread a chance to complete */
15094                 /* it should remain joinable and hence detachable */
15095                 sleep( 1 );
15096
15097                 status = pthread_detach( &t );
15098                 if( status ) return status;
15099         }
15100 #endif
15101
15102 #ifdef HAVE_LINUX_THREADS
15103         pthread_kill_other_threads_np();
15104 #endif
15105
15106         return 0;
15107
15108 }
15109
15110 EOF
15111 if { (eval echo configure:15112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15112 then
15113   ol_cv_pthread_lpthreads_lexc=yes
15114 else
15115   echo "configure: failed program was:" >&5
15116   cat conftest.$ac_ext >&5
15117   rm -fr conftest*
15118   ol_cv_pthread_lpthreads_lexc=no
15119 fi
15120 rm -fr conftest*
15121 fi
15122
15123
15124                 # restore the LIBS
15125                 LIBS="$ol_LIBS"
15126         
15127 fi
15128
15129 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15130
15131         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15132                 ol_link_pthreads="-lpthreads -lexc"
15133                 ol_link_threads=posix
15134         fi
15135 fi
15136
15137
15138                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15139 if test "$ol_link_threads" = no ; then
15140         # try -lpthreads
15141         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15142 echo "configure:15143: checking for pthread link with -lpthreads" >&5
15143 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15144   echo $ac_n "(cached) $ac_c" 1>&6
15145 else
15146   
15147                 # save the flags
15148                 ol_LIBS="$LIBS"
15149                 LIBS="-lpthreads $LIBS"
15150
15151                 if test "$cross_compiling" = yes; then
15152   cat > conftest.$ac_ext <<EOF
15153 #line 15154 "configure"
15154 #include "confdefs.h"
15155 /* pthread test headers */
15156 #include <pthread.h>
15157 #ifndef NULL
15158 #define NULL (void*)0
15159 #endif
15160
15161 static void *task(p)
15162         void *p;
15163 {
15164         return (void *) (p == NULL);
15165 }
15166
15167 int main() {
15168
15169         /* pthread test function */
15170         pthread_t t;
15171         int status;
15172         int detach = 1;
15173
15174 #ifdef HAVE_PTHREADS_FINAL
15175         /* Final pthreads */
15176         pthread_attr_t attr;
15177
15178         status = pthread_attr_init(&attr);
15179         if( status ) return status;
15180
15181 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15182         if( !detach ) {
15183 #if defined( PTHREAD_CREATE_JOINABLE )
15184                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15185 #else
15186                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15187 #endif
15188
15189 #ifdef PTHREAD_CREATE_DETACHED
15190         } else {
15191                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15192 #endif
15193         }
15194         if( status ) return status;
15195 #endif
15196
15197         status = pthread_create( &t, &attr, task, NULL );
15198         if( status ) return status;
15199
15200 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15201         if( detach ) {
15202                 /* give thread a chance to complete */
15203                 /* it should remain joinable and hence detachable */
15204                 sleep( 1 );
15205
15206                 status = pthread_detach( t );
15207                 if( status ) return status;
15208         }
15209 #endif
15210
15211 #else
15212         /* Draft 4 pthreads */
15213         status = pthread_create( &t, pthread_attr_default, task, NULL );
15214         if( status ) return status;
15215
15216         if( detach ) {
15217                 /* give thread a chance to complete */
15218                 /* it should remain joinable and hence detachable */
15219                 sleep( 1 );
15220
15221                 status = pthread_detach( &t );
15222                 if( status ) return status;
15223         }
15224 #endif
15225
15226 #ifdef HAVE_LINUX_THREADS
15227         pthread_kill_other_threads_np();
15228 #endif
15229
15230         return 0;
15231
15232 ; return 0; }
15233 EOF
15234 if { (eval echo configure:15235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15235   rm -rf conftest*
15236   ol_cv_pthread_lib_lpthreads=yes
15237 else
15238   echo "configure: failed program was:" >&5
15239   cat conftest.$ac_ext >&5
15240   rm -rf conftest*
15241   ol_cv_pthread_lib_lpthreads=no
15242 fi
15243 rm -f conftest*
15244 else
15245   cat > conftest.$ac_ext <<EOF
15246 #line 15247 "configure"
15247 #include "confdefs.h"
15248 /* pthread test headers */
15249 #include <pthread.h>
15250 #ifndef NULL
15251 #define NULL (void*)0
15252 #endif
15253
15254 static void *task(p)
15255         void *p;
15256 {
15257         return (void *) (p == NULL);
15258 }
15259
15260
15261 int main(argc, argv)
15262         int argc;
15263         char **argv;
15264 {
15265
15266         /* pthread test function */
15267         pthread_t t;
15268         int status;
15269         int detach = 1;
15270
15271 #ifdef HAVE_PTHREADS_FINAL
15272         /* Final pthreads */
15273         pthread_attr_t attr;
15274
15275         status = pthread_attr_init(&attr);
15276         if( status ) return status;
15277
15278 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15279         if( !detach ) {
15280 #if defined( PTHREAD_CREATE_JOINABLE )
15281                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15282 #else
15283                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15284 #endif
15285
15286 #ifdef PTHREAD_CREATE_DETACHED
15287         } else {
15288                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15289 #endif
15290         }
15291         if( status ) return status;
15292 #endif
15293
15294         status = pthread_create( &t, &attr, task, NULL );
15295         if( status ) return status;
15296
15297 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15298         if( detach ) {
15299                 /* give thread a chance to complete */
15300                 /* it should remain joinable and hence detachable */
15301                 sleep( 1 );
15302
15303                 status = pthread_detach( t );
15304                 if( status ) return status;
15305         }
15306 #endif
15307
15308 #else
15309         /* Draft 4 pthreads */
15310         status = pthread_create( &t, pthread_attr_default, task, NULL );
15311         if( status ) return status;
15312
15313         if( detach ) {
15314                 /* give thread a chance to complete */
15315                 /* it should remain joinable and hence detachable */
15316                 sleep( 1 );
15317
15318                 status = pthread_detach( &t );
15319                 if( status ) return status;
15320         }
15321 #endif
15322
15323 #ifdef HAVE_LINUX_THREADS
15324         pthread_kill_other_threads_np();
15325 #endif
15326
15327         return 0;
15328
15329 }
15330
15331 EOF
15332 if { (eval echo configure:15333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15333 then
15334   ol_cv_pthread_lib_lpthreads=yes
15335 else
15336   echo "configure: failed program was:" >&5
15337   cat conftest.$ac_ext >&5
15338   rm -fr conftest*
15339   ol_cv_pthread_lib_lpthreads=no
15340 fi
15341 rm -fr conftest*
15342 fi
15343
15344
15345                 # restore the LIBS
15346                 LIBS="$ol_LIBS"
15347         
15348 fi
15349
15350 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15351
15352         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15353                 ol_link_pthreads="-lpthreads"
15354                 ol_link_threads=posix
15355         fi
15356 fi
15357
15358
15359                 if test $ol_link_threads != no ; then
15360                         cat >> confdefs.h <<\EOF
15361 #define HAVE_PTHREADS 1
15362 EOF
15363
15364
15365                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15366
15367                                                 save_CPPFLAGS="$CPPFLAGS"
15368                         save_LIBS="$LIBS"
15369                         LIBS="$LTHREAD_LIBS $LIBS"
15370
15371                                                                                                 for ac_func in sched_yield pthread_yield
15372 do
15373 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15374 echo "configure:15375: checking for $ac_func" >&5
15375 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15376   echo $ac_n "(cached) $ac_c" 1>&6
15377 else
15378   cat > conftest.$ac_ext <<EOF
15379 #line 15380 "configure"
15380 #include "confdefs.h"
15381 /* System header to define __stub macros and hopefully few prototypes,
15382     which can conflict with char $ac_func(); below.  */
15383 #include <assert.h>
15384 /* Override any gcc2 internal prototype to avoid an error.  */
15385 /* We use char because int might match the return type of a gcc2
15386     builtin and then its argument prototype would still apply.  */
15387 char $ac_func();
15388 char (*f)();
15389
15390 int main() {
15391
15392 /* The GNU C library defines this for functions which it implements
15393     to always fail with ENOSYS.  Some functions are actually named
15394     something starting with __ and the normal name is an alias.  */
15395 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15396 choke me
15397 #else
15398 f = $ac_func;
15399 #endif
15400
15401 ; return 0; }
15402 EOF
15403 if { (eval echo configure:15404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15404   rm -rf conftest*
15405   eval "ac_cv_func_$ac_func=yes"
15406 else
15407   echo "configure: failed program was:" >&5
15408   cat conftest.$ac_ext >&5
15409   rm -rf conftest*
15410   eval "ac_cv_func_$ac_func=no"
15411 fi
15412 rm -f conftest*
15413 fi
15414
15415 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15416   echo "$ac_t""yes" 1>&6
15417     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15418   cat >> confdefs.h <<EOF
15419 #define $ac_tr_func 1
15420 EOF
15421  
15422 else
15423   echo "$ac_t""no" 1>&6
15424 fi
15425 done
15426
15427
15428                         if test $ac_cv_func_sched_yield = no -a \
15429                                 $ac_cv_func_pthread_yield = no ; then
15430                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15431 echo "configure:15432: checking for sched_yield in -lrt" >&5
15432 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15434   echo $ac_n "(cached) $ac_c" 1>&6
15435 else
15436   ac_save_LIBS="$LIBS"
15437 LIBS="-lrt  $LIBS"
15438 cat > conftest.$ac_ext <<EOF
15439 #line 15440 "configure"
15440 #include "confdefs.h"
15441 /* Override any gcc2 internal prototype to avoid an error.  */
15442 /* We use char because int might match the return type of a gcc2
15443     builtin and then its argument prototype would still apply.  */
15444 char sched_yield();
15445
15446 int main() {
15447 sched_yield()
15448 ; return 0; }
15449 EOF
15450 if { (eval echo configure:15451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15451   rm -rf conftest*
15452   eval "ac_cv_lib_$ac_lib_var=yes"
15453 else
15454   echo "configure: failed program was:" >&5
15455   cat conftest.$ac_ext >&5
15456   rm -rf conftest*
15457   eval "ac_cv_lib_$ac_lib_var=no"
15458 fi
15459 rm -f conftest*
15460 LIBS="$ac_save_LIBS"
15461
15462 fi
15463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15464   echo "$ac_t""yes" 1>&6
15465   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15466                                         cat >> confdefs.h <<\EOF
15467 #define HAVE_SCHED_YIELD 1
15468 EOF
15469
15470                                         ac_cv_func_sched_yield=yes
15471 else
15472   echo "$ac_t""no" 1>&6
15473 ac_cv_func_sched_yield=no
15474 fi
15475
15476                         fi
15477                         if test $ac_cv_func_sched_yield = no -a \
15478                                 $ac_cv_func_pthread_yield = no ; then
15479                                                                                                 for ac_func in thr_yield
15480 do
15481 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15482 echo "configure:15483: checking for $ac_func" >&5
15483 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15484   echo $ac_n "(cached) $ac_c" 1>&6
15485 else
15486   cat > conftest.$ac_ext <<EOF
15487 #line 15488 "configure"
15488 #include "confdefs.h"
15489 /* System header to define __stub macros and hopefully few prototypes,
15490     which can conflict with char $ac_func(); below.  */
15491 #include <assert.h>
15492 /* Override any gcc2 internal prototype to avoid an error.  */
15493 /* We use char because int might match the return type of a gcc2
15494     builtin and then its argument prototype would still apply.  */
15495 char $ac_func();
15496 char (*f)();
15497
15498 int main() {
15499
15500 /* The GNU C library defines this for functions which it implements
15501     to always fail with ENOSYS.  Some functions are actually named
15502     something starting with __ and the normal name is an alias.  */
15503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15504 choke me
15505 #else
15506 f = $ac_func;
15507 #endif
15508
15509 ; return 0; }
15510 EOF
15511 if { (eval echo configure:15512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15512   rm -rf conftest*
15513   eval "ac_cv_func_$ac_func=yes"
15514 else
15515   echo "configure: failed program was:" >&5
15516   cat conftest.$ac_ext >&5
15517   rm -rf conftest*
15518   eval "ac_cv_func_$ac_func=no"
15519 fi
15520 rm -f conftest*
15521 fi
15522
15523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15524   echo "$ac_t""yes" 1>&6
15525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15526   cat >> confdefs.h <<EOF
15527 #define $ac_tr_func 1
15528 EOF
15529  
15530 else
15531   echo "$ac_t""no" 1>&6
15532 fi
15533 done
15534
15535                         fi
15536                         if test $ac_cv_func_sched_yield = no -a \
15537                                 $ac_cv_func_pthread_yield = no -a \
15538                                 "$ac_cv_func_thr_yield" = no ; then
15539                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15540                         fi
15541
15542                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15543 do
15544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15545 echo "configure:15546: checking for $ac_func" >&5
15546 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15547   echo $ac_n "(cached) $ac_c" 1>&6
15548 else
15549   cat > conftest.$ac_ext <<EOF
15550 #line 15551 "configure"
15551 #include "confdefs.h"
15552 /* System header to define __stub macros and hopefully few prototypes,
15553     which can conflict with char $ac_func(); below.  */
15554 #include <assert.h>
15555 /* Override any gcc2 internal prototype to avoid an error.  */
15556 /* We use char because int might match the return type of a gcc2
15557     builtin and then its argument prototype would still apply.  */
15558 char $ac_func();
15559 char (*f)();
15560
15561 int main() {
15562
15563 /* The GNU C library defines this for functions which it implements
15564     to always fail with ENOSYS.  Some functions are actually named
15565     something starting with __ and the normal name is an alias.  */
15566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15567 choke me
15568 #else
15569 f = $ac_func;
15570 #endif
15571
15572 ; return 0; }
15573 EOF
15574 if { (eval echo configure:15575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15575   rm -rf conftest*
15576   eval "ac_cv_func_$ac_func=yes"
15577 else
15578   echo "configure: failed program was:" >&5
15579   cat conftest.$ac_ext >&5
15580   rm -rf conftest*
15581   eval "ac_cv_func_$ac_func=no"
15582 fi
15583 rm -f conftest*
15584 fi
15585
15586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15587   echo "$ac_t""yes" 1>&6
15588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15589   cat >> confdefs.h <<EOF
15590 #define $ac_tr_func 1
15591 EOF
15592  
15593 else
15594   echo "$ac_t""no" 1>&6
15595 fi
15596 done
15597
15598
15599                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15600 echo "configure:15601: checking for pthread_detach with <pthread.h>" >&5
15601 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15602   echo $ac_n "(cached) $ac_c" 1>&6
15603 else
15604   
15605                                                                 cat > conftest.$ac_ext <<EOF
15606 #line 15607 "configure"
15607 #include "confdefs.h"
15608
15609 #include <pthread.h>
15610 #ifndef NULL
15611 #define NULL (void*)0
15612 #endif
15613
15614 int main() {
15615 pthread_detach(NULL);
15616 ; return 0; }
15617 EOF
15618 if { (eval echo configure:15619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15619   rm -rf conftest*
15620   ol_cv_func_pthread_detach=yes
15621 else
15622   echo "configure: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   rm -rf conftest*
15625   ol_cv_func_pthread_detach=no
15626 fi
15627 rm -f conftest*
15628                         
15629 fi
15630
15631 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15632
15633                         if test $ol_cv_func_pthread_detach = no ; then
15634                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15635                         fi
15636
15637                         cat >> confdefs.h <<\EOF
15638 #define HAVE_PTHREAD_DETACH 1
15639 EOF
15640
15641
15642                                                 for ac_func in \
15643                                 pthread_setconcurrency \
15644                                 pthread_getconcurrency \
15645                                 thr_setconcurrency \
15646                                 thr_getconcurrency \
15647                         
15648 do
15649 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15650 echo "configure:15651: checking for $ac_func" >&5
15651 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15652   echo $ac_n "(cached) $ac_c" 1>&6
15653 else
15654   cat > conftest.$ac_ext <<EOF
15655 #line 15656 "configure"
15656 #include "confdefs.h"
15657 /* System header to define __stub macros and hopefully few prototypes,
15658     which can conflict with char $ac_func(); below.  */
15659 #include <assert.h>
15660 /* Override any gcc2 internal prototype to avoid an error.  */
15661 /* We use char because int might match the return type of a gcc2
15662     builtin and then its argument prototype would still apply.  */
15663 char $ac_func();
15664 char (*f)();
15665
15666 int main() {
15667
15668 /* The GNU C library defines this for functions which it implements
15669     to always fail with ENOSYS.  Some functions are actually named
15670     something starting with __ and the normal name is an alias.  */
15671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15672 choke me
15673 #else
15674 f = $ac_func;
15675 #endif
15676
15677 ; return 0; }
15678 EOF
15679 if { (eval echo configure:15680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15680   rm -rf conftest*
15681   eval "ac_cv_func_$ac_func=yes"
15682 else
15683   echo "configure: failed program was:" >&5
15684   cat conftest.$ac_ext >&5
15685   rm -rf conftest*
15686   eval "ac_cv_func_$ac_func=no"
15687 fi
15688 rm -f conftest*
15689 fi
15690
15691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15692   echo "$ac_t""yes" 1>&6
15693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15694   cat >> confdefs.h <<EOF
15695 #define $ac_tr_func 1
15696 EOF
15697  
15698 else
15699   echo "$ac_t""no" 1>&6
15700 fi
15701 done
15702
15703
15704                         
15705         for ac_func in pthread_kill_other_threads_np
15706 do
15707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15708 echo "configure:15709: checking for $ac_func" >&5
15709 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15710   echo $ac_n "(cached) $ac_c" 1>&6
15711 else
15712   cat > conftest.$ac_ext <<EOF
15713 #line 15714 "configure"
15714 #include "confdefs.h"
15715 /* System header to define __stub macros and hopefully few prototypes,
15716     which can conflict with char $ac_func(); below.  */
15717 #include <assert.h>
15718 /* Override any gcc2 internal prototype to avoid an error.  */
15719 /* We use char because int might match the return type of a gcc2
15720     builtin and then its argument prototype would still apply.  */
15721 char $ac_func();
15722 char (*f)();
15723
15724 int main() {
15725
15726 /* The GNU C library defines this for functions which it implements
15727     to always fail with ENOSYS.  Some functions are actually named
15728     something starting with __ and the normal name is an alias.  */
15729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15730 choke me
15731 #else
15732 f = $ac_func;
15733 #endif
15734
15735 ; return 0; }
15736 EOF
15737 if { (eval echo configure:15738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15738   rm -rf conftest*
15739   eval "ac_cv_func_$ac_func=yes"
15740 else
15741   echo "configure: failed program was:" >&5
15742   cat conftest.$ac_ext >&5
15743   rm -rf conftest*
15744   eval "ac_cv_func_$ac_func=no"
15745 fi
15746 rm -f conftest*
15747 fi
15748
15749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15750   echo "$ac_t""yes" 1>&6
15751     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15752   cat >> confdefs.h <<EOF
15753 #define $ac_tr_func 1
15754 EOF
15755  
15756 else
15757   echo "$ac_t""no" 1>&6
15758 fi
15759 done
15760
15761         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15762 echo "configure:15763: checking for LinuxThreads implementation" >&5
15763 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15764   echo $ac_n "(cached) $ac_c" 1>&6
15765 else
15766   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15767 fi
15768
15769 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15770
15771                         
15772         
15773         
15774         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15775 echo "configure:15776: checking for LinuxThreads consistency" >&5
15776 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15777   echo $ac_n "(cached) $ac_c" 1>&6
15778 else
15779   
15780                 if test $ol_cv_header_linux_threads = yes -a \
15781                         $ol_cv_sys_linux_threads = yes; then
15782                         ol_cv_linux_threads=yes
15783                 elif test $ol_cv_header_linux_threads = no -a \
15784                         $ol_cv_sys_linux_threads = no; then
15785                         ol_cv_linux_threads=no
15786                 else
15787                         ol_cv_linux_threads=error
15788                 fi
15789         
15790 fi
15791
15792 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15793
15794
15795                         if test $ol_cv_linux_threads = error; then
15796                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15797                         fi
15798
15799                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15800 echo "configure:15801: checking if pthread_create() works" >&5
15801 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15802   echo $ac_n "(cached) $ac_c" 1>&6
15803 else
15804   
15805                         if test "$cross_compiling" = yes; then
15806                                 ol_cv_pthread_create_works=yes
15807 else
15808   cat > conftest.$ac_ext <<EOF
15809 #line 15810 "configure"
15810 #include "confdefs.h"
15811 /* pthread test headers */
15812 #include <pthread.h>
15813 #ifndef NULL
15814 #define NULL (void*)0
15815 #endif
15816
15817 static void *task(p)
15818         void *p;
15819 {
15820         return (void *) (p == NULL);
15821 }
15822
15823
15824 int main(argc, argv)
15825         int argc;
15826         char **argv;
15827 {
15828
15829         /* pthread test function */
15830         pthread_t t;
15831         int status;
15832         int detach = 1;
15833
15834 #ifdef HAVE_PTHREADS_FINAL
15835         /* Final pthreads */
15836         pthread_attr_t attr;
15837
15838         status = pthread_attr_init(&attr);
15839         if( status ) return status;
15840
15841 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15842         if( !detach ) {
15843 #if defined( PTHREAD_CREATE_JOINABLE )
15844                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15845 #else
15846                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15847 #endif
15848
15849 #ifdef PTHREAD_CREATE_DETACHED
15850         } else {
15851                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15852 #endif
15853         }
15854         if( status ) return status;
15855 #endif
15856
15857         status = pthread_create( &t, &attr, task, NULL );
15858         if( status ) return status;
15859
15860 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15861         if( detach ) {
15862                 /* give thread a chance to complete */
15863                 /* it should remain joinable and hence detachable */
15864                 sleep( 1 );
15865
15866                 status = pthread_detach( t );
15867                 if( status ) return status;
15868         }
15869 #endif
15870
15871 #else
15872         /* Draft 4 pthreads */
15873         status = pthread_create( &t, pthread_attr_default, task, NULL );
15874         if( status ) return status;
15875
15876         if( detach ) {
15877                 /* give thread a chance to complete */
15878                 /* it should remain joinable and hence detachable */
15879                 sleep( 1 );
15880
15881                 status = pthread_detach( &t );
15882                 if( status ) return status;
15883         }
15884 #endif
15885
15886 #ifdef HAVE_LINUX_THREADS
15887         pthread_kill_other_threads_np();
15888 #endif
15889
15890         return 0;
15891
15892 }
15893
15894 EOF
15895 if { (eval echo configure:15896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15896 then
15897   ol_cv_pthread_create_works=yes
15898 else
15899   echo "configure: failed program was:" >&5
15900   cat conftest.$ac_ext >&5
15901   rm -fr conftest*
15902   ol_cv_pthread_create_works=no
15903 fi
15904 rm -fr conftest*
15905 fi
15906
15907 fi
15908
15909 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15910
15911                         if test $ol_cv_pthread_create_works = no ; then
15912                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15913                         fi
15914
15915                                                 if test $ol_with_yielding_select = auto ; then
15916                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15917 echo "configure:15918: checking if select yields when using pthreads" >&5
15918 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15919   echo $ac_n "(cached) $ac_c" 1>&6
15920 else
15921   
15922                                 if test "$cross_compiling" = yes; then
15923   ol_cv_pthread_select_yields=cross
15924 else
15925   cat > conftest.$ac_ext <<EOF
15926 #line 15927 "configure"
15927 #include "confdefs.h"
15928
15929 #include <sys/types.h>
15930 #include <sys/time.h>
15931 #include <unistd.h>
15932 #include <pthread.h>
15933 #ifndef NULL
15934 #define NULL (void*) 0
15935 #endif
15936
15937 static int fildes[2];
15938
15939 static void *task(p)
15940         void *p;
15941 {
15942         int i;
15943         struct timeval tv;
15944
15945         fd_set rfds;
15946
15947         tv.tv_sec=10;
15948         tv.tv_usec=0;
15949
15950         FD_ZERO(&rfds);
15951         FD_SET(fildes[0], &rfds);
15952
15953         /* we're not interested in any fds */
15954         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15955
15956         if(i < 0) {
15957                 perror("select");
15958                 exit(10);
15959         }
15960
15961         exit(0); /* if we exit here, the select blocked the whole process */
15962 }
15963
15964 int main(argc, argv)
15965         int argc;
15966         char **argv;
15967 {
15968         pthread_t t;
15969
15970         /* create a pipe to select */
15971         if(pipe(&fildes[0])) {
15972                 perror("select");
15973                 exit(1);
15974         }
15975
15976 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15977         (void) pthread_setconcurrency(2);
15978 #else
15979 #ifdef HAVE_THR_SETCONCURRENCY
15980         /* Set Solaris LWP concurrency to 2 */
15981         thr_setconcurrency(2);
15982 #endif
15983 #endif
15984
15985 #if HAVE_PTHREADS_D4
15986         pthread_create(&t, pthread_attr_default, task, NULL);
15987 #else
15988         pthread_create(&t, NULL, task, NULL);
15989 #endif
15990
15991 #if HAVE_SCHED_YIELD
15992         sched_yield();  /* make sure task runs first */
15993 #else
15994 #ifdef HAVE_PTHREAD_YIELD
15995         pthread_yield();        /* make sure task runs first */
15996 #endif
15997 #endif
15998
15999         exit(2);
16000 }
16001 EOF
16002 if { (eval echo configure:16003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16003 then
16004   ol_cv_pthread_select_yields=no
16005 else
16006   echo "configure: failed program was:" >&5
16007   cat conftest.$ac_ext >&5
16008   rm -fr conftest*
16009   ol_cv_pthread_select_yields=yes
16010 fi
16011 rm -fr conftest*
16012 fi
16013
16014 fi
16015
16016 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16017
16018                                 if test $ol_cv_pthread_select_yields = cross ; then
16019                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16020                                 fi
16021
16022                                 if test $ol_cv_pthread_select_yields = yes ; then
16023                                         ol_with_yielding_select=yes
16024                                 fi
16025                         fi
16026
16027                                                 CPPFLAGS="$save_CPPFLAGS"
16028                         LIBS="$save_LIBS"
16029                 else
16030                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16031                 fi
16032         fi
16033
16034         if test $ol_with_threads = posix ; then
16035                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16036         fi
16037 fi
16038
16039 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16040         -o $ol_with_threads = mach ; then
16041
16042                 for ac_hdr in mach/cthreads.h cthreads.h
16043 do
16044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16046 echo "configure:16047: checking for $ac_hdr" >&5
16047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16048   echo $ac_n "(cached) $ac_c" 1>&6
16049 else
16050   cat > conftest.$ac_ext <<EOF
16051 #line 16052 "configure"
16052 #include "confdefs.h"
16053 #include <$ac_hdr>
16054 EOF
16055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16056 { (eval echo configure:16057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16058 if test -z "$ac_err"; then
16059   rm -rf conftest*
16060   eval "ac_cv_header_$ac_safe=yes"
16061 else
16062   echo "$ac_err" >&5
16063   echo "configure: failed program was:" >&5
16064   cat conftest.$ac_ext >&5
16065   rm -rf conftest*
16066   eval "ac_cv_header_$ac_safe=no"
16067 fi
16068 rm -f conftest*
16069 fi
16070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16071   echo "$ac_t""yes" 1>&6
16072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16073   cat >> confdefs.h <<EOF
16074 #define $ac_tr_hdr 1
16075 EOF
16076  
16077 else
16078   echo "$ac_t""no" 1>&6
16079 fi
16080 done
16081
16082         if test $ac_cv_header_mach_cthreads_h = yes ; then
16083                 ol_with_threads=found
16084
16085                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16086 echo "configure:16087: checking for cthread_fork" >&5
16087 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16088   echo $ac_n "(cached) $ac_c" 1>&6
16089 else
16090   cat > conftest.$ac_ext <<EOF
16091 #line 16092 "configure"
16092 #include "confdefs.h"
16093 /* System header to define __stub macros and hopefully few prototypes,
16094     which can conflict with char cthread_fork(); below.  */
16095 #include <assert.h>
16096 /* Override any gcc2 internal prototype to avoid an error.  */
16097 /* We use char because int might match the return type of a gcc2
16098     builtin and then its argument prototype would still apply.  */
16099 char cthread_fork();
16100 char (*f)();
16101
16102 int main() {
16103
16104 /* The GNU C library defines this for functions which it implements
16105     to always fail with ENOSYS.  Some functions are actually named
16106     something starting with __ and the normal name is an alias.  */
16107 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16108 choke me
16109 #else
16110 f = cthread_fork;
16111 #endif
16112
16113 ; return 0; }
16114 EOF
16115 if { (eval echo configure:16116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16116   rm -rf conftest*
16117   eval "ac_cv_func_cthread_fork=yes"
16118 else
16119   echo "configure: failed program was:" >&5
16120   cat conftest.$ac_ext >&5
16121   rm -rf conftest*
16122   eval "ac_cv_func_cthread_fork=no"
16123 fi
16124 rm -f conftest*
16125 fi
16126
16127 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16128   echo "$ac_t""yes" 1>&6
16129   ol_link_threads=yes
16130 else
16131   echo "$ac_t""no" 1>&6
16132 fi
16133
16134
16135                 if test $ol_link_threads = no ; then
16136                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16137 echo "configure:16138: checking for cthread_fork with -all_load" >&5
16138 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16139   echo $ac_n "(cached) $ac_c" 1>&6
16140 else
16141   
16142                                                                 save_LIBS="$LIBS"
16143                                 LIBS="-all_load $LIBS"
16144                                 cat > conftest.$ac_ext <<EOF
16145 #line 16146 "configure"
16146 #include "confdefs.h"
16147 #include <mach/cthreads.h>
16148 int main() {
16149
16150                                         cthread_fork((void *)0, (void *)0);
16151                                         
16152 ; return 0; }
16153 EOF
16154 if { (eval echo configure:16155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16155   rm -rf conftest*
16156   ol_cv_cthread_all_load=yes
16157 else
16158   echo "configure: failed program was:" >&5
16159   cat conftest.$ac_ext >&5
16160   rm -rf conftest*
16161   ol_cv_cthread_all_load=no
16162 fi
16163 rm -f conftest*
16164                                                                 LIBS="$save_LIBS"
16165                         
16166 fi
16167
16168 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16169
16170                         if test $ol_cv_cthread_all_load = yes ; then
16171                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16172                                 ol_link_threads=mach
16173                                 ol_with_threads=found
16174                         fi
16175                 fi
16176
16177         elif test $ac_cv_header_cthreads_h = yes ; then
16178                                 
16179                 ol_with_threads=found
16180  
16181                                 save_LIBS="$LIBS"
16182                 LIBS="$LIBS -lthreads"
16183                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16184 echo "configure:16185: checking for cthread_fork" >&5
16185 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16186   echo $ac_n "(cached) $ac_c" 1>&6
16187 else
16188   cat > conftest.$ac_ext <<EOF
16189 #line 16190 "configure"
16190 #include "confdefs.h"
16191 /* System header to define __stub macros and hopefully few prototypes,
16192     which can conflict with char cthread_fork(); below.  */
16193 #include <assert.h>
16194 /* Override any gcc2 internal prototype to avoid an error.  */
16195 /* We use char because int might match the return type of a gcc2
16196     builtin and then its argument prototype would still apply.  */
16197 char cthread_fork();
16198 char (*f)();
16199
16200 int main() {
16201
16202 /* The GNU C library defines this for functions which it implements
16203     to always fail with ENOSYS.  Some functions are actually named
16204     something starting with __ and the normal name is an alias.  */
16205 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16206 choke me
16207 #else
16208 f = cthread_fork;
16209 #endif
16210
16211 ; return 0; }
16212 EOF
16213 if { (eval echo configure:16214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16214   rm -rf conftest*
16215   eval "ac_cv_func_cthread_fork=yes"
16216 else
16217   echo "configure: failed program was:" >&5
16218   cat conftest.$ac_ext >&5
16219   rm -rf conftest*
16220   eval "ac_cv_func_cthread_fork=no"
16221 fi
16222 rm -f conftest*
16223 fi
16224
16225 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16226   echo "$ac_t""yes" 1>&6
16227   ol_link_threads=yes
16228 else
16229   echo "$ac_t""no" 1>&6
16230 fi
16231
16232                 LIBS="$save_LIBS"
16233
16234                 if test $ol_link_threads = yes ; then
16235                         LTHREAD_LIBS="-lthreads"
16236                         ol_link_threads=mach
16237                         ol_with_threads=found
16238                 else
16239                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16240                 fi
16241
16242         elif test $ol_with_threads = mach ; then
16243                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16244         fi
16245
16246         if test $ol_link_threads = mach ; then
16247                 cat >> confdefs.h <<\EOF
16248 #define HAVE_MACH_CTHREADS 1
16249 EOF
16250
16251         elif test $ol_with_threads = found ; then
16252                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16253         fi
16254 fi
16255
16256 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16257         -o $ol_with_threads = pth ; then
16258
16259         for ac_hdr in pth.h
16260 do
16261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16263 echo "configure:16264: checking for $ac_hdr" >&5
16264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16265   echo $ac_n "(cached) $ac_c" 1>&6
16266 else
16267   cat > conftest.$ac_ext <<EOF
16268 #line 16269 "configure"
16269 #include "confdefs.h"
16270 #include <$ac_hdr>
16271 EOF
16272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16273 { (eval echo configure:16274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16275 if test -z "$ac_err"; then
16276   rm -rf conftest*
16277   eval "ac_cv_header_$ac_safe=yes"
16278 else
16279   echo "$ac_err" >&5
16280   echo "configure: failed program was:" >&5
16281   cat conftest.$ac_ext >&5
16282   rm -rf conftest*
16283   eval "ac_cv_header_$ac_safe=no"
16284 fi
16285 rm -f conftest*
16286 fi
16287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16288   echo "$ac_t""yes" 1>&6
16289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16290   cat >> confdefs.h <<EOF
16291 #define $ac_tr_hdr 1
16292 EOF
16293  
16294 else
16295   echo "$ac_t""no" 1>&6
16296 fi
16297 done
16298
16299
16300         if test $ac_cv_header_pth_h = yes ; then
16301                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16302 echo "configure:16303: checking for pth_version in -lpth" >&5
16303 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16304 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16305   echo $ac_n "(cached) $ac_c" 1>&6
16306 else
16307   ac_save_LIBS="$LIBS"
16308 LIBS="-lpth  $LIBS"
16309 cat > conftest.$ac_ext <<EOF
16310 #line 16311 "configure"
16311 #include "confdefs.h"
16312 /* Override any gcc2 internal prototype to avoid an error.  */
16313 /* We use char because int might match the return type of a gcc2
16314     builtin and then its argument prototype would still apply.  */
16315 char pth_version();
16316
16317 int main() {
16318 pth_version()
16319 ; return 0; }
16320 EOF
16321 if { (eval echo configure:16322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16322   rm -rf conftest*
16323   eval "ac_cv_lib_$ac_lib_var=yes"
16324 else
16325   echo "configure: failed program was:" >&5
16326   cat conftest.$ac_ext >&5
16327   rm -rf conftest*
16328   eval "ac_cv_lib_$ac_lib_var=no"
16329 fi
16330 rm -f conftest*
16331 LIBS="$ac_save_LIBS"
16332
16333 fi
16334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16335   echo "$ac_t""yes" 1>&6
16336   have_pth=yes
16337 else
16338   echo "$ac_t""no" 1>&6
16339 have_pth=no
16340 fi
16341
16342
16343                 if test $have_pth = yes ; then
16344                         cat >> confdefs.h <<\EOF
16345 #define HAVE_GNU_PTH 1
16346 EOF
16347
16348                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16349                         ol_link_threads=pth
16350                         ol_with_threads=found
16351
16352                         if test $ol_with_yielding_select = auto ; then
16353                                 ol_with_yielding_select=yes
16354                         fi
16355                 fi
16356         fi
16357 fi
16358
16359 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16360         -o $ol_with_threads = lwp ; then
16361
16362                 for ac_hdr in thread.h synch.h
16363 do
16364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16366 echo "configure:16367: checking for $ac_hdr" >&5
16367 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16368   echo $ac_n "(cached) $ac_c" 1>&6
16369 else
16370   cat > conftest.$ac_ext <<EOF
16371 #line 16372 "configure"
16372 #include "confdefs.h"
16373 #include <$ac_hdr>
16374 EOF
16375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16376 { (eval echo configure:16377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16378 if test -z "$ac_err"; then
16379   rm -rf conftest*
16380   eval "ac_cv_header_$ac_safe=yes"
16381 else
16382   echo "$ac_err" >&5
16383   echo "configure: failed program was:" >&5
16384   cat conftest.$ac_ext >&5
16385   rm -rf conftest*
16386   eval "ac_cv_header_$ac_safe=no"
16387 fi
16388 rm -f conftest*
16389 fi
16390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16391   echo "$ac_t""yes" 1>&6
16392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16393   cat >> confdefs.h <<EOF
16394 #define $ac_tr_hdr 1
16395 EOF
16396  
16397 else
16398   echo "$ac_t""no" 1>&6
16399 fi
16400 done
16401
16402         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16403                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16404 echo "configure:16405: checking for thr_create in -lthread" >&5
16405 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16407   echo $ac_n "(cached) $ac_c" 1>&6
16408 else
16409   ac_save_LIBS="$LIBS"
16410 LIBS="-lthread  $LIBS"
16411 cat > conftest.$ac_ext <<EOF
16412 #line 16413 "configure"
16413 #include "confdefs.h"
16414 /* Override any gcc2 internal prototype to avoid an error.  */
16415 /* We use char because int might match the return type of a gcc2
16416     builtin and then its argument prototype would still apply.  */
16417 char thr_create();
16418
16419 int main() {
16420 thr_create()
16421 ; return 0; }
16422 EOF
16423 if { (eval echo configure:16424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16424   rm -rf conftest*
16425   eval "ac_cv_lib_$ac_lib_var=yes"
16426 else
16427   echo "configure: failed program was:" >&5
16428   cat conftest.$ac_ext >&5
16429   rm -rf conftest*
16430   eval "ac_cv_lib_$ac_lib_var=no"
16431 fi
16432 rm -f conftest*
16433 LIBS="$ac_save_LIBS"
16434
16435 fi
16436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16437   echo "$ac_t""yes" 1>&6
16438   have_thr=yes
16439 else
16440   echo "$ac_t""no" 1>&6
16441 have_thr=no
16442 fi
16443
16444
16445                 if test $have_thr = yes ; then
16446                         cat >> confdefs.h <<\EOF
16447 #define HAVE_THR 1
16448 EOF
16449
16450                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16451                         ol_link_threads=thr
16452
16453                         if test $ol_with_yielding_select = auto ; then
16454                                 ol_with_yielding_select=yes
16455                         fi
16456
16457                                                 for ac_func in \
16458                                 thr_setconcurrency \
16459                                 thr_getconcurrency \
16460                         
16461 do
16462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16463 echo "configure:16464: checking for $ac_func" >&5
16464 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16465   echo $ac_n "(cached) $ac_c" 1>&6
16466 else
16467   cat > conftest.$ac_ext <<EOF
16468 #line 16469 "configure"
16469 #include "confdefs.h"
16470 /* System header to define __stub macros and hopefully few prototypes,
16471     which can conflict with char $ac_func(); below.  */
16472 #include <assert.h>
16473 /* Override any gcc2 internal prototype to avoid an error.  */
16474 /* We use char because int might match the return type of a gcc2
16475     builtin and then its argument prototype would still apply.  */
16476 char $ac_func();
16477 char (*f)();
16478
16479 int main() {
16480
16481 /* The GNU C library defines this for functions which it implements
16482     to always fail with ENOSYS.  Some functions are actually named
16483     something starting with __ and the normal name is an alias.  */
16484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16485 choke me
16486 #else
16487 f = $ac_func;
16488 #endif
16489
16490 ; return 0; }
16491 EOF
16492 if { (eval echo configure:16493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16493   rm -rf conftest*
16494   eval "ac_cv_func_$ac_func=yes"
16495 else
16496   echo "configure: failed program was:" >&5
16497   cat conftest.$ac_ext >&5
16498   rm -rf conftest*
16499   eval "ac_cv_func_$ac_func=no"
16500 fi
16501 rm -f conftest*
16502 fi
16503
16504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16505   echo "$ac_t""yes" 1>&6
16506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16507   cat >> confdefs.h <<EOF
16508 #define $ac_tr_func 1
16509 EOF
16510  
16511 else
16512   echo "$ac_t""no" 1>&6
16513 fi
16514 done
16515
16516                 fi
16517         fi
16518
16519                 for ac_hdr in lwp/lwp.h
16520 do
16521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16523 echo "configure:16524: checking for $ac_hdr" >&5
16524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16525   echo $ac_n "(cached) $ac_c" 1>&6
16526 else
16527   cat > conftest.$ac_ext <<EOF
16528 #line 16529 "configure"
16529 #include "confdefs.h"
16530 #include <$ac_hdr>
16531 EOF
16532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16533 { (eval echo configure:16534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16535 if test -z "$ac_err"; then
16536   rm -rf conftest*
16537   eval "ac_cv_header_$ac_safe=yes"
16538 else
16539   echo "$ac_err" >&5
16540   echo "configure: failed program was:" >&5
16541   cat conftest.$ac_ext >&5
16542   rm -rf conftest*
16543   eval "ac_cv_header_$ac_safe=no"
16544 fi
16545 rm -f conftest*
16546 fi
16547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16548   echo "$ac_t""yes" 1>&6
16549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16550   cat >> confdefs.h <<EOF
16551 #define $ac_tr_hdr 1
16552 EOF
16553  
16554 else
16555   echo "$ac_t""no" 1>&6
16556 fi
16557 done
16558
16559         if test $ac_cv_header_lwp_lwp_h = yes ; then
16560                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16561 echo "configure:16562: checking for lwp_create in -llwp" >&5
16562 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16564   echo $ac_n "(cached) $ac_c" 1>&6
16565 else
16566   ac_save_LIBS="$LIBS"
16567 LIBS="-llwp  $LIBS"
16568 cat > conftest.$ac_ext <<EOF
16569 #line 16570 "configure"
16570 #include "confdefs.h"
16571 /* Override any gcc2 internal prototype to avoid an error.  */
16572 /* We use char because int might match the return type of a gcc2
16573     builtin and then its argument prototype would still apply.  */
16574 char lwp_create();
16575
16576 int main() {
16577 lwp_create()
16578 ; return 0; }
16579 EOF
16580 if { (eval echo configure:16581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16581   rm -rf conftest*
16582   eval "ac_cv_lib_$ac_lib_var=yes"
16583 else
16584   echo "configure: failed program was:" >&5
16585   cat conftest.$ac_ext >&5
16586   rm -rf conftest*
16587   eval "ac_cv_lib_$ac_lib_var=no"
16588 fi
16589 rm -f conftest*
16590 LIBS="$ac_save_LIBS"
16591
16592 fi
16593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16594   echo "$ac_t""yes" 1>&6
16595   have_lwp=yes
16596 else
16597   echo "$ac_t""no" 1>&6
16598 have_lwp=no
16599 fi
16600
16601
16602                 if test $have_lwp = yes ; then
16603                         cat >> confdefs.h <<\EOF
16604 #define HAVE_LWP 1
16605 EOF
16606
16607                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16608                         ol_link_threads=lwp
16609
16610                         if test $ol_with_yielding_select = auto ; then
16611                                 ol_with_yielding_select=no
16612                         fi
16613                 fi
16614         fi
16615 fi
16616
16617 if test $ol_with_yielding_select = yes ; then
16618         cat >> confdefs.h <<\EOF
16619 #define HAVE_YIELDING_SELECT 1
16620 EOF
16621
16622 fi
16623
16624 if test $ol_with_threads = manual ; then
16625                 ol_link_threads=yes
16626
16627         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16628
16629         for ac_hdr in pthread.h sched.h
16630 do
16631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16633 echo "configure:16634: checking for $ac_hdr" >&5
16634 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16635   echo $ac_n "(cached) $ac_c" 1>&6
16636 else
16637   cat > conftest.$ac_ext <<EOF
16638 #line 16639 "configure"
16639 #include "confdefs.h"
16640 #include <$ac_hdr>
16641 EOF
16642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16643 { (eval echo configure:16644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16645 if test -z "$ac_err"; then
16646   rm -rf conftest*
16647   eval "ac_cv_header_$ac_safe=yes"
16648 else
16649   echo "$ac_err" >&5
16650   echo "configure: failed program was:" >&5
16651   cat conftest.$ac_ext >&5
16652   rm -rf conftest*
16653   eval "ac_cv_header_$ac_safe=no"
16654 fi
16655 rm -f conftest*
16656 fi
16657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16658   echo "$ac_t""yes" 1>&6
16659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16660   cat >> confdefs.h <<EOF
16661 #define $ac_tr_hdr 1
16662 EOF
16663  
16664 else
16665   echo "$ac_t""no" 1>&6
16666 fi
16667 done
16668
16669         for ac_func in sched_yield pthread_yield
16670 do
16671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16672 echo "configure:16673: checking for $ac_func" >&5
16673 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16674   echo $ac_n "(cached) $ac_c" 1>&6
16675 else
16676   cat > conftest.$ac_ext <<EOF
16677 #line 16678 "configure"
16678 #include "confdefs.h"
16679 /* System header to define __stub macros and hopefully few prototypes,
16680     which can conflict with char $ac_func(); below.  */
16681 #include <assert.h>
16682 /* Override any gcc2 internal prototype to avoid an error.  */
16683 /* We use char because int might match the return type of a gcc2
16684     builtin and then its argument prototype would still apply.  */
16685 char $ac_func();
16686 char (*f)();
16687
16688 int main() {
16689
16690 /* The GNU C library defines this for functions which it implements
16691     to always fail with ENOSYS.  Some functions are actually named
16692     something starting with __ and the normal name is an alias.  */
16693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16694 choke me
16695 #else
16696 f = $ac_func;
16697 #endif
16698
16699 ; return 0; }
16700 EOF
16701 if { (eval echo configure:16702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16702   rm -rf conftest*
16703   eval "ac_cv_func_$ac_func=yes"
16704 else
16705   echo "configure: failed program was:" >&5
16706   cat conftest.$ac_ext >&5
16707   rm -rf conftest*
16708   eval "ac_cv_func_$ac_func=no"
16709 fi
16710 rm -f conftest*
16711 fi
16712
16713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16714   echo "$ac_t""yes" 1>&6
16715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16716   cat >> confdefs.h <<EOF
16717 #define $ac_tr_func 1
16718 EOF
16719  
16720 else
16721   echo "$ac_t""no" 1>&6
16722 fi
16723 done
16724
16725         
16726         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16727 echo "configure:16728: checking for LinuxThreads pthread.h" >&5
16728 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16729   echo $ac_n "(cached) $ac_c" 1>&6
16730 else
16731   cat > conftest.$ac_ext <<EOF
16732 #line 16733 "configure"
16733 #include "confdefs.h"
16734 #include <pthread.h>
16735 EOF
16736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16737   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16738   rm -rf conftest*
16739   ol_cv_header_linux_threads=yes
16740 else
16741   rm -rf conftest*
16742   ol_cv_header_linux_threads=no
16743 fi
16744 rm -f conftest*
16745
16746                 
16747 fi
16748
16749 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16750         if test $ol_cv_header_linux_threads = yes; then
16751                 cat >> confdefs.h <<\EOF
16752 #define HAVE_LINUX_THREADS 1
16753 EOF
16754
16755         fi
16756
16757
16758         for ac_hdr in mach/cthreads.h
16759 do
16760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16762 echo "configure:16763: checking for $ac_hdr" >&5
16763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16764   echo $ac_n "(cached) $ac_c" 1>&6
16765 else
16766   cat > conftest.$ac_ext <<EOF
16767 #line 16768 "configure"
16768 #include "confdefs.h"
16769 #include <$ac_hdr>
16770 EOF
16771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16772 { (eval echo configure:16773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16774 if test -z "$ac_err"; then
16775   rm -rf conftest*
16776   eval "ac_cv_header_$ac_safe=yes"
16777 else
16778   echo "$ac_err" >&5
16779   echo "configure: failed program was:" >&5
16780   cat conftest.$ac_ext >&5
16781   rm -rf conftest*
16782   eval "ac_cv_header_$ac_safe=no"
16783 fi
16784 rm -f conftest*
16785 fi
16786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16787   echo "$ac_t""yes" 1>&6
16788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16789   cat >> confdefs.h <<EOF
16790 #define $ac_tr_hdr 1
16791 EOF
16792  
16793 else
16794   echo "$ac_t""no" 1>&6
16795 fi
16796 done
16797
16798         for ac_hdr in lwp/lwp.h
16799 do
16800 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16801 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16802 echo "configure:16803: checking for $ac_hdr" >&5
16803 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16804   echo $ac_n "(cached) $ac_c" 1>&6
16805 else
16806   cat > conftest.$ac_ext <<EOF
16807 #line 16808 "configure"
16808 #include "confdefs.h"
16809 #include <$ac_hdr>
16810 EOF
16811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16812 { (eval echo configure:16813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16814 if test -z "$ac_err"; then
16815   rm -rf conftest*
16816   eval "ac_cv_header_$ac_safe=yes"
16817 else
16818   echo "$ac_err" >&5
16819   echo "configure: failed program was:" >&5
16820   cat conftest.$ac_ext >&5
16821   rm -rf conftest*
16822   eval "ac_cv_header_$ac_safe=no"
16823 fi
16824 rm -f conftest*
16825 fi
16826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16827   echo "$ac_t""yes" 1>&6
16828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16829   cat >> confdefs.h <<EOF
16830 #define $ac_tr_hdr 1
16831 EOF
16832  
16833 else
16834   echo "$ac_t""no" 1>&6
16835 fi
16836 done
16837
16838         for ac_hdr in thread.h synch.h
16839 do
16840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16842 echo "configure:16843: checking for $ac_hdr" >&5
16843 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16844   echo $ac_n "(cached) $ac_c" 1>&6
16845 else
16846   cat > conftest.$ac_ext <<EOF
16847 #line 16848 "configure"
16848 #include "confdefs.h"
16849 #include <$ac_hdr>
16850 EOF
16851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16852 { (eval echo configure:16853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16854 if test -z "$ac_err"; then
16855   rm -rf conftest*
16856   eval "ac_cv_header_$ac_safe=yes"
16857 else
16858   echo "$ac_err" >&5
16859   echo "configure: failed program was:" >&5
16860   cat conftest.$ac_ext >&5
16861   rm -rf conftest*
16862   eval "ac_cv_header_$ac_safe=no"
16863 fi
16864 rm -f conftest*
16865 fi
16866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16867   echo "$ac_t""yes" 1>&6
16868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16869   cat >> confdefs.h <<EOF
16870 #define $ac_tr_hdr 1
16871 EOF
16872  
16873 else
16874   echo "$ac_t""no" 1>&6
16875 fi
16876 done
16877
16878 fi
16879
16880 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16881                         cat >> confdefs.h <<\EOF
16882 #define REENTRANT 1
16883 EOF
16884
16885         cat >> confdefs.h <<\EOF
16886 #define _REENTRANT 1
16887 EOF
16888
16889         cat >> confdefs.h <<\EOF
16890 #define THREAD_SAFE 1
16891 EOF
16892
16893         cat >> confdefs.h <<\EOF
16894 #define _THREAD_SAFE 1
16895 EOF
16896
16897         cat >> confdefs.h <<\EOF
16898 #define THREADSAFE 1
16899 EOF
16900
16901         cat >> confdefs.h <<\EOF
16902 #define _THREADSAFE 1
16903 EOF
16904
16905         cat >> confdefs.h <<\EOF
16906 #define _SGI_MP_SOURCE 1
16907 EOF
16908
16909
16910                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16911 echo "configure:16912: checking for thread specific errno" >&5
16912 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16913   echo $ac_n "(cached) $ac_c" 1>&6
16914 else
16915   
16916                 cat > conftest.$ac_ext <<EOF
16917 #line 16918 "configure"
16918 #include "confdefs.h"
16919 #include <errno.h>
16920 int main() {
16921 errno = 0;
16922 ; return 0; }
16923 EOF
16924 if { (eval echo configure:16925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16925   rm -rf conftest*
16926   ol_cv_errno_thread_specific=yes
16927 else
16928   echo "configure: failed program was:" >&5
16929   cat conftest.$ac_ext >&5
16930   rm -rf conftest*
16931   ol_cv_errno_thread_specific=no
16932 fi
16933 rm -f conftest*
16934         
16935 fi
16936
16937 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16938
16939                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16940 echo "configure:16941: checking for thread specific h_errno" >&5
16941 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16942   echo $ac_n "(cached) $ac_c" 1>&6
16943 else
16944   
16945                 cat > conftest.$ac_ext <<EOF
16946 #line 16947 "configure"
16947 #include "confdefs.h"
16948 #include <netdb.h>
16949 int main() {
16950 h_errno = 0;
16951 ; return 0; }
16952 EOF
16953 if { (eval echo configure:16954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16954   rm -rf conftest*
16955   ol_cv_h_errno_thread_specific=yes
16956 else
16957   echo "configure: failed program was:" >&5
16958   cat conftest.$ac_ext >&5
16959   rm -rf conftest*
16960   ol_cv_h_errno_thread_specific=no
16961 fi
16962 rm -f conftest*
16963         
16964 fi
16965
16966 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16967
16968         if test $ol_cv_errno_thread_specific != yes \
16969                 -o $ol_cv_h_errno_thread_specific != yes ; then
16970                 LIBS="$LTHREAD_LIBS $LIBS"
16971                 LTHREAD_LIBS=""
16972         fi
16973
16974 fi  
16975
16976 if test $ol_link_threads = no ; then
16977         if test $ol_with_threads = yes ; then
16978                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16979         fi
16980
16981         if test $ol_with_threads = auto ; then
16982                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16983                 ol_with_threads=no
16984         fi
16985
16986         cat >> confdefs.h <<\EOF
16987 #define NO_THREADS 1
16988 EOF
16989
16990         LTHREAD_LIBS=""
16991 fi
16992
16993 if test $ol_link_threads != no ; then
16994         cat >> confdefs.h <<\EOF
16995 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16996 EOF
16997
16998 fi
16999
17000 ol_link_ldbm=no 
17001
17002 if test $ol_with_ldbm_api = auto \
17003         -o $ol_with_ldbm_api = berkeley \
17004         -o $ol_with_ldbm_api = bcompat ; then
17005
17006         if test $ol_with_ldbm_api = bcompat; then \
17007                 for ac_hdr in db_185.h db.h
17008 do
17009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17011 echo "configure:17012: checking for $ac_hdr" >&5
17012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17013   echo $ac_n "(cached) $ac_c" 1>&6
17014 else
17015   cat > conftest.$ac_ext <<EOF
17016 #line 17017 "configure"
17017 #include "confdefs.h"
17018 #include <$ac_hdr>
17019 EOF
17020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17021 { (eval echo configure:17022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17023 if test -z "$ac_err"; then
17024   rm -rf conftest*
17025   eval "ac_cv_header_$ac_safe=yes"
17026 else
17027   echo "$ac_err" >&5
17028   echo "configure: failed program was:" >&5
17029   cat conftest.$ac_ext >&5
17030   rm -rf conftest*
17031   eval "ac_cv_header_$ac_safe=no"
17032 fi
17033 rm -f conftest*
17034 fi
17035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17036   echo "$ac_t""yes" 1>&6
17037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17038   cat >> confdefs.h <<EOF
17039 #define $ac_tr_hdr 1
17040 EOF
17041  
17042 else
17043   echo "$ac_t""no" 1>&6
17044 fi
17045 done
17046
17047 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17048         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17049 echo "configure:17050: checking if Berkeley DB header compatibility" >&5
17050 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17051   echo $ac_n "(cached) $ac_c" 1>&6
17052 else
17053   
17054                 cat > conftest.$ac_ext <<EOF
17055 #line 17056 "configure"
17056 #include "confdefs.h"
17057
17058 #if HAVE_DB_185_H
17059 #       include <db_185.h>
17060 #else
17061 #       include <db.h>
17062 #endif
17063
17064  /* this check could be improved */
17065 #ifndef DB_VERSION_MAJOR
17066 #       define DB_VERSION_MAJOR 1
17067 #endif
17068
17069 #if DB_VERSION_MAJOR == 1 
17070         __db_version_1
17071 #endif
17072
17073 EOF
17074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17075   egrep "__db_version_1" >/dev/null 2>&1; then
17076   rm -rf conftest*
17077   ol_cv_header_db1=yes
17078 else
17079   rm -rf conftest*
17080   ol_cv_header_db1=no
17081 fi
17082 rm -f conftest*
17083
17084 fi
17085
17086 echo "$ac_t""$ol_cv_header_db1" 1>&6
17087
17088         if test $ol_cv_header_db1 = yes ; then
17089                 ol_cv_lib_db=no
17090 if test $ol_cv_lib_db = no ; then
17091         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17092 echo "configure:17093: checking for Berkeley DB link (default)" >&5
17093 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17094   echo $ac_n "(cached) $ac_c" 1>&6
17095 else
17096   
17097         ol_DB_LIB=
17098         ol_LIBS=$LIBS
17099         LIBS="$ol_DB_LIB $LIBS"
17100
17101         cat > conftest.$ac_ext <<EOF
17102 #line 17103 "configure"
17103 #include "confdefs.h"
17104
17105 #ifdef HAVE_DB_185_H
17106 # include <db_185.h>
17107 #else
17108 # include <db.h>
17109 #endif
17110
17111 #ifndef DB_VERSION_MAJOR
17112 # define DB_VERSION_MAJOR 1
17113 #endif
17114
17115 #ifndef NULL
17116 #define NULL ((void*)0)
17117 #endif
17118
17119 int main() {
17120
17121 #if DB_VERSION_MAJOR > 1
17122         {
17123                 char *version;
17124                 int major, minor, patch;
17125
17126                 version = db_version( &major, &minor, &patch );
17127
17128                 if( major != DB_VERSION_MAJOR ||
17129                         minor < DB_VERSION_MINOR )
17130                 {
17131                         printf("Berkeley DB version mismatch\n"
17132                                 "\texpected: %s\n\tgot: %s\n",
17133                                 DB_VERSION_STRING, version);
17134                         return 1;
17135                 }
17136         }
17137 #endif
17138
17139 #if DB_VERSION_MAJOR > 2
17140         db_env_create( NULL, 0 );
17141 #elif DB_VERSION_MAJOR > 1
17142         db_appexit( NULL );
17143 #else
17144         (void) dbopen( NULL, 0, 0, 0, NULL);
17145 #endif
17146
17147 ; return 0; }
17148 EOF
17149 if { (eval echo configure:17150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17150   rm -rf conftest*
17151   ol_cv_db_none=yes
17152 else
17153   echo "configure: failed program was:" >&5
17154   cat conftest.$ac_ext >&5
17155   rm -rf conftest*
17156   ol_cv_db_none=no
17157 fi
17158 rm -f conftest*
17159
17160         LIBS="$ol_LIBS"
17161
17162 fi
17163
17164 echo "$ac_t""$ol_cv_db_none" 1>&6
17165
17166         if test $ol_cv_db_none = yes ; then
17167                 ol_cv_lib_db=yes
17168         fi
17169 fi
17170
17171 if test $ol_cv_lib_db = no ; then
17172         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17173 echo "configure:17174: checking for Berkeley DB link (-ldb4)" >&5
17174 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17175   echo $ac_n "(cached) $ac_c" 1>&6
17176 else
17177   
17178         ol_DB_LIB=-ldb4
17179         ol_LIBS=$LIBS
17180         LIBS="$ol_DB_LIB $LIBS"
17181
17182         cat > conftest.$ac_ext <<EOF
17183 #line 17184 "configure"
17184 #include "confdefs.h"
17185
17186 #ifdef HAVE_DB_185_H
17187 # include <db_185.h>
17188 #else
17189 # include <db.h>
17190 #endif
17191
17192 #ifndef DB_VERSION_MAJOR
17193 # define DB_VERSION_MAJOR 1
17194 #endif
17195
17196 #ifndef NULL
17197 #define NULL ((void*)0)
17198 #endif
17199
17200 int main() {
17201
17202 #if DB_VERSION_MAJOR > 1
17203         {
17204                 char *version;
17205                 int major, minor, patch;
17206
17207                 version = db_version( &major, &minor, &patch );
17208
17209                 if( major != DB_VERSION_MAJOR ||
17210                         minor < DB_VERSION_MINOR )
17211                 {
17212                         printf("Berkeley DB version mismatch\n"
17213                                 "\texpected: %s\n\tgot: %s\n",
17214                                 DB_VERSION_STRING, version);
17215                         return 1;
17216                 }
17217         }
17218 #endif
17219
17220 #if DB_VERSION_MAJOR > 2
17221         db_env_create( NULL, 0 );
17222 #elif DB_VERSION_MAJOR > 1
17223         db_appexit( NULL );
17224 #else
17225         (void) dbopen( NULL, 0, 0, 0, NULL);
17226 #endif
17227
17228 ; return 0; }
17229 EOF
17230 if { (eval echo configure:17231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17231   rm -rf conftest*
17232   ol_cv_db_db4=yes
17233 else
17234   echo "configure: failed program was:" >&5
17235   cat conftest.$ac_ext >&5
17236   rm -rf conftest*
17237   ol_cv_db_db4=no
17238 fi
17239 rm -f conftest*
17240
17241         LIBS="$ol_LIBS"
17242
17243 fi
17244
17245 echo "$ac_t""$ol_cv_db_db4" 1>&6
17246
17247         if test $ol_cv_db_db4 = yes ; then
17248                 ol_cv_lib_db=-ldb4
17249         fi
17250 fi
17251
17252 if test $ol_cv_lib_db = no ; then
17253         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17254 echo "configure:17255: checking for Berkeley DB link (-ldb-4)" >&5
17255 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17256   echo $ac_n "(cached) $ac_c" 1>&6
17257 else
17258   
17259         ol_DB_LIB=-ldb-4
17260         ol_LIBS=$LIBS
17261         LIBS="$ol_DB_LIB $LIBS"
17262
17263         cat > conftest.$ac_ext <<EOF
17264 #line 17265 "configure"
17265 #include "confdefs.h"
17266
17267 #ifdef HAVE_DB_185_H
17268 # include <db_185.h>
17269 #else
17270 # include <db.h>
17271 #endif
17272
17273 #ifndef DB_VERSION_MAJOR
17274 # define DB_VERSION_MAJOR 1
17275 #endif
17276
17277 #ifndef NULL
17278 #define NULL ((void*)0)
17279 #endif
17280
17281 int main() {
17282
17283 #if DB_VERSION_MAJOR > 1
17284         {
17285                 char *version;
17286                 int major, minor, patch;
17287
17288                 version = db_version( &major, &minor, &patch );
17289
17290                 if( major != DB_VERSION_MAJOR ||
17291                         minor < DB_VERSION_MINOR )
17292                 {
17293                         printf("Berkeley DB version mismatch\n"
17294                                 "\texpected: %s\n\tgot: %s\n",
17295                                 DB_VERSION_STRING, version);
17296                         return 1;
17297                 }
17298         }
17299 #endif
17300
17301 #if DB_VERSION_MAJOR > 2
17302         db_env_create( NULL, 0 );
17303 #elif DB_VERSION_MAJOR > 1
17304         db_appexit( NULL );
17305 #else
17306         (void) dbopen( NULL, 0, 0, 0, NULL);
17307 #endif
17308
17309 ; return 0; }
17310 EOF
17311 if { (eval echo configure:17312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17312   rm -rf conftest*
17313   ol_cv_db_db_4=yes
17314 else
17315   echo "configure: failed program was:" >&5
17316   cat conftest.$ac_ext >&5
17317   rm -rf conftest*
17318   ol_cv_db_db_4=no
17319 fi
17320 rm -f conftest*
17321
17322         LIBS="$ol_LIBS"
17323
17324 fi
17325
17326 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17327
17328         if test $ol_cv_db_db_4 = yes ; then
17329                 ol_cv_lib_db=-ldb-4
17330         fi
17331 fi
17332
17333 if test $ol_cv_lib_db = no ; then
17334         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17335 echo "configure:17336: checking for Berkeley DB link (-ldb)" >&5
17336 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17337   echo $ac_n "(cached) $ac_c" 1>&6
17338 else
17339   
17340         ol_DB_LIB=-ldb
17341         ol_LIBS=$LIBS
17342         LIBS="$ol_DB_LIB $LIBS"
17343
17344         cat > conftest.$ac_ext <<EOF
17345 #line 17346 "configure"
17346 #include "confdefs.h"
17347
17348 #ifdef HAVE_DB_185_H
17349 # include <db_185.h>
17350 #else
17351 # include <db.h>
17352 #endif
17353
17354 #ifndef DB_VERSION_MAJOR
17355 # define DB_VERSION_MAJOR 1
17356 #endif
17357
17358 #ifndef NULL
17359 #define NULL ((void*)0)
17360 #endif
17361
17362 int main() {
17363
17364 #if DB_VERSION_MAJOR > 1
17365         {
17366                 char *version;
17367                 int major, minor, patch;
17368
17369                 version = db_version( &major, &minor, &patch );
17370
17371                 if( major != DB_VERSION_MAJOR ||
17372                         minor < DB_VERSION_MINOR )
17373                 {
17374                         printf("Berkeley DB version mismatch\n"
17375                                 "\texpected: %s\n\tgot: %s\n",
17376                                 DB_VERSION_STRING, version);
17377                         return 1;
17378                 }
17379         }
17380 #endif
17381
17382 #if DB_VERSION_MAJOR > 2
17383         db_env_create( NULL, 0 );
17384 #elif DB_VERSION_MAJOR > 1
17385         db_appexit( NULL );
17386 #else
17387         (void) dbopen( NULL, 0, 0, 0, NULL);
17388 #endif
17389
17390 ; return 0; }
17391 EOF
17392 if { (eval echo configure:17393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17393   rm -rf conftest*
17394   ol_cv_db_db=yes
17395 else
17396   echo "configure: failed program was:" >&5
17397   cat conftest.$ac_ext >&5
17398   rm -rf conftest*
17399   ol_cv_db_db=no
17400 fi
17401 rm -f conftest*
17402
17403         LIBS="$ol_LIBS"
17404
17405 fi
17406
17407 echo "$ac_t""$ol_cv_db_db" 1>&6
17408
17409         if test $ol_cv_db_db = yes ; then
17410                 ol_cv_lib_db=-ldb
17411         fi
17412 fi
17413
17414 if test $ol_cv_lib_db = no ; then
17415         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17416 echo "configure:17417: checking for Berkeley DB link (-ldb3)" >&5
17417 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17418   echo $ac_n "(cached) $ac_c" 1>&6
17419 else
17420   
17421         ol_DB_LIB=-ldb3
17422         ol_LIBS=$LIBS
17423         LIBS="$ol_DB_LIB $LIBS"
17424
17425         cat > conftest.$ac_ext <<EOF
17426 #line 17427 "configure"
17427 #include "confdefs.h"
17428
17429 #ifdef HAVE_DB_185_H
17430 # include <db_185.h>
17431 #else
17432 # include <db.h>
17433 #endif
17434
17435 #ifndef DB_VERSION_MAJOR
17436 # define DB_VERSION_MAJOR 1
17437 #endif
17438
17439 #ifndef NULL
17440 #define NULL ((void*)0)
17441 #endif
17442
17443 int main() {
17444
17445 #if DB_VERSION_MAJOR > 1
17446         {
17447                 char *version;
17448                 int major, minor, patch;
17449
17450                 version = db_version( &major, &minor, &patch );
17451
17452                 if( major != DB_VERSION_MAJOR ||
17453                         minor < DB_VERSION_MINOR )
17454                 {
17455                         printf("Berkeley DB version mismatch\n"
17456                                 "\texpected: %s\n\tgot: %s\n",
17457                                 DB_VERSION_STRING, version);
17458                         return 1;
17459                 }
17460         }
17461 #endif
17462
17463 #if DB_VERSION_MAJOR > 2
17464         db_env_create( NULL, 0 );
17465 #elif DB_VERSION_MAJOR > 1
17466         db_appexit( NULL );
17467 #else
17468         (void) dbopen( NULL, 0, 0, 0, NULL);
17469 #endif
17470
17471 ; return 0; }
17472 EOF
17473 if { (eval echo configure:17474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17474   rm -rf conftest*
17475   ol_cv_db_db3=yes
17476 else
17477   echo "configure: failed program was:" >&5
17478   cat conftest.$ac_ext >&5
17479   rm -rf conftest*
17480   ol_cv_db_db3=no
17481 fi
17482 rm -f conftest*
17483
17484         LIBS="$ol_LIBS"
17485
17486 fi
17487
17488 echo "$ac_t""$ol_cv_db_db3" 1>&6
17489
17490         if test $ol_cv_db_db3 = yes ; then
17491                 ol_cv_lib_db=-ldb3
17492         fi
17493 fi
17494
17495 if test $ol_cv_lib_db = no ; then
17496         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17497 echo "configure:17498: checking for Berkeley DB link (-ldb-3)" >&5
17498 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17499   echo $ac_n "(cached) $ac_c" 1>&6
17500 else
17501   
17502         ol_DB_LIB=-ldb-3
17503         ol_LIBS=$LIBS
17504         LIBS="$ol_DB_LIB $LIBS"
17505
17506         cat > conftest.$ac_ext <<EOF
17507 #line 17508 "configure"
17508 #include "confdefs.h"
17509
17510 #ifdef HAVE_DB_185_H
17511 # include <db_185.h>
17512 #else
17513 # include <db.h>
17514 #endif
17515
17516 #ifndef DB_VERSION_MAJOR
17517 # define DB_VERSION_MAJOR 1
17518 #endif
17519
17520 #ifndef NULL
17521 #define NULL ((void*)0)
17522 #endif
17523
17524 int main() {
17525
17526 #if DB_VERSION_MAJOR > 1
17527         {
17528                 char *version;
17529                 int major, minor, patch;
17530
17531                 version = db_version( &major, &minor, &patch );
17532
17533                 if( major != DB_VERSION_MAJOR ||
17534                         minor < DB_VERSION_MINOR )
17535                 {
17536                         printf("Berkeley DB version mismatch\n"
17537                                 "\texpected: %s\n\tgot: %s\n",
17538                                 DB_VERSION_STRING, version);
17539                         return 1;
17540                 }
17541         }
17542 #endif
17543
17544 #if DB_VERSION_MAJOR > 2
17545         db_env_create( NULL, 0 );
17546 #elif DB_VERSION_MAJOR > 1
17547         db_appexit( NULL );
17548 #else
17549         (void) dbopen( NULL, 0, 0, 0, NULL);
17550 #endif
17551
17552 ; return 0; }
17553 EOF
17554 if { (eval echo configure:17555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17555   rm -rf conftest*
17556   ol_cv_db_db_3=yes
17557 else
17558   echo "configure: failed program was:" >&5
17559   cat conftest.$ac_ext >&5
17560   rm -rf conftest*
17561   ol_cv_db_db_3=no
17562 fi
17563 rm -f conftest*
17564
17565         LIBS="$ol_LIBS"
17566
17567 fi
17568
17569 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17570
17571         if test $ol_cv_db_db_3 = yes ; then
17572                 ol_cv_lib_db=-ldb-3
17573         fi
17574 fi
17575
17576 if test $ol_cv_lib_db = no ; then
17577         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17578 echo "configure:17579: checking for Berkeley DB link (-ldb2)" >&5
17579 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17580   echo $ac_n "(cached) $ac_c" 1>&6
17581 else
17582   
17583         ol_DB_LIB=-ldb2
17584         ol_LIBS=$LIBS
17585         LIBS="$ol_DB_LIB $LIBS"
17586
17587         cat > conftest.$ac_ext <<EOF
17588 #line 17589 "configure"
17589 #include "confdefs.h"
17590
17591 #ifdef HAVE_DB_185_H
17592 # include <db_185.h>
17593 #else
17594 # include <db.h>
17595 #endif
17596
17597 #ifndef DB_VERSION_MAJOR
17598 # define DB_VERSION_MAJOR 1
17599 #endif
17600
17601 #ifndef NULL
17602 #define NULL ((void*)0)
17603 #endif
17604
17605 int main() {
17606
17607 #if DB_VERSION_MAJOR > 1
17608         {
17609                 char *version;
17610                 int major, minor, patch;
17611
17612                 version = db_version( &major, &minor, &patch );
17613
17614                 if( major != DB_VERSION_MAJOR ||
17615                         minor < DB_VERSION_MINOR )
17616                 {
17617                         printf("Berkeley DB version mismatch\n"
17618                                 "\texpected: %s\n\tgot: %s\n",
17619                                 DB_VERSION_STRING, version);
17620                         return 1;
17621                 }
17622         }
17623 #endif
17624
17625 #if DB_VERSION_MAJOR > 2
17626         db_env_create( NULL, 0 );
17627 #elif DB_VERSION_MAJOR > 1
17628         db_appexit( NULL );
17629 #else
17630         (void) dbopen( NULL, 0, 0, 0, NULL);
17631 #endif
17632
17633 ; return 0; }
17634 EOF
17635 if { (eval echo configure:17636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17636   rm -rf conftest*
17637   ol_cv_db_db2=yes
17638 else
17639   echo "configure: failed program was:" >&5
17640   cat conftest.$ac_ext >&5
17641   rm -rf conftest*
17642   ol_cv_db_db2=no
17643 fi
17644 rm -f conftest*
17645
17646         LIBS="$ol_LIBS"
17647
17648 fi
17649
17650 echo "$ac_t""$ol_cv_db_db2" 1>&6
17651
17652         if test $ol_cv_db_db2 = yes ; then
17653                 ol_cv_lib_db=-ldb2
17654         fi
17655 fi
17656
17657 if test $ol_cv_lib_db = no ; then
17658         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17659 echo "configure:17660: checking for Berkeley DB link (-ldb-2)" >&5
17660 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17661   echo $ac_n "(cached) $ac_c" 1>&6
17662 else
17663   
17664         ol_DB_LIB=-ldb-2
17665         ol_LIBS=$LIBS
17666         LIBS="$ol_DB_LIB $LIBS"
17667
17668         cat > conftest.$ac_ext <<EOF
17669 #line 17670 "configure"
17670 #include "confdefs.h"
17671
17672 #ifdef HAVE_DB_185_H
17673 # include <db_185.h>
17674 #else
17675 # include <db.h>
17676 #endif
17677
17678 #ifndef DB_VERSION_MAJOR
17679 # define DB_VERSION_MAJOR 1
17680 #endif
17681
17682 #ifndef NULL
17683 #define NULL ((void*)0)
17684 #endif
17685
17686 int main() {
17687
17688 #if DB_VERSION_MAJOR > 1
17689         {
17690                 char *version;
17691                 int major, minor, patch;
17692
17693                 version = db_version( &major, &minor, &patch );
17694
17695                 if( major != DB_VERSION_MAJOR ||
17696                         minor < DB_VERSION_MINOR )
17697                 {
17698                         printf("Berkeley DB version mismatch\n"
17699                                 "\texpected: %s\n\tgot: %s\n",
17700                                 DB_VERSION_STRING, version);
17701                         return 1;
17702                 }
17703         }
17704 #endif
17705
17706 #if DB_VERSION_MAJOR > 2
17707         db_env_create( NULL, 0 );
17708 #elif DB_VERSION_MAJOR > 1
17709         db_appexit( NULL );
17710 #else
17711         (void) dbopen( NULL, 0, 0, 0, NULL);
17712 #endif
17713
17714 ; return 0; }
17715 EOF
17716 if { (eval echo configure:17717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17717   rm -rf conftest*
17718   ol_cv_db_db_2=yes
17719 else
17720   echo "configure: failed program was:" >&5
17721   cat conftest.$ac_ext >&5
17722   rm -rf conftest*
17723   ol_cv_db_db_2=no
17724 fi
17725 rm -f conftest*
17726
17727         LIBS="$ol_LIBS"
17728
17729 fi
17730
17731 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17732
17733         if test $ol_cv_db_db_2 = yes ; then
17734                 ol_cv_lib_db=-ldb-2
17735         fi
17736 fi
17737
17738 if test $ol_cv_lib_db = no ; then
17739         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17740 echo "configure:17741: checking for Berkeley DB link (-ldb1)" >&5
17741 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17742   echo $ac_n "(cached) $ac_c" 1>&6
17743 else
17744   
17745         ol_DB_LIB=-ldb1
17746         ol_LIBS=$LIBS
17747         LIBS="$ol_DB_LIB $LIBS"
17748
17749         cat > conftest.$ac_ext <<EOF
17750 #line 17751 "configure"
17751 #include "confdefs.h"
17752
17753 #ifdef HAVE_DB_185_H
17754 # include <db_185.h>
17755 #else
17756 # include <db.h>
17757 #endif
17758
17759 #ifndef DB_VERSION_MAJOR
17760 # define DB_VERSION_MAJOR 1
17761 #endif
17762
17763 #ifndef NULL
17764 #define NULL ((void*)0)
17765 #endif
17766
17767 int main() {
17768
17769 #if DB_VERSION_MAJOR > 1
17770         {
17771                 char *version;
17772                 int major, minor, patch;
17773
17774                 version = db_version( &major, &minor, &patch );
17775
17776                 if( major != DB_VERSION_MAJOR ||
17777                         minor < DB_VERSION_MINOR )
17778                 {
17779                         printf("Berkeley DB version mismatch\n"
17780                                 "\texpected: %s\n\tgot: %s\n",
17781                                 DB_VERSION_STRING, version);
17782                         return 1;
17783                 }
17784         }
17785 #endif
17786
17787 #if DB_VERSION_MAJOR > 2
17788         db_env_create( NULL, 0 );
17789 #elif DB_VERSION_MAJOR > 1
17790         db_appexit( NULL );
17791 #else
17792         (void) dbopen( NULL, 0, 0, 0, NULL);
17793 #endif
17794
17795 ; return 0; }
17796 EOF
17797 if { (eval echo configure:17798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17798   rm -rf conftest*
17799   ol_cv_db_db1=yes
17800 else
17801   echo "configure: failed program was:" >&5
17802   cat conftest.$ac_ext >&5
17803   rm -rf conftest*
17804   ol_cv_db_db1=no
17805 fi
17806 rm -f conftest*
17807
17808         LIBS="$ol_LIBS"
17809
17810 fi
17811
17812 echo "$ac_t""$ol_cv_db_db1" 1>&6
17813
17814         if test $ol_cv_db_db1 = yes ; then
17815                 ol_cv_lib_db=-ldb1
17816         fi
17817 fi
17818
17819 if test $ol_cv_lib_db = no ; then
17820         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17821 echo "configure:17822: checking for Berkeley DB link (-ldb-1)" >&5
17822 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17823   echo $ac_n "(cached) $ac_c" 1>&6
17824 else
17825   
17826         ol_DB_LIB=-ldb-1
17827         ol_LIBS=$LIBS
17828         LIBS="$ol_DB_LIB $LIBS"
17829
17830         cat > conftest.$ac_ext <<EOF
17831 #line 17832 "configure"
17832 #include "confdefs.h"
17833
17834 #ifdef HAVE_DB_185_H
17835 # include <db_185.h>
17836 #else
17837 # include <db.h>
17838 #endif
17839
17840 #ifndef DB_VERSION_MAJOR
17841 # define DB_VERSION_MAJOR 1
17842 #endif
17843
17844 #ifndef NULL
17845 #define NULL ((void*)0)
17846 #endif
17847
17848 int main() {
17849
17850 #if DB_VERSION_MAJOR > 1
17851         {
17852                 char *version;
17853                 int major, minor, patch;
17854
17855                 version = db_version( &major, &minor, &patch );
17856
17857                 if( major != DB_VERSION_MAJOR ||
17858                         minor < DB_VERSION_MINOR )
17859                 {
17860                         printf("Berkeley DB version mismatch\n"
17861                                 "\texpected: %s\n\tgot: %s\n",
17862                                 DB_VERSION_STRING, version);
17863                         return 1;
17864                 }
17865         }
17866 #endif
17867
17868 #if DB_VERSION_MAJOR > 2
17869         db_env_create( NULL, 0 );
17870 #elif DB_VERSION_MAJOR > 1
17871         db_appexit( NULL );
17872 #else
17873         (void) dbopen( NULL, 0, 0, 0, NULL);
17874 #endif
17875
17876 ; return 0; }
17877 EOF
17878 if { (eval echo configure:17879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17879   rm -rf conftest*
17880   ol_cv_db_db_1=yes
17881 else
17882   echo "configure: failed program was:" >&5
17883   cat conftest.$ac_ext >&5
17884   rm -rf conftest*
17885   ol_cv_db_db_1=no
17886 fi
17887 rm -f conftest*
17888
17889         LIBS="$ol_LIBS"
17890
17891 fi
17892
17893 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17894
17895         if test $ol_cv_db_db_1 = yes ; then
17896                 ol_cv_lib_db=-ldb-1
17897         fi
17898 fi
17899
17900
17901                 if test "$ol_cv_lib_db" != no ; then
17902                         ol_cv_berkeley_db=yes
17903                 fi
17904         fi
17905 fi
17906
17907         else
17908                 ol_cv_berkeley_db=no
17909 for ac_hdr in db.h
17910 do
17911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17913 echo "configure:17914: checking for $ac_hdr" >&5
17914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17915   echo $ac_n "(cached) $ac_c" 1>&6
17916 else
17917   cat > conftest.$ac_ext <<EOF
17918 #line 17919 "configure"
17919 #include "confdefs.h"
17920 #include <$ac_hdr>
17921 EOF
17922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17923 { (eval echo configure:17924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17925 if test -z "$ac_err"; then
17926   rm -rf conftest*
17927   eval "ac_cv_header_$ac_safe=yes"
17928 else
17929   echo "$ac_err" >&5
17930   echo "configure: failed program was:" >&5
17931   cat conftest.$ac_ext >&5
17932   rm -rf conftest*
17933   eval "ac_cv_header_$ac_safe=no"
17934 fi
17935 rm -f conftest*
17936 fi
17937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17938   echo "$ac_t""yes" 1>&6
17939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17940   cat >> confdefs.h <<EOF
17941 #define $ac_tr_hdr 1
17942 EOF
17943  
17944 else
17945   echo "$ac_t""no" 1>&6
17946 fi
17947 done
17948
17949 if test $ac_cv_header_db_h = yes; then
17950         ol_cv_lib_db=no
17951 if test $ol_cv_lib_db = no ; then
17952         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17953 echo "configure:17954: checking for Berkeley DB link (default)" >&5
17954 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17955   echo $ac_n "(cached) $ac_c" 1>&6
17956 else
17957   
17958         ol_DB_LIB=
17959         ol_LIBS=$LIBS
17960         LIBS="$ol_DB_LIB $LIBS"
17961
17962         cat > conftest.$ac_ext <<EOF
17963 #line 17964 "configure"
17964 #include "confdefs.h"
17965
17966 #ifdef HAVE_DB_185_H
17967 # include <db_185.h>
17968 #else
17969 # include <db.h>
17970 #endif
17971
17972 #ifndef DB_VERSION_MAJOR
17973 # define DB_VERSION_MAJOR 1
17974 #endif
17975
17976 #ifndef NULL
17977 #define NULL ((void*)0)
17978 #endif
17979
17980 int main() {
17981
17982 #if DB_VERSION_MAJOR > 1
17983         {
17984                 char *version;
17985                 int major, minor, patch;
17986
17987                 version = db_version( &major, &minor, &patch );
17988
17989                 if( major != DB_VERSION_MAJOR ||
17990                         minor < DB_VERSION_MINOR )
17991                 {
17992                         printf("Berkeley DB version mismatch\n"
17993                                 "\texpected: %s\n\tgot: %s\n",
17994                                 DB_VERSION_STRING, version);
17995                         return 1;
17996                 }
17997         }
17998 #endif
17999
18000 #if DB_VERSION_MAJOR > 2
18001         db_env_create( NULL, 0 );
18002 #elif DB_VERSION_MAJOR > 1
18003         db_appexit( NULL );
18004 #else
18005         (void) dbopen( NULL, 0, 0, 0, NULL);
18006 #endif
18007
18008 ; return 0; }
18009 EOF
18010 if { (eval echo configure:18011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18011   rm -rf conftest*
18012   ol_cv_db_none=yes
18013 else
18014   echo "configure: failed program was:" >&5
18015   cat conftest.$ac_ext >&5
18016   rm -rf conftest*
18017   ol_cv_db_none=no
18018 fi
18019 rm -f conftest*
18020
18021         LIBS="$ol_LIBS"
18022
18023 fi
18024
18025 echo "$ac_t""$ol_cv_db_none" 1>&6
18026
18027         if test $ol_cv_db_none = yes ; then
18028                 ol_cv_lib_db=yes
18029         fi
18030 fi
18031
18032 if test $ol_cv_lib_db = no ; then
18033         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18034 echo "configure:18035: checking for Berkeley DB link (-ldb4)" >&5
18035 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18036   echo $ac_n "(cached) $ac_c" 1>&6
18037 else
18038   
18039         ol_DB_LIB=-ldb4
18040         ol_LIBS=$LIBS
18041         LIBS="$ol_DB_LIB $LIBS"
18042
18043         cat > conftest.$ac_ext <<EOF
18044 #line 18045 "configure"
18045 #include "confdefs.h"
18046
18047 #ifdef HAVE_DB_185_H
18048 # include <db_185.h>
18049 #else
18050 # include <db.h>
18051 #endif
18052
18053 #ifndef DB_VERSION_MAJOR
18054 # define DB_VERSION_MAJOR 1
18055 #endif
18056
18057 #ifndef NULL
18058 #define NULL ((void*)0)
18059 #endif
18060
18061 int main() {
18062
18063 #if DB_VERSION_MAJOR > 1
18064         {
18065                 char *version;
18066                 int major, minor, patch;
18067
18068                 version = db_version( &major, &minor, &patch );
18069
18070                 if( major != DB_VERSION_MAJOR ||
18071                         minor < DB_VERSION_MINOR )
18072                 {
18073                         printf("Berkeley DB version mismatch\n"
18074                                 "\texpected: %s\n\tgot: %s\n",
18075                                 DB_VERSION_STRING, version);
18076                         return 1;
18077                 }
18078         }
18079 #endif
18080
18081 #if DB_VERSION_MAJOR > 2
18082         db_env_create( NULL, 0 );
18083 #elif DB_VERSION_MAJOR > 1
18084         db_appexit( NULL );
18085 #else
18086         (void) dbopen( NULL, 0, 0, 0, NULL);
18087 #endif
18088
18089 ; return 0; }
18090 EOF
18091 if { (eval echo configure:18092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18092   rm -rf conftest*
18093   ol_cv_db_db4=yes
18094 else
18095   echo "configure: failed program was:" >&5
18096   cat conftest.$ac_ext >&5
18097   rm -rf conftest*
18098   ol_cv_db_db4=no
18099 fi
18100 rm -f conftest*
18101
18102         LIBS="$ol_LIBS"
18103
18104 fi
18105
18106 echo "$ac_t""$ol_cv_db_db4" 1>&6
18107
18108         if test $ol_cv_db_db4 = yes ; then
18109                 ol_cv_lib_db=-ldb4
18110         fi
18111 fi
18112
18113 if test $ol_cv_lib_db = no ; then
18114         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18115 echo "configure:18116: checking for Berkeley DB link (-ldb-4)" >&5
18116 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18117   echo $ac_n "(cached) $ac_c" 1>&6
18118 else
18119   
18120         ol_DB_LIB=-ldb-4
18121         ol_LIBS=$LIBS
18122         LIBS="$ol_DB_LIB $LIBS"
18123
18124         cat > conftest.$ac_ext <<EOF
18125 #line 18126 "configure"
18126 #include "confdefs.h"
18127
18128 #ifdef HAVE_DB_185_H
18129 # include <db_185.h>
18130 #else
18131 # include <db.h>
18132 #endif
18133
18134 #ifndef DB_VERSION_MAJOR
18135 # define DB_VERSION_MAJOR 1
18136 #endif
18137
18138 #ifndef NULL
18139 #define NULL ((void*)0)
18140 #endif
18141
18142 int main() {
18143
18144 #if DB_VERSION_MAJOR > 1
18145         {
18146                 char *version;
18147                 int major, minor, patch;
18148
18149                 version = db_version( &major, &minor, &patch );
18150
18151                 if( major != DB_VERSION_MAJOR ||
18152                         minor < DB_VERSION_MINOR )
18153                 {
18154                         printf("Berkeley DB version mismatch\n"
18155                                 "\texpected: %s\n\tgot: %s\n",
18156                                 DB_VERSION_STRING, version);
18157                         return 1;
18158                 }
18159         }
18160 #endif
18161
18162 #if DB_VERSION_MAJOR > 2
18163         db_env_create( NULL, 0 );
18164 #elif DB_VERSION_MAJOR > 1
18165         db_appexit( NULL );
18166 #else
18167         (void) dbopen( NULL, 0, 0, 0, NULL);
18168 #endif
18169
18170 ; return 0; }
18171 EOF
18172 if { (eval echo configure:18173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18173   rm -rf conftest*
18174   ol_cv_db_db_4=yes
18175 else
18176   echo "configure: failed program was:" >&5
18177   cat conftest.$ac_ext >&5
18178   rm -rf conftest*
18179   ol_cv_db_db_4=no
18180 fi
18181 rm -f conftest*
18182
18183         LIBS="$ol_LIBS"
18184
18185 fi
18186
18187 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18188
18189         if test $ol_cv_db_db_4 = yes ; then
18190                 ol_cv_lib_db=-ldb-4
18191         fi
18192 fi
18193
18194 if test $ol_cv_lib_db = no ; then
18195         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18196 echo "configure:18197: checking for Berkeley DB link (-ldb)" >&5
18197 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18198   echo $ac_n "(cached) $ac_c" 1>&6
18199 else
18200   
18201         ol_DB_LIB=-ldb
18202         ol_LIBS=$LIBS
18203         LIBS="$ol_DB_LIB $LIBS"
18204
18205         cat > conftest.$ac_ext <<EOF
18206 #line 18207 "configure"
18207 #include "confdefs.h"
18208
18209 #ifdef HAVE_DB_185_H
18210 # include <db_185.h>
18211 #else
18212 # include <db.h>
18213 #endif
18214
18215 #ifndef DB_VERSION_MAJOR
18216 # define DB_VERSION_MAJOR 1
18217 #endif
18218
18219 #ifndef NULL
18220 #define NULL ((void*)0)
18221 #endif
18222
18223 int main() {
18224
18225 #if DB_VERSION_MAJOR > 1
18226         {
18227                 char *version;
18228                 int major, minor, patch;
18229
18230                 version = db_version( &major, &minor, &patch );
18231
18232                 if( major != DB_VERSION_MAJOR ||
18233                         minor < DB_VERSION_MINOR )
18234                 {
18235                         printf("Berkeley DB version mismatch\n"
18236                                 "\texpected: %s\n\tgot: %s\n",
18237                                 DB_VERSION_STRING, version);
18238                         return 1;
18239                 }
18240         }
18241 #endif
18242
18243 #if DB_VERSION_MAJOR > 2
18244         db_env_create( NULL, 0 );
18245 #elif DB_VERSION_MAJOR > 1
18246         db_appexit( NULL );
18247 #else
18248         (void) dbopen( NULL, 0, 0, 0, NULL);
18249 #endif
18250
18251 ; return 0; }
18252 EOF
18253 if { (eval echo configure:18254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18254   rm -rf conftest*
18255   ol_cv_db_db=yes
18256 else
18257   echo "configure: failed program was:" >&5
18258   cat conftest.$ac_ext >&5
18259   rm -rf conftest*
18260   ol_cv_db_db=no
18261 fi
18262 rm -f conftest*
18263
18264         LIBS="$ol_LIBS"
18265
18266 fi
18267
18268 echo "$ac_t""$ol_cv_db_db" 1>&6
18269
18270         if test $ol_cv_db_db = yes ; then
18271                 ol_cv_lib_db=-ldb
18272         fi
18273 fi
18274
18275 if test $ol_cv_lib_db = no ; then
18276         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18277 echo "configure:18278: checking for Berkeley DB link (-ldb3)" >&5
18278 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18279   echo $ac_n "(cached) $ac_c" 1>&6
18280 else
18281   
18282         ol_DB_LIB=-ldb3
18283         ol_LIBS=$LIBS
18284         LIBS="$ol_DB_LIB $LIBS"
18285
18286         cat > conftest.$ac_ext <<EOF
18287 #line 18288 "configure"
18288 #include "confdefs.h"
18289
18290 #ifdef HAVE_DB_185_H
18291 # include <db_185.h>
18292 #else
18293 # include <db.h>
18294 #endif
18295
18296 #ifndef DB_VERSION_MAJOR
18297 # define DB_VERSION_MAJOR 1
18298 #endif
18299
18300 #ifndef NULL
18301 #define NULL ((void*)0)
18302 #endif
18303
18304 int main() {
18305
18306 #if DB_VERSION_MAJOR > 1
18307         {
18308                 char *version;
18309                 int major, minor, patch;
18310
18311                 version = db_version( &major, &minor, &patch );
18312
18313                 if( major != DB_VERSION_MAJOR ||
18314                         minor < DB_VERSION_MINOR )
18315                 {
18316                         printf("Berkeley DB version mismatch\n"
18317                                 "\texpected: %s\n\tgot: %s\n",
18318                                 DB_VERSION_STRING, version);
18319                         return 1;
18320                 }
18321         }
18322 #endif
18323
18324 #if DB_VERSION_MAJOR > 2
18325         db_env_create( NULL, 0 );
18326 #elif DB_VERSION_MAJOR > 1
18327         db_appexit( NULL );
18328 #else
18329         (void) dbopen( NULL, 0, 0, 0, NULL);
18330 #endif
18331
18332 ; return 0; }
18333 EOF
18334 if { (eval echo configure:18335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18335   rm -rf conftest*
18336   ol_cv_db_db3=yes
18337 else
18338   echo "configure: failed program was:" >&5
18339   cat conftest.$ac_ext >&5
18340   rm -rf conftest*
18341   ol_cv_db_db3=no
18342 fi
18343 rm -f conftest*
18344
18345         LIBS="$ol_LIBS"
18346
18347 fi
18348
18349 echo "$ac_t""$ol_cv_db_db3" 1>&6
18350
18351         if test $ol_cv_db_db3 = yes ; then
18352                 ol_cv_lib_db=-ldb3
18353         fi
18354 fi
18355
18356 if test $ol_cv_lib_db = no ; then
18357         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18358 echo "configure:18359: checking for Berkeley DB link (-ldb-3)" >&5
18359 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18360   echo $ac_n "(cached) $ac_c" 1>&6
18361 else
18362   
18363         ol_DB_LIB=-ldb-3
18364         ol_LIBS=$LIBS
18365         LIBS="$ol_DB_LIB $LIBS"
18366
18367         cat > conftest.$ac_ext <<EOF
18368 #line 18369 "configure"
18369 #include "confdefs.h"
18370
18371 #ifdef HAVE_DB_185_H
18372 # include <db_185.h>
18373 #else
18374 # include <db.h>
18375 #endif
18376
18377 #ifndef DB_VERSION_MAJOR
18378 # define DB_VERSION_MAJOR 1
18379 #endif
18380
18381 #ifndef NULL
18382 #define NULL ((void*)0)
18383 #endif
18384
18385 int main() {
18386
18387 #if DB_VERSION_MAJOR > 1
18388         {
18389                 char *version;
18390                 int major, minor, patch;
18391
18392                 version = db_version( &major, &minor, &patch );
18393
18394                 if( major != DB_VERSION_MAJOR ||
18395                         minor < DB_VERSION_MINOR )
18396                 {
18397                         printf("Berkeley DB version mismatch\n"
18398                                 "\texpected: %s\n\tgot: %s\n",
18399                                 DB_VERSION_STRING, version);
18400                         return 1;
18401                 }
18402         }
18403 #endif
18404
18405 #if DB_VERSION_MAJOR > 2
18406         db_env_create( NULL, 0 );
18407 #elif DB_VERSION_MAJOR > 1
18408         db_appexit( NULL );
18409 #else
18410         (void) dbopen( NULL, 0, 0, 0, NULL);
18411 #endif
18412
18413 ; return 0; }
18414 EOF
18415 if { (eval echo configure:18416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18416   rm -rf conftest*
18417   ol_cv_db_db_3=yes
18418 else
18419   echo "configure: failed program was:" >&5
18420   cat conftest.$ac_ext >&5
18421   rm -rf conftest*
18422   ol_cv_db_db_3=no
18423 fi
18424 rm -f conftest*
18425
18426         LIBS="$ol_LIBS"
18427
18428 fi
18429
18430 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18431
18432         if test $ol_cv_db_db_3 = yes ; then
18433                 ol_cv_lib_db=-ldb-3
18434         fi
18435 fi
18436
18437 if test $ol_cv_lib_db = no ; then
18438         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18439 echo "configure:18440: checking for Berkeley DB link (-ldb2)" >&5
18440 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18441   echo $ac_n "(cached) $ac_c" 1>&6
18442 else
18443   
18444         ol_DB_LIB=-ldb2
18445         ol_LIBS=$LIBS
18446         LIBS="$ol_DB_LIB $LIBS"
18447
18448         cat > conftest.$ac_ext <<EOF
18449 #line 18450 "configure"
18450 #include "confdefs.h"
18451
18452 #ifdef HAVE_DB_185_H
18453 # include <db_185.h>
18454 #else
18455 # include <db.h>
18456 #endif
18457
18458 #ifndef DB_VERSION_MAJOR
18459 # define DB_VERSION_MAJOR 1
18460 #endif
18461
18462 #ifndef NULL
18463 #define NULL ((void*)0)
18464 #endif
18465
18466 int main() {
18467
18468 #if DB_VERSION_MAJOR > 1
18469         {
18470                 char *version;
18471                 int major, minor, patch;
18472
18473                 version = db_version( &major, &minor, &patch );
18474
18475                 if( major != DB_VERSION_MAJOR ||
18476                         minor < DB_VERSION_MINOR )
18477                 {
18478                         printf("Berkeley DB version mismatch\n"
18479                                 "\texpected: %s\n\tgot: %s\n",
18480                                 DB_VERSION_STRING, version);
18481                         return 1;
18482                 }
18483         }
18484 #endif
18485
18486 #if DB_VERSION_MAJOR > 2
18487         db_env_create( NULL, 0 );
18488 #elif DB_VERSION_MAJOR > 1
18489         db_appexit( NULL );
18490 #else
18491         (void) dbopen( NULL, 0, 0, 0, NULL);
18492 #endif
18493
18494 ; return 0; }
18495 EOF
18496 if { (eval echo configure:18497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18497   rm -rf conftest*
18498   ol_cv_db_db2=yes
18499 else
18500   echo "configure: failed program was:" >&5
18501   cat conftest.$ac_ext >&5
18502   rm -rf conftest*
18503   ol_cv_db_db2=no
18504 fi
18505 rm -f conftest*
18506
18507         LIBS="$ol_LIBS"
18508
18509 fi
18510
18511 echo "$ac_t""$ol_cv_db_db2" 1>&6
18512
18513         if test $ol_cv_db_db2 = yes ; then
18514                 ol_cv_lib_db=-ldb2
18515         fi
18516 fi
18517
18518 if test $ol_cv_lib_db = no ; then
18519         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18520 echo "configure:18521: checking for Berkeley DB link (-ldb-2)" >&5
18521 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18522   echo $ac_n "(cached) $ac_c" 1>&6
18523 else
18524   
18525         ol_DB_LIB=-ldb-2
18526         ol_LIBS=$LIBS
18527         LIBS="$ol_DB_LIB $LIBS"
18528
18529         cat > conftest.$ac_ext <<EOF
18530 #line 18531 "configure"
18531 #include "confdefs.h"
18532
18533 #ifdef HAVE_DB_185_H
18534 # include <db_185.h>
18535 #else
18536 # include <db.h>
18537 #endif
18538
18539 #ifndef DB_VERSION_MAJOR
18540 # define DB_VERSION_MAJOR 1
18541 #endif
18542
18543 #ifndef NULL
18544 #define NULL ((void*)0)
18545 #endif
18546
18547 int main() {
18548
18549 #if DB_VERSION_MAJOR > 1
18550         {
18551                 char *version;
18552                 int major, minor, patch;
18553
18554                 version = db_version( &major, &minor, &patch );
18555
18556                 if( major != DB_VERSION_MAJOR ||
18557                         minor < DB_VERSION_MINOR )
18558                 {
18559                         printf("Berkeley DB version mismatch\n"
18560                                 "\texpected: %s\n\tgot: %s\n",
18561                                 DB_VERSION_STRING, version);
18562                         return 1;
18563                 }
18564         }
18565 #endif
18566
18567 #if DB_VERSION_MAJOR > 2
18568         db_env_create( NULL, 0 );
18569 #elif DB_VERSION_MAJOR > 1
18570         db_appexit( NULL );
18571 #else
18572         (void) dbopen( NULL, 0, 0, 0, NULL);
18573 #endif
18574
18575 ; return 0; }
18576 EOF
18577 if { (eval echo configure:18578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18578   rm -rf conftest*
18579   ol_cv_db_db_2=yes
18580 else
18581   echo "configure: failed program was:" >&5
18582   cat conftest.$ac_ext >&5
18583   rm -rf conftest*
18584   ol_cv_db_db_2=no
18585 fi
18586 rm -f conftest*
18587
18588         LIBS="$ol_LIBS"
18589
18590 fi
18591
18592 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18593
18594         if test $ol_cv_db_db_2 = yes ; then
18595                 ol_cv_lib_db=-ldb-2
18596         fi
18597 fi
18598
18599 if test $ol_cv_lib_db = no ; then
18600         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18601 echo "configure:18602: checking for Berkeley DB link (-ldb1)" >&5
18602 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18603   echo $ac_n "(cached) $ac_c" 1>&6
18604 else
18605   
18606         ol_DB_LIB=-ldb1
18607         ol_LIBS=$LIBS
18608         LIBS="$ol_DB_LIB $LIBS"
18609
18610         cat > conftest.$ac_ext <<EOF
18611 #line 18612 "configure"
18612 #include "confdefs.h"
18613
18614 #ifdef HAVE_DB_185_H
18615 # include <db_185.h>
18616 #else
18617 # include <db.h>
18618 #endif
18619
18620 #ifndef DB_VERSION_MAJOR
18621 # define DB_VERSION_MAJOR 1
18622 #endif
18623
18624 #ifndef NULL
18625 #define NULL ((void*)0)
18626 #endif
18627
18628 int main() {
18629
18630 #if DB_VERSION_MAJOR > 1
18631         {
18632                 char *version;
18633                 int major, minor, patch;
18634
18635                 version = db_version( &major, &minor, &patch );
18636
18637                 if( major != DB_VERSION_MAJOR ||
18638                         minor < DB_VERSION_MINOR )
18639                 {
18640                         printf("Berkeley DB version mismatch\n"
18641                                 "\texpected: %s\n\tgot: %s\n",
18642                                 DB_VERSION_STRING, version);
18643                         return 1;
18644                 }
18645         }
18646 #endif
18647
18648 #if DB_VERSION_MAJOR > 2
18649         db_env_create( NULL, 0 );
18650 #elif DB_VERSION_MAJOR > 1
18651         db_appexit( NULL );
18652 #else
18653         (void) dbopen( NULL, 0, 0, 0, NULL);
18654 #endif
18655
18656 ; return 0; }
18657 EOF
18658 if { (eval echo configure:18659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18659   rm -rf conftest*
18660   ol_cv_db_db1=yes
18661 else
18662   echo "configure: failed program was:" >&5
18663   cat conftest.$ac_ext >&5
18664   rm -rf conftest*
18665   ol_cv_db_db1=no
18666 fi
18667 rm -f conftest*
18668
18669         LIBS="$ol_LIBS"
18670
18671 fi
18672
18673 echo "$ac_t""$ol_cv_db_db1" 1>&6
18674
18675         if test $ol_cv_db_db1 = yes ; then
18676                 ol_cv_lib_db=-ldb1
18677         fi
18678 fi
18679
18680 if test $ol_cv_lib_db = no ; then
18681         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18682 echo "configure:18683: checking for Berkeley DB link (-ldb-1)" >&5
18683 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18684   echo $ac_n "(cached) $ac_c" 1>&6
18685 else
18686   
18687         ol_DB_LIB=-ldb-1
18688         ol_LIBS=$LIBS
18689         LIBS="$ol_DB_LIB $LIBS"
18690
18691         cat > conftest.$ac_ext <<EOF
18692 #line 18693 "configure"
18693 #include "confdefs.h"
18694
18695 #ifdef HAVE_DB_185_H
18696 # include <db_185.h>
18697 #else
18698 # include <db.h>
18699 #endif
18700
18701 #ifndef DB_VERSION_MAJOR
18702 # define DB_VERSION_MAJOR 1
18703 #endif
18704
18705 #ifndef NULL
18706 #define NULL ((void*)0)
18707 #endif
18708
18709 int main() {
18710
18711 #if DB_VERSION_MAJOR > 1
18712         {
18713                 char *version;
18714                 int major, minor, patch;
18715
18716                 version = db_version( &major, &minor, &patch );
18717
18718                 if( major != DB_VERSION_MAJOR ||
18719                         minor < DB_VERSION_MINOR )
18720                 {
18721                         printf("Berkeley DB version mismatch\n"
18722                                 "\texpected: %s\n\tgot: %s\n",
18723                                 DB_VERSION_STRING, version);
18724                         return 1;
18725                 }
18726         }
18727 #endif
18728
18729 #if DB_VERSION_MAJOR > 2
18730         db_env_create( NULL, 0 );
18731 #elif DB_VERSION_MAJOR > 1
18732         db_appexit( NULL );
18733 #else
18734         (void) dbopen( NULL, 0, 0, 0, NULL);
18735 #endif
18736
18737 ; return 0; }
18738 EOF
18739 if { (eval echo configure:18740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18740   rm -rf conftest*
18741   ol_cv_db_db_1=yes
18742 else
18743   echo "configure: failed program was:" >&5
18744   cat conftest.$ac_ext >&5
18745   rm -rf conftest*
18746   ol_cv_db_db_1=no
18747 fi
18748 rm -f conftest*
18749
18750         LIBS="$ol_LIBS"
18751
18752 fi
18753
18754 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18755
18756         if test $ol_cv_db_db_1 = yes ; then
18757                 ol_cv_lib_db=-ldb-1
18758         fi
18759 fi
18760
18761
18762         if test "$ol_cv_lib_db" != no ; then
18763                 ol_cv_berkeley_db=yes
18764                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18765 echo "configure:18766: checking for Berkeley DB thread support" >&5
18766 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18767   echo $ac_n "(cached) $ac_c" 1>&6
18768 else
18769   
18770         ol_LIBS="$LIBS"
18771         if test $ol_cv_lib_db != yes ; then
18772                 LIBS="$ol_cv_lib_db"
18773         fi
18774
18775         if test "$cross_compiling" = yes; then
18776   ol_cv_berkeley_db_thread=cross
18777 else
18778   cat > conftest.$ac_ext <<EOF
18779 #line 18780 "configure"
18780 #include "confdefs.h"
18781
18782 #ifdef HAVE_DB_185_H
18783         choke me;
18784 #else
18785 #include <db.h>
18786 #endif
18787 #ifndef NULL
18788 #define NULL ((void *)0)
18789 #endif
18790 main()
18791 {
18792         int rc;
18793         u_int32_t flags = DB_CREATE |
18794 #ifdef DB_PRIVATE
18795                 DB_PRIVATE |
18796 #endif
18797                 DB_THREAD;
18798
18799 #if DB_VERSION_MAJOR > 2
18800         DB_ENV *env = NULL;
18801
18802         rc = db_env_create( &env, 0 );
18803
18804         flags |= DB_INIT_MPOOL;
18805 #ifdef DB_MPOOL_PRIVATE
18806         flags |= DB_MPOOL_PRIVATE;
18807 #endif
18808
18809         if( rc ) {
18810                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18811                 return rc;
18812         }
18813
18814 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18815         rc = env->open( env, NULL, flags, 0 );
18816 #else
18817         rc = env->open( env, NULL, NULL, flags, 0 );
18818 #endif
18819
18820         if ( rc == 0 ) {
18821                 rc = env->close( env, 0 );
18822         }
18823
18824         if( rc ) {
18825                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18826                 return rc;
18827         }
18828
18829 #else
18830         DB_ENV env;
18831         memset( &env, '\0', sizeof(env) );
18832
18833         rc = db_appinit( NULL, NULL, &env, flags );
18834
18835         if( rc == 0 ) {
18836                 db_appexit( &env );
18837         }
18838
18839         unlink("__db_mpool.share");
18840         unlink("__db_lock.share");
18841 #endif
18842
18843         return rc;
18844 }
18845 EOF
18846 if { (eval echo configure:18847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18847 then
18848   ol_cv_berkeley_db_thread=yes
18849 else
18850   echo "configure: failed program was:" >&5
18851   cat conftest.$ac_ext >&5
18852   rm -fr conftest*
18853   ol_cv_berkeley_db_thread=no
18854 fi
18855 rm -fr conftest*
18856 fi
18857
18858
18859         LIBS="$ol_LIBS"
18860
18861         if test $ol_cv_berkeley_db_thread != no ; then
18862                 cat >> confdefs.h <<\EOF
18863 #define HAVE_BERKELEY_DB_THREAD 1
18864 EOF
18865
18866         fi
18867
18868 fi
18869
18870 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18871         fi
18872 fi
18873
18874         fi
18875
18876         if test $ol_cv_berkeley_db != no ; then
18877                 cat >> confdefs.h <<\EOF
18878 #define HAVE_BERKELEY_DB 1
18879 EOF
18880
18881
18882                 ol_link_ldbm=berkeley
18883                 ol_with_ldbm_api=berkeley
18884
18885                 if test $ol_with_ldbm_type = hash ; then
18886                         cat >> confdefs.h <<\EOF
18887 #define LDBM_USE_DBHASH 1
18888 EOF
18889
18890                 else
18891                         cat >> confdefs.h <<\EOF
18892 #define LDBM_USE_DBBTREE 1
18893 EOF
18894
18895                 fi
18896
18897                                                 if test $ol_cv_lib_db != yes ; then
18898                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18899                 fi
18900         fi
18901 fi
18902
18903 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18904         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18905 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18906         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18907 echo "configure:18908: checking Berkeley DB version for BDB backend" >&5
18908 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18909   echo $ac_n "(cached) $ac_c" 1>&6
18910 else
18911   
18912         cat > conftest.$ac_ext <<EOF
18913 #line 18914 "configure"
18914 #include "confdefs.h"
18915
18916 #include <db.h>
18917
18918  /* this check could be improved */
18919 #ifndef DB_VERSION_MAJOR
18920 #       define DB_VERSION_MAJOR 1
18921 #endif
18922
18923 /* require 4.0 or later */
18924 #if DB_VERSION_MAJOR >= 4 
18925         __db_version_compat
18926 #endif
18927         
18928 EOF
18929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18930   egrep "__db_version_compat" >/dev/null 2>&1; then
18931   rm -rf conftest*
18932   ol_cv_bdb_compat=yes
18933 else
18934   rm -rf conftest*
18935   ol_cv_bdb_compat=no
18936 fi
18937 rm -f conftest*
18938
18939 fi
18940
18941 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18942
18943
18944         if test $ol_cv_bdb_compat = yes ; then
18945                 ol_enable_bdb=yes
18946         elif test $ol_enable_bdb = yes ; then
18947                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18948         else
18949                 ol_enable_bdb=no
18950         fi
18951 fi
18952
18953 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18954         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18955         ol_with_ldbm_api=none
18956 fi
18957
18958 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18959         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18960 echo "configure:18961: checking for MDBM library" >&5
18961 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18962   echo $ac_n "(cached) $ac_c" 1>&6
18963 else
18964         ol_LIBS="$LIBS"
18965         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18966 echo "configure:18967: checking for mdbm_set_chain" >&5
18967 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18968   echo $ac_n "(cached) $ac_c" 1>&6
18969 else
18970   cat > conftest.$ac_ext <<EOF
18971 #line 18972 "configure"
18972 #include "confdefs.h"
18973 /* System header to define __stub macros and hopefully few prototypes,
18974     which can conflict with char mdbm_set_chain(); below.  */
18975 #include <assert.h>
18976 /* Override any gcc2 internal prototype to avoid an error.  */
18977 /* We use char because int might match the return type of a gcc2
18978     builtin and then its argument prototype would still apply.  */
18979 char mdbm_set_chain();
18980 char (*f)();
18981
18982 int main() {
18983
18984 /* The GNU C library defines this for functions which it implements
18985     to always fail with ENOSYS.  Some functions are actually named
18986     something starting with __ and the normal name is an alias.  */
18987 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18988 choke me
18989 #else
18990 f = mdbm_set_chain;
18991 #endif
18992
18993 ; return 0; }
18994 EOF
18995 if { (eval echo configure:18996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18996   rm -rf conftest*
18997   eval "ac_cv_func_mdbm_set_chain=yes"
18998 else
18999   echo "configure: failed program was:" >&5
19000   cat conftest.$ac_ext >&5
19001   rm -rf conftest*
19002   eval "ac_cv_func_mdbm_set_chain=no"
19003 fi
19004 rm -f conftest*
19005 fi
19006
19007 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19008   echo "$ac_t""yes" 1>&6
19009   ol_cv_lib_mdbm=yes
19010 else
19011   echo "$ac_t""no" 1>&6
19012
19013                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19014 echo "configure:19015: checking for mdbm_set_chain in -lmdbm" >&5
19015 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19016 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19017   echo $ac_n "(cached) $ac_c" 1>&6
19018 else
19019   ac_save_LIBS="$LIBS"
19020 LIBS="-lmdbm  $LIBS"
19021 cat > conftest.$ac_ext <<EOF
19022 #line 19023 "configure"
19023 #include "confdefs.h"
19024 /* Override any gcc2 internal prototype to avoid an error.  */
19025 /* We use char because int might match the return type of a gcc2
19026     builtin and then its argument prototype would still apply.  */
19027 char mdbm_set_chain();
19028
19029 int main() {
19030 mdbm_set_chain()
19031 ; return 0; }
19032 EOF
19033 if { (eval echo configure:19034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19034   rm -rf conftest*
19035   eval "ac_cv_lib_$ac_lib_var=yes"
19036 else
19037   echo "configure: failed program was:" >&5
19038   cat conftest.$ac_ext >&5
19039   rm -rf conftest*
19040   eval "ac_cv_lib_$ac_lib_var=no"
19041 fi
19042 rm -f conftest*
19043 LIBS="$ac_save_LIBS"
19044
19045 fi
19046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19047   echo "$ac_t""yes" 1>&6
19048   ol_cv_lib_mdbm=-lmdbm
19049 else
19050   echo "$ac_t""no" 1>&6
19051 ol_cv_lib_mdbm=no
19052 fi
19053
19054         
19055 fi
19056
19057         LIBS="$ol_LIBS"
19058
19059 fi
19060
19061 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19062
19063
19064  for ac_hdr in mdbm.h
19065 do
19066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19068 echo "configure:19069: checking for $ac_hdr" >&5
19069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19070   echo $ac_n "(cached) $ac_c" 1>&6
19071 else
19072   cat > conftest.$ac_ext <<EOF
19073 #line 19074 "configure"
19074 #include "confdefs.h"
19075 #include <$ac_hdr>
19076 EOF
19077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19078 { (eval echo configure:19079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19080 if test -z "$ac_err"; then
19081   rm -rf conftest*
19082   eval "ac_cv_header_$ac_safe=yes"
19083 else
19084   echo "$ac_err" >&5
19085   echo "configure: failed program was:" >&5
19086   cat conftest.$ac_ext >&5
19087   rm -rf conftest*
19088   eval "ac_cv_header_$ac_safe=no"
19089 fi
19090 rm -f conftest*
19091 fi
19092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19093   echo "$ac_t""yes" 1>&6
19094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19095   cat >> confdefs.h <<EOF
19096 #define $ac_tr_hdr 1
19097 EOF
19098  
19099 else
19100   echo "$ac_t""no" 1>&6
19101 fi
19102 done
19103
19104  echo $ac_n "checking for db""... $ac_c" 1>&6
19105 echo "configure:19106: checking for db" >&5
19106 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19107   echo $ac_n "(cached) $ac_c" 1>&6
19108 else
19109   
19110         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19111                 ol_cv_mdbm=no
19112         else
19113                 ol_cv_mdbm=yes
19114         fi
19115
19116 fi
19117
19118 echo "$ac_t""$ol_cv_mdbm" 1>&6
19119  if test $ol_cv_mdbm = yes ; then
19120         cat >> confdefs.h <<\EOF
19121 #define HAVE_MDBM 1
19122 EOF
19123
19124  fi
19125
19126
19127         if test $ol_cv_mdbm = yes ; then
19128                 ol_link_ldbm=mdbm
19129                 ol_with_ldbm_api=mdbm
19130                 if test $ol_cv_lib_mdbm != yes ; then
19131                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19132                 fi
19133         fi
19134 fi
19135
19136 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19137         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19138 echo "configure:19139: checking for GDBM library" >&5
19139 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19140   echo $ac_n "(cached) $ac_c" 1>&6
19141 else
19142         ol_LIBS="$LIBS"
19143         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19144 echo "configure:19145: checking for gdbm_open" >&5
19145 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19146   echo $ac_n "(cached) $ac_c" 1>&6
19147 else
19148   cat > conftest.$ac_ext <<EOF
19149 #line 19150 "configure"
19150 #include "confdefs.h"
19151 /* System header to define __stub macros and hopefully few prototypes,
19152     which can conflict with char gdbm_open(); below.  */
19153 #include <assert.h>
19154 /* Override any gcc2 internal prototype to avoid an error.  */
19155 /* We use char because int might match the return type of a gcc2
19156     builtin and then its argument prototype would still apply.  */
19157 char gdbm_open();
19158 char (*f)();
19159
19160 int main() {
19161
19162 /* The GNU C library defines this for functions which it implements
19163     to always fail with ENOSYS.  Some functions are actually named
19164     something starting with __ and the normal name is an alias.  */
19165 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19166 choke me
19167 #else
19168 f = gdbm_open;
19169 #endif
19170
19171 ; return 0; }
19172 EOF
19173 if { (eval echo configure:19174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19174   rm -rf conftest*
19175   eval "ac_cv_func_gdbm_open=yes"
19176 else
19177   echo "configure: failed program was:" >&5
19178   cat conftest.$ac_ext >&5
19179   rm -rf conftest*
19180   eval "ac_cv_func_gdbm_open=no"
19181 fi
19182 rm -f conftest*
19183 fi
19184
19185 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19186   echo "$ac_t""yes" 1>&6
19187   ol_cv_lib_gdbm=yes
19188 else
19189   echo "$ac_t""no" 1>&6
19190
19191                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19192 echo "configure:19193: checking for gdbm_open in -lgdbm" >&5
19193 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19195   echo $ac_n "(cached) $ac_c" 1>&6
19196 else
19197   ac_save_LIBS="$LIBS"
19198 LIBS="-lgdbm  $LIBS"
19199 cat > conftest.$ac_ext <<EOF
19200 #line 19201 "configure"
19201 #include "confdefs.h"
19202 /* Override any gcc2 internal prototype to avoid an error.  */
19203 /* We use char because int might match the return type of a gcc2
19204     builtin and then its argument prototype would still apply.  */
19205 char gdbm_open();
19206
19207 int main() {
19208 gdbm_open()
19209 ; return 0; }
19210 EOF
19211 if { (eval echo configure:19212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19212   rm -rf conftest*
19213   eval "ac_cv_lib_$ac_lib_var=yes"
19214 else
19215   echo "configure: failed program was:" >&5
19216   cat conftest.$ac_ext >&5
19217   rm -rf conftest*
19218   eval "ac_cv_lib_$ac_lib_var=no"
19219 fi
19220 rm -f conftest*
19221 LIBS="$ac_save_LIBS"
19222
19223 fi
19224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19225   echo "$ac_t""yes" 1>&6
19226   ol_cv_lib_gdbm=-lgdbm
19227 else
19228   echo "$ac_t""no" 1>&6
19229 ol_cv_lib_gdbm=no
19230 fi
19231
19232         
19233 fi
19234
19235         LIBS="$ol_LIBS"
19236
19237 fi
19238
19239 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19240
19241
19242  for ac_hdr in gdbm.h
19243 do
19244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19246 echo "configure:19247: checking for $ac_hdr" >&5
19247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19248   echo $ac_n "(cached) $ac_c" 1>&6
19249 else
19250   cat > conftest.$ac_ext <<EOF
19251 #line 19252 "configure"
19252 #include "confdefs.h"
19253 #include <$ac_hdr>
19254 EOF
19255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19256 { (eval echo configure:19257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19258 if test -z "$ac_err"; then
19259   rm -rf conftest*
19260   eval "ac_cv_header_$ac_safe=yes"
19261 else
19262   echo "$ac_err" >&5
19263   echo "configure: failed program was:" >&5
19264   cat conftest.$ac_ext >&5
19265   rm -rf conftest*
19266   eval "ac_cv_header_$ac_safe=no"
19267 fi
19268 rm -f conftest*
19269 fi
19270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19271   echo "$ac_t""yes" 1>&6
19272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19273   cat >> confdefs.h <<EOF
19274 #define $ac_tr_hdr 1
19275 EOF
19276  
19277 else
19278   echo "$ac_t""no" 1>&6
19279 fi
19280 done
19281
19282  echo $ac_n "checking for db""... $ac_c" 1>&6
19283 echo "configure:19284: checking for db" >&5
19284 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19285   echo $ac_n "(cached) $ac_c" 1>&6
19286 else
19287   
19288         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19289                 ol_cv_gdbm=no
19290         else
19291                 ol_cv_gdbm=yes
19292         fi
19293
19294 fi
19295
19296 echo "$ac_t""$ol_cv_gdbm" 1>&6
19297  if test $ol_cv_gdbm = yes ; then
19298         cat >> confdefs.h <<\EOF
19299 #define HAVE_GDBM 1
19300 EOF
19301
19302  fi
19303
19304
19305         if test $ol_cv_gdbm = yes ; then
19306                 ol_link_ldbm=gdbm
19307                 ol_with_ldbm_api=gdbm
19308
19309                 if test $ol_cv_lib_gdbm != yes ; then
19310                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19311                 fi
19312         fi
19313 fi
19314
19315 if test $ol_with_ldbm_api = ndbm ; then
19316         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19317 echo "configure:19318: checking for NDBM library" >&5
19318 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19319   echo $ac_n "(cached) $ac_c" 1>&6
19320 else
19321         ol_LIBS="$LIBS"
19322         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19323 echo "configure:19324: checking for dbm_open" >&5
19324 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19325   echo $ac_n "(cached) $ac_c" 1>&6
19326 else
19327   cat > conftest.$ac_ext <<EOF
19328 #line 19329 "configure"
19329 #include "confdefs.h"
19330 /* System header to define __stub macros and hopefully few prototypes,
19331     which can conflict with char dbm_open(); below.  */
19332 #include <assert.h>
19333 /* Override any gcc2 internal prototype to avoid an error.  */
19334 /* We use char because int might match the return type of a gcc2
19335     builtin and then its argument prototype would still apply.  */
19336 char dbm_open();
19337 char (*f)();
19338
19339 int main() {
19340
19341 /* The GNU C library defines this for functions which it implements
19342     to always fail with ENOSYS.  Some functions are actually named
19343     something starting with __ and the normal name is an alias.  */
19344 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19345 choke me
19346 #else
19347 f = dbm_open;
19348 #endif
19349
19350 ; return 0; }
19351 EOF
19352 if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19353   rm -rf conftest*
19354   eval "ac_cv_func_dbm_open=yes"
19355 else
19356   echo "configure: failed program was:" >&5
19357   cat conftest.$ac_ext >&5
19358   rm -rf conftest*
19359   eval "ac_cv_func_dbm_open=no"
19360 fi
19361 rm -f conftest*
19362 fi
19363
19364 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19365   echo "$ac_t""yes" 1>&6
19366   ol_cv_lib_ndbm=yes
19367 else
19368   echo "$ac_t""no" 1>&6
19369
19370                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19371 echo "configure:19372: checking for dbm_open in -lndbm" >&5
19372 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19374   echo $ac_n "(cached) $ac_c" 1>&6
19375 else
19376   ac_save_LIBS="$LIBS"
19377 LIBS="-lndbm  $LIBS"
19378 cat > conftest.$ac_ext <<EOF
19379 #line 19380 "configure"
19380 #include "confdefs.h"
19381 /* Override any gcc2 internal prototype to avoid an error.  */
19382 /* We use char because int might match the return type of a gcc2
19383     builtin and then its argument prototype would still apply.  */
19384 char dbm_open();
19385
19386 int main() {
19387 dbm_open()
19388 ; return 0; }
19389 EOF
19390 if { (eval echo configure:19391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19391   rm -rf conftest*
19392   eval "ac_cv_lib_$ac_lib_var=yes"
19393 else
19394   echo "configure: failed program was:" >&5
19395   cat conftest.$ac_ext >&5
19396   rm -rf conftest*
19397   eval "ac_cv_lib_$ac_lib_var=no"
19398 fi
19399 rm -f conftest*
19400 LIBS="$ac_save_LIBS"
19401
19402 fi
19403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19404   echo "$ac_t""yes" 1>&6
19405   ol_cv_lib_ndbm=-lndbm
19406 else
19407   echo "$ac_t""no" 1>&6
19408
19409                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19410 echo "configure:19411: checking for dbm_open in -ldbm" >&5
19411 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19413   echo $ac_n "(cached) $ac_c" 1>&6
19414 else
19415   ac_save_LIBS="$LIBS"
19416 LIBS="-ldbm  $LIBS"
19417 cat > conftest.$ac_ext <<EOF
19418 #line 19419 "configure"
19419 #include "confdefs.h"
19420 /* Override any gcc2 internal prototype to avoid an error.  */
19421 /* We use char because int might match the return type of a gcc2
19422     builtin and then its argument prototype would still apply.  */
19423 char dbm_open();
19424
19425 int main() {
19426 dbm_open()
19427 ; return 0; }
19428 EOF
19429 if { (eval echo configure:19430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19430   rm -rf conftest*
19431   eval "ac_cv_lib_$ac_lib_var=yes"
19432 else
19433   echo "configure: failed program was:" >&5
19434   cat conftest.$ac_ext >&5
19435   rm -rf conftest*
19436   eval "ac_cv_lib_$ac_lib_var=no"
19437 fi
19438 rm -f conftest*
19439 LIBS="$ac_save_LIBS"
19440
19441 fi
19442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19443   echo "$ac_t""yes" 1>&6
19444   ol_cv_lib_ndbm=-ldbm
19445 else
19446   echo "$ac_t""no" 1>&6
19447 ol_cv_lib_ndbm=no
19448 fi
19449                 
19450 fi
19451
19452         
19453 fi
19454
19455         LIBS="$ol_LIBS"
19456
19457 fi
19458
19459 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19460
19461
19462  for ac_hdr in ndbm.h
19463 do
19464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19466 echo "configure:19467: checking for $ac_hdr" >&5
19467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19468   echo $ac_n "(cached) $ac_c" 1>&6
19469 else
19470   cat > conftest.$ac_ext <<EOF
19471 #line 19472 "configure"
19472 #include "confdefs.h"
19473 #include <$ac_hdr>
19474 EOF
19475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19476 { (eval echo configure:19477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19478 if test -z "$ac_err"; then
19479   rm -rf conftest*
19480   eval "ac_cv_header_$ac_safe=yes"
19481 else
19482   echo "$ac_err" >&5
19483   echo "configure: failed program was:" >&5
19484   cat conftest.$ac_ext >&5
19485   rm -rf conftest*
19486   eval "ac_cv_header_$ac_safe=no"
19487 fi
19488 rm -f conftest*
19489 fi
19490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19491   echo "$ac_t""yes" 1>&6
19492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19493   cat >> confdefs.h <<EOF
19494 #define $ac_tr_hdr 1
19495 EOF
19496  
19497 else
19498   echo "$ac_t""no" 1>&6
19499 fi
19500 done
19501
19502  echo $ac_n "checking for db""... $ac_c" 1>&6
19503 echo "configure:19504: checking for db" >&5
19504 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19505   echo $ac_n "(cached) $ac_c" 1>&6
19506 else
19507   
19508         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19509                 ol_cv_ndbm=no
19510         else
19511                 ol_cv_ndbm=yes
19512         fi
19513
19514 fi
19515
19516 echo "$ac_t""$ol_cv_ndbm" 1>&6
19517  if test $ol_cv_ndbm = yes ; then
19518         cat >> confdefs.h <<\EOF
19519 #define HAVE_NDBM 1
19520 EOF
19521
19522  fi
19523
19524
19525         if test $ol_cv_ndbm = yes ; then
19526                 ol_link_ldbm=ndbm
19527                 ol_with_ldbm_api=ndbm
19528
19529                 if test $ol_cv_lib_ndbm != yes ; then
19530                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19531                 fi
19532         fi
19533 fi
19534
19535 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19536         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19537         if test $ol_enable_ldbm = yes ; then
19538                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19539         fi
19540
19541         echo "configure: warning: disabling LDBM" 1>&2
19542         ol_enable_ldbm=no
19543 fi
19544
19545 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19546         BUILD_LIBS_DYNAMIC=shared
19547         cat >> confdefs.h <<\EOF
19548 #define LDAP_LIBS_DYNAMIC 1
19549 EOF
19550
19551 else
19552         BUILD_LIBS_DYNAMIC=static
19553 fi
19554
19555 if test $ol_enable_wrappers != no ; then
19556         for ac_hdr in tcpd.h
19557 do
19558 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19560 echo "configure:19561: checking for $ac_hdr" >&5
19561 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19562   echo $ac_n "(cached) $ac_c" 1>&6
19563 else
19564   cat > conftest.$ac_ext <<EOF
19565 #line 19566 "configure"
19566 #include "confdefs.h"
19567 #include <$ac_hdr>
19568 EOF
19569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19570 { (eval echo configure:19571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19572 if test -z "$ac_err"; then
19573   rm -rf conftest*
19574   eval "ac_cv_header_$ac_safe=yes"
19575 else
19576   echo "$ac_err" >&5
19577   echo "configure: failed program was:" >&5
19578   cat conftest.$ac_ext >&5
19579   rm -rf conftest*
19580   eval "ac_cv_header_$ac_safe=no"
19581 fi
19582 rm -f conftest*
19583 fi
19584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19585   echo "$ac_t""yes" 1>&6
19586     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19587   cat >> confdefs.h <<EOF
19588 #define $ac_tr_hdr 1
19589 EOF
19590  
19591                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19592 echo "configure:19593: checking for TCP wrappers library" >&5
19593                 save_LIBS="$LIBS"
19594                 LIBS="$LIBS -lwrap"
19595                 cat > conftest.$ac_ext <<EOF
19596 #line 19597 "configure"
19597 #include "confdefs.h"
19598
19599 #include <tcpd.h>
19600 int allow_severity = 0;
19601 int deny_severity  = 0;
19602
19603 struct request_info *req;
19604                 
19605 int main() {
19606
19607 hosts_access(req)
19608                 
19609 ; return 0; }
19610 EOF
19611 if { (eval echo configure:19612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19612   rm -rf conftest*
19613   echo "$ac_t""-lwrap" 1>&6
19614                 have_wrappers=yes
19615                 LIBS="$save_LIBS"
19616 else
19617   echo "configure: failed program was:" >&5
19618   cat conftest.$ac_ext >&5
19619   rm -rf conftest*
19620   
19621                                 LIBS="$LIBS -lnsl"
19622                 cat > conftest.$ac_ext <<EOF
19623 #line 19624 "configure"
19624 #include "confdefs.h"
19625
19626 #include <tcpd.h>
19627 int allow_severity = 0;
19628 int deny_severity  = 0;
19629
19630 struct request_info *req;
19631                 
19632 int main() {
19633
19634 hosts_access(req)
19635                 
19636 ; return 0; }
19637 EOF
19638 if { (eval echo configure:19639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19639   rm -rf conftest*
19640   echo "$ac_t""-lwrap -lnsl" 1>&6
19641                 have_wrappers=yes
19642                 LIBS="$save_LIBS -lnsl"
19643 else
19644   echo "configure: failed program was:" >&5
19645   cat conftest.$ac_ext >&5
19646   rm -rf conftest*
19647   
19648                 echo "$ac_t""no" 1>&6
19649                 have_wrappers=no
19650                 LIBS=$save_LIBS
19651 fi
19652 rm -f conftest*
19653 fi
19654 rm -f conftest*
19655 else
19656   echo "$ac_t""no" 1>&6
19657 have_wrappers=no
19658 fi
19659 done
19660
19661
19662         if test $have_wrappers = yes ; then
19663                 cat >> confdefs.h <<\EOF
19664 #define HAVE_TCPD 1
19665 EOF
19666
19667                 WRAP_LIBS="-lwrap"
19668         elif test $ol_enable_wrappers = yes ; then
19669                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19670         else
19671                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19672                 WRAP_LIBS=""
19673         fi
19674 fi
19675
19676 if test $ol_enable_syslog != no ; then
19677         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19678 echo "configure:19679: checking for openlog" >&5
19679 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19680   echo $ac_n "(cached) $ac_c" 1>&6
19681 else
19682   cat > conftest.$ac_ext <<EOF
19683 #line 19684 "configure"
19684 #include "confdefs.h"
19685 /* System header to define __stub macros and hopefully few prototypes,
19686     which can conflict with char openlog(); below.  */
19687 #include <assert.h>
19688 /* Override any gcc2 internal prototype to avoid an error.  */
19689 /* We use char because int might match the return type of a gcc2
19690     builtin and then its argument prototype would still apply.  */
19691 char openlog();
19692 char (*f)();
19693
19694 int main() {
19695
19696 /* The GNU C library defines this for functions which it implements
19697     to always fail with ENOSYS.  Some functions are actually named
19698     something starting with __ and the normal name is an alias.  */
19699 #if defined (__stub_openlog) || defined (__stub___openlog)
19700 choke me
19701 #else
19702 f = openlog;
19703 #endif
19704
19705 ; return 0; }
19706 EOF
19707 if { (eval echo configure:19708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19708   rm -rf conftest*
19709   eval "ac_cv_func_openlog=yes"
19710 else
19711   echo "configure: failed program was:" >&5
19712   cat conftest.$ac_ext >&5
19713   rm -rf conftest*
19714   eval "ac_cv_func_openlog=no"
19715 fi
19716 rm -f conftest*
19717 fi
19718
19719 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19720   echo "$ac_t""yes" 1>&6
19721   :
19722 else
19723   echo "$ac_t""no" 1>&6
19724 fi
19725
19726         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19727                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19728         fi
19729         ol_enable_syslog=$ac_cv_func_openlog
19730 fi
19731
19732
19733 ol_link_sql=no
19734 if test $ol_enable_sql != no ; then
19735         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19736 echo "configure:19737: checking for SQLDriverConnect in -liodbc" >&5
19737 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19739   echo $ac_n "(cached) $ac_c" 1>&6
19740 else
19741   ac_save_LIBS="$LIBS"
19742 LIBS="-liodbc  $LIBS"
19743 cat > conftest.$ac_ext <<EOF
19744 #line 19745 "configure"
19745 #include "confdefs.h"
19746 /* Override any gcc2 internal prototype to avoid an error.  */
19747 /* We use char because int might match the return type of a gcc2
19748     builtin and then its argument prototype would still apply.  */
19749 char SQLDriverConnect();
19750
19751 int main() {
19752 SQLDriverConnect()
19753 ; return 0; }
19754 EOF
19755 if { (eval echo configure:19756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19756   rm -rf conftest*
19757   eval "ac_cv_lib_$ac_lib_var=yes"
19758 else
19759   echo "configure: failed program was:" >&5
19760   cat conftest.$ac_ext >&5
19761   rm -rf conftest*
19762   eval "ac_cv_lib_$ac_lib_var=no"
19763 fi
19764 rm -f conftest*
19765 LIBS="$ac_save_LIBS"
19766
19767 fi
19768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19769   echo "$ac_t""yes" 1>&6
19770   have_iodbc=yes
19771 else
19772   echo "$ac_t""no" 1>&6
19773 have_iodbc=no
19774 fi
19775
19776         if test $have_iodbc = yes ; then
19777                 ol_link_sql="-liodbc"
19778         else
19779                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19780 echo "configure:19781: checking for SQLDriverConnect in -lodbc" >&5
19781 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19783   echo $ac_n "(cached) $ac_c" 1>&6
19784 else
19785   ac_save_LIBS="$LIBS"
19786 LIBS="-lodbc  $LIBS"
19787 cat > conftest.$ac_ext <<EOF
19788 #line 19789 "configure"
19789 #include "confdefs.h"
19790 /* Override any gcc2 internal prototype to avoid an error.  */
19791 /* We use char because int might match the return type of a gcc2
19792     builtin and then its argument prototype would still apply.  */
19793 char SQLDriverConnect();
19794
19795 int main() {
19796 SQLDriverConnect()
19797 ; return 0; }
19798 EOF
19799 if { (eval echo configure:19800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19800   rm -rf conftest*
19801   eval "ac_cv_lib_$ac_lib_var=yes"
19802 else
19803   echo "configure: failed program was:" >&5
19804   cat conftest.$ac_ext >&5
19805   rm -rf conftest*
19806   eval "ac_cv_lib_$ac_lib_var=no"
19807 fi
19808 rm -f conftest*
19809 LIBS="$ac_save_LIBS"
19810
19811 fi
19812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19813   echo "$ac_t""yes" 1>&6
19814   have_odbc=yes
19815 else
19816   echo "$ac_t""no" 1>&6
19817 have_odbc=no
19818 fi
19819
19820                 if test $have_odbc = yes ; then
19821                         ol_link_sql="-lodbc"
19822                 fi
19823         fi
19824
19825         if test $ol_link_sql != no ; then
19826                 SLAPD_SQL_LIBS="$ol_link_sql"
19827
19828         elif test $ol_enable_sql != auto ; then
19829                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19830         fi
19831 fi
19832
19833 ol_link_termcap=no
19834 for ac_hdr in termcap.h ncurses.h
19835 do
19836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19838 echo "configure:19839: checking for $ac_hdr" >&5
19839 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19840   echo $ac_n "(cached) $ac_c" 1>&6
19841 else
19842   cat > conftest.$ac_ext <<EOF
19843 #line 19844 "configure"
19844 #include "confdefs.h"
19845 #include <$ac_hdr>
19846 EOF
19847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19848 { (eval echo configure:19849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19850 if test -z "$ac_err"; then
19851   rm -rf conftest*
19852   eval "ac_cv_header_$ac_safe=yes"
19853 else
19854   echo "$ac_err" >&5
19855   echo "configure: failed program was:" >&5
19856   cat conftest.$ac_ext >&5
19857   rm -rf conftest*
19858   eval "ac_cv_header_$ac_safe=no"
19859 fi
19860 rm -f conftest*
19861 fi
19862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19863   echo "$ac_t""yes" 1>&6
19864     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19865   cat >> confdefs.h <<EOF
19866 #define $ac_tr_hdr 1
19867 EOF
19868  
19869 else
19870   echo "$ac_t""no" 1>&6
19871 fi
19872 done
19873
19874
19875 if test $ol_link_termcap = no ; then
19876         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19877 echo "configure:19878: checking for tputs in -ltermcap" >&5
19878 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19879 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19880   echo $ac_n "(cached) $ac_c" 1>&6
19881 else
19882   ac_save_LIBS="$LIBS"
19883 LIBS="-ltermcap  $LIBS"
19884 cat > conftest.$ac_ext <<EOF
19885 #line 19886 "configure"
19886 #include "confdefs.h"
19887 /* Override any gcc2 internal prototype to avoid an error.  */
19888 /* We use char because int might match the return type of a gcc2
19889     builtin and then its argument prototype would still apply.  */
19890 char tputs();
19891
19892 int main() {
19893 tputs()
19894 ; return 0; }
19895 EOF
19896 if { (eval echo configure:19897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19897   rm -rf conftest*
19898   eval "ac_cv_lib_$ac_lib_var=yes"
19899 else
19900   echo "configure: failed program was:" >&5
19901   cat conftest.$ac_ext >&5
19902   rm -rf conftest*
19903   eval "ac_cv_lib_$ac_lib_var=no"
19904 fi
19905 rm -f conftest*
19906 LIBS="$ac_save_LIBS"
19907
19908 fi
19909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19910   echo "$ac_t""yes" 1>&6
19911   have_termcap=yes
19912 else
19913   echo "$ac_t""no" 1>&6
19914 have_termcap=no
19915 fi
19916
19917         if test $have_termcap = yes ; then
19918                 cat >> confdefs.h <<\EOF
19919 #define HAVE_TERMCAP 1
19920 EOF
19921
19922                 ol_link_termcap=yes
19923                 TERMCAP_LIBS=-ltermcap
19924         fi
19925 fi
19926
19927 if test $ol_link_termcap = no ; then
19928         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19929 echo "configure:19930: checking for initscr in -lncurses" >&5
19930 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19932   echo $ac_n "(cached) $ac_c" 1>&6
19933 else
19934   ac_save_LIBS="$LIBS"
19935 LIBS="-lncurses  $LIBS"
19936 cat > conftest.$ac_ext <<EOF
19937 #line 19938 "configure"
19938 #include "confdefs.h"
19939 /* Override any gcc2 internal prototype to avoid an error.  */
19940 /* We use char because int might match the return type of a gcc2
19941     builtin and then its argument prototype would still apply.  */
19942 char initscr();
19943
19944 int main() {
19945 initscr()
19946 ; return 0; }
19947 EOF
19948 if { (eval echo configure:19949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19949   rm -rf conftest*
19950   eval "ac_cv_lib_$ac_lib_var=yes"
19951 else
19952   echo "configure: failed program was:" >&5
19953   cat conftest.$ac_ext >&5
19954   rm -rf conftest*
19955   eval "ac_cv_lib_$ac_lib_var=no"
19956 fi
19957 rm -f conftest*
19958 LIBS="$ac_save_LIBS"
19959
19960 fi
19961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19962   echo "$ac_t""yes" 1>&6
19963   have_ncurses=yes
19964 else
19965   echo "$ac_t""no" 1>&6
19966 have_ncurses=no
19967 fi
19968
19969         if test $have_ncurses = yes ; then
19970                 cat >> confdefs.h <<\EOF
19971 #define HAVE_NCURSES 1
19972 EOF
19973
19974                 ol_link_termcap=yes
19975                 TERMCAP_LIBS=-lncurses
19976         fi
19977 fi
19978
19979 if test $ol_link_termcap = no ; then
19980         cat >> confdefs.h <<\EOF
19981 #define NO_TERMCAP 1
19982 EOF
19983
19984         TERMCAP_LIBS=
19985 fi
19986
19987 ol_link_sasl=no
19988 ol_link_spasswd=no
19989 if test $ol_with_cyrus_sasl != no ; then
19990         for ac_hdr in sasl/sasl.h sasl.h
19991 do
19992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19994 echo "configure:19995: checking for $ac_hdr" >&5
19995 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19996   echo $ac_n "(cached) $ac_c" 1>&6
19997 else
19998   cat > conftest.$ac_ext <<EOF
19999 #line 20000 "configure"
20000 #include "confdefs.h"
20001 #include <$ac_hdr>
20002 EOF
20003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20004 { (eval echo configure:20005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20006 if test -z "$ac_err"; then
20007   rm -rf conftest*
20008   eval "ac_cv_header_$ac_safe=yes"
20009 else
20010   echo "$ac_err" >&5
20011   echo "configure: failed program was:" >&5
20012   cat conftest.$ac_ext >&5
20013   rm -rf conftest*
20014   eval "ac_cv_header_$ac_safe=no"
20015 fi
20016 rm -f conftest*
20017 fi
20018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20019   echo "$ac_t""yes" 1>&6
20020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20021   cat >> confdefs.h <<EOF
20022 #define $ac_tr_hdr 1
20023 EOF
20024  
20025 else
20026   echo "$ac_t""no" 1>&6
20027 fi
20028 done
20029
20030
20031         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20032                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20033 echo "configure:20034: checking for sasl_client_init in -lsasl2" >&5
20034 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20036   echo $ac_n "(cached) $ac_c" 1>&6
20037 else
20038   ac_save_LIBS="$LIBS"
20039 LIBS="-lsasl2  $LIBS"
20040 cat > conftest.$ac_ext <<EOF
20041 #line 20042 "configure"
20042 #include "confdefs.h"
20043 /* Override any gcc2 internal prototype to avoid an error.  */
20044 /* We use char because int might match the return type of a gcc2
20045     builtin and then its argument prototype would still apply.  */
20046 char sasl_client_init();
20047
20048 int main() {
20049 sasl_client_init()
20050 ; return 0; }
20051 EOF
20052 if { (eval echo configure:20053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20053   rm -rf conftest*
20054   eval "ac_cv_lib_$ac_lib_var=yes"
20055 else
20056   echo "configure: failed program was:" >&5
20057   cat conftest.$ac_ext >&5
20058   rm -rf conftest*
20059   eval "ac_cv_lib_$ac_lib_var=no"
20060 fi
20061 rm -f conftest*
20062 LIBS="$ac_save_LIBS"
20063
20064 fi
20065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20066   echo "$ac_t""yes" 1>&6
20067   ol_link_sasl="-lsasl2"
20068 else
20069   echo "$ac_t""no" 1>&6
20070 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20071 echo "configure:20072: checking for sasl_client_init in -lsasl" >&5
20072 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20074   echo $ac_n "(cached) $ac_c" 1>&6
20075 else
20076   ac_save_LIBS="$LIBS"
20077 LIBS="-lsasl  $LIBS"
20078 cat > conftest.$ac_ext <<EOF
20079 #line 20080 "configure"
20080 #include "confdefs.h"
20081 /* Override any gcc2 internal prototype to avoid an error.  */
20082 /* We use char because int might match the return type of a gcc2
20083     builtin and then its argument prototype would still apply.  */
20084 char sasl_client_init();
20085
20086 int main() {
20087 sasl_client_init()
20088 ; return 0; }
20089 EOF
20090 if { (eval echo configure:20091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20091   rm -rf conftest*
20092   eval "ac_cv_lib_$ac_lib_var=yes"
20093 else
20094   echo "configure: failed program was:" >&5
20095   cat conftest.$ac_ext >&5
20096   rm -rf conftest*
20097   eval "ac_cv_lib_$ac_lib_var=no"
20098 fi
20099 rm -f conftest*
20100 LIBS="$ac_save_LIBS"
20101
20102 fi
20103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20104   echo "$ac_t""yes" 1>&6
20105   ol_link_sasl="-lsasl"
20106 else
20107   echo "$ac_t""no" 1>&6
20108 fi
20109
20110 fi
20111
20112         fi
20113
20114         if test $ol_link_sasl = no ; then
20115                 if test $ol_with_cyrus_sasl != auto ; then
20116                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20117                 else
20118                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20119                         echo "configure: warning: SASL authentication not supported!" 1>&2
20120                         if test $ol_link_tls = no ; then
20121                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20122                         fi
20123                 fi
20124         else
20125                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20126 echo "configure:20127: checking Cyrus SASL library version" >&5
20127 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20128   echo $ac_n "(cached) $ac_c" 1>&6
20129 else
20130   
20131         cat > conftest.$ac_ext <<EOF
20132 #line 20133 "configure"
20133 #include "confdefs.h"
20134
20135 #ifdef HAVE_SASL_SASL_H
20136 #include <sasl/sasl.h>
20137 #else
20138 #include <sasl.h>
20139 #endif
20140
20141 /* require 2.1.3 or later */
20142 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20143         char *__sasl_compat = "1.5.x okay";
20144 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20145         __sasl_compat "2.2+ or better okay (we guess)";
20146 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20147         && SASL_VERSION_STEP >=3
20148         __sasl_compat = "2.1.3+ or better okay";
20149 #endif
20150         
20151 EOF
20152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20153   egrep "__sasl_compat" >/dev/null 2>&1; then
20154   rm -rf conftest*
20155   ol_cv_sasl_compat=yes
20156 else
20157   rm -rf conftest*
20158   ol_cv_sasl_compat=no
20159 fi
20160 rm -f conftest*
20161
20162 fi
20163
20164 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20165
20166                 if test $ol_cv_sasl_compat = no ; then
20167                         ol_link_sasl=no
20168                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20169                 fi
20170
20171                 cat >> confdefs.h <<\EOF
20172 #define HAVE_CYRUS_SASL 1
20173 EOF
20174
20175                 SASL_LIBS="$ol_link_sasl"
20176                 if test $ol_enable_spasswd != no ; then
20177                         ol_link_spasswd=yes
20178                 fi
20179
20180                 ac_save_LIBS="$LIBS"
20181                 LIBS="$LIBS $ol_link_sasl"
20182                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20183 echo "configure:20184: checking for sasl_version" >&5
20184 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20185   echo $ac_n "(cached) $ac_c" 1>&6
20186 else
20187   cat > conftest.$ac_ext <<EOF
20188 #line 20189 "configure"
20189 #include "confdefs.h"
20190 /* System header to define __stub macros and hopefully few prototypes,
20191     which can conflict with char sasl_version(); below.  */
20192 #include <assert.h>
20193 /* Override any gcc2 internal prototype to avoid an error.  */
20194 /* We use char because int might match the return type of a gcc2
20195     builtin and then its argument prototype would still apply.  */
20196 char sasl_version();
20197 char (*f)();
20198
20199 int main() {
20200
20201 /* The GNU C library defines this for functions which it implements
20202     to always fail with ENOSYS.  Some functions are actually named
20203     something starting with __ and the normal name is an alias.  */
20204 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20205 choke me
20206 #else
20207 f = sasl_version;
20208 #endif
20209
20210 ; return 0; }
20211 EOF
20212 if { (eval echo configure:20213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20213   rm -rf conftest*
20214   eval "ac_cv_func_sasl_version=yes"
20215 else
20216   echo "configure: failed program was:" >&5
20217   cat conftest.$ac_ext >&5
20218   rm -rf conftest*
20219   eval "ac_cv_func_sasl_version=no"
20220 fi
20221 rm -f conftest*
20222 fi
20223
20224 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20225   echo "$ac_t""yes" 1>&6
20226   cat >> confdefs.h <<\EOF
20227 #define HAVE_SASL_VERSION 1
20228 EOF
20229
20230 else
20231   echo "$ac_t""no" 1>&6
20232 fi
20233
20234                 LIBS="$ac_save_LIBS"
20235         fi
20236
20237 else
20238         echo "configure: warning: SASL authentication not supported!" 1>&2
20239         if test $ol_link_tls = no ; then
20240                 echo "configure: warning: Strong authentication not supported!" 1>&2
20241         fi
20242 fi
20243
20244 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20245         dev=no
20246         if test -r /dev/urandom ; then
20247                 dev="/dev/urandom";
20248         elif test -r /idev/urandom ; then
20249                 dev="/idev/urandom";
20250         elif test -r /dev/srandom ; then
20251                 dev="/dev/srandom";
20252         elif test -r /dev/random ; then
20253                 dev="/dev/random";
20254         elif test -r /idev/random ; then
20255                 dev="/idev/random";
20256         fi
20257
20258         if test $dev != no ; then
20259                 cat >> confdefs.h <<EOF
20260 #define URANDOM_DEVICE "$dev"
20261 EOF
20262
20263         fi
20264 fi
20265
20266 ol_link_fetch=no
20267 if test $ol_with_fetch != no ; then
20268         ol_LIBS=$LIBS
20269 LIBS="-lfetch -lcom_err $LIBS"
20270 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20271 echo "configure:20272: checking fetch(3) library" >&5
20272 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20273   echo $ac_n "(cached) $ac_c" 1>&6
20274 else
20275   
20276         cat > conftest.$ac_ext <<EOF
20277 #line 20278 "configure"
20278 #include "confdefs.h"
20279
20280 #include <sys/param.h>
20281 #include <stdio.h>
20282 #include <fetch.h>
20283 int main() {
20284 struct url *u = fetchParseURL("file:///"); 
20285 ; return 0; }
20286 EOF
20287 if { (eval echo configure:20288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20288   rm -rf conftest*
20289   ol_cv_lib_fetch=yes
20290 else
20291   echo "configure: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   rm -rf conftest*
20294   ol_cv_lib_fetch=no
20295 fi
20296 rm -f conftest*
20297 fi
20298
20299 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20300 LIBS=$ol_LIBS
20301 if test $ol_cv_lib_fetch != no ; then
20302         ol_link_fetch="-lfetch -lcom_err"
20303         cat >> confdefs.h <<\EOF
20304 #define HAVE_FETCH 1
20305 EOF
20306
20307 fi
20308
20309
20310         if test $ol_cv_lib_fetch != no ; then
20311                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20312                 ol_link_fetch=freebsd
20313
20314         elif test $ol_with_fetch != auto ; then
20315                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20316         fi 
20317 fi
20318
20319 ol_link_readline=no
20320 if test $ol_with_readline != no ; then
20321         for ac_hdr in readline/readline.h readline/history.h
20322 do
20323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20325 echo "configure:20326: checking for $ac_hdr" >&5
20326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20327   echo $ac_n "(cached) $ac_c" 1>&6
20328 else
20329   cat > conftest.$ac_ext <<EOF
20330 #line 20331 "configure"
20331 #include "confdefs.h"
20332 #include <$ac_hdr>
20333 EOF
20334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20335 { (eval echo configure:20336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20337 if test -z "$ac_err"; then
20338   rm -rf conftest*
20339   eval "ac_cv_header_$ac_safe=yes"
20340 else
20341   echo "$ac_err" >&5
20342   echo "configure: failed program was:" >&5
20343   cat conftest.$ac_ext >&5
20344   rm -rf conftest*
20345   eval "ac_cv_header_$ac_safe=no"
20346 fi
20347 rm -f conftest*
20348 fi
20349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20350   echo "$ac_t""yes" 1>&6
20351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20352   cat >> confdefs.h <<EOF
20353 #define $ac_tr_hdr 1
20354 EOF
20355  
20356 else
20357   echo "$ac_t""no" 1>&6
20358 fi
20359 done
20360
20361
20362         if test $ac_cv_header_readline_readline_h = yes ; then
20363                 save_LIBS="$LIBS"
20364                 LIBS="$TERMCAP_LIBS $LIBS"
20365                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20366 echo "configure:20367: checking for readline in -lreadline" >&5
20367 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20369   echo $ac_n "(cached) $ac_c" 1>&6
20370 else
20371   ac_save_LIBS="$LIBS"
20372 LIBS="-lreadline  $LIBS"
20373 cat > conftest.$ac_ext <<EOF
20374 #line 20375 "configure"
20375 #include "confdefs.h"
20376 /* Override any gcc2 internal prototype to avoid an error.  */
20377 /* We use char because int might match the return type of a gcc2
20378     builtin and then its argument prototype would still apply.  */
20379 char readline();
20380
20381 int main() {
20382 readline()
20383 ; return 0; }
20384 EOF
20385 if { (eval echo configure:20386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20386   rm -rf conftest*
20387   eval "ac_cv_lib_$ac_lib_var=yes"
20388 else
20389   echo "configure: failed program was:" >&5
20390   cat conftest.$ac_ext >&5
20391   rm -rf conftest*
20392   eval "ac_cv_lib_$ac_lib_var=no"
20393 fi
20394 rm -f conftest*
20395 LIBS="$ac_save_LIBS"
20396
20397 fi
20398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20399   echo "$ac_t""yes" 1>&6
20400   have_readline=yes
20401 else
20402   echo "$ac_t""no" 1>&6
20403 have_readline=no
20404 fi
20405
20406                 LIBS="$save_LIBS"
20407                         
20408                 if test $have_readline = yes ; then
20409                         ol_with_readline=found
20410                         ol_link_readline=yes
20411
20412                         READLINE_LIBS="-lreadline"
20413                 fi
20414         fi
20415 fi
20416
20417 if test $ol_link_readline = yes ; then
20418         cat >> confdefs.h <<\EOF
20419 #define HAVE_READLINE 1
20420 EOF
20421
20422 fi
20423
20424
20425 if test $ol_enable_crypt != no ; then
20426         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20427 echo "configure:20428: checking for crypt" >&5
20428 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20429   echo $ac_n "(cached) $ac_c" 1>&6
20430 else
20431   cat > conftest.$ac_ext <<EOF
20432 #line 20433 "configure"
20433 #include "confdefs.h"
20434 /* System header to define __stub macros and hopefully few prototypes,
20435     which can conflict with char crypt(); below.  */
20436 #include <assert.h>
20437 /* Override any gcc2 internal prototype to avoid an error.  */
20438 /* We use char because int might match the return type of a gcc2
20439     builtin and then its argument prototype would still apply.  */
20440 char crypt();
20441 char (*f)();
20442
20443 int main() {
20444
20445 /* The GNU C library defines this for functions which it implements
20446     to always fail with ENOSYS.  Some functions are actually named
20447     something starting with __ and the normal name is an alias.  */
20448 #if defined (__stub_crypt) || defined (__stub___crypt)
20449 choke me
20450 #else
20451 f = crypt;
20452 #endif
20453
20454 ; return 0; }
20455 EOF
20456 if { (eval echo configure:20457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20457   rm -rf conftest*
20458   eval "ac_cv_func_crypt=yes"
20459 else
20460   echo "configure: failed program was:" >&5
20461   cat conftest.$ac_ext >&5
20462   rm -rf conftest*
20463   eval "ac_cv_func_crypt=no"
20464 fi
20465 rm -f conftest*
20466 fi
20467
20468 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20469   echo "$ac_t""yes" 1>&6
20470   have_crypt=yes
20471 else
20472   echo "$ac_t""no" 1>&6
20473
20474                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20475 echo "configure:20476: checking for crypt in -lcrypt" >&5
20476 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20478   echo $ac_n "(cached) $ac_c" 1>&6
20479 else
20480   ac_save_LIBS="$LIBS"
20481 LIBS="-lcrypt  $LIBS"
20482 cat > conftest.$ac_ext <<EOF
20483 #line 20484 "configure"
20484 #include "confdefs.h"
20485 /* Override any gcc2 internal prototype to avoid an error.  */
20486 /* We use char because int might match the return type of a gcc2
20487     builtin and then its argument prototype would still apply.  */
20488 char crypt();
20489
20490 int main() {
20491 crypt()
20492 ; return 0; }
20493 EOF
20494 if { (eval echo configure:20495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20495   rm -rf conftest*
20496   eval "ac_cv_lib_$ac_lib_var=yes"
20497 else
20498   echo "configure: failed program was:" >&5
20499   cat conftest.$ac_ext >&5
20500   rm -rf conftest*
20501   eval "ac_cv_lib_$ac_lib_var=no"
20502 fi
20503 rm -f conftest*
20504 LIBS="$ac_save_LIBS"
20505
20506 fi
20507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20508   echo "$ac_t""yes" 1>&6
20509   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20510                         have_crypt=yes
20511 else
20512   echo "$ac_t""no" 1>&6
20513 have_crypt=no
20514 fi
20515
20516 fi
20517
20518
20519         if test $have_crypt = yes ; then
20520                 cat >> confdefs.h <<\EOF
20521 #define HAVE_CRYPT 1
20522 EOF
20523
20524         else
20525                 echo "configure: warning: could not find crypt" 1>&2
20526                 if test $ol_enable_crypt = yes ; then
20527                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20528                 fi
20529
20530                 echo "configure: warning: disabling crypt support" 1>&2
20531                 ol_enable_crypt=no
20532         fi
20533 fi
20534
20535 if test $ol_enable_proctitle != no ; then
20536         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20537 echo "configure:20538: checking for setproctitle" >&5
20538 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20539   echo $ac_n "(cached) $ac_c" 1>&6
20540 else
20541   cat > conftest.$ac_ext <<EOF
20542 #line 20543 "configure"
20543 #include "confdefs.h"
20544 /* System header to define __stub macros and hopefully few prototypes,
20545     which can conflict with char setproctitle(); below.  */
20546 #include <assert.h>
20547 /* Override any gcc2 internal prototype to avoid an error.  */
20548 /* We use char because int might match the return type of a gcc2
20549     builtin and then its argument prototype would still apply.  */
20550 char setproctitle();
20551 char (*f)();
20552
20553 int main() {
20554
20555 /* The GNU C library defines this for functions which it implements
20556     to always fail with ENOSYS.  Some functions are actually named
20557     something starting with __ and the normal name is an alias.  */
20558 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20559 choke me
20560 #else
20561 f = setproctitle;
20562 #endif
20563
20564 ; return 0; }
20565 EOF
20566 if { (eval echo configure:20567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20567   rm -rf conftest*
20568   eval "ac_cv_func_setproctitle=yes"
20569 else
20570   echo "configure: failed program was:" >&5
20571   cat conftest.$ac_ext >&5
20572   rm -rf conftest*
20573   eval "ac_cv_func_setproctitle=no"
20574 fi
20575 rm -f conftest*
20576 fi
20577
20578 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20579   echo "$ac_t""yes" 1>&6
20580   have_setproctitle=yes
20581 else
20582   echo "$ac_t""no" 1>&6
20583
20584                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20585 echo "configure:20586: checking for setproctitle in -lutil" >&5
20586 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20588   echo $ac_n "(cached) $ac_c" 1>&6
20589 else
20590   ac_save_LIBS="$LIBS"
20591 LIBS="-lutil  $LIBS"
20592 cat > conftest.$ac_ext <<EOF
20593 #line 20594 "configure"
20594 #include "confdefs.h"
20595 /* Override any gcc2 internal prototype to avoid an error.  */
20596 /* We use char because int might match the return type of a gcc2
20597     builtin and then its argument prototype would still apply.  */
20598 char setproctitle();
20599
20600 int main() {
20601 setproctitle()
20602 ; return 0; }
20603 EOF
20604 if { (eval echo configure:20605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20605   rm -rf conftest*
20606   eval "ac_cv_lib_$ac_lib_var=yes"
20607 else
20608   echo "configure: failed program was:" >&5
20609   cat conftest.$ac_ext >&5
20610   rm -rf conftest*
20611   eval "ac_cv_lib_$ac_lib_var=no"
20612 fi
20613 rm -f conftest*
20614 LIBS="$ac_save_LIBS"
20615
20616 fi
20617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20618   echo "$ac_t""yes" 1>&6
20619   have_setproctitle=yes
20620                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20621 else
20622   echo "$ac_t""no" 1>&6
20623 have_setproctitle=no
20624                         LIBOBJS="$LIBOBJS setproctitle.o"
20625                         LIBSRCS="$LIBSRCS setproctitle.c"
20626 fi
20627
20628 fi
20629
20630
20631         if test $have_setproctitle = yes ; then
20632                 cat >> confdefs.h <<\EOF
20633 #define HAVE_SETPROCTITLE 1
20634 EOF
20635
20636         fi
20637 fi
20638
20639 if test $ol_enable_slp != no ; then
20640         for ac_hdr in slp.h 
20641 do
20642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20644 echo "configure:20645: checking for $ac_hdr" >&5
20645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20646   echo $ac_n "(cached) $ac_c" 1>&6
20647 else
20648   cat > conftest.$ac_ext <<EOF
20649 #line 20650 "configure"
20650 #include "confdefs.h"
20651 #include <$ac_hdr>
20652 EOF
20653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20654 { (eval echo configure:20655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20656 if test -z "$ac_err"; then
20657   rm -rf conftest*
20658   eval "ac_cv_header_$ac_safe=yes"
20659 else
20660   echo "$ac_err" >&5
20661   echo "configure: failed program was:" >&5
20662   cat conftest.$ac_ext >&5
20663   rm -rf conftest*
20664   eval "ac_cv_header_$ac_safe=no"
20665 fi
20666 rm -f conftest*
20667 fi
20668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20669   echo "$ac_t""yes" 1>&6
20670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20671   cat >> confdefs.h <<EOF
20672 #define $ac_tr_hdr 1
20673 EOF
20674  
20675 else
20676   echo "$ac_t""no" 1>&6
20677 fi
20678 done
20679
20680
20681         if test $ac_cv_header_slp_h = yes ; then
20682                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20683 echo "configure:20684: checking for SLPOpen in -lslp" >&5
20684 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20686   echo $ac_n "(cached) $ac_c" 1>&6
20687 else
20688   ac_save_LIBS="$LIBS"
20689 LIBS="-lslp  $LIBS"
20690 cat > conftest.$ac_ext <<EOF
20691 #line 20692 "configure"
20692 #include "confdefs.h"
20693 /* Override any gcc2 internal prototype to avoid an error.  */
20694 /* We use char because int might match the return type of a gcc2
20695     builtin and then its argument prototype would still apply.  */
20696 char SLPOpen();
20697
20698 int main() {
20699 SLPOpen()
20700 ; return 0; }
20701 EOF
20702 if { (eval echo configure:20703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20703   rm -rf conftest*
20704   eval "ac_cv_lib_$ac_lib_var=yes"
20705 else
20706   echo "configure: failed program was:" >&5
20707   cat conftest.$ac_ext >&5
20708   rm -rf conftest*
20709   eval "ac_cv_lib_$ac_lib_var=no"
20710 fi
20711 rm -f conftest*
20712 LIBS="$ac_save_LIBS"
20713
20714 fi
20715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20716   echo "$ac_t""yes" 1>&6
20717   have_slp=yes
20718 else
20719   echo "$ac_t""no" 1>&6
20720 have_slp=no
20721 fi
20722
20723                 if test $have_slp = yes ; then
20724                         cat >> confdefs.h <<\EOF
20725 #define HAVE_SLP 1
20726 EOF
20727
20728                         SLAPD_SLP_LIBS=-lslp
20729                 fi
20730
20731         elif test $ol_enable_slp = yes ; then
20732                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20733         fi
20734 fi
20735
20736 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20737 echo "configure:20738: checking for ANSI C header files" >&5
20738 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20739   echo $ac_n "(cached) $ac_c" 1>&6
20740 else
20741   cat > conftest.$ac_ext <<EOF
20742 #line 20743 "configure"
20743 #include "confdefs.h"
20744 #include <stdlib.h>
20745 #include <stdarg.h>
20746 #include <string.h>
20747 #include <float.h>
20748 EOF
20749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20750 { (eval echo configure:20751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20752 if test -z "$ac_err"; then
20753   rm -rf conftest*
20754   ac_cv_header_stdc=yes
20755 else
20756   echo "$ac_err" >&5
20757   echo "configure: failed program was:" >&5
20758   cat conftest.$ac_ext >&5
20759   rm -rf conftest*
20760   ac_cv_header_stdc=no
20761 fi
20762 rm -f conftest*
20763
20764 if test $ac_cv_header_stdc = yes; then
20765   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20766 cat > conftest.$ac_ext <<EOF
20767 #line 20768 "configure"
20768 #include "confdefs.h"
20769 #include <string.h>
20770 EOF
20771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20772   egrep "memchr" >/dev/null 2>&1; then
20773   :
20774 else
20775   rm -rf conftest*
20776   ac_cv_header_stdc=no
20777 fi
20778 rm -f conftest*
20779
20780 fi
20781
20782 if test $ac_cv_header_stdc = yes; then
20783   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20784 cat > conftest.$ac_ext <<EOF
20785 #line 20786 "configure"
20786 #include "confdefs.h"
20787 #include <stdlib.h>
20788 EOF
20789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20790   egrep "free" >/dev/null 2>&1; then
20791   :
20792 else
20793   rm -rf conftest*
20794   ac_cv_header_stdc=no
20795 fi
20796 rm -f conftest*
20797
20798 fi
20799
20800 if test $ac_cv_header_stdc = yes; then
20801   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20802 if test "$cross_compiling" = yes; then
20803   :
20804 else
20805   cat > conftest.$ac_ext <<EOF
20806 #line 20807 "configure"
20807 #include "confdefs.h"
20808 #include <ctype.h>
20809 #if ((' ' & 0x0FF) == 0x020)
20810 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20811 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20812 #else
20813 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20814  || ('j' <= (c) && (c) <= 'r') \
20815  || ('s' <= (c) && (c) <= 'z'))
20816 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20817 #endif
20818 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20819 int main () { int i; for (i = 0; i < 256; i++)
20820 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20821 exit (0); }
20822
20823 EOF
20824 if { (eval echo configure:20825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20825 then
20826   :
20827 else
20828   echo "configure: failed program was:" >&5
20829   cat conftest.$ac_ext >&5
20830   rm -fr conftest*
20831   ac_cv_header_stdc=no
20832 fi
20833 rm -fr conftest*
20834 fi
20835
20836 fi
20837 fi
20838
20839 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20840 if test $ac_cv_header_stdc = yes; then
20841   cat >> confdefs.h <<\EOF
20842 #define STDC_HEADERS 1
20843 EOF
20844
20845 fi
20846
20847 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20848 echo "configure:20849: checking for mode_t" >&5
20849 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20850   echo $ac_n "(cached) $ac_c" 1>&6
20851 else
20852   cat > conftest.$ac_ext <<EOF
20853 #line 20854 "configure"
20854 #include "confdefs.h"
20855 #include <sys/types.h>
20856 #if STDC_HEADERS
20857 #include <stdlib.h>
20858 #include <stddef.h>
20859 #endif
20860
20861 EOF
20862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20863   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20864   rm -rf conftest*
20865   eval "ac_cv_type_mode_t=yes"
20866 else
20867   rm -rf conftest*
20868   eval "ac_cv_type_mode_t=no"
20869 fi
20870 rm -f conftest*
20871
20872 fi
20873 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20874   echo "$ac_t""yes" 1>&6
20875 else
20876   echo "$ac_t""no" 1>&6
20877   cat >> confdefs.h <<EOF
20878 #define mode_t int
20879 EOF
20880
20881 fi
20882
20883 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20884 echo "configure:20885: checking for off_t" >&5
20885 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20886   echo $ac_n "(cached) $ac_c" 1>&6
20887 else
20888   cat > conftest.$ac_ext <<EOF
20889 #line 20890 "configure"
20890 #include "confdefs.h"
20891 #include <sys/types.h>
20892 #if STDC_HEADERS
20893 #include <stdlib.h>
20894 #include <stddef.h>
20895 #endif
20896
20897 EOF
20898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20899   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20900   rm -rf conftest*
20901   eval "ac_cv_type_off_t=yes"
20902 else
20903   rm -rf conftest*
20904   eval "ac_cv_type_off_t=no"
20905 fi
20906 rm -f conftest*
20907
20908 fi
20909 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20910   echo "$ac_t""yes" 1>&6
20911 else
20912   echo "$ac_t""no" 1>&6
20913   cat >> confdefs.h <<EOF
20914 #define off_t long
20915 EOF
20916
20917 fi
20918
20919 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20920 echo "configure:20921: checking for pid_t" >&5
20921 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20922   echo $ac_n "(cached) $ac_c" 1>&6
20923 else
20924   cat > conftest.$ac_ext <<EOF
20925 #line 20926 "configure"
20926 #include "confdefs.h"
20927 #include <sys/types.h>
20928 #if STDC_HEADERS
20929 #include <stdlib.h>
20930 #include <stddef.h>
20931 #endif
20932
20933 EOF
20934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20935   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20936   rm -rf conftest*
20937   eval "ac_cv_type_pid_t=yes"
20938 else
20939   rm -rf conftest*
20940   eval "ac_cv_type_pid_t=no"
20941 fi
20942 rm -f conftest*
20943
20944 fi
20945 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20946   echo "$ac_t""yes" 1>&6
20947 else
20948   echo "$ac_t""no" 1>&6
20949   cat >> confdefs.h <<EOF
20950 #define pid_t int
20951 EOF
20952
20953 fi
20954
20955 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20956 echo "configure:20957: checking for ptrdiff_t" >&5
20957 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20958   echo $ac_n "(cached) $ac_c" 1>&6
20959 else
20960   cat > conftest.$ac_ext <<EOF
20961 #line 20962 "configure"
20962 #include "confdefs.h"
20963 #include <stddef.h>
20964 int main() {
20965 ptrdiff_t p
20966 ; return 0; }
20967 EOF
20968 if { (eval echo configure:20969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20969   rm -rf conftest*
20970   am_cv_type_ptrdiff_t=yes
20971 else
20972   echo "configure: failed program was:" >&5
20973   cat conftest.$ac_ext >&5
20974   rm -rf conftest*
20975   am_cv_type_ptrdiff_t=no
20976 fi
20977 rm -f conftest*
20978 fi
20979
20980 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20981    if test $am_cv_type_ptrdiff_t = yes; then
20982      cat >> confdefs.h <<\EOF
20983 #define HAVE_PTRDIFF_T 1
20984 EOF
20985
20986    fi
20987
20988 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20989 echo "configure:20990: checking return type of signal handlers" >&5
20990 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20991   echo $ac_n "(cached) $ac_c" 1>&6
20992 else
20993   cat > conftest.$ac_ext <<EOF
20994 #line 20995 "configure"
20995 #include "confdefs.h"
20996 #include <sys/types.h>
20997 #include <signal.h>
20998 #ifdef signal
20999 #undef signal
21000 #endif
21001 #ifdef __cplusplus
21002 extern "C" void (*signal (int, void (*)(int)))(int);
21003 #else
21004 void (*signal ()) ();
21005 #endif
21006
21007 int main() {
21008 int i;
21009 ; return 0; }
21010 EOF
21011 if { (eval echo configure:21012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21012   rm -rf conftest*
21013   ac_cv_type_signal=void
21014 else
21015   echo "configure: failed program was:" >&5
21016   cat conftest.$ac_ext >&5
21017   rm -rf conftest*
21018   ac_cv_type_signal=int
21019 fi
21020 rm -f conftest*
21021 fi
21022
21023 echo "$ac_t""$ac_cv_type_signal" 1>&6
21024 cat >> confdefs.h <<EOF
21025 #define RETSIGTYPE $ac_cv_type_signal
21026 EOF
21027
21028
21029 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21030 echo "configure:21031: checking for size_t" >&5
21031 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21032   echo $ac_n "(cached) $ac_c" 1>&6
21033 else
21034   cat > conftest.$ac_ext <<EOF
21035 #line 21036 "configure"
21036 #include "confdefs.h"
21037 #include <sys/types.h>
21038 #if STDC_HEADERS
21039 #include <stdlib.h>
21040 #include <stddef.h>
21041 #endif
21042
21043 EOF
21044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21045   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21046   rm -rf conftest*
21047   eval "ac_cv_type_size_t=yes"
21048 else
21049   rm -rf conftest*
21050   eval "ac_cv_type_size_t=no"
21051 fi
21052 rm -f conftest*
21053
21054 fi
21055 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21056   echo "$ac_t""yes" 1>&6
21057 else
21058   echo "$ac_t""no" 1>&6
21059   cat >> confdefs.h <<EOF
21060 #define size_t unsigned
21061 EOF
21062
21063 fi
21064
21065
21066 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21067 echo "configure:21068: checking for ssize_t" >&5
21068 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21069   echo $ac_n "(cached) $ac_c" 1>&6
21070 else
21071   cat > conftest.$ac_ext <<EOF
21072 #line 21073 "configure"
21073 #include "confdefs.h"
21074 #include <sys/types.h>
21075 #if STDC_HEADERS
21076 #include <stdlib.h>
21077 #include <stddef.h>
21078 #endif
21079
21080 EOF
21081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21082   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21083   rm -rf conftest*
21084   eval "ac_cv_type_ssize_t=yes"
21085 else
21086   rm -rf conftest*
21087   eval "ac_cv_type_ssize_t=no"
21088 fi
21089 rm -f conftest*
21090
21091 fi
21092 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21093   echo "$ac_t""yes" 1>&6
21094 else
21095   echo "$ac_t""no" 1>&6
21096   cat >> confdefs.h <<EOF
21097 #define ssize_t signed int
21098 EOF
21099
21100 fi
21101
21102 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21103 echo "configure:21104: checking for caddr_t" >&5
21104 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21105   echo $ac_n "(cached) $ac_c" 1>&6
21106 else
21107   cat > conftest.$ac_ext <<EOF
21108 #line 21109 "configure"
21109 #include "confdefs.h"
21110 #include <sys/types.h>
21111 #if STDC_HEADERS
21112 #include <stdlib.h>
21113 #include <stddef.h>
21114 #endif
21115
21116 EOF
21117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21118   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21119   rm -rf conftest*
21120   eval "ac_cv_type_caddr_t=yes"
21121 else
21122   rm -rf conftest*
21123   eval "ac_cv_type_caddr_t=no"
21124 fi
21125 rm -f conftest*
21126
21127 fi
21128 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21129   echo "$ac_t""yes" 1>&6
21130 else
21131   echo "$ac_t""no" 1>&6
21132   cat >> confdefs.h <<EOF
21133 #define caddr_t char *
21134 EOF
21135
21136 fi
21137
21138
21139 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21140 echo "configure:21141: checking for socklen_t" >&5
21141 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21142   echo $ac_n "(cached) $ac_c" 1>&6
21143 else
21144   cat > conftest.$ac_ext <<EOF
21145 #line 21146 "configure"
21146 #include "confdefs.h"
21147
21148 #ifdef HAVE_SYS_TYPES_H
21149 #include <sys/types.h>
21150 #endif
21151 #ifdef HAVE_SYS_SOCKET_H
21152 #include <sys/socket.h>
21153 #endif
21154
21155 int main() {
21156 socklen_t len;
21157 ; return 0; }
21158 EOF
21159 if { (eval echo configure:21160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21160   rm -rf conftest*
21161   ol_cv_type_socklen_t=yes
21162 else
21163   echo "configure: failed program was:" >&5
21164   cat conftest.$ac_ext >&5
21165   rm -rf conftest*
21166   ol_cv_type_socklen_t=no
21167 fi
21168 rm -f conftest*
21169 fi
21170
21171 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21172   if test $ol_cv_type_socklen_t = no; then
21173     cat >> confdefs.h <<\EOF
21174 #define socklen_t int
21175 EOF
21176
21177   fi
21178  
21179 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21180 echo "configure:21181: checking for member st_blksize in aggregate type struct stat" >&5
21181 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21182   echo $ac_n "(cached) $ac_c" 1>&6
21183 else
21184   cat > conftest.$ac_ext <<EOF
21185 #line 21186 "configure"
21186 #include "confdefs.h"
21187 #include <sys/types.h>
21188 #include <sys/stat.h>
21189 int main() {
21190 struct stat foo; foo.st_blksize;
21191 ; return 0; }
21192 EOF
21193 if { (eval echo configure:21194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21194   rm -rf conftest*
21195   ac_cv_c_struct_member_st_blksize=yes
21196 else
21197   echo "configure: failed program was:" >&5
21198   cat conftest.$ac_ext >&5
21199   rm -rf conftest*
21200   ac_cv_c_struct_member_st_blksize=no
21201 fi
21202 rm -f conftest*
21203 fi
21204
21205 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21206 st_blksize="$ac_cv_c_struct_member_st_blksize"
21207 if test $ac_cv_c_struct_member_st_blksize = yes; then
21208   cat >> confdefs.h <<\EOF
21209 #define HAVE_ST_BLKSIZE 1
21210 EOF
21211
21212 fi
21213
21214 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21215 echo "configure:21216: checking whether time.h and sys/time.h may both be included" >&5
21216 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21217   echo $ac_n "(cached) $ac_c" 1>&6
21218 else
21219   cat > conftest.$ac_ext <<EOF
21220 #line 21221 "configure"
21221 #include "confdefs.h"
21222 #include <sys/types.h>
21223 #include <sys/time.h>
21224 #include <time.h>
21225 int main() {
21226 struct tm *tp;
21227 ; return 0; }
21228 EOF
21229 if { (eval echo configure:21230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21230   rm -rf conftest*
21231   ac_cv_header_time=yes
21232 else
21233   echo "configure: failed program was:" >&5
21234   cat conftest.$ac_ext >&5
21235   rm -rf conftest*
21236   ac_cv_header_time=no
21237 fi
21238 rm -f conftest*
21239 fi
21240
21241 echo "$ac_t""$ac_cv_header_time" 1>&6
21242 if test $ac_cv_header_time = yes; then
21243   cat >> confdefs.h <<\EOF
21244 #define TIME_WITH_SYS_TIME 1
21245 EOF
21246
21247 fi
21248
21249 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21250 echo "configure:21251: checking whether struct tm is in sys/time.h or time.h" >&5
21251 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21252   echo $ac_n "(cached) $ac_c" 1>&6
21253 else
21254   cat > conftest.$ac_ext <<EOF
21255 #line 21256 "configure"
21256 #include "confdefs.h"
21257 #include <sys/types.h>
21258 #include <time.h>
21259 int main() {
21260 struct tm *tp; tp->tm_sec;
21261 ; return 0; }
21262 EOF
21263 if { (eval echo configure:21264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21264   rm -rf conftest*
21265   ac_cv_struct_tm=time.h
21266 else
21267   echo "configure: failed program was:" >&5
21268   cat conftest.$ac_ext >&5
21269   rm -rf conftest*
21270   ac_cv_struct_tm=sys/time.h
21271 fi
21272 rm -f conftest*
21273 fi
21274
21275 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21276 if test $ac_cv_struct_tm = sys/time.h; then
21277   cat >> confdefs.h <<\EOF
21278 #define TM_IN_SYS_TIME 1
21279 EOF
21280
21281 fi
21282
21283 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21284 echo "configure:21285: checking for uid_t in sys/types.h" >&5
21285 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21286   echo $ac_n "(cached) $ac_c" 1>&6
21287 else
21288   cat > conftest.$ac_ext <<EOF
21289 #line 21290 "configure"
21290 #include "confdefs.h"
21291 #include <sys/types.h>
21292 EOF
21293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21294   egrep "uid_t" >/dev/null 2>&1; then
21295   rm -rf conftest*
21296   ac_cv_type_uid_t=yes
21297 else
21298   rm -rf conftest*
21299   ac_cv_type_uid_t=no
21300 fi
21301 rm -f conftest*
21302
21303 fi
21304
21305 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21306 if test $ac_cv_type_uid_t = no; then
21307   cat >> confdefs.h <<\EOF
21308 #define uid_t int
21309 EOF
21310
21311   cat >> confdefs.h <<\EOF
21312 #define gid_t int
21313 EOF
21314
21315 fi
21316
21317 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21318 echo "configure:21319: checking for sig_atomic_t" >&5
21319 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21320   echo $ac_n "(cached) $ac_c" 1>&6
21321 else
21322   cat > conftest.$ac_ext <<EOF
21323 #line 21324 "configure"
21324 #include "confdefs.h"
21325 #include <signal.h>
21326 int main() {
21327 sig_atomic_t atomic;
21328 ; return 0; }
21329 EOF
21330 if { (eval echo configure:21331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21331   rm -rf conftest*
21332   ol_cv_type_sig_atomic_t=yes
21333 else
21334   echo "configure: failed program was:" >&5
21335   cat conftest.$ac_ext >&5
21336   rm -rf conftest*
21337   ol_cv_type_sig_atomic_t=no
21338 fi
21339 rm -f conftest*
21340 fi
21341
21342 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21343   if test $ol_cv_type_sig_atomic_t = no; then
21344     cat >> confdefs.h <<\EOF
21345 #define sig_atomic_t int
21346 EOF
21347
21348   fi
21349  
21350
21351
21352 # test for pw_gecos in struct passwd
21353 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21354 echo "configure:21355: checking struct passwd for pw_gecos" >&5
21355 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21356   echo $ac_n "(cached) $ac_c" 1>&6
21357 else
21358   
21359         cat > conftest.$ac_ext <<EOF
21360 #line 21361 "configure"
21361 #include "confdefs.h"
21362 #include <pwd.h>
21363 int main() {
21364
21365         struct passwd pwd;
21366         pwd.pw_gecos = pwd.pw_name;
21367
21368 ; return 0; }
21369 EOF
21370 if { (eval echo configure:21371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21371   rm -rf conftest*
21372   ol_cv_struct_passwd_pw_gecos=yes
21373 else
21374   echo "configure: failed program was:" >&5
21375   cat conftest.$ac_ext >&5
21376   rm -rf conftest*
21377   ol_cv_struct_passwd_pw_gecos=no
21378 fi
21379 rm -f conftest*
21380 fi
21381
21382 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21383 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21384         cat >> confdefs.h <<\EOF
21385 #define HAVE_PW_GECOS 1
21386 EOF
21387
21388 fi
21389
21390 # test for pw_passwd in struct passwd
21391 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21392 echo "configure:21393: checking struct passwd for pw_passwd" >&5
21393 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21394   echo $ac_n "(cached) $ac_c" 1>&6
21395 else
21396   
21397         cat > conftest.$ac_ext <<EOF
21398 #line 21399 "configure"
21399 #include "confdefs.h"
21400 #include <pwd.h>
21401 int main() {
21402
21403         struct passwd pwd;
21404         pwd.pw_passwd = pwd.pw_name;
21405
21406 ; return 0; }
21407 EOF
21408 if { (eval echo configure:21409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21409   rm -rf conftest*
21410   ol_cv_struct_passwd_pw_passwd=yes
21411 else
21412   echo "configure: failed program was:" >&5
21413   cat conftest.$ac_ext >&5
21414   rm -rf conftest*
21415   ol_cv_struct_passwd_pw_passwd=no
21416 fi
21417 rm -f conftest*
21418 fi
21419
21420 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21421 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21422         cat >> confdefs.h <<\EOF
21423 #define HAVE_PW_PASSWD 1
21424 EOF
21425
21426 fi
21427
21428
21429 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21430 echo "configure:21431: checking if toupper() requires islower()" >&5
21431 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21432   echo $ac_n "(cached) $ac_c" 1>&6
21433 else
21434   
21435         if test "$cross_compiling" = yes; then
21436   ol_cv_c_upper_lower=safe
21437 else
21438   cat > conftest.$ac_ext <<EOF
21439 #line 21440 "configure"
21440 #include "confdefs.h"
21441
21442 #include <ctype.h>
21443 main()
21444 {
21445         if ('C' == toupper('C'))
21446                 exit(0);
21447         else
21448                 exit(1);
21449 }
21450 EOF
21451 if { (eval echo configure:21452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21452 then
21453   ol_cv_c_upper_lower=no
21454 else
21455   echo "configure: failed program was:" >&5
21456   cat conftest.$ac_ext >&5
21457   rm -fr conftest*
21458   ol_cv_c_upper_lower=yes
21459 fi
21460 rm -fr conftest*
21461 fi
21462
21463 fi
21464
21465 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21466 if test $ol_cv_c_upper_lower != no ; then
21467         cat >> confdefs.h <<\EOF
21468 #define C_UPPER_LOWER 1
21469 EOF
21470
21471 fi
21472
21473 echo $ac_n "checking for working const""... $ac_c" 1>&6
21474 echo "configure:21475: checking for working const" >&5
21475 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21476   echo $ac_n "(cached) $ac_c" 1>&6
21477 else
21478   cat > conftest.$ac_ext <<EOF
21479 #line 21480 "configure"
21480 #include "confdefs.h"
21481
21482 int main() {
21483
21484 /* Ultrix mips cc rejects this.  */
21485 typedef int charset[2]; const charset x;
21486 /* SunOS 4.1.1 cc rejects this.  */
21487 char const *const *ccp;
21488 char **p;
21489 /* NEC SVR4.0.2 mips cc rejects this.  */
21490 struct point {int x, y;};
21491 static struct point const zero = {0,0};
21492 /* AIX XL C 1.02.0.0 rejects this.
21493    It does not let you subtract one const X* pointer from another in an arm
21494    of an if-expression whose if-part is not a constant expression */
21495 const char *g = "string";
21496 ccp = &g + (g ? g-g : 0);
21497 /* HPUX 7.0 cc rejects these. */
21498 ++ccp;
21499 p = (char**) ccp;
21500 ccp = (char const *const *) p;
21501 { /* SCO 3.2v4 cc rejects this.  */
21502   char *t;
21503   char const *s = 0 ? (char *) 0 : (char const *) 0;
21504
21505   *t++ = 0;
21506 }
21507 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21508   int x[] = {25, 17};
21509   const int *foo = &x[0];
21510   ++foo;
21511 }
21512 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21513   typedef const int *iptr;
21514   iptr p = 0;
21515   ++p;
21516 }
21517 { /* AIX XL C 1.02.0.0 rejects this saying
21518      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21519   struct s { int j; const int *ap[3]; };
21520   struct s *b; b->j = 5;
21521 }
21522 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21523   const int foo = 10;
21524 }
21525
21526 ; return 0; }
21527 EOF
21528 if { (eval echo configure:21529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21529   rm -rf conftest*
21530   ac_cv_c_const=yes
21531 else
21532   echo "configure: failed program was:" >&5
21533   cat conftest.$ac_ext >&5
21534   rm -rf conftest*
21535   ac_cv_c_const=no
21536 fi
21537 rm -f conftest*
21538 fi
21539
21540 echo "$ac_t""$ac_cv_c_const" 1>&6
21541 if test $ac_cv_c_const = no; then
21542   cat >> confdefs.h <<\EOF
21543 #define const 
21544 EOF
21545
21546 fi
21547
21548 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21549 echo "configure:21550: checking if compiler understands volatile" >&5
21550 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21551   echo $ac_n "(cached) $ac_c" 1>&6
21552 else
21553   cat > conftest.$ac_ext <<EOF
21554 #line 21555 "configure"
21555 #include "confdefs.h"
21556 int x, y, z;
21557 int main() {
21558 volatile int a; int * volatile b = x ? &y : &z;
21559       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21560       *b = 0;
21561 ; return 0; }
21562 EOF
21563 if { (eval echo configure:21564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21564   rm -rf conftest*
21565   ol_cv_c_volatile=yes
21566 else
21567   echo "configure: failed program was:" >&5
21568   cat conftest.$ac_ext >&5
21569   rm -rf conftest*
21570   ol_cv_c_volatile=no
21571 fi
21572 rm -f conftest*
21573 fi
21574
21575 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21576   if test $ol_cv_c_volatile = yes; then
21577     : 
21578   else
21579     cat >> confdefs.h <<\EOF
21580 #define volatile 
21581 EOF
21582
21583   fi
21584  
21585
21586 if test $cross_compiling = yes ; then
21587         cat >> confdefs.h <<\EOF
21588 #define CROSS_COMPILING 1
21589 EOF
21590
21591 else
21592         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21593 echo "configure:21594: checking whether byte ordering is bigendian" >&5
21594 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21595   echo $ac_n "(cached) $ac_c" 1>&6
21596 else
21597   ac_cv_c_bigendian=unknown
21598 # See if sys/param.h defines the BYTE_ORDER macro.
21599 cat > conftest.$ac_ext <<EOF
21600 #line 21601 "configure"
21601 #include "confdefs.h"
21602 #include <sys/types.h>
21603 #include <sys/param.h>
21604 int main() {
21605
21606 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21607  bogus endian macros
21608 #endif
21609 ; return 0; }
21610 EOF
21611 if { (eval echo configure:21612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21612   rm -rf conftest*
21613   # It does; now see whether it defined to BIG_ENDIAN or not.
21614 cat > conftest.$ac_ext <<EOF
21615 #line 21616 "configure"
21616 #include "confdefs.h"
21617 #include <sys/types.h>
21618 #include <sys/param.h>
21619 int main() {
21620
21621 #if BYTE_ORDER != BIG_ENDIAN
21622  not big endian
21623 #endif
21624 ; return 0; }
21625 EOF
21626 if { (eval echo configure:21627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21627   rm -rf conftest*
21628   ac_cv_c_bigendian=yes
21629 else
21630   echo "configure: failed program was:" >&5
21631   cat conftest.$ac_ext >&5
21632   rm -rf conftest*
21633   ac_cv_c_bigendian=no
21634 fi
21635 rm -f conftest*
21636 else
21637   echo "configure: failed program was:" >&5
21638   cat conftest.$ac_ext >&5
21639 fi
21640 rm -f conftest*
21641 if test $ac_cv_c_bigendian = unknown; then
21642 if test "$cross_compiling" = yes; then
21643     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21644 else
21645   cat > conftest.$ac_ext <<EOF
21646 #line 21647 "configure"
21647 #include "confdefs.h"
21648 main () {
21649   /* Are we little or big endian?  From Harbison&Steele.  */
21650   union
21651   {
21652     long l;
21653     char c[sizeof (long)];
21654   } u;
21655   u.l = 1;
21656   exit (u.c[sizeof (long) - 1] == 1);
21657 }
21658 EOF
21659 if { (eval echo configure:21660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21660 then
21661   ac_cv_c_bigendian=no
21662 else
21663   echo "configure: failed program was:" >&5
21664   cat conftest.$ac_ext >&5
21665   rm -fr conftest*
21666   ac_cv_c_bigendian=yes
21667 fi
21668 rm -fr conftest*
21669 fi
21670
21671 fi
21672 fi
21673
21674 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21675 if test $ac_cv_c_bigendian = yes; then
21676   cat >> confdefs.h <<\EOF
21677 #define WORDS_BIGENDIAN 1
21678 EOF
21679
21680 fi
21681
21682 fi
21683
21684 echo $ac_n "checking size of short""... $ac_c" 1>&6
21685 echo "configure:21686: checking size of short" >&5 
21686 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21687   echo $ac_n "(cached) $ac_c" 1>&6
21688 else
21689   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21690   cat > conftest.$ac_ext <<EOF
21691 #line 21692 "configure"
21692 #include "confdefs.h"
21693 #include "confdefs.h" 
21694 #include <sys/types.h> 
21695  
21696
21697 int main() {
21698 switch (0) case 0: case (sizeof (short) == $ac_size):;
21699 ; return 0; }
21700 EOF
21701 if { (eval echo configure:21702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21702   rm -rf conftest*
21703   ac_cv_sizeof_short=$ac_size
21704 else
21705   echo "configure: failed program was:" >&5
21706   cat conftest.$ac_ext >&5
21707 fi
21708 rm -f conftest* 
21709   if test x$ac_cv_sizeof_short != x ; then break; fi 
21710 done 
21711
21712 fi
21713  
21714 if test x$ac_cv_sizeof_short = x ; then 
21715   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21716 fi 
21717 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21718 cat >> confdefs.h <<EOF
21719 #define SIZEOF_SHORT $ac_cv_sizeof_short
21720 EOF
21721  
21722  
21723 echo $ac_n "checking size of int""... $ac_c" 1>&6
21724 echo "configure:21725: checking size of int" >&5 
21725 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21726   echo $ac_n "(cached) $ac_c" 1>&6
21727 else
21728   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21729   cat > conftest.$ac_ext <<EOF
21730 #line 21731 "configure"
21731 #include "confdefs.h"
21732 #include "confdefs.h" 
21733 #include <sys/types.h> 
21734  
21735
21736 int main() {
21737 switch (0) case 0: case (sizeof (int) == $ac_size):;
21738 ; return 0; }
21739 EOF
21740 if { (eval echo configure:21741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21741   rm -rf conftest*
21742   ac_cv_sizeof_int=$ac_size
21743 else
21744   echo "configure: failed program was:" >&5
21745   cat conftest.$ac_ext >&5
21746 fi
21747 rm -f conftest* 
21748   if test x$ac_cv_sizeof_int != x ; then break; fi 
21749 done 
21750
21751 fi
21752  
21753 if test x$ac_cv_sizeof_int = x ; then 
21754   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21755 fi 
21756 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21757 cat >> confdefs.h <<EOF
21758 #define SIZEOF_INT $ac_cv_sizeof_int
21759 EOF
21760  
21761  
21762 echo $ac_n "checking size of long""... $ac_c" 1>&6
21763 echo "configure:21764: checking size of long" >&5 
21764 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21765   echo $ac_n "(cached) $ac_c" 1>&6
21766 else
21767   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21768   cat > conftest.$ac_ext <<EOF
21769 #line 21770 "configure"
21770 #include "confdefs.h"
21771 #include "confdefs.h" 
21772 #include <sys/types.h> 
21773  
21774
21775 int main() {
21776 switch (0) case 0: case (sizeof (long) == $ac_size):;
21777 ; return 0; }
21778 EOF
21779 if { (eval echo configure:21780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21780   rm -rf conftest*
21781   ac_cv_sizeof_long=$ac_size
21782 else
21783   echo "configure: failed program was:" >&5
21784   cat conftest.$ac_ext >&5
21785 fi
21786 rm -f conftest* 
21787   if test x$ac_cv_sizeof_long != x ; then break; fi 
21788 done 
21789
21790 fi
21791  
21792 if test x$ac_cv_sizeof_long = x ; then 
21793   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21794 fi 
21795 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21796 cat >> confdefs.h <<EOF
21797 #define SIZEOF_LONG $ac_cv_sizeof_long
21798 EOF
21799  
21800
21801
21802 if test "$ac_cv_sizeof_int" -lt 4 ; then
21803         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21804
21805         cat >> confdefs.h <<\EOF
21806 #define LBER_INT_T long
21807 EOF
21808
21809 else
21810         cat >> confdefs.h <<\EOF
21811 #define LBER_INT_T int
21812 EOF
21813
21814 fi
21815
21816 cat >> confdefs.h <<\EOF
21817 #define LBER_LEN_T long
21818 EOF
21819
21820 cat >> confdefs.h <<\EOF
21821 #define LBER_SOCKET_T int
21822 EOF
21823
21824 cat >> confdefs.h <<\EOF
21825 #define LBER_TAG_T long
21826 EOF
21827
21828
21829 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21830 echo "configure:21831: checking for 8-bit clean memcmp" >&5
21831 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21832   echo $ac_n "(cached) $ac_c" 1>&6
21833 else
21834   if test "$cross_compiling" = yes; then
21835   ac_cv_func_memcmp_clean=no
21836 else
21837   cat > conftest.$ac_ext <<EOF
21838 #line 21839 "configure"
21839 #include "confdefs.h"
21840
21841 main()
21842 {
21843   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21844   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21845 }
21846
21847 EOF
21848 if { (eval echo configure:21849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21849 then
21850   ac_cv_func_memcmp_clean=yes
21851 else
21852   echo "configure: failed program was:" >&5
21853   cat conftest.$ac_ext >&5
21854   rm -fr conftest*
21855   ac_cv_func_memcmp_clean=no
21856 fi
21857 rm -fr conftest*
21858 fi
21859
21860 fi
21861
21862 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21863 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21864
21865 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21866 echo "configure:21867: checking for strftime" >&5
21867 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21868   echo $ac_n "(cached) $ac_c" 1>&6
21869 else
21870   cat > conftest.$ac_ext <<EOF
21871 #line 21872 "configure"
21872 #include "confdefs.h"
21873 /* System header to define __stub macros and hopefully few prototypes,
21874     which can conflict with char strftime(); below.  */
21875 #include <assert.h>
21876 /* Override any gcc2 internal prototype to avoid an error.  */
21877 /* We use char because int might match the return type of a gcc2
21878     builtin and then its argument prototype would still apply.  */
21879 char strftime();
21880 char (*f)();
21881
21882 int main() {
21883
21884 /* The GNU C library defines this for functions which it implements
21885     to always fail with ENOSYS.  Some functions are actually named
21886     something starting with __ and the normal name is an alias.  */
21887 #if defined (__stub_strftime) || defined (__stub___strftime)
21888 choke me
21889 #else
21890 f = strftime;
21891 #endif
21892
21893 ; return 0; }
21894 EOF
21895 if { (eval echo configure:21896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21896   rm -rf conftest*
21897   eval "ac_cv_func_strftime=yes"
21898 else
21899   echo "configure: failed program was:" >&5
21900   cat conftest.$ac_ext >&5
21901   rm -rf conftest*
21902   eval "ac_cv_func_strftime=no"
21903 fi
21904 rm -f conftest*
21905 fi
21906
21907 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21908   echo "$ac_t""yes" 1>&6
21909   cat >> confdefs.h <<\EOF
21910 #define HAVE_STRFTIME 1
21911 EOF
21912
21913 else
21914   echo "$ac_t""no" 1>&6
21915 # strftime is in -lintl on SCO UNIX.
21916 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21917 echo "configure:21918: checking for strftime in -lintl" >&5
21918 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21920   echo $ac_n "(cached) $ac_c" 1>&6
21921 else
21922   ac_save_LIBS="$LIBS"
21923 LIBS="-lintl  $LIBS"
21924 cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 /* Override any gcc2 internal prototype to avoid an error.  */
21928 /* We use char because int might match the return type of a gcc2
21929     builtin and then its argument prototype would still apply.  */
21930 char strftime();
21931
21932 int main() {
21933 strftime()
21934 ; return 0; }
21935 EOF
21936 if { (eval echo configure:21937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21937   rm -rf conftest*
21938   eval "ac_cv_lib_$ac_lib_var=yes"
21939 else
21940   echo "configure: failed program was:" >&5
21941   cat conftest.$ac_ext >&5
21942   rm -rf conftest*
21943   eval "ac_cv_lib_$ac_lib_var=no"
21944 fi
21945 rm -f conftest*
21946 LIBS="$ac_save_LIBS"
21947
21948 fi
21949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21950   echo "$ac_t""yes" 1>&6
21951   cat >> confdefs.h <<\EOF
21952 #define HAVE_STRFTIME 1
21953 EOF
21954
21955 LIBS="-lintl $LIBS"
21956 else
21957   echo "$ac_t""no" 1>&6
21958 fi
21959
21960 fi
21961
21962
21963 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21964 echo "configure:21965: checking for inet_aton()" >&5
21965 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21966   echo $ac_n "(cached) $ac_c" 1>&6
21967 else
21968   cat > conftest.$ac_ext <<EOF
21969 #line 21970 "configure"
21970 #include "confdefs.h"
21971
21972 #ifdef HAVE_SYS_TYPES_H
21973 #       include <sys/types.h>
21974 #endif
21975 #ifdef HAVE_SYS_SOCKET_H
21976 #       include <sys/socket.h>
21977 #       ifdef HAVE_SYS_SELECT_H
21978 #               include <sys/select.h>
21979 #       endif
21980 #       include <netinet/in.h>
21981 #       ifdef HAVE_ARPA_INET_H
21982 #               include <arpa/inet.h>
21983 #       endif
21984 #endif
21985
21986 int main() {
21987 struct in_addr in;
21988 int rc = inet_aton( "255.255.255.255", &in );
21989 ; return 0; }
21990 EOF
21991 if { (eval echo configure:21992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21992   rm -rf conftest*
21993   ol_cv_func_inet_aton=yes
21994 else
21995   echo "configure: failed program was:" >&5
21996   cat conftest.$ac_ext >&5
21997   rm -rf conftest*
21998   ol_cv_func_inet_aton=no
21999 fi
22000 rm -f conftest*
22001 fi
22002
22003 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22004   if test $ol_cv_func_inet_aton != no; then
22005     cat >> confdefs.h <<\EOF
22006 #define HAVE_INET_ATON 1
22007 EOF
22008
22009   fi
22010  
22011
22012 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22013 echo "configure:22014: checking for _spawnlp" >&5
22014 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22015   echo $ac_n "(cached) $ac_c" 1>&6
22016 else
22017   cat > conftest.$ac_ext <<EOF
22018 #line 22019 "configure"
22019 #include "confdefs.h"
22020 /* System header to define __stub macros and hopefully few prototypes,
22021     which can conflict with char _spawnlp(); below.  */
22022 #include <assert.h>
22023 /* Override any gcc2 internal prototype to avoid an error.  */
22024 /* We use char because int might match the return type of a gcc2
22025     builtin and then its argument prototype would still apply.  */
22026 char _spawnlp();
22027 char (*f)();
22028
22029 int main() {
22030
22031 /* The GNU C library defines this for functions which it implements
22032     to always fail with ENOSYS.  Some functions are actually named
22033     something starting with __ and the normal name is an alias.  */
22034 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22035 choke me
22036 #else
22037 f = _spawnlp;
22038 #endif
22039
22040 ; return 0; }
22041 EOF
22042 if { (eval echo configure:22043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22043   rm -rf conftest*
22044   eval "ac_cv_func__spawnlp=yes"
22045 else
22046   echo "configure: failed program was:" >&5
22047   cat conftest.$ac_ext >&5
22048   rm -rf conftest*
22049   eval "ac_cv_func__spawnlp=no"
22050 fi
22051 rm -f conftest*
22052 fi
22053
22054 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22055   echo "$ac_t""yes" 1>&6
22056   cat >> confdefs.h <<\EOF
22057 #define HAVE_SPAWNLP 1
22058 EOF
22059
22060 else
22061   echo "$ac_t""no" 1>&6
22062 fi
22063
22064
22065 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22066 echo "configure:22067: checking for _snprintf" >&5
22067 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22068   echo $ac_n "(cached) $ac_c" 1>&6
22069 else
22070   cat > conftest.$ac_ext <<EOF
22071 #line 22072 "configure"
22072 #include "confdefs.h"
22073 /* System header to define __stub macros and hopefully few prototypes,
22074     which can conflict with char _snprintf(); below.  */
22075 #include <assert.h>
22076 /* Override any gcc2 internal prototype to avoid an error.  */
22077 /* We use char because int might match the return type of a gcc2
22078     builtin and then its argument prototype would still apply.  */
22079 char _snprintf();
22080 char (*f)();
22081
22082 int main() {
22083
22084 /* The GNU C library defines this for functions which it implements
22085     to always fail with ENOSYS.  Some functions are actually named
22086     something starting with __ and the normal name is an alias.  */
22087 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22088 choke me
22089 #else
22090 f = _snprintf;
22091 #endif
22092
22093 ; return 0; }
22094 EOF
22095 if { (eval echo configure:22096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22096   rm -rf conftest*
22097   eval "ac_cv_func__snprintf=yes"
22098 else
22099   echo "configure: failed program was:" >&5
22100   cat conftest.$ac_ext >&5
22101   rm -rf conftest*
22102   eval "ac_cv_func__snprintf=no"
22103 fi
22104 rm -f conftest*
22105 fi
22106
22107 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22108   echo "$ac_t""yes" 1>&6
22109   ac_cv_func_snprintf=yes
22110         cat >> confdefs.h <<\EOF
22111 #define snprintf _snprintf
22112 EOF
22113
22114
22115 else
22116   echo "$ac_t""no" 1>&6
22117 fi
22118
22119
22120 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22121 echo "configure:22122: checking for _vsnprintf" >&5
22122 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22123   echo $ac_n "(cached) $ac_c" 1>&6
22124 else
22125   cat > conftest.$ac_ext <<EOF
22126 #line 22127 "configure"
22127 #include "confdefs.h"
22128 /* System header to define __stub macros and hopefully few prototypes,
22129     which can conflict with char _vsnprintf(); below.  */
22130 #include <assert.h>
22131 /* Override any gcc2 internal prototype to avoid an error.  */
22132 /* We use char because int might match the return type of a gcc2
22133     builtin and then its argument prototype would still apply.  */
22134 char _vsnprintf();
22135 char (*f)();
22136
22137 int main() {
22138
22139 /* The GNU C library defines this for functions which it implements
22140     to always fail with ENOSYS.  Some functions are actually named
22141     something starting with __ and the normal name is an alias.  */
22142 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22143 choke me
22144 #else
22145 f = _vsnprintf;
22146 #endif
22147
22148 ; return 0; }
22149 EOF
22150 if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22151   rm -rf conftest*
22152   eval "ac_cv_func__vsnprintf=yes"
22153 else
22154   echo "configure: failed program was:" >&5
22155   cat conftest.$ac_ext >&5
22156   rm -rf conftest*
22157   eval "ac_cv_func__vsnprintf=no"
22158 fi
22159 rm -f conftest*
22160 fi
22161
22162 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22163   echo "$ac_t""yes" 1>&6
22164   ac_cv_func_vsnprintf=yes
22165         cat >> confdefs.h <<\EOF
22166 #define vsnprintf _vsnprintf
22167 EOF
22168
22169
22170 else
22171   echo "$ac_t""no" 1>&6
22172 fi
22173
22174
22175 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22176 echo "configure:22177: checking for vprintf" >&5
22177 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22178   echo $ac_n "(cached) $ac_c" 1>&6
22179 else
22180   cat > conftest.$ac_ext <<EOF
22181 #line 22182 "configure"
22182 #include "confdefs.h"
22183 /* System header to define __stub macros and hopefully few prototypes,
22184     which can conflict with char vprintf(); below.  */
22185 #include <assert.h>
22186 /* Override any gcc2 internal prototype to avoid an error.  */
22187 /* We use char because int might match the return type of a gcc2
22188     builtin and then its argument prototype would still apply.  */
22189 char vprintf();
22190 char (*f)();
22191
22192 int main() {
22193
22194 /* The GNU C library defines this for functions which it implements
22195     to always fail with ENOSYS.  Some functions are actually named
22196     something starting with __ and the normal name is an alias.  */
22197 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22198 choke me
22199 #else
22200 f = vprintf;
22201 #endif
22202
22203 ; return 0; }
22204 EOF
22205 if { (eval echo configure:22206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22206   rm -rf conftest*
22207   eval "ac_cv_func_vprintf=yes"
22208 else
22209   echo "configure: failed program was:" >&5
22210   cat conftest.$ac_ext >&5
22211   rm -rf conftest*
22212   eval "ac_cv_func_vprintf=no"
22213 fi
22214 rm -f conftest*
22215 fi
22216
22217 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22218   echo "$ac_t""yes" 1>&6
22219   cat >> confdefs.h <<\EOF
22220 #define HAVE_VPRINTF 1
22221 EOF
22222
22223 else
22224   echo "$ac_t""no" 1>&6
22225 fi
22226
22227 if test "$ac_cv_func_vprintf" != yes; then
22228 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22229 echo "configure:22230: checking for _doprnt" >&5
22230 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22231   echo $ac_n "(cached) $ac_c" 1>&6
22232 else
22233   cat > conftest.$ac_ext <<EOF
22234 #line 22235 "configure"
22235 #include "confdefs.h"
22236 /* System header to define __stub macros and hopefully few prototypes,
22237     which can conflict with char _doprnt(); below.  */
22238 #include <assert.h>
22239 /* Override any gcc2 internal prototype to avoid an error.  */
22240 /* We use char because int might match the return type of a gcc2
22241     builtin and then its argument prototype would still apply.  */
22242 char _doprnt();
22243 char (*f)();
22244
22245 int main() {
22246
22247 /* The GNU C library defines this for functions which it implements
22248     to always fail with ENOSYS.  Some functions are actually named
22249     something starting with __ and the normal name is an alias.  */
22250 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22251 choke me
22252 #else
22253 f = _doprnt;
22254 #endif
22255
22256 ; return 0; }
22257 EOF
22258 if { (eval echo configure:22259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22259   rm -rf conftest*
22260   eval "ac_cv_func__doprnt=yes"
22261 else
22262   echo "configure: failed program was:" >&5
22263   cat conftest.$ac_ext >&5
22264   rm -rf conftest*
22265   eval "ac_cv_func__doprnt=no"
22266 fi
22267 rm -f conftest*
22268 fi
22269
22270 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22271   echo "$ac_t""yes" 1>&6
22272   cat >> confdefs.h <<\EOF
22273 #define HAVE_DOPRNT 1
22274 EOF
22275
22276 else
22277   echo "$ac_t""no" 1>&6
22278 fi
22279
22280 fi
22281
22282
22283 if test $ac_cv_func_vprintf = yes ; then
22284                 for ac_func in vsnprintf vsprintf
22285 do
22286 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22287 echo "configure:22288: checking for $ac_func" >&5
22288 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22289   echo $ac_n "(cached) $ac_c" 1>&6
22290 else
22291   cat > conftest.$ac_ext <<EOF
22292 #line 22293 "configure"
22293 #include "confdefs.h"
22294 /* System header to define __stub macros and hopefully few prototypes,
22295     which can conflict with char $ac_func(); below.  */
22296 #include <assert.h>
22297 /* Override any gcc2 internal prototype to avoid an error.  */
22298 /* We use char because int might match the return type of a gcc2
22299     builtin and then its argument prototype would still apply.  */
22300 char $ac_func();
22301 char (*f)();
22302
22303 int main() {
22304
22305 /* The GNU C library defines this for functions which it implements
22306     to always fail with ENOSYS.  Some functions are actually named
22307     something starting with __ and the normal name is an alias.  */
22308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22309 choke me
22310 #else
22311 f = $ac_func;
22312 #endif
22313
22314 ; return 0; }
22315 EOF
22316 if { (eval echo configure:22317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22317   rm -rf conftest*
22318   eval "ac_cv_func_$ac_func=yes"
22319 else
22320   echo "configure: failed program was:" >&5
22321   cat conftest.$ac_ext >&5
22322   rm -rf conftest*
22323   eval "ac_cv_func_$ac_func=no"
22324 fi
22325 rm -f conftest*
22326 fi
22327
22328 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22329   echo "$ac_t""yes" 1>&6
22330     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22331   cat >> confdefs.h <<EOF
22332 #define $ac_tr_func 1
22333 EOF
22334  
22335 else
22336   echo "$ac_t""no" 1>&6
22337 fi
22338 done
22339
22340 fi
22341
22342 for ac_func in \
22343         bcopy                   \
22344         closesocket             \
22345         chroot                  \
22346         endgrent                \
22347         endpwent                \
22348         fcntl                   \
22349         flock                   \
22350         fstat                   \
22351         getdtablesize   \
22352         getgrgid                \
22353         gethostname             \
22354         getpass                 \
22355         getpassphrase   \
22356         getpwuid                \
22357         getpwnam                \
22358         getspnam                \
22359         gettimeofday    \
22360         initgroups              \
22361         lockf                   \
22362         memcpy                  \
22363         memmove                 \
22364         mkstemp                 \
22365         mktemp                  \
22366         pipe                    \
22367         read                    \
22368         recv                    \
22369         recvfrom                \
22370         recvmsg                 \
22371         setpwfile               \
22372         setgid                  \
22373         setegid                 \
22374         setsid                  \
22375         setuid                  \
22376         seteuid                 \
22377         sigaction               \
22378         signal                  \
22379         sigset                  \
22380         strdup                  \
22381         strerror                \
22382         strpbrk                 \
22383         strrchr                 \
22384         strsep                  \
22385         strstr                  \
22386         strtol                  \
22387         strtoul                 \
22388         strspn                  \
22389         sysconf                 \
22390         usleep                  \
22391         waitpid                 \
22392         wait4                   \
22393         write                   \
22394         send                    \
22395         sendto                  \
22396
22397 do
22398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22399 echo "configure:22400: checking for $ac_func" >&5
22400 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22401   echo $ac_n "(cached) $ac_c" 1>&6
22402 else
22403   cat > conftest.$ac_ext <<EOF
22404 #line 22405 "configure"
22405 #include "confdefs.h"
22406 /* System header to define __stub macros and hopefully few prototypes,
22407     which can conflict with char $ac_func(); below.  */
22408 #include <assert.h>
22409 /* Override any gcc2 internal prototype to avoid an error.  */
22410 /* We use char because int might match the return type of a gcc2
22411     builtin and then its argument prototype would still apply.  */
22412 char $ac_func();
22413 char (*f)();
22414
22415 int main() {
22416
22417 /* The GNU C library defines this for functions which it implements
22418     to always fail with ENOSYS.  Some functions are actually named
22419     something starting with __ and the normal name is an alias.  */
22420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22421 choke me
22422 #else
22423 f = $ac_func;
22424 #endif
22425
22426 ; return 0; }
22427 EOF
22428 if { (eval echo configure:22429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22429   rm -rf conftest*
22430   eval "ac_cv_func_$ac_func=yes"
22431 else
22432   echo "configure: failed program was:" >&5
22433   cat conftest.$ac_ext >&5
22434   rm -rf conftest*
22435   eval "ac_cv_func_$ac_func=no"
22436 fi
22437 rm -f conftest*
22438 fi
22439
22440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22441   echo "$ac_t""yes" 1>&6
22442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22443   cat >> confdefs.h <<EOF
22444 #define $ac_tr_func 1
22445 EOF
22446  
22447 else
22448   echo "$ac_t""no" 1>&6
22449 fi
22450 done
22451
22452
22453 for ac_func in getopt
22454 do
22455 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22456 echo "configure:22457: checking for $ac_func" >&5
22457 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22458   echo $ac_n "(cached) $ac_c" 1>&6
22459 else
22460   cat > conftest.$ac_ext <<EOF
22461 #line 22462 "configure"
22462 #include "confdefs.h"
22463 /* System header to define __stub macros and hopefully few prototypes,
22464     which can conflict with char $ac_func(); below.  */
22465 #include <assert.h>
22466 /* Override any gcc2 internal prototype to avoid an error.  */
22467 /* We use char because int might match the return type of a gcc2
22468     builtin and then its argument prototype would still apply.  */
22469 char $ac_func();
22470 char (*f)();
22471
22472 int main() {
22473
22474 /* The GNU C library defines this for functions which it implements
22475     to always fail with ENOSYS.  Some functions are actually named
22476     something starting with __ and the normal name is an alias.  */
22477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22478 choke me
22479 #else
22480 f = $ac_func;
22481 #endif
22482
22483 ; return 0; }
22484 EOF
22485 if { (eval echo configure:22486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22486   rm -rf conftest*
22487   eval "ac_cv_func_$ac_func=yes"
22488 else
22489   echo "configure: failed program was:" >&5
22490   cat conftest.$ac_ext >&5
22491   rm -rf conftest*
22492   eval "ac_cv_func_$ac_func=no"
22493 fi
22494 rm -f conftest*
22495 fi
22496
22497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22498   echo "$ac_t""yes" 1>&6
22499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22500   cat >> confdefs.h <<EOF
22501 #define $ac_tr_func 1
22502 EOF
22503  
22504 else
22505   echo "$ac_t""no" 1>&6
22506 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22507 fi
22508 done
22509
22510
22511
22512 if test "$ac_cv_func_getopt" != yes; then
22513         LIBSRCS="$LIBSRCS getopt.c"
22514 fi
22515
22516 # Check Configuration
22517 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22518 echo "configure:22519: checking declaration of sys_errlist" >&5
22519 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22520   echo $ac_n "(cached) $ac_c" 1>&6
22521 else
22522   
22523         cat > conftest.$ac_ext <<EOF
22524 #line 22525 "configure"
22525 #include "confdefs.h"
22526
22527 #include <stdio.h>
22528 #include <sys/types.h>
22529 #include <errno.h>
22530 #ifdef WINNT
22531 #include <stdlib.h>
22532 #endif 
22533 int main() {
22534 char *c = (char *) *sys_errlist
22535 ; return 0; }
22536 EOF
22537 if { (eval echo configure:22538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22538   rm -rf conftest*
22539   ol_cv_dcl_sys_errlist=yes
22540         ol_cv_have_sys_errlist=yes
22541 else
22542   echo "configure: failed program was:" >&5
22543   cat conftest.$ac_ext >&5
22544   rm -rf conftest*
22545   ol_cv_dcl_sys_errlist=no
22546 fi
22547 rm -f conftest*
22548 fi
22549
22550 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22551 #
22552 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22553 if test $ol_cv_dcl_sys_errlist = no ; then
22554         cat >> confdefs.h <<\EOF
22555 #define DECL_SYS_ERRLIST 1
22556 EOF
22557
22558
22559         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22560 echo "configure:22561: checking existence of sys_errlist" >&5
22561 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22562   echo $ac_n "(cached) $ac_c" 1>&6
22563 else
22564   
22565                 cat > conftest.$ac_ext <<EOF
22566 #line 22567 "configure"
22567 #include "confdefs.h"
22568 #include <errno.h>
22569 int main() {
22570 char *c = (char *) *sys_errlist
22571 ; return 0; }
22572 EOF
22573 if { (eval echo configure:22574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22574   rm -rf conftest*
22575   ol_cv_have_sys_errlist=yes
22576 else
22577   echo "configure: failed program was:" >&5
22578   cat conftest.$ac_ext >&5
22579   rm -rf conftest*
22580   ol_cv_have_sys_errlist=no
22581 fi
22582 rm -f conftest*
22583 fi
22584
22585 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22586 fi
22587 if test $ol_cv_have_sys_errlist = yes ; then
22588         cat >> confdefs.h <<\EOF
22589 #define HAVE_SYS_ERRLIST 1
22590 EOF
22591
22592 fi
22593
22594
22595
22596 if test "$ol_enable_debug" != no ; then
22597         cat >> confdefs.h <<\EOF
22598 #define LDAP_DEBUG 1
22599 EOF
22600
22601 fi
22602 if test "$ol_enable_syslog" = yes ; then
22603         cat >> confdefs.h <<\EOF
22604 #define LDAP_SYSLOG 1
22605 EOF
22606
22607 fi
22608 if test "$ol_enable_cache" = no ; then
22609         cat >> confdefs.h <<\EOF
22610 #define LDAP_NOCACHE 1
22611 EOF
22612
22613 fi
22614 if test "$ol_link_kbind" != no ; then
22615         cat >> confdefs.h <<\EOF
22616 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22617 EOF
22618
22619 fi
22620 if test "$ol_enable_proctitle" != no ; then
22621         cat >> confdefs.h <<\EOF
22622 #define LDAP_PROCTITLE 1
22623 EOF
22624
22625 fi
22626 if test "$ol_enable_referrals" != no ; then
22627         cat >> confdefs.h <<\EOF
22628 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22629 EOF
22630
22631 fi
22632 if test "$ol_enable_local" != no; then
22633         cat >> confdefs.h <<\EOF
22634 #define LDAP_PF_LOCAL 1
22635 EOF
22636
22637 fi
22638 if test "$ol_link_ipv6" != no; then
22639         cat >> confdefs.h <<\EOF
22640 #define LDAP_PF_INET6 1
22641 EOF
22642
22643 fi
22644 if test "$ol_enable_cleartext" != no ; then
22645         cat >> confdefs.h <<\EOF
22646 #define SLAPD_CLEARTEXT 1
22647 EOF
22648
22649 fi
22650 if test "$ol_enable_crypt" != no ; then
22651         cat >> confdefs.h <<\EOF
22652 #define SLAPD_CRYPT 1
22653 EOF
22654
22655 fi
22656 if test "$ol_link_kpasswd" != no ; then
22657         cat >> confdefs.h <<\EOF
22658 #define SLAPD_KPASSWD 1
22659 EOF
22660
22661 fi
22662 if test "$ol_link_spasswd" != no ; then
22663         cat >> confdefs.h <<\EOF
22664 #define SLAPD_SPASSWD 1
22665 EOF
22666
22667 fi
22668 if test "$ol_enable_multimaster" != no ; then
22669         cat >> confdefs.h <<\EOF
22670 #define SLAPD_MULTIMASTER 1
22671 EOF
22672
22673 fi
22674 if test "$ol_enable_phonetic" != no ; then
22675         cat >> confdefs.h <<\EOF
22676 #define SLAPD_PHONETIC 1
22677 EOF
22678
22679 fi
22680 if test "$ol_enable_rlookups" != no ; then
22681         cat >> confdefs.h <<\EOF
22682 #define SLAPD_RLOOKUPS 1
22683 EOF
22684
22685 fi
22686 if test "$ol_enable_aci" != no ; then
22687         cat >> confdefs.h <<\EOF
22688 #define SLAPD_ACI_ENABLED 1
22689 EOF
22690
22691 fi
22692
22693 if test "$ol_link_modules" != no ; then
22694         cat >> confdefs.h <<\EOF
22695 #define SLAPD_MODULES 1
22696 EOF
22697
22698         BUILD_SLAPD=yes
22699         SLAPD_MODULES_LDFLAGS="-dlopen self"
22700 fi
22701
22702 if test "$ol_enable_bdb" != no ; then
22703         cat >> confdefs.h <<\EOF
22704 #define SLAPD_BDB 1
22705 EOF
22706
22707         BUILD_SLAPD=yes
22708         BUILD_BDB=yes
22709         if test "$ol_with_bdb_module" != static ; then
22710                 cat >> confdefs.h <<\EOF
22711 #define SLAPD_BDB_DYNAMIC 1
22712 EOF
22713
22714                 BUILD_BDB=mod
22715                 BUILD_BDB_DYNAMIC=shared
22716                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22717         else
22718                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22719         fi
22720 fi
22721
22722 if test "$ol_link_dnssrv" != no ; then
22723         cat >> confdefs.h <<\EOF
22724 #define SLAPD_DNSSRV 1
22725 EOF
22726
22727         BUILD_SLAPD=yes
22728         BUILD_DNSSRV=yes
22729         if test "$ol_with_dnssrv_module" != static ; then
22730                 cat >> confdefs.h <<\EOF
22731 #define SLAPD_DNSSRV_DYNAMIC 1
22732 EOF
22733
22734                 BUILD_DNSSRV=mod
22735                 BUILD_DNSSRV_DYNAMIC=shared
22736                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22737         else
22738                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22739         fi
22740 fi
22741
22742 if test "$ol_enable_ldap" != no ; then
22743         cat >> confdefs.h <<\EOF
22744 #define SLAPD_LDAP 1
22745 EOF
22746
22747         BUILD_SLAPD=yes
22748         BUILD_LDAP=yes
22749         if test "$ol_with_ldap_module" != static ; then
22750                 cat >> confdefs.h <<\EOF
22751 #define SLAPD_LDAP_DYNAMIC 1
22752 EOF
22753
22754                 BUILD_LDAP=mod
22755                 BUILD_LDAP_DYNAMIC=shared
22756                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22757         else
22758                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22759         fi
22760 fi
22761
22762 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22763         cat >> confdefs.h <<\EOF
22764 #define SLAPD_LDBM 1
22765 EOF
22766
22767         BUILD_SLAPD=yes
22768         BUILD_LDBM=yes
22769         if test "$ol_with_ldbm_module" != static ; then
22770                 cat >> confdefs.h <<\EOF
22771 #define SLAPD_LDBM_DYNAMIC 1
22772 EOF
22773
22774                 BUILD_LDBM=mod
22775                 BUILD_LDBM_DYNAMIC=shared
22776                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22777         else
22778                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22779         fi
22780 fi
22781
22782 if test "$ol_enable_meta" != no ; then
22783         if test "$ol_enable_ldap" = no ; then
22784                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22785         fi
22786         if test "$ol_enable_rewrite" = no ; then
22787                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22788         fi
22789         cat >> confdefs.h <<\EOF
22790 #define SLAPD_META 1
22791 EOF
22792
22793         BUILD_SLAPD=yes
22794         BUILD_META=yes
22795         BUILD_LDAP=yes
22796         BUILD_REWRITE=yes
22797         if test "$ol_with_meta_module" != static ; then
22798                 cat >> confdefs.h <<\EOF
22799 #define SLAPD_META_DYNAMIC 1
22800 EOF
22801
22802                 BUILD_META=mod
22803                 BUILD_META_DYNAMIC=shared
22804                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22805         else
22806                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22807         fi
22808 fi
22809
22810 if test "$ol_enable_monitor" != no ; then
22811         cat >> confdefs.h <<\EOF
22812 #define SLAPD_MONITOR 1
22813 EOF
22814
22815         BUILD_SLAPD=yes
22816         BUILD_MONITOR=yes
22817         if test "$ol_with_monitor_module" != static ; then
22818                 cat >> confdefs.h <<\EOF
22819 #define SLAPD_MONITOR_DYNAMIC 1
22820 EOF
22821
22822                 BUILD_MONITOR=mod
22823                 BUILD_MONITOR_DYNAMIC=shared
22824                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22825         else
22826                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22827         fi
22828 fi
22829
22830 if test "$ol_enable_null" != no ; then
22831         cat >> confdefs.h <<\EOF
22832 #define SLAPD_NULL 1
22833 EOF
22834
22835         BUILD_SLAPD=yes
22836         BUILD_NULL=yes
22837         if test "$ol_with_null_module" != static ; then
22838                 cat >> confdefs.h <<\EOF
22839 #define SLAPD_NULL_DYNAMIC 1
22840 EOF
22841
22842                 BUILD_NULL=mod
22843                 BUILD_NULL_DYNAMIC=shared
22844                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22845         else
22846                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22847         fi
22848 fi
22849
22850 if test "$ol_enable_passwd" != no ; then
22851         cat >> confdefs.h <<\EOF
22852 #define SLAPD_PASSWD 1
22853 EOF
22854
22855         BUILD_SLAPD=yes
22856         BUILD_PASSWD=yes
22857         if test "$ol_with_passwd_module" != static ; then
22858                 cat >> confdefs.h <<\EOF
22859 #define SLAPD_PASSWD_DYNAMIC 1
22860 EOF
22861
22862                 BUILD_PASSWD=mod
22863                 BUILD_PASSWD_DYNAMIC=shared
22864                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22865         else
22866                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22867         fi
22868 fi
22869
22870 if test "$ol_link_perl" != no ; then
22871         cat >> confdefs.h <<\EOF
22872 #define SLAPD_PERL 1
22873 EOF
22874
22875         BUILD_SLAPD=yes
22876         BUILD_PERL=yes
22877         if test "$ol_with_perl_module" != static ; then
22878                 cat >> confdefs.h <<\EOF
22879 #define SLAPD_PERL_DYNAMIC 1
22880 EOF
22881
22882                 BUILD_PERL=mod
22883                 BUILD_PERL_DYNAMIC=shared
22884                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22885         else
22886                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22887         fi
22888 fi
22889
22890 if test "$ol_enable_shell" != no ; then
22891         cat >> confdefs.h <<\EOF
22892 #define SLAPD_SHELL 1
22893 EOF
22894
22895         BUILD_SLAPD=yes
22896         BUILD_SHELL=yes
22897         if test "$ol_with_shell_module" != static ; then
22898                 cat >> confdefs.h <<\EOF
22899 #define SLAPD_SHELL_DYNAMIC 1
22900 EOF
22901
22902                 BUILD_SHELL=mod
22903                 BUILD_SHELL_DYNAMIC=shared
22904                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22905         else
22906                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22907         fi
22908 fi
22909
22910 if test "$ol_link_sql" != no ; then
22911         cat >> confdefs.h <<\EOF
22912 #define SLAPD_SQL 1
22913 EOF
22914
22915         BUILD_SLAPD=yes
22916         BUILD_SQL=yes
22917         if test "$ol_with_sql_module" != static; then
22918                 cat >> confdefs.h <<\EOF
22919 #define SLAPD_SQL_DYNAMIC 1
22920 EOF
22921
22922                 BUILD_SQL=mod
22923                 BUILD_SQL_DYNAMIC=shared
22924                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22925         else
22926                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22927         fi
22928 fi
22929
22930 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22931         $BUILD_SLAPD = yes ; then
22932         BUILD_SLURPD=yes
22933 fi
22934
22935 if test "$ol_enable_rewrite" != no ; then
22936         cat >> confdefs.h <<\EOF
22937 #define ENABLE_REWRITE 1
22938 EOF
22939
22940         BUILD_REWRITE=yes
22941 fi
22942
22943
22944
22945 if test "$ac_cv_mingw32" = yes ; then
22946         PLAT=NT
22947         SLAPD_MODULES_LDFLAGS=
22948 else
22949         PLAT=UNIX
22950 fi
22951
22952 if test -z "$SLAPD_STATIC_BACKENDS"; then
22953         SLAPD_NO_STATIC='#'
22954 else
22955         SLAPD_NO_STATIC=
22956 fi
22957
22958
22959
22960
22961
22962
22963   
22964   
22965   
22966   
22967   
22968   
22969   
22970   
22971   
22972   
22973   
22974   
22975   
22976   
22977   
22978   
22979   
22980   
22981   
22982   
22983   
22984   
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022 # Check whether --with-xxinstall or --without-xxinstall was given.
23023 if test "${with_xxinstall+set}" = set; then
23024   withval="$with_xxinstall"
23025   :
23026 fi
23027
23028
23029
23030 trap '' 1 2 15
23031
23032 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23033
23034 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23035 # Let make expand exec_prefix.
23036 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23037
23038 # Any assignment to VPATH causes Sun make to only execute
23039 # the first set of double-colon rules, so remove it if not needed.
23040 # If there is a colon in the path, we need to keep it.
23041 if test "x$srcdir" = x.; then
23042   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23043 fi
23044
23045 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23046
23047 DEFS=-DHAVE_CONFIG_H
23048
23049 # Without the "./", some shells look in PATH for config.status.
23050 : ${CONFIG_STATUS=./config.status}
23051
23052 echo creating $CONFIG_STATUS
23053 rm -f $CONFIG_STATUS
23054 cat > $CONFIG_STATUS <<EOF
23055 #! /bin/sh
23056 # Generated automatically by configure.
23057 # Run this file to recreate the current configuration.
23058 # This directory was configured as follows,
23059 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23060 #
23061 # $0 $ac_configure_args
23062 #
23063 # Compiler output produced by configure, useful for debugging
23064 # configure, is in ./config.log if it exists.
23065
23066 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23067 for ac_option
23068 do
23069   case "\$ac_option" in
23070   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23071     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23072     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23073   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23074     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23075     exit 0 ;;
23076   -help | --help | --hel | --he | --h)
23077     echo "\$ac_cs_usage"; exit 0 ;;
23078   *) echo "\$ac_cs_usage"; exit 1 ;;
23079   esac
23080 done
23081
23082 ac_given_srcdir=$srcdir
23083 ac_given_INSTALL="$INSTALL"
23084
23085 trap 'rm -fr `echo "\
23086 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23087 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23088 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23089 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23090 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23091 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23092 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23093 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23094 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23095 include/Makefile:build/top.mk:include/Makefile.in \
23096 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23097 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23098 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23099 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23100 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23101 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23102 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23103 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23104 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23105 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23106 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23107 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23108 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23109 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23110 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23111 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23112 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23113 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23114 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23115 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23116 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23117 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23118 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23119 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23120 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23121 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23122 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23123 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23124  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23125 EOF
23126 cat >> $CONFIG_STATUS <<EOF
23127
23128 # Protect against being on the right side of a sed subst in config.status.
23129 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23130  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23131 $ac_vpsub
23132 $extrasub
23133 s%@SHELL@%$SHELL%g
23134 s%@CFLAGS@%$CFLAGS%g
23135 s%@CPPFLAGS@%$CPPFLAGS%g
23136 s%@CXXFLAGS@%$CXXFLAGS%g
23137 s%@FFLAGS@%$FFLAGS%g
23138 s%@DEFS@%$DEFS%g
23139 s%@LDFLAGS@%$LDFLAGS%g
23140 s%@LIBS@%$LIBS%g
23141 s%@exec_prefix@%$exec_prefix%g
23142 s%@prefix@%$prefix%g
23143 s%@program_transform_name@%$program_transform_name%g
23144 s%@bindir@%$bindir%g
23145 s%@sbindir@%$sbindir%g
23146 s%@libexecdir@%$libexecdir%g
23147 s%@datadir@%$datadir%g
23148 s%@sysconfdir@%$sysconfdir%g
23149 s%@sharedstatedir@%$sharedstatedir%g
23150 s%@localstatedir@%$localstatedir%g
23151 s%@libdir@%$libdir%g
23152 s%@includedir@%$includedir%g
23153 s%@oldincludedir@%$oldincludedir%g
23154 s%@infodir@%$infodir%g
23155 s%@mandir@%$mandir%g
23156 s%@host@%$host%g
23157 s%@host_alias@%$host_alias%g
23158 s%@host_cpu@%$host_cpu%g
23159 s%@host_vendor@%$host_vendor%g
23160 s%@host_os@%$host_os%g
23161 s%@target@%$target%g
23162 s%@target_alias@%$target_alias%g
23163 s%@target_cpu@%$target_cpu%g
23164 s%@target_vendor@%$target_vendor%g
23165 s%@target_os@%$target_os%g
23166 s%@build@%$build%g
23167 s%@build_alias@%$build_alias%g
23168 s%@build_cpu@%$build_cpu%g
23169 s%@build_vendor@%$build_vendor%g
23170 s%@build_os@%$build_os%g
23171 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23172 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23173 s%@INSTALL_DATA@%$INSTALL_DATA%g
23174 s%@PACKAGE@%$PACKAGE%g
23175 s%@VERSION@%$VERSION%g
23176 s%@ACLOCAL@%$ACLOCAL%g
23177 s%@AUTOCONF@%$AUTOCONF%g
23178 s%@AUTOMAKE@%$AUTOMAKE%g
23179 s%@AUTOHEADER@%$AUTOHEADER%g
23180 s%@MAKEINFO@%$MAKEINFO%g
23181 s%@install_sh@%$install_sh%g
23182 s%@AMTAR@%$AMTAR%g
23183 s%@AWK@%$AWK%g
23184 s%@AMTARFLAGS@%$AMTARFLAGS%g
23185 s%@SET_MAKE@%$SET_MAKE%g
23186 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23187 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23188 s%@top_builddir@%$top_builddir%g
23189 s%@ldap_subdir@%$ldap_subdir%g
23190 s%@CC@%$CC%g
23191 s%@AR@%$AR%g
23192 s%@LN_S@%$LN_S%g
23193 s%@OBJEXT@%$OBJEXT%g
23194 s%@EXEEXT@%$EXEEXT%g
23195 s%@ECHO@%$ECHO%g
23196 s%@RANLIB@%$RANLIB%g
23197 s%@STRIP@%$STRIP%g
23198 s%@DLLTOOL@%$DLLTOOL%g
23199 s%@AS@%$AS%g
23200 s%@OBJDUMP@%$OBJDUMP%g
23201 s%@CPP@%$CPP%g
23202 s%@LIBTOOL@%$LIBTOOL%g
23203 s%@LN_H@%$LN_H%g
23204 s%@SENDMAIL@%$SENDMAIL%g
23205 s%@EDITOR@%$EDITOR%g
23206 s%@PERLBIN@%$PERLBIN%g
23207 s%@OL_MKDEP@%$OL_MKDEP%g
23208 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23209 s%@LIBOBJS@%$LIBOBJS%g
23210 s%@LIBSRCS@%$LIBSRCS%g
23211 s%@PLAT@%$PLAT%g
23212 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23213 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23214 s%@BUILD_BDB@%$BUILD_BDB%g
23215 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23216 s%@BUILD_LDAP@%$BUILD_LDAP%g
23217 s%@BUILD_LDBM@%$BUILD_LDBM%g
23218 s%@BUILD_META@%$BUILD_META%g
23219 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23220 s%@BUILD_NULL@%$BUILD_NULL%g
23221 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23222 s%@BUILD_PERL@%$BUILD_PERL%g
23223 s%@BUILD_SHELL@%$BUILD_SHELL%g
23224 s%@BUILD_SQL@%$BUILD_SQL%g
23225 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23226 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23227 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23228 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23229 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23230 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23231 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23232 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23233 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23234 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23235 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23236 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23237 s%@LDAP_LIBS@%$LDAP_LIBS%g
23238 s%@LDIF_LIBS@%$LDIF_LIBS%g
23239 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23240 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23241 s%@LDBM_LIBS@%$LDBM_LIBS%g
23242 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23243 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23244 s%@WRAP_LIBS@%$WRAP_LIBS%g
23245 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23246 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23247 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23248 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23249 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23250 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23251 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23252 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23253 s%@KRB4_LIBS@%$KRB4_LIBS%g
23254 s%@KRB5_LIBS@%$KRB5_LIBS%g
23255 s%@READLINE_LIBS@%$READLINE_LIBS%g
23256 s%@SASL_LIBS@%$SASL_LIBS%g
23257 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23258 s%@TLS_LIBS@%$TLS_LIBS%g
23259 s%@MODULES_LIBS@%$MODULES_LIBS%g
23260 s%@AUTH_LIBS@%$AUTH_LIBS%g
23261 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23262 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23263 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23264 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23265
23266 CEOF
23267 EOF
23268
23269 cat >> $CONFIG_STATUS <<\EOF
23270
23271 # Split the substitutions into bite-sized pieces for seds with
23272 # small command number limits, like on Digital OSF/1 and HP-UX.
23273 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23274 ac_file=1 # Number of current file.
23275 ac_beg=1 # First line for current file.
23276 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23277 ac_more_lines=:
23278 ac_sed_cmds=""
23279 while $ac_more_lines; do
23280   if test $ac_beg -gt 1; then
23281     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23282   else
23283     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23284   fi
23285   if test ! -s conftest.s$ac_file; then
23286     ac_more_lines=false
23287     rm -f conftest.s$ac_file
23288   else
23289     if test -z "$ac_sed_cmds"; then
23290       ac_sed_cmds="sed -f conftest.s$ac_file"
23291     else
23292       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23293     fi
23294     ac_file=`expr $ac_file + 1`
23295     ac_beg=$ac_end
23296     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23297   fi
23298 done
23299 if test -z "$ac_sed_cmds"; then
23300   ac_sed_cmds=cat
23301 fi
23302 EOF
23303
23304 cat >> $CONFIG_STATUS <<EOF
23305
23306 CONFIG_FILES=\${CONFIG_FILES-"\
23307 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23308 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23309 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23310 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23311 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23312 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23313 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23314 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23315 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23316 include/Makefile:build/top.mk:include/Makefile.in \
23317 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23318 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23319 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23320 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23321 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23322 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23323 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23324 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23325 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23326 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23327 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23328 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23329 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23330 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23331 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23332 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23333 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23334 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23335 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23336 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23337 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23338 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23339 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23340 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23341 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23342 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23343 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23344 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23345 "}
23346 EOF
23347 cat >> $CONFIG_STATUS <<\EOF
23348 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23349   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23350   case "$ac_file" in
23351   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23352        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23353   *) ac_file_in="${ac_file}.in" ;;
23354   esac
23355
23356   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23357
23358   # Remove last slash and all that follows it.  Not all systems have dirname.
23359   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23360   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23361     # The file is in a subdirectory.
23362     test ! -d "$ac_dir" && mkdir "$ac_dir"
23363     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23364     # A "../" for each directory in $ac_dir_suffix.
23365     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23366   else
23367     ac_dir_suffix= ac_dots=
23368   fi
23369
23370   case "$ac_given_srcdir" in
23371   .)  srcdir=.
23372       if test -z "$ac_dots"; then top_srcdir=.
23373       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23374   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23375   *) # Relative path.
23376     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23377     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23378   esac
23379
23380   case "$ac_given_INSTALL" in
23381   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23382   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23383   esac
23384
23385   echo creating "$ac_file"
23386   rm -f "$ac_file"
23387   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23388   case "$ac_file" in
23389   *[Mm]akefile*) ac_comsub="1i\\
23390 # $configure_input" ;;
23391   *) ac_comsub= ;;
23392   esac
23393
23394   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23395   sed -e "$ac_comsub
23396 s%@configure_input@%$configure_input%g
23397 s%@srcdir@%$srcdir%g
23398 s%@top_srcdir@%$top_srcdir%g
23399 s%@INSTALL@%$INSTALL%g
23400 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23401 fi; done
23402 rm -f conftest.s*
23403
23404 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23405 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23406 #
23407 # ac_d sets the value in "#define NAME VALUE" lines.
23408 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23409 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23410 ac_dC='\3'
23411 ac_dD='%g'
23412 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23413 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23414 ac_uB='\([      ]\)%\1#\2define\3'
23415 ac_uC=' '
23416 ac_uD='\4%g'
23417 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23418 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23419 ac_eB='$%\1#\2define\3'
23420 ac_eC=' '
23421 ac_eD='%g'
23422
23423 if test "${CONFIG_HEADERS+set}" != set; then
23424 EOF
23425 cat >> $CONFIG_STATUS <<EOF
23426   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23427 EOF
23428 cat >> $CONFIG_STATUS <<\EOF
23429 fi
23430 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23431   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23432   case "$ac_file" in
23433   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23434        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23435   *) ac_file_in="${ac_file}.in" ;;
23436   esac
23437
23438   echo creating $ac_file
23439
23440   rm -f conftest.frag conftest.in conftest.out
23441   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23442   cat $ac_file_inputs > conftest.in
23443
23444 EOF
23445
23446 # Transform confdefs.h into a sed script conftest.vals that substitutes
23447 # the proper values into config.h.in to produce config.h.  And first:
23448 # Protect against being on the right side of a sed subst in config.status.
23449 # Protect against being in an unquoted here document in config.status.
23450 rm -f conftest.vals
23451 cat > conftest.hdr <<\EOF
23452 s/[\\&%]/\\&/g
23453 s%[\\$`]%\\&%g
23454 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23455 s%ac_d%ac_u%gp
23456 s%ac_u%ac_e%gp
23457 EOF
23458 sed -n -f conftest.hdr confdefs.h > conftest.vals
23459 rm -f conftest.hdr
23460
23461 # This sed command replaces #undef with comments.  This is necessary, for
23462 # example, in the case of _POSIX_SOURCE, which is predefined and required
23463 # on some systems where configure will not decide to define it.
23464 cat >> conftest.vals <<\EOF
23465 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23466 EOF
23467
23468 # Break up conftest.vals because some shells have a limit on
23469 # the size of here documents, and old seds have small limits too.
23470
23471 rm -f conftest.tail
23472 while :
23473 do
23474   ac_lines=`grep -c . conftest.vals`
23475   # grep -c gives empty output for an empty file on some AIX systems.
23476   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23477   # Write a limited-size here document to conftest.frag.
23478   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23479   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23480   echo 'CEOF
23481   sed -f conftest.frag conftest.in > conftest.out
23482   rm -f conftest.in
23483   mv conftest.out conftest.in
23484 ' >> $CONFIG_STATUS
23485   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23486   rm -f conftest.vals
23487   mv conftest.tail conftest.vals
23488 done
23489 rm -f conftest.vals
23490
23491 cat >> $CONFIG_STATUS <<\EOF
23492   rm -f conftest.frag conftest.h
23493   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23494   cat conftest.in >> conftest.h
23495   rm -f conftest.in
23496   if cmp -s $ac_file conftest.h 2>/dev/null; then
23497     echo "$ac_file is unchanged"
23498     rm -f conftest.h
23499   else
23500     # Remove last slash and all that follows it.  Not all systems have dirname.
23501       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23502       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23503       # The file is in a subdirectory.
23504       test ! -d "$ac_dir" && mkdir "$ac_dir"
23505     fi
23506     rm -f $ac_file
23507     mv conftest.h $ac_file
23508   fi
23509 fi; done
23510
23511 EOF
23512 cat >> $CONFIG_STATUS <<EOF
23513
23514 EOF
23515 cat >> $CONFIG_STATUS <<\EOF
23516
23517 date > stamp-h
23518 echo Please run \"make depend\" to build dependencies
23519
23520 exit 0
23521 EOF
23522 chmod +x $CONFIG_STATUS
23523 rm -fr confdefs* $ac_clean_files
23524 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23525