]> git.sur5r.net Git - openldap/blob - configure
5a4c9f96749c47487084200b52019d5345304874
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.421 2002/06/12 02:55:36 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     --enable-tcl          enable tcl backend [no]"
141 ac_help="$ac_help
142     --with-tcl-module     module type static|dynamic [static]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
583   -program-transform-name | --program-transform-name \
584   | --program-transform-nam | --program-transform-na \
585   | --program-transform-n | --program-transform- \
586   | --program-transform | --program-transfor \
587   | --program-transfo | --program-transf \
588   | --program-trans | --program-tran \
589   | --progr-tra | --program-tr | --program-t)
590     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if 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/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB=`$SHTOOL echo -e %B`
874 TN=`$SHTOOL echo -e %b`
875
876 echo "Configuring $TB$OL_STRING$TN ..."
877
878
879 echo $ac_n "checking host system type""... $ac_c" 1>&6
880 echo "configure:881: checking host system type" >&5
881 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
882
883 # Make sure we can run config.sub.
884   if $ac_config_sub sun4 >/dev/null 2>&1; then :
885     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
886   fi
887
888   ac_cv_host_alias=$host
889   case "$ac_cv_host_alias" in
890   NONE)
891     case $nonopt in
892     NONE)
893       if ac_cv_host_alias=`$ac_config_guess`; then :
894       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
895       fi ;;
896     *) ac_cv_host_alias=$nonopt ;;
897     esac ;;
898   esac
899
900   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
901   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
902   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
903   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
904 else
905   echo $ac_n "(cached) $ac_c" 1>&6
906 fi
907
908 echo "$ac_t""$ac_cv_host" 1>&6
909
910 host=$ac_cv_host
911 host_alias=$ac_cv_host_alias
912 host_cpu=$ac_cv_host_cpu
913 host_vendor=$ac_cv_host_vendor
914 host_os=$ac_cv_host_os
915
916
917
918
919
920 echo $ac_n "checking target system type""... $ac_c" 1>&6
921 echo "configure:922: checking target system type" >&5
922 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
923
924 # Make sure we can run config.sub.
925   if $ac_config_sub sun4 >/dev/null 2>&1; then :
926     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
927   fi
928
929   ac_cv_target_alias=$target
930   case "$ac_cv_target_alias" in
931   NONE)
932     case $nonopt in
933     NONE)
934       ac_cv_target_alias=$host_alias ;;
935
936     *) ac_cv_target_alias=$nonopt ;;
937     esac ;;
938   esac
939
940   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
941   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
942   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
943   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
944 else
945   echo $ac_n "(cached) $ac_c" 1>&6
946 fi
947
948 echo "$ac_t""$ac_cv_target" 1>&6
949
950 target=$ac_cv_target
951 target_alias=$ac_cv_target_alias
952 target_cpu=$ac_cv_target_cpu
953 target_vendor=$ac_cv_target_vendor
954 target_os=$ac_cv_target_os
955
956
957
958
959
960 echo $ac_n "checking build system type""... $ac_c" 1>&6
961 echo "configure:962: checking build system type" >&5
962 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
963
964 # Make sure we can run config.sub.
965   if $ac_config_sub sun4 >/dev/null 2>&1; then :
966     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
967   fi
968
969   ac_cv_build_alias=$build
970   case "$ac_cv_build_alias" in
971   NONE)
972     case $nonopt in
973     NONE)
974       ac_cv_build_alias=$host_alias ;;
975
976     *) ac_cv_build_alias=$nonopt ;;
977     esac ;;
978   esac
979
980   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
981   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
982   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
983   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
984 else
985   echo $ac_n "(cached) $ac_c" 1>&6
986 fi
987
988 echo "$ac_t""$ac_cv_build" 1>&6
989
990 build=$ac_cv_build
991 build_alias=$ac_cv_build_alias
992 build_cpu=$ac_cv_build_cpu
993 build_vendor=$ac_cv_build_vendor
994 build_os=$ac_cv_build_os
995
996
997
998
999
1000 # Do some error checking and defaulting for the host and target type.
1001 # The inputs are:
1002 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1003 #
1004 # The rules are:
1005 # 1. You are not allowed to specify --host, --target, and nonopt at the
1006 #    same time.
1007 # 2. Host defaults to nonopt.
1008 # 3. If nonopt is not specified, then host defaults to the current host,
1009 #    as determined by config.guess.
1010 # 4. Target and build default to nonopt.
1011 # 5. If nonopt is not specified, then target and build default to host.
1012
1013 # The aliases save the names the user supplied, while $host etc.
1014 # will get canonicalized.
1015 case $host---$target---$nonopt in
1016 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1017 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1018 esac
1019
1020 test "$host_alias" != "$target_alias" &&
1021   test "$program_prefix$program_suffix$program_transform_name" = \
1022     NONENONEs,x,x, &&
1023   program_prefix=${target_alias}-
1024
1025
1026 # Find a good install program.  We prefer a C program (faster),
1027 # so one script is as good as another.  But avoid the broken or
1028 # incompatible versions:
1029 # SysV /etc/install, /usr/sbin/install
1030 # SunOS /usr/etc/install
1031 # IRIX /sbin/install
1032 # AIX /bin/install
1033 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1034 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1035 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1036 # ./install, which can be erroneously created by make from ./install.sh.
1037 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1038 echo "configure:1039: checking for a BSD compatible install" >&5
1039 if test -z "$INSTALL"; then
1040 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1044   for ac_dir in $PATH; do
1045     # Account for people who put trailing slashes in PATH elements.
1046     case "$ac_dir/" in
1047     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1048     *)
1049       # OSF1 and SCO ODT 3.0 have their own names for install.
1050       # Don't use installbsd from OSF since it installs stuff as root
1051       # by default.
1052       for ac_prog in ginstall scoinst install; do
1053         if test -f $ac_dir/$ac_prog; then
1054           if test $ac_prog = install &&
1055             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # AIX install.  It has an incompatible calling convention.
1057             :
1058           elif test $ac_prog = install &&
1059             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # program-specific install script used by HP pwplus--don't use.
1061             :
1062           else
1063             ac_cv_path_install="$ac_dir/$ac_prog -c"
1064             break 2
1065           fi
1066         fi
1067       done
1068       ;;
1069     esac
1070   done
1071   IFS="$ac_save_IFS"
1072
1073 fi
1074   if test "${ac_cv_path_install+set}" = set; then
1075     INSTALL="$ac_cv_path_install"
1076   else
1077     # As a last resort, use the slow shell script.  We don't cache a
1078     # path for INSTALL within a source directory, because that will
1079     # break other packages using the cache if that directory is
1080     # removed, or if the path is relative.
1081     INSTALL="$ac_install_sh"
1082   fi
1083 fi
1084 echo "$ac_t""$INSTALL" 1>&6
1085
1086 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1087 # It thinks the first close brace ends the variable substitution.
1088 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1089
1090 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1091
1092 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1093
1094 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1095 echo "configure:1096: checking whether build environment is sane" >&5
1096 # Just in case
1097 sleep 1
1098 echo timestamp > conftestfile
1099 # Do `set' in a subshell so we don't clobber the current shell's
1100 # arguments.  Must try -L first in case configure is actually a
1101 # symlink; some systems play weird games with the mod time of symlinks
1102 # (eg FreeBSD returns the mod time of the symlink's containing
1103 # directory).
1104 if (
1105    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1106    if test "$*" = "X"; then
1107       # -L didn't work.
1108       set X `ls -t $srcdir/configure conftestfile`
1109    fi
1110    if test "$*" != "X $srcdir/configure conftestfile" \
1111       && test "$*" != "X conftestfile $srcdir/configure"; then
1112
1113       # If neither matched, then we have a broken ls.  This can happen
1114       # if, for instance, CONFIG_SHELL is bash and it inherits a
1115       # broken ls alias from the environment.  This has actually
1116       # happened.  Such a system could not be considered "sane".
1117       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1118 alias in your environment" 1>&2; exit 1; }
1119    fi
1120
1121    test "$2" = conftestfile
1122    )
1123 then
1124    # Ok.
1125    :
1126 else
1127    { echo "configure: error: newly created file is older than distributed files!
1128 Check your system clock" 1>&2; exit 1; }
1129 fi
1130 rm -f conftest*
1131 echo "$ac_t""yes" 1>&6
1132 if test "$program_transform_name" = s,x,x,; then
1133   program_transform_name=
1134 else
1135   # Double any \ or $.  echo might interpret backslashes.
1136   cat <<\EOF_SED > conftestsed
1137 s,\\,\\\\,g; s,\$,$$,g
1138 EOF_SED
1139   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1140   rm -f conftestsed
1141 fi
1142 test "$program_prefix" != NONE &&
1143   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1144 # Use a double $ so make ignores it.
1145 test "$program_suffix" != NONE &&
1146   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1147
1148 # sed with no file args requires a program.
1149 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1150
1151 for ac_prog in mawk gawk nawk awk
1152 do
1153 # Extract the first word of "$ac_prog", so it can be a program name with args.
1154 set dummy $ac_prog; ac_word=$2
1155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1156 echo "configure:1157: checking for $ac_word" >&5
1157 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   if test -n "$AWK"; then
1161   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1162 else
1163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1164   ac_dummy="$PATH"
1165   for ac_dir in $ac_dummy; do
1166     test -z "$ac_dir" && ac_dir=.
1167     if test -f $ac_dir/$ac_word; then
1168       ac_cv_prog_AWK="$ac_prog"
1169       break
1170     fi
1171   done
1172   IFS="$ac_save_ifs"
1173 fi
1174 fi
1175 AWK="$ac_cv_prog_AWK"
1176 if test -n "$AWK"; then
1177   echo "$ac_t""$AWK" 1>&6
1178 else
1179   echo "$ac_t""no" 1>&6
1180 fi
1181
1182 test -n "$AWK" && break
1183 done
1184
1185 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1186 echo "configure:1187: checking whether ${MAKE-make} sets \${MAKE}" >&5
1187 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1188 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1189   echo $ac_n "(cached) $ac_c" 1>&6
1190 else
1191   cat > conftestmake <<\EOF
1192 all:
1193         @echo 'ac_maketemp="${MAKE}"'
1194 EOF
1195 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1196 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1197 if test -n "$ac_maketemp"; then
1198   eval ac_cv_prog_make_${ac_make}_set=yes
1199 else
1200   eval ac_cv_prog_make_${ac_make}_set=no
1201 fi
1202 rm -f conftestmake
1203 fi
1204 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1205   echo "$ac_t""yes" 1>&6
1206   SET_MAKE=
1207 else
1208   echo "$ac_t""no" 1>&6
1209   SET_MAKE="MAKE=${MAKE-make}"
1210 fi
1211
1212
1213
1214 PACKAGE=$OL_PACKAGE
1215
1216 VERSION=$OL_VERSION
1217
1218 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1219   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1220 fi
1221
1222
1223
1224 missing_dir=`cd $ac_aux_dir && pwd`
1225 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1226 echo "configure:1227: checking for working aclocal" >&5
1227 # Run test in a subshell; some versions of sh will print an error if
1228 # an executable is not found, even if stderr is redirected.
1229 # Redirect stdin to placate older versions of autoconf.  Sigh.
1230 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1231    ACLOCAL=aclocal
1232    echo "$ac_t""found" 1>&6
1233 else
1234    ACLOCAL="$missing_dir/missing aclocal"
1235    echo "$ac_t""missing" 1>&6
1236 fi
1237
1238 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1239 echo "configure:1240: checking for working autoconf" >&5
1240 # Run test in a subshell; some versions of sh will print an error if
1241 # an executable is not found, even if stderr is redirected.
1242 # Redirect stdin to placate older versions of autoconf.  Sigh.
1243 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1244    AUTOCONF=autoconf
1245    echo "$ac_t""found" 1>&6
1246 else
1247    AUTOCONF="$missing_dir/missing autoconf"
1248    echo "$ac_t""missing" 1>&6
1249 fi
1250
1251 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1252 echo "configure:1253: checking for working automake" >&5
1253 # Run test in a subshell; some versions of sh will print an error if
1254 # an executable is not found, even if stderr is redirected.
1255 # Redirect stdin to placate older versions of autoconf.  Sigh.
1256 if (automake --version) < /dev/null > /dev/null 2>&1; then
1257    AUTOMAKE=automake
1258    echo "$ac_t""found" 1>&6
1259 else
1260    AUTOMAKE="$missing_dir/missing automake"
1261    echo "$ac_t""missing" 1>&6
1262 fi
1263
1264 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1265 echo "configure:1266: checking for working autoheader" >&5
1266 # Run test in a subshell; some versions of sh will print an error if
1267 # an executable is not found, even if stderr is redirected.
1268 # Redirect stdin to placate older versions of autoconf.  Sigh.
1269 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1270    AUTOHEADER=autoheader
1271    echo "$ac_t""found" 1>&6
1272 else
1273    AUTOHEADER="$missing_dir/missing autoheader"
1274    echo "$ac_t""missing" 1>&6
1275 fi
1276
1277 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1278 echo "configure:1279: checking for working makeinfo" >&5
1279 # Run test in a subshell; some versions of sh will print an error if
1280 # an executable is not found, even if stderr is redirected.
1281 # Redirect stdin to placate older versions of autoconf.  Sigh.
1282 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1283    MAKEINFO=makeinfo
1284    echo "$ac_t""found" 1>&6
1285 else
1286    MAKEINFO="$missing_dir/missing makeinfo"
1287    echo "$ac_t""missing" 1>&6
1288 fi
1289
1290 install_sh="$missing_dir/install-sh"
1291 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1292
1293 for ac_prog in gnutar gtar tar
1294 do
1295 # Extract the first word of "$ac_prog", so it can be a program name with args.
1296 set dummy $ac_prog; ac_word=$2
1297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1298 echo "configure:1299: checking for $ac_word" >&5
1299 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1300   echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302   if test -n "$AMTAR"; then
1303   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1304 else
1305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1306   ac_dummy="$PATH"
1307   for ac_dir in $ac_dummy; do
1308     test -z "$ac_dir" && ac_dir=.
1309     if test -f $ac_dir/$ac_word; then
1310       ac_cv_prog_AMTAR="$ac_prog"
1311       break
1312     fi
1313   done
1314   IFS="$ac_save_ifs"
1315 fi
1316 fi
1317 AMTAR="$ac_cv_prog_AMTAR"
1318 if test -n "$AMTAR"; then
1319   echo "$ac_t""$AMTAR" 1>&6
1320 else
1321   echo "$ac_t""no" 1>&6
1322 fi
1323
1324 test -n "$AMTAR" && break
1325 done
1326
1327
1328 AMTARFLAGS=
1329 if test -n "$AMTAR"; then
1330   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1331         AMTARFLAGS=o
1332   fi
1333 fi
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_PACKAGE "$PACKAGE"
1337 EOF
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_VERSION "$VERSION"
1341 EOF
1342
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION $OL_API_INC
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1358 EOF
1359
1360
1361 OPENLDAP_LIBVERSION=$OL_API_LIB
1362
1363 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1364
1365
1366
1367 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1368 echo "configure:1369: checking configure arguments" >&5
1369
1370
1371 top_builddir=`pwd`
1372
1373 ldap_subdir="/openldap"
1374
1375 # Check whether --with-subdir or --without-subdir was given.
1376 if test "${with_subdir+set}" = set; then
1377   withval="$with_subdir"
1378   case "$withval" in
1379         no) ldap_subdir=""
1380                 ;;
1381         yes)
1382                 ;;
1383         /*|\\*)
1384                 ldap_subdir="$withval"
1385                 ;;
1386         *)
1387                 ldap_subdir="/$withval"
1388                 ;;
1389 esac
1390
1391 fi
1392
1393
1394 # OpenLDAP --enable-debug
1395         # Check whether --enable-debug or --disable-debug was given.
1396 if test "${enable_debug+set}" = set; then
1397   enableval="$enable_debug"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1407         fi
1408         ol_enable_debug="$ol_arg"
1409
1410 else
1411         ol_enable_debug="yes"
1412 fi
1413 # end --enable-debug
1414 # OpenLDAP --enable-syslog
1415         # Check whether --enable-syslog or --disable-syslog was given.
1416 if test "${enable_syslog+set}" = set; then
1417   enableval="$enable_syslog"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1427         fi
1428         ol_enable_syslog="$ol_arg"
1429
1430 else
1431         ol_enable_syslog="auto"
1432 fi
1433 # end --enable-syslog
1434 # OpenLDAP --enable-proctitle
1435         # Check whether --enable-proctitle or --disable-proctitle was given.
1436 if test "${enable_proctitle+set}" = set; then
1437   enableval="$enable_proctitle"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1447         fi
1448         ol_enable_proctitle="$ol_arg"
1449
1450 else
1451         ol_enable_proctitle="yes"
1452 fi
1453 # end --enable-proctitle
1454 # OpenLDAP --enable-cache
1455         # Check whether --enable-cache or --disable-cache was given.
1456 if test "${enable_cache+set}" = set; then
1457   enableval="$enable_cache"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1467         fi
1468         ol_enable_cache="$ol_arg"
1469
1470 else
1471         ol_enable_cache="no"
1472 fi
1473 # end --enable-cache
1474 # OpenLDAP --enable-referrals
1475         # Check whether --enable-referrals or --disable-referrals was given.
1476 if test "${enable_referrals+set}" = set; then
1477   enableval="$enable_referrals"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1487         fi
1488         ol_enable_referrals="$ol_arg"
1489
1490 else
1491         ol_enable_referrals="no"
1492 fi
1493 # end --enable-referrals
1494 ol_enable_kbind=${ol_enable_kbind-no}
1495 # OpenLDAP --enable-ipv6
1496         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1497 if test "${enable_ipv6+set}" = set; then
1498   enableval="$enable_ipv6"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1508         fi
1509         ol_enable_ipv6="$ol_arg"
1510
1511 else
1512         ol_enable_ipv6="auto"
1513 fi
1514 # end --enable-ipv6
1515 # OpenLDAP --enable-local
1516         # Check whether --enable-local or --disable-local was given.
1517 if test "${enable_local+set}" = set; then
1518   enableval="$enable_local"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1528         fi
1529         ol_enable_local="$ol_arg"
1530
1531 else
1532         ol_enable_local="auto"
1533 fi
1534 # end --enable-local
1535 # OpenLDAP --enable-x_compile
1536         # Check whether --enable-x_compile or --disable-x_compile was given.
1537 if test "${enable_x_compile+set}" = set; then
1538   enableval="$enable_x_compile"
1539   
1540         ol_arg=invalid
1541         for ol_val in yes no ; do
1542                 if test "$enableval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1548         fi
1549         ol_enable_x_compile="$ol_arg"
1550
1551 else
1552         ol_enable_x_compile="no"
1553 fi
1554 # end --enable-x_compile
1555
1556
1557 # OpenLDAP --with-cyrus_sasl
1558         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1559 if test "${with_cyrus_sasl+set}" = set; then
1560   withval="$with_cyrus_sasl"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no  ; do
1564                 if test "$withval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1570         fi
1571         ol_with_cyrus_sasl="$ol_arg"
1572
1573 else
1574         ol_with_cyrus_sasl="auto"
1575 fi
1576 # end --with-cyrus_sasl
1577
1578 # OpenLDAP --with-fetch
1579         # Check whether --with-fetch or --without-fetch was given.
1580 if test "${with_fetch+set}" = set; then
1581   withval="$with_fetch"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no  ; do
1585                 if test "$withval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1591         fi
1592         ol_with_fetch="$ol_arg"
1593
1594 else
1595         ol_with_fetch="auto"
1596 fi
1597 # end --with-fetch
1598
1599 # OpenLDAP --with-kerberos
1600         # Check whether --with-kerberos or --without-kerberos was given.
1601 if test "${with_kerberos+set}" = set; then
1602   withval="$with_kerberos"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1606                 if test "$withval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1612         fi
1613         ol_with_kerberos="$ol_arg"
1614
1615 else
1616         ol_with_kerberos="auto"
1617 fi
1618 # end --with-kerberos
1619
1620 # OpenLDAP --with-readline
1621         # Check whether --with-readline or --without-readline was given.
1622 if test "${with_readline+set}" = set; then
1623   withval="$with_readline"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto yes no  ; do
1627                 if test "$withval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1633         fi
1634         ol_with_readline="$ol_arg"
1635
1636 else
1637         ol_with_readline="auto"
1638 fi
1639 # end --with-readline
1640
1641 # OpenLDAP --with-threads
1642         # Check whether --with-threads or --without-threads was given.
1643 if test "${with_threads+set}" = set; then
1644   withval="$with_threads"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1654         fi
1655         ol_with_threads="$ol_arg"
1656
1657 else
1658         ol_with_threads="auto"
1659 fi
1660 # end --with-threads
1661
1662 # OpenLDAP --with-tls
1663         # Check whether --with-tls or --without-tls was given.
1664 if test "${with_tls+set}" = set; then
1665   withval="$with_tls"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto ssleay openssl yes no  ; do
1669                 if test "$withval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1675         fi
1676         ol_with_tls="$ol_arg"
1677
1678 else
1679         ol_with_tls="auto"
1680 fi
1681 # end --with-tls
1682
1683 # OpenLDAP --with-yielding_select
1684         # Check whether --with-yielding_select or --without-yielding_select was given.
1685 if test "${with_yielding_select+set}" = set; then
1686   withval="$with_yielding_select"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no manual  ; do
1690                 if test "$withval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1696         fi
1697         ol_with_yielding_select="$ol_arg"
1698
1699 else
1700         ol_with_yielding_select="auto"
1701 fi
1702 # end --with-yielding_select
1703
1704
1705
1706 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1707 if test "${with_xxslapdoptions+set}" = set; then
1708   withval="$with_xxslapdoptions"
1709   :
1710 fi
1711
1712 # OpenLDAP --enable-slapd
1713         # Check whether --enable-slapd or --disable-slapd was given.
1714 if test "${enable_slapd+set}" = set; then
1715   enableval="$enable_slapd"
1716   
1717         ol_arg=invalid
1718         for ol_val in auto yes no ; do
1719                 if test "$enableval" = "$ol_val" ; then
1720                         ol_arg="$ol_val"
1721                 fi
1722         done
1723         if test "$ol_arg" = "invalid" ; then
1724                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1725         fi
1726         ol_enable_slapd="$ol_arg"
1727
1728 else
1729         ol_enable_slapd="yes"
1730 fi
1731 # end --enable-slapd
1732 # OpenLDAP --enable-aci
1733         # Check whether --enable-aci or --disable-aci was given.
1734 if test "${enable_aci+set}" = set; then
1735   enableval="$enable_aci"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1745         fi
1746         ol_enable_aci="$ol_arg"
1747
1748 else
1749         ol_enable_aci="no"
1750 fi
1751 # end --enable-aci
1752 # OpenLDAP --enable-cleartext
1753         # Check whether --enable-cleartext or --disable-cleartext was given.
1754 if test "${enable_cleartext+set}" = set; then
1755   enableval="$enable_cleartext"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1765         fi
1766         ol_enable_cleartext="$ol_arg"
1767
1768 else
1769         ol_enable_cleartext="yes"
1770 fi
1771 # end --enable-cleartext
1772 # OpenLDAP --enable-crypt
1773         # Check whether --enable-crypt or --disable-crypt was given.
1774 if test "${enable_crypt+set}" = set; then
1775   enableval="$enable_crypt"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1785         fi
1786         ol_enable_crypt="$ol_arg"
1787
1788 else
1789         ol_enable_crypt="no"
1790 fi
1791 # end --enable-crypt
1792 # OpenLDAP --enable-dynamic
1793         # Check whether --enable-dynamic or --disable-dynamic was given.
1794 if test "${enable_dynamic+set}" = set; then
1795   enableval="$enable_dynamic"
1796   
1797         ol_arg=invalid
1798         for ol_val in auto yes no ; do
1799                 if test "$enableval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1805         fi
1806         ol_enable_dynamic="$ol_arg"
1807
1808 else
1809         ol_enable_dynamic="no"
1810 fi
1811 # end --enable-dynamic
1812 # OpenLDAP --enable-kpasswd
1813         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1814 if test "${enable_kpasswd+set}" = set; then
1815   enableval="$enable_kpasswd"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1825         fi
1826         ol_enable_kpasswd="$ol_arg"
1827
1828 else
1829         ol_enable_kpasswd="no"
1830 fi
1831 # end --enable-kpasswd
1832 # OpenLDAP --enable-lmpasswd
1833         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1834 if test "${enable_lmpasswd+set}" = set; then
1835   enableval="$enable_lmpasswd"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1845         fi
1846         ol_enable_lmpasswd="$ol_arg"
1847
1848 else
1849         ol_enable_lmpasswd="no"
1850 fi
1851 # end --enable-lmpasswd
1852 # OpenLDAP --enable-spasswd
1853         # Check whether --enable-spasswd or --disable-spasswd was given.
1854 if test "${enable_spasswd+set}" = set; then
1855   enableval="$enable_spasswd"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1865         fi
1866         ol_enable_spasswd="$ol_arg"
1867
1868 else
1869         ol_enable_spasswd="no"
1870 fi
1871 # end --enable-spasswd
1872 # OpenLDAP --enable-modules
1873         # Check whether --enable-modules or --disable-modules was given.
1874 if test "${enable_modules+set}" = set; then
1875   enableval="$enable_modules"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1885         fi
1886         ol_enable_modules="$ol_arg"
1887
1888 else
1889         ol_enable_modules="no"
1890 fi
1891 # end --enable-modules
1892 ol_enable_multimaster=${ol_enable_multimaster-no}
1893 # OpenLDAP --enable-phonetic
1894         # Check whether --enable-phonetic or --disable-phonetic was given.
1895 if test "${enable_phonetic+set}" = set; then
1896   enableval="$enable_phonetic"
1897   
1898         ol_arg=invalid
1899         for ol_val in auto yes no ; do
1900                 if test "$enableval" = "$ol_val" ; then
1901                         ol_arg="$ol_val"
1902                 fi
1903         done
1904         if test "$ol_arg" = "invalid" ; then
1905                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1906         fi
1907         ol_enable_phonetic="$ol_arg"
1908
1909 else
1910         ol_enable_phonetic="no"
1911 fi
1912 # end --enable-phonetic
1913 # OpenLDAP --enable-rewrite
1914         # Check whether --enable-rewrite or --disable-rewrite was given.
1915 if test "${enable_rewrite+set}" = set; then
1916   enableval="$enable_rewrite"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1926         fi
1927         ol_enable_rewrite="$ol_arg"
1928
1929 else
1930         ol_enable_rewrite="no"
1931 fi
1932 # end --enable-rewrite
1933 # OpenLDAP --enable-rlookups
1934         # Check whether --enable-rlookups or --disable-rlookups was given.
1935 if test "${enable_rlookups+set}" = set; then
1936   enableval="$enable_rlookups"
1937   
1938         ol_arg=invalid
1939         for ol_val in auto yes no ; do
1940                 if test "$enableval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1946         fi
1947         ol_enable_rlookups="$ol_arg"
1948
1949 else
1950         ol_enable_rlookups="no"
1951 fi
1952 # end --enable-rlookups
1953 # OpenLDAP --enable-slp
1954         # Check whether --enable-slp or --disable-slp was given.
1955 if test "${enable_slp+set}" = set; then
1956   enableval="$enable_slp"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1966         fi
1967         ol_enable_slp="$ol_arg"
1968
1969 else
1970         ol_enable_slp="no"
1971 fi
1972 # end --enable-slp
1973 # OpenLDAP --enable-wrappers
1974         # Check whether --enable-wrappers or --disable-wrappers was given.
1975 if test "${enable_wrappers+set}" = set; then
1976   enableval="$enable_wrappers"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto yes no ; do
1980                 if test "$enableval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1986         fi
1987         ol_enable_wrappers="$ol_arg"
1988
1989 else
1990         ol_enable_wrappers="no"
1991 fi
1992 # end --enable-wrappers
1993
1994 # OpenLDAP --enable-bdb
1995         # Check whether --enable-bdb or --disable-bdb was given.
1996 if test "${enable_bdb+set}" = set; then
1997   enableval="$enable_bdb"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2007         fi
2008         ol_enable_bdb="$ol_arg"
2009
2010 else
2011         ol_enable_bdb="yes"
2012 fi
2013 # end --enable-bdb
2014 # OpenLDAP --with-bdb_module
2015         # Check whether --with-bdb_module or --without-bdb_module was given.
2016 if test "${with_bdb_module+set}" = set; then
2017   withval="$with_bdb_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_bdb_module="$ol_arg"
2029
2030 else
2031         ol_with_bdb_module="static"
2032 fi
2033 # end --with-bdb_module
2034
2035 # OpenLDAP --enable-dnssrv
2036         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2037 if test "${enable_dnssrv+set}" = set; then
2038   enableval="$enable_dnssrv"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2048         fi
2049         ol_enable_dnssrv="$ol_arg"
2050
2051 else
2052         ol_enable_dnssrv="no"
2053 fi
2054 # end --enable-dnssrv
2055 # OpenLDAP --with-dnssrv_module
2056         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2057 if test "${with_dnssrv_module+set}" = set; then
2058   withval="$with_dnssrv_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_dnssrv_module="$ol_arg"
2070
2071 else
2072         ol_with_dnssrv_module="static"
2073 fi
2074 # end --with-dnssrv_module
2075
2076 # OpenLDAP --enable-ldap
2077         # Check whether --enable-ldap or --disable-ldap was given.
2078 if test "${enable_ldap+set}" = set; then
2079   enableval="$enable_ldap"
2080   
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2089         fi
2090         ol_enable_ldap="$ol_arg"
2091
2092 else
2093         ol_enable_ldap="no"
2094 fi
2095 # end --enable-ldap
2096 # OpenLDAP --with-ldap_module
2097         # Check whether --with-ldap_module or --without-ldap_module was given.
2098 if test "${with_ldap_module+set}" = set; then
2099   withval="$with_ldap_module"
2100   
2101         ol_arg=invalid
2102         for ol_val in static dynamic ; do
2103                 if test "$withval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2109         fi
2110         ol_with_ldap_module="$ol_arg"
2111
2112 else
2113         ol_with_ldap_module="static"
2114 fi
2115 # end --with-ldap_module
2116
2117 # OpenLDAP --enable-ldbm
2118         # Check whether --enable-ldbm or --disable-ldbm was given.
2119 if test "${enable_ldbm+set}" = set; then
2120   enableval="$enable_ldbm"
2121   
2122         ol_arg=invalid
2123         for ol_val in auto yes no ; do
2124                 if test "$enableval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2130         fi
2131         ol_enable_ldbm="$ol_arg"
2132
2133 else
2134         ol_enable_ldbm="no"
2135 fi
2136 # end --enable-ldbm
2137 # OpenLDAP --with-ldbm_api
2138         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2139 if test "${with_ldbm_api+set}" = set; then
2140   withval="$with_ldbm_api"
2141   
2142         ol_arg=invalid
2143         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2144                 if test "$withval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2150         fi
2151         ol_with_ldbm_api="$ol_arg"
2152
2153 else
2154         ol_with_ldbm_api="auto"
2155 fi
2156 # end --with-ldbm_api
2157
2158 # OpenLDAP --with-ldbm_module
2159         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2160 if test "${with_ldbm_module+set}" = set; then
2161   withval="$with_ldbm_module"
2162   
2163         ol_arg=invalid
2164         for ol_val in static dynamic ; do
2165                 if test "$withval" = "$ol_val" ; then
2166                         ol_arg="$ol_val"
2167                 fi
2168         done
2169         if test "$ol_arg" = "invalid" ; then
2170                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2171         fi
2172         ol_with_ldbm_module="$ol_arg"
2173
2174 else
2175         ol_with_ldbm_module="static"
2176 fi
2177 # end --with-ldbm_module
2178
2179 # OpenLDAP --with-ldbm_type
2180         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2181 if test "${with_ldbm_type+set}" = set; then
2182   withval="$with_ldbm_type"
2183   
2184         ol_arg=invalid
2185         for ol_val in auto btree hash ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2192         fi
2193         ol_with_ldbm_type="$ol_arg"
2194
2195 else
2196         ol_with_ldbm_type="auto"
2197 fi
2198 # end --with-ldbm_type
2199
2200 # OpenLDAP --enable-meta
2201         # Check whether --enable-meta or --disable-meta was given.
2202 if test "${enable_meta+set}" = set; then
2203   enableval="$enable_meta"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2213         fi
2214         ol_enable_meta="$ol_arg"
2215
2216 else
2217         ol_enable_meta="no"
2218 fi
2219 # end --enable-meta
2220 # OpenLDAP --with-meta_module
2221         # Check whether --with-meta_module or --without-meta_module was given.
2222 if test "${with_meta_module+set}" = set; then
2223   withval="$with_meta_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_meta_module="$ol_arg"
2235
2236 else
2237         ol_with_meta_module="static"
2238 fi
2239 # end --with-meta_module
2240
2241 # OpenLDAP --enable-monitor
2242         # Check whether --enable-monitor or --disable-monitor was given.
2243 if test "${enable_monitor+set}" = set; then
2244   enableval="$enable_monitor"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2254         fi
2255         ol_enable_monitor="$ol_arg"
2256
2257 else
2258         ol_enable_monitor="no"
2259 fi
2260 # end --enable-monitor
2261 # OpenLDAP --with-monitor_module
2262         # Check whether --with-monitor_module or --without-monitor_module was given.
2263 if test "${with_monitor_module+set}" = set; then
2264   withval="$with_monitor_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_monitor_module="$ol_arg"
2276
2277 else
2278         ol_with_monitor_module="static"
2279 fi
2280 # end --with-monitor_module
2281
2282 # OpenLDAP --enable-null
2283         # Check whether --enable-null or --disable-null was given.
2284 if test "${enable_null+set}" = set; then
2285   enableval="$enable_null"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2295         fi
2296         ol_enable_null="$ol_arg"
2297
2298 else
2299         ol_enable_null="no"
2300 fi
2301 # end --enable-null
2302 # OpenLDAP --with-null_module
2303         # Check whether --with-null_module or --without-null_module was given.
2304 if test "${with_null_module+set}" = set; then
2305   withval="$with_null_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_null_module="$ol_arg"
2317
2318 else
2319         ol_with_null_module="static"
2320 fi
2321 # end --with-null_module
2322
2323 # OpenLDAP --enable-passwd
2324         # Check whether --enable-passwd or --disable-passwd was given.
2325 if test "${enable_passwd+set}" = set; then
2326   enableval="$enable_passwd"
2327   
2328         ol_arg=invalid
2329         for ol_val in auto yes no ; do
2330                 if test "$enableval" = "$ol_val" ; then
2331                         ol_arg="$ol_val"
2332                 fi
2333         done
2334         if test "$ol_arg" = "invalid" ; then
2335                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2336         fi
2337         ol_enable_passwd="$ol_arg"
2338
2339 else
2340         ol_enable_passwd="no"
2341 fi
2342 # end --enable-passwd
2343 # OpenLDAP --with-passwd_module
2344         # Check whether --with-passwd_module or --without-passwd_module was given.
2345 if test "${with_passwd_module+set}" = set; then
2346   withval="$with_passwd_module"
2347   
2348         ol_arg=invalid
2349         for ol_val in static dynamic ; do
2350                 if test "$withval" = "$ol_val" ; then
2351                         ol_arg="$ol_val"
2352                 fi
2353         done
2354         if test "$ol_arg" = "invalid" ; then
2355                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2356         fi
2357         ol_with_passwd_module="$ol_arg"
2358
2359 else
2360         ol_with_passwd_module="static"
2361 fi
2362 # end --with-passwd_module
2363
2364 # OpenLDAP --enable-perl
2365         # Check whether --enable-perl or --disable-perl was given.
2366 if test "${enable_perl+set}" = set; then
2367   enableval="$enable_perl"
2368   
2369         ol_arg=invalid
2370         for ol_val in auto yes no ; do
2371                 if test "$enableval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2377         fi
2378         ol_enable_perl="$ol_arg"
2379
2380 else
2381         ol_enable_perl="no"
2382 fi
2383 # end --enable-perl
2384 # OpenLDAP --with-perl_module
2385         # Check whether --with-perl_module or --without-perl_module was given.
2386 if test "${with_perl_module+set}" = set; then
2387   withval="$with_perl_module"
2388   
2389         ol_arg=invalid
2390         for ol_val in static dynamic ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2397         fi
2398         ol_with_perl_module="$ol_arg"
2399
2400 else
2401         ol_with_perl_module="static"
2402 fi
2403 # end --with-perl_module
2404
2405 # OpenLDAP --enable-shell
2406         # Check whether --enable-shell or --disable-shell was given.
2407 if test "${enable_shell+set}" = set; then
2408   enableval="$enable_shell"
2409   
2410         ol_arg=invalid
2411         for ol_val in auto yes no ; do
2412                 if test "$enableval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2418         fi
2419         ol_enable_shell="$ol_arg"
2420
2421 else
2422         ol_enable_shell="no"
2423 fi
2424 # end --enable-shell
2425 # OpenLDAP --with-shell_module
2426         # Check whether --with-shell_module or --without-shell_module was given.
2427 if test "${with_shell_module+set}" = set; then
2428   withval="$with_shell_module"
2429   
2430         ol_arg=invalid
2431         for ol_val in static dynamic ; do
2432                 if test "$withval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2438         fi
2439         ol_with_shell_module="$ol_arg"
2440
2441 else
2442         ol_with_shell_module="static"
2443 fi
2444 # end --with-shell_module
2445
2446 # OpenLDAP --enable-sql
2447         # Check whether --enable-sql or --disable-sql was given.
2448 if test "${enable_sql+set}" = set; then
2449   enableval="$enable_sql"
2450   
2451         ol_arg=invalid
2452         for ol_val in auto yes no ; do
2453                 if test "$enableval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2459         fi
2460         ol_enable_sql="$ol_arg"
2461
2462 else
2463         ol_enable_sql="no"
2464 fi
2465 # end --enable-sql
2466 # OpenLDAP --with-sql_module
2467         # Check whether --with-sql_module or --without-sql_module was given.
2468 if test "${with_sql_module+set}" = set; then
2469   withval="$with_sql_module"
2470   
2471         ol_arg=invalid
2472         for ol_val in static dynamic ; do
2473                 if test "$withval" = "$ol_val" ; then
2474                         ol_arg="$ol_val"
2475                 fi
2476         done
2477         if test "$ol_arg" = "invalid" ; then
2478                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2479         fi
2480         ol_with_sql_module="$ol_arg"
2481
2482 else
2483         ol_with_sql_module="static"
2484 fi
2485 # end --with-sql_module
2486
2487 # OpenLDAP --enable-tcl
2488         # Check whether --enable-tcl or --disable-tcl was given.
2489 if test "${enable_tcl+set}" = set; then
2490   enableval="$enable_tcl"
2491   
2492         ol_arg=invalid
2493         for ol_val in auto yes no ; do
2494                 if test "$enableval" = "$ol_val" ; then
2495                         ol_arg="$ol_val"
2496                 fi
2497         done
2498         if test "$ol_arg" = "invalid" ; then
2499                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2500         fi
2501         ol_enable_tcl="$ol_arg"
2502
2503 else
2504         ol_enable_tcl="no"
2505 fi
2506 # end --enable-tcl
2507 # OpenLDAP --with-tcl_module
2508         # Check whether --with-tcl_module or --without-tcl_module was given.
2509 if test "${with_tcl_module+set}" = set; then
2510   withval="$with_tcl_module"
2511   
2512         ol_arg=invalid
2513         for ol_val in static dynamic ; do
2514                 if test "$withval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2520         fi
2521         ol_with_tcl_module="$ol_arg"
2522
2523 else
2524         ol_with_tcl_module="static"
2525 fi
2526 # end --with-tcl_module
2527
2528
2529 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2530 if test "${with_xxslurpdoptions+set}" = set; then
2531   withval="$with_xxslurpdoptions"
2532   :
2533 fi
2534
2535 # OpenLDAP --enable-slurpd
2536         # Check whether --enable-slurpd or --disable-slurpd was given.
2537 if test "${enable_slurpd+set}" = set; then
2538   enableval="$enable_slurpd"
2539   
2540         ol_arg=invalid
2541         for ol_val in auto yes no ; do
2542                 if test "$enableval" = "$ol_val" ; then
2543                         ol_arg="$ol_val"
2544                 fi
2545         done
2546         if test "$ol_arg" = "invalid" ; then
2547                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2548         fi
2549         ol_enable_slurpd="$ol_arg"
2550
2551 else
2552         ol_enable_slurpd="auto"
2553 fi
2554 # end --enable-slurpd
2555
2556 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2557 if test "${with_xxliboptions+set}" = set; then
2558   withval="$with_xxliboptions"
2559   :
2560 fi
2561
2562 # Check whether --enable-static or --disable-static was given.
2563 if test "${enable_static+set}" = set; then
2564   enableval="$enable_static"
2565   p=${PACKAGE-default}
2566 case $enableval in
2567 yes) enable_static=yes ;;
2568 no) enable_static=no ;;
2569 *)
2570   enable_static=no
2571   # Look at the argument we got.  We use all the common list separators.
2572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2573   for pkg in $enableval; do
2574     if test "X$pkg" = "X$p"; then
2575       enable_static=yes
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579   ;;
2580 esac
2581 else
2582   enable_static=yes
2583 fi
2584
2585 # Check whether --enable-shared or --disable-shared was given.
2586 if test "${enable_shared+set}" = set; then
2587   enableval="$enable_shared"
2588   p=${PACKAGE-default}
2589 case $enableval in
2590 yes) enable_shared=yes ;;
2591 no) enable_shared=no ;;
2592 *)
2593   enable_shared=no
2594   # Look at the argument we got.  We use all the common list separators.
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2596   for pkg in $enableval; do
2597     if test "X$pkg" = "X$p"; then
2598       enable_shared=yes
2599     fi
2600   done
2601   IFS="$ac_save_ifs"
2602   ;;
2603 esac
2604 else
2605   enable_shared=yes
2606 fi
2607
2608
2609
2610 # validate options
2611 if test $ol_enable_slapd = no ; then
2612                 if test $ol_enable_bdb = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2614         fi
2615         if test $ol_enable_dnssrv = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2617         fi
2618         if test $ol_enable_ldap = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2620         fi
2621         if test $ol_enable_ldbm = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2623         fi
2624         if test $ol_enable_meta = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2626         fi
2627         if test $ol_enable_monitor = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2629         fi
2630         if test $ol_enable_null = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2632         fi
2633         if test $ol_enable_passwd = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2635         fi
2636         if test $ol_enable_perl = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2638         fi
2639         if test $ol_enable_shell = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2641         fi
2642         if test $ol_enable_tcl = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2644         fi
2645         if test $ol_enable_sql = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2647         fi
2648         if test $ol_enable_modules = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2650         fi
2651         if test $ol_enable_multimaster = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2653         fi
2654         if test $ol_enable_wrappers = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2656         fi
2657         if test $ol_enable_phonetic = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2659         fi
2660         if test $ol_enable_rlookups = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2662         fi
2663         if test $ol_enable_aci = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2665         fi
2666         if test $ol_with_ldbm_api != auto ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2668         fi
2669         if test $ol_with_ldbm_type != auto ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2671         fi
2672         if test $ol_with_bdb_module != static ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2674         fi
2675         if test $ol_with_dnssrv_module != static ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2677         fi
2678         if test $ol_with_ldap_module != static ; then
2679                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_module != static ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2683         fi
2684         if test $ol_with_meta_module != static ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2686         fi
2687         if test $ol_with_monitor_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2689         fi
2690         if test $ol_with_null_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2692         fi
2693         if test $ol_with_passwd_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2695         fi
2696         if test $ol_with_perl_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2698         fi
2699         if test $ol_with_shell_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2701         fi
2702         if test $ol_with_tcl_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2704         fi
2705         if test $ol_with_sql_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2707         fi
2708         if test $ol_enable_slurpd = yes ; then
2709                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2710         fi
2711         if test $ol_enable_rewrite = yes ; then
2712                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2713         fi
2714
2715         # force settings to no
2716         ol_enable_bdb=no
2717         ol_enable_dnssrv=no
2718         ol_enable_ldap=no
2719         ol_enable_ldbm=no
2720         ol_enable_meta=no
2721         ol_enable_monitor=no
2722         ol_enable_null=no
2723         ol_enable_passwd=no
2724         ol_enable_perl=no
2725         ol_enable_shell=no
2726         ol_enable_tcl=no
2727         ol_enable_sql=no
2728
2729         ol_enable_modules=no
2730         ol_enable_multimaster=no
2731         ol_enable_phonetic=no
2732         ol_enable_rlookups=no
2733         ol_enable_aci=no
2734         ol_enable_wrappers=no
2735         ol_enable_dynamic=no
2736
2737         ol_with_ldbm_api=no
2738         ol_with_ldbm_type=no
2739
2740         ol_with_bdb_module=static
2741         ol_with_dnssrv_module=static
2742         ol_with_ldap_module=static
2743         ol_with_ldbm_module=static
2744         ol_with_meta_module=static
2745         ol_with_monitor_module=static
2746         ol_with_null_module=static
2747         ol_with_passwd_module=static
2748         ol_with_perl_module=static
2749         ol_with_shell_module=static
2750         ol_with_tcl_module=static
2751         ol_with_sql_module=static
2752
2753         ol_enable_slurpd=no
2754
2755         ol_enable_rewrite=no
2756
2757 elif test $ol_enable_ldbm = no ; then
2758         
2759         if test $ol_with_ldbm_api != auto ; then
2760                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2761         fi
2762
2763         if test $ol_with_ldbm_type != auto ; then
2764                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2765         fi
2766
2767         if test $ol_with_ldbm_module != static ; then
2768                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2769         fi
2770
2771         if test $ol_enable_modules != yes -a \
2772                 $ol_enable_bdb = no -a \
2773                 $ol_enable_dnssrv = no -a \
2774                 $ol_enable_ldap = no -a \
2775                 $ol_enable_meta = no -a \
2776                 $ol_enable_monitor = no -a \
2777                 $ol_enable_null = no -a \
2778                 $ol_enable_passwd = no -a \
2779                 $ol_enable_perl = no -a \
2780                 $ol_enable_shell = no -a \
2781                 $ol_enable_sql = no -a \
2782                 $ol_enable_tcl = no ; then
2783
2784                 if test $ol_enable_slapd = yes ; then
2785                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2786                 else
2787                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2788                         ol_enable_slapd=no
2789                 fi
2790         fi
2791
2792         ol_with_ldbm_api=no
2793         ol_with_ldbm_type=no
2794         ol_with_ldbm_module=static
2795
2796         if test $ol_enable_bdb != no ; then
2797                 ol_with_ldbm_api=berkeley
2798         fi
2799
2800 else
2801                 if test $ol_with_ldbm_api = gdbm -a \
2802                 $ol_with_ldbm_type = btree ; then
2803                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2804         fi
2805         if test $ol_with_ldbm_api = mdbm -a \
2806                 $ol_with_ldbm_type = btree ; then
2807                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2808         fi
2809         if test $ol_with_ldbm_api = ndbm -a \
2810                 $ol_with_ldbm_type = btree ; then
2811                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2812         fi
2813
2814         if test $ol_enable_bdb = yes ; then
2815                 if test $ol_with_ldbm_api = auto ; then
2816                         ol_with_ldbm_api=berkeley
2817                 elif test $ol_with_ldbm_api != berkeley ; then
2818                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2819                 fi
2820
2821         elif test $ol_enable_bdb = auto ; then
2822                 if test $ol_with_ldbm_api != berkeley \
2823                         -o $ol_with_ldbm_api != auto ; then
2824                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2825                         ol_enable_bdb=no
2826                 fi
2827         fi
2828 fi
2829
2830 if test $ol_enable_slurpd = yes ; then
2831                 if test $ol_with_threads = no ; then
2832                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2833         fi
2834 fi
2835
2836 if test $ol_enable_lmpasswd = yes ; then
2837         if test $ol_with_tls = no ; then
2838                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2839         fi
2840 fi
2841
2842 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2843         if test $ol_with_kerberos = no ; then
2844                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2845         elif test $ol_with_kerberos = auto ; then
2846                 ol_with_kerberos=yes
2847         fi
2848
2849 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2850         if test $ol_with_kerberos = auto ; then
2851                 ol_with_kerberos=no
2852         elif test $ol_with_kerberos != no ; then
2853                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2854                 ol_with_kerberos=no
2855         fi
2856 fi
2857
2858 if test $ol_enable_spasswd = yes ; then
2859         if test $ol_with_cyrus_sasl = no ; then
2860                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2861         fi
2862         ol_with_cyrus_sasl=yes
2863 fi
2864
2865 echo "$ac_t""done" 1>&6
2866
2867 LDAP_LIBS=
2868 LDIF_LIBS=
2869 LDBM_LIB=
2870 LDBM_LIBS=
2871 LTHREAD_LIBS=
2872 LUTIL_LIBS=
2873
2874 SLAPD_LIBS=
2875 SLURPD_LIBS=
2876
2877 BUILD_SLAPD=no
2878 BUILD_SLURPD=no
2879
2880 BUILD_THREAD=no
2881
2882 BUILD_BDB=no
2883 BUILD_DNSSRV=no
2884 BUILD_LDAP=no
2885 BUILD_LDBM=no
2886 BUILD_META=no
2887 BUILD_MONITOR=no
2888 BUILD_NULL=no
2889 BUILD_PASSWD=no
2890 BUILD_PERL=no
2891 BUILD_SHELL=no
2892 BUILD_SQL=no
2893 BUILD_TCL=no
2894
2895 BUILD_BDB_DYNAMIC=static
2896 BUILD_DNSSRV_DYNAMIC=static
2897 BUILD_LDAP_DYNAMIC=static
2898 BUILD_LDBM_DYNAMIC=static
2899 BUILD_META_DYNAMIC=static
2900 BUILD_MONITOR_DYNAMIC=static
2901 BUILD_NULL_DYNAMIC=static
2902 BUILD_PASSWD_DYNAMIC=static
2903 BUILD_PERL_DYNAMIC=static
2904 BUILD_SHELL_DYNAMIC=static
2905 BUILD_TCL_DYNAMIC=static
2906 BUILD_SQL_DYNAMIC=static
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 MOD_TCL_LIB=
2923 KRB4_LIBS=
2924 KRB5_LIBS=
2925 READLINE_LIBS=
2926 SASL_LIBS=
2927 TERMCAP_LIBS=
2928 TLS_LIBS=
2929 MODULES_LIBS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108
3109 fi
3110
3111
3112 if test -z "${AR}"; then
3113         for ac_prog in ar gar
3114 do
3115 # Extract the first word of "$ac_prog", so it can be a program name with args.
3116 set dummy $ac_prog; ac_word=$2
3117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3118 echo "configure:3119: checking for $ac_word" >&5
3119 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3120   echo $ac_n "(cached) $ac_c" 1>&6
3121 else
3122   if test -n "$AR"; then
3123   ac_cv_prog_AR="$AR" # Let the user override the test.
3124 else
3125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3126   ac_dummy="$PATH"
3127   for ac_dir in $ac_dummy; do
3128     test -z "$ac_dir" && ac_dir=.
3129     if test -f $ac_dir/$ac_word; then
3130       ac_cv_prog_AR="$ac_prog"
3131       break
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135 fi
3136 fi
3137 AR="$ac_cv_prog_AR"
3138 if test -n "$AR"; then
3139   echo "$ac_t""$AR" 1>&6
3140 else
3141   echo "$ac_t""no" 1>&6
3142 fi
3143
3144 test -n "$AR" && break
3145 done
3146 test -n "$AR" || AR="missing"
3147
3148
3149         if test "${AR}" = "missing" ; then
3150                 { echo "configure: error: Unable to locate ar(1).  Check PATH or set AR." 1>&2; exit 1; }
3151         fi
3152 fi
3153
3154
3155
3156 # Find the correct PATH separator.  Usually this is `:', but
3157 # DJGPP uses `;' like DOS.
3158 if test "X${PATH_SEPARATOR+set}" != Xset; then
3159   UNAME=${UNAME-`uname 2>/dev/null`}
3160   case X$UNAME in
3161     *-DOS) lt_cv_sys_path_separator=';' ;;
3162     *)     lt_cv_sys_path_separator=':' ;;
3163   esac
3164   PATH_SEPARATOR=$lt_cv_sys_path_separator
3165 fi
3166
3167 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3168 echo "configure:3169: checking for Cygwin environment" >&5
3169 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3170   echo $ac_n "(cached) $ac_c" 1>&6
3171 else
3172   cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175
3176 int main() {
3177
3178 #ifndef __CYGWIN__
3179 #define __CYGWIN__ __CYGWIN32__
3180 #endif
3181 return __CYGWIN__;
3182 ; return 0; }
3183 EOF
3184 if { (eval echo configure:3185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3185   rm -rf conftest*
3186   ac_cv_cygwin=yes
3187 else
3188   echo "configure: failed program was:" >&5
3189   cat conftest.$ac_ext >&5
3190   rm -rf conftest*
3191   ac_cv_cygwin=no
3192 fi
3193 rm -f conftest*
3194 fi
3195
3196 echo "$ac_t""$ac_cv_cygwin" 1>&6
3197 CYGWIN=
3198 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3199 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3200 echo "configure:3201: checking for mingw32 environment" >&5
3201 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3202   echo $ac_n "(cached) $ac_c" 1>&6
3203 else
3204   cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207
3208 int main() {
3209 return __MINGW32__;
3210 ; return 0; }
3211 EOF
3212 if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3213   rm -rf conftest*
3214   ac_cv_mingw32=yes
3215 else
3216   echo "configure: failed program was:" >&5
3217   cat conftest.$ac_ext >&5
3218   rm -rf conftest*
3219   ac_cv_mingw32=no
3220 fi
3221 rm -f conftest*
3222 fi
3223
3224 echo "$ac_t""$ac_cv_mingw32" 1>&6
3225 MINGW32=
3226 test "$ac_cv_mingw32" = yes && MINGW32=yes
3227 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3228 echo "configure:3229: checking for EMX OS/2 environment" >&5
3229 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3230   echo $ac_n "(cached) $ac_c" 1>&6
3231 else
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235
3236 int main() {
3237 return __EMX__;
3238 ; return 0; }
3239 EOF
3240 if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3241   rm -rf conftest*
3242   ac_cv_emxos2=yes
3243 else
3244   echo "configure: failed program was:" >&5
3245   cat conftest.$ac_ext >&5
3246   rm -rf conftest*
3247   ac_cv_emxos2=no
3248 fi
3249 rm -f conftest*
3250 fi
3251
3252 echo "$ac_t""$ac_cv_emxos2" 1>&6
3253 EMXOS2=
3254 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3255 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3256 echo "configure:3257: checking how to run the C preprocessor" >&5
3257 # On Suns, sometimes $CPP names a directory.
3258 if test -n "$CPP" && test -d "$CPP"; then
3259   CPP=
3260 fi
3261 if test -z "$CPP"; then
3262 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3263   echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265     # This must be in double quotes, not single quotes, because CPP may get
3266   # substituted into the Makefile and "${CC-cc}" will confuse make.
3267   CPP="${CC-cc} -E"
3268   # On the NeXT, cc -E runs the code through the compiler's parser,
3269   # not just through cpp.
3270   cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 #include <assert.h>
3274 Syntax Error
3275 EOF
3276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3277 { (eval echo configure:3278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3279 if test -z "$ac_err"; then
3280   :
3281 else
3282   echo "$ac_err" >&5
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   CPP="${CC-cc} -E -traditional-cpp"
3287   cat > conftest.$ac_ext <<EOF
3288 #line 3289 "configure"
3289 #include "confdefs.h"
3290 #include <assert.h>
3291 Syntax Error
3292 EOF
3293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3294 { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3296 if test -z "$ac_err"; then
3297   :
3298 else
3299   echo "$ac_err" >&5
3300   echo "configure: failed program was:" >&5
3301   cat conftest.$ac_ext >&5
3302   rm -rf conftest*
3303   CPP="${CC-cc} -nologo -E"
3304   cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include <assert.h>
3308 Syntax Error
3309 EOF
3310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3311 { (eval echo configure:3312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3313 if test -z "$ac_err"; then
3314   :
3315 else
3316   echo "$ac_err" >&5
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   CPP=/lib/cpp
3321 fi
3322 rm -f conftest*
3323 fi
3324 rm -f conftest*
3325 fi
3326 rm -f conftest*
3327   ac_cv_prog_CPP="$CPP"
3328 fi
3329   CPP="$ac_cv_prog_CPP"
3330 else
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333 echo "$ac_t""$CPP" 1>&6
3334
3335 # Check whether --enable-fast-install or --disable-fast-install was given.
3336 if test "${enable_fast_install+set}" = set; then
3337   enableval="$enable_fast_install"
3338   p=${PACKAGE-default}
3339 case $enableval in
3340 yes) enable_fast_install=yes ;;
3341 no) enable_fast_install=no ;;
3342 *)
3343   enable_fast_install=no
3344   # Look at the argument we got.  We use all the common list separators.
3345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3346   for pkg in $enableval; do
3347     if test "X$pkg" = "X$p"; then
3348       enable_fast_install=yes
3349     fi
3350   done
3351   IFS="$ac_save_ifs"
3352   ;;
3353 esac
3354 else
3355   enable_fast_install=yes
3356 fi
3357
3358 # Extract the first word of "gcc", so it can be a program name with args.
3359 set dummy gcc; ac_word=$2
3360 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3361 echo "configure:3362: checking for $ac_word" >&5
3362 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3363   echo $ac_n "(cached) $ac_c" 1>&6
3364 else
3365   if test -n "$CC"; then
3366   ac_cv_prog_CC="$CC" # Let the user override the test.
3367 else
3368   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3369   ac_dummy="$PATH"
3370   for ac_dir in $ac_dummy; do
3371     test -z "$ac_dir" && ac_dir=.
3372     if test -f $ac_dir/$ac_word; then
3373       ac_cv_prog_CC="gcc"
3374       break
3375     fi
3376   done
3377   IFS="$ac_save_ifs"
3378 fi
3379 fi
3380 CC="$ac_cv_prog_CC"
3381 if test -n "$CC"; then
3382   echo "$ac_t""$CC" 1>&6
3383 else
3384   echo "$ac_t""no" 1>&6
3385 fi
3386
3387 if test -z "$CC"; then
3388   # Extract the first word of "cc", so it can be a program name with args.
3389 set dummy cc; ac_word=$2
3390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3391 echo "configure:3392: checking for $ac_word" >&5
3392 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3393   echo $ac_n "(cached) $ac_c" 1>&6
3394 else
3395   if test -n "$CC"; then
3396   ac_cv_prog_CC="$CC" # Let the user override the test.
3397 else
3398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3399   ac_prog_rejected=no
3400   ac_dummy="$PATH"
3401   for ac_dir in $ac_dummy; do
3402     test -z "$ac_dir" && ac_dir=.
3403     if test -f $ac_dir/$ac_word; then
3404       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3405         ac_prog_rejected=yes
3406         continue
3407       fi
3408       ac_cv_prog_CC="cc"
3409       break
3410     fi
3411   done
3412   IFS="$ac_save_ifs"
3413 if test $ac_prog_rejected = yes; then
3414   # We found a bogon in the path, so make sure we never use it.
3415   set dummy $ac_cv_prog_CC
3416   shift
3417   if test $# -gt 0; then
3418     # We chose a different compiler from the bogus one.
3419     # However, it has the same basename, so the bogon will be chosen
3420     # first if we set CC to just the basename; use the full file name.
3421     shift
3422     set dummy "$ac_dir/$ac_word" "$@"
3423     shift
3424     ac_cv_prog_CC="$@"
3425   fi
3426 fi
3427 fi
3428 fi
3429 CC="$ac_cv_prog_CC"
3430 if test -n "$CC"; then
3431   echo "$ac_t""$CC" 1>&6
3432 else
3433   echo "$ac_t""no" 1>&6
3434 fi
3435
3436   if test -z "$CC"; then
3437     case "`uname -s`" in
3438     *win32* | *WIN32* | *CYGWIN*)
3439       # Extract the first word of "cl", so it can be a program name with args.
3440 set dummy cl; ac_word=$2
3441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3442 echo "configure:3443: checking for $ac_word" >&5
3443 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3444   echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446   if test -n "$CC"; then
3447   ac_cv_prog_CC="$CC" # Let the user override the test.
3448 else
3449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3450   ac_dummy="$PATH"
3451   for ac_dir in $ac_dummy; do
3452     test -z "$ac_dir" && ac_dir=.
3453     if test -f $ac_dir/$ac_word; then
3454       ac_cv_prog_CC="cl"
3455       break
3456     fi
3457   done
3458   IFS="$ac_save_ifs"
3459 fi
3460 fi
3461 CC="$ac_cv_prog_CC"
3462 if test -n "$CC"; then
3463   echo "$ac_t""$CC" 1>&6
3464 else
3465   echo "$ac_t""no" 1>&6
3466 fi
3467  ;;
3468     esac
3469   fi
3470   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3471 fi
3472
3473 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3474 echo "configure:3475: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3475
3476 ac_ext=c
3477 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3478 ac_cpp='$CPP $CPPFLAGS'
3479 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3480 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3481 cross_compiling=$ac_cv_prog_cc_cross
3482
3483 cat > conftest.$ac_ext << EOF
3484
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487
3488 main(){return(0);}
3489 EOF
3490 if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3491   ac_cv_prog_cc_works=yes
3492   # If we can't run a trivial program, we are probably using a cross compiler.
3493   if (./conftest; exit) 2>/dev/null; then
3494     ac_cv_prog_cc_cross=no
3495   else
3496     ac_cv_prog_cc_cross=yes
3497   fi
3498 else
3499   echo "configure: failed program was:" >&5
3500   cat conftest.$ac_ext >&5
3501   ac_cv_prog_cc_works=no
3502 fi
3503 rm -fr conftest*
3504 ac_ext=c
3505 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3506 ac_cpp='$CPP $CPPFLAGS'
3507 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3508 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3509 cross_compiling=$ac_cv_prog_cc_cross
3510
3511 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3512 if test $ac_cv_prog_cc_works = no; then
3513   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3514 fi
3515 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3516 echo "configure:3517: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3517 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3518 cross_compiling=$ac_cv_prog_cc_cross
3519
3520 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3521 echo "configure:3522: checking whether we are using GNU C" >&5
3522 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3523   echo $ac_n "(cached) $ac_c" 1>&6
3524 else
3525   cat > conftest.c <<EOF
3526 #ifdef __GNUC__
3527   yes;
3528 #endif
3529 EOF
3530 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3531   ac_cv_prog_gcc=yes
3532 else
3533   ac_cv_prog_gcc=no
3534 fi
3535 fi
3536
3537 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3538
3539 if test $ac_cv_prog_gcc = yes; then
3540   GCC=yes
3541 else
3542   GCC=
3543 fi
3544
3545 ac_test_CFLAGS="${CFLAGS+set}"
3546 ac_save_CFLAGS="$CFLAGS"
3547 CFLAGS=
3548 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3549 echo "configure:3550: checking whether ${CC-cc} accepts -g" >&5
3550 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3551   echo $ac_n "(cached) $ac_c" 1>&6
3552 else
3553   echo 'void f(){}' > conftest.c
3554 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3555   ac_cv_prog_cc_g=yes
3556 else
3557   ac_cv_prog_cc_g=no
3558 fi
3559 rm -f conftest*
3560
3561 fi
3562
3563 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3564 if test "$ac_test_CFLAGS" = set; then
3565   CFLAGS="$ac_save_CFLAGS"
3566 elif test $ac_cv_prog_cc_g = yes; then
3567   if test "$GCC" = yes; then
3568     CFLAGS="-g -O2"
3569   else
3570     CFLAGS="-g"
3571   fi
3572 else
3573   if test "$GCC" = yes; then
3574     CFLAGS="-O2"
3575   else
3576     CFLAGS=
3577   fi
3578 fi
3579
3580 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3581 if test "${with_gnu_ld+set}" = set; then
3582   withval="$with_gnu_ld"
3583   test "$withval" = no || with_gnu_ld=yes
3584 else
3585   with_gnu_ld=no
3586 fi
3587
3588 ac_prog=ld
3589 if test "$GCC" = yes; then
3590   # Check if gcc -print-prog-name=ld gives a path.
3591   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3592 echo "configure:3593: checking for ld used by GCC" >&5
3593   case $host in
3594   *-*-mingw*)
3595     # gcc leaves a trailing carriage return which upsets mingw
3596     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3597   *)
3598     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3599   esac
3600   case $ac_prog in
3601     # Accept absolute paths.
3602     [\\/]* | [A-Za-z]:[\\/]*)
3603       re_direlt='/[^/][^/]*/\.\./'
3604       # Canonicalize the path of ld
3605       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3606       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3607         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3608       done
3609       test -z "$LD" && LD="$ac_prog"
3610       ;;
3611   "")
3612     # If it fails, then pretend we aren't using GCC.
3613     ac_prog=ld
3614     ;;
3615   *)
3616     # If it is relative, then search for the first ld in PATH.
3617     with_gnu_ld=unknown
3618     ;;
3619   esac
3620 elif test "$with_gnu_ld" = yes; then
3621   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3622 echo "configure:3623: checking for GNU ld" >&5
3623 else
3624   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3625 echo "configure:3626: checking for non-GNU ld" >&5
3626 fi
3627 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   if test -z "$LD"; then
3631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3632   for ac_dir in $PATH; do
3633     test -z "$ac_dir" && ac_dir=.
3634     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3635       lt_cv_path_LD="$ac_dir/$ac_prog"
3636       # Check to see if the program is GNU ld.  I'd rather use --version,
3637       # but apparently some GNU ld's only accept -v.
3638       # Break only if it was the GNU/non-GNU ld that we prefer.
3639       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3640         test "$with_gnu_ld" != no && break
3641       else
3642         test "$with_gnu_ld" != yes && break
3643       fi
3644     fi
3645   done
3646   IFS="$ac_save_ifs"
3647 else
3648   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3649 fi
3650 fi
3651
3652 LD="$lt_cv_path_LD"
3653 if test -n "$LD"; then
3654   echo "$ac_t""$LD" 1>&6
3655 else
3656   echo "$ac_t""no" 1>&6
3657 fi
3658 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3659 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3660 echo "configure:3661: checking if the linker ($LD) is GNU ld" >&5
3661 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3662   echo $ac_n "(cached) $ac_c" 1>&6
3663 else
3664   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3665 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3666   lt_cv_prog_gnu_ld=yes
3667 else
3668   lt_cv_prog_gnu_ld=no
3669 fi
3670 fi
3671
3672 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3673 with_gnu_ld=$lt_cv_prog_gnu_ld
3674
3675
3676 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3677 echo "configure:3678: checking for $LD option to reload object files" >&5
3678 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   lt_cv_ld_reload_flag='-r'
3682 fi
3683
3684 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3685 reload_flag=$lt_cv_ld_reload_flag
3686 test -n "$reload_flag" && reload_flag=" $reload_flag"
3687
3688 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3689 echo "configure:3690: checking for BSD-compatible nm" >&5
3690 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   if test -n "$NM"; then
3694   # Let the user override the test.
3695   lt_cv_path_NM="$NM"
3696 else
3697   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3698   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3699     test -z "$ac_dir" && ac_dir=.
3700     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3701     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3702       # Check to see if the nm accepts a BSD-compat flag.
3703       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3704       #   nm: unknown option "B" ignored
3705       # Tru64's nm complains that /dev/null is an invalid object file
3706       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3707         lt_cv_path_NM="$tmp_nm -B"
3708         break
3709       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3710         lt_cv_path_NM="$tmp_nm -p"
3711         break
3712       else
3713         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3714         continue # so that we can try to find one that supports BSD flags
3715       fi
3716     fi
3717   done
3718   IFS="$ac_save_ifs"
3719   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3720 fi
3721 fi
3722
3723 NM="$lt_cv_path_NM"
3724 echo "$ac_t""$NM" 1>&6
3725
3726 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3727 echo "configure:3728: checking whether ln -s works" >&5
3728 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3729   echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731   rm -f conftestdata
3732 if ln -s X conftestdata 2>/dev/null
3733 then
3734   rm -f conftestdata
3735   ac_cv_prog_LN_S="ln -s"
3736 else
3737   ac_cv_prog_LN_S=ln
3738 fi
3739 fi
3740 LN_S="$ac_cv_prog_LN_S"
3741 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3742   echo "$ac_t""yes" 1>&6
3743 else
3744   echo "$ac_t""no" 1>&6
3745 fi
3746
3747 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3748 echo "configure:3749: checking how to recognise dependant libraries" >&5
3749 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3750   echo $ac_n "(cached) $ac_c" 1>&6
3751 else
3752   lt_cv_file_magic_cmd='$MAGIC_CMD'
3753 lt_cv_file_magic_test_file=
3754 lt_cv_deplibs_check_method='unknown'
3755 # Need to set the preceding variable on all platforms that support
3756 # interlibrary dependencies.
3757 # 'none' -- dependencies not supported.
3758 # `unknown' -- same as none, but documents that we really don't know.
3759 # 'pass_all' -- all dependencies passed with no checks.
3760 # 'test_compile' -- check by making test program.
3761 # 'file_magic [[regex]]' -- check by looking for files in library path
3762 # which responds to the $file_magic_cmd with a given egrep regex.
3763 # If you have `file' or equivalent on your system and you're not sure
3764 # whether `pass_all' will *always* work, you probably want this one.
3765
3766 case $host_os in
3767 aix4* | aix5*)
3768   lt_cv_deplibs_check_method=pass_all
3769   ;;
3770
3771 beos*)
3772   lt_cv_deplibs_check_method=pass_all
3773   ;;
3774
3775 bsdi4*)
3776   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3777   lt_cv_file_magic_cmd='/usr/bin/file -L'
3778   lt_cv_file_magic_test_file=/shlib/libc.so
3779   ;;
3780
3781 cygwin* | mingw* | pw32*)
3782   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3783   lt_cv_file_magic_cmd='$OBJDUMP -f'
3784   ;;
3785
3786 darwin* | rhapsody*)
3787   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3788   lt_cv_file_magic_cmd='/usr/bin/file -L'
3789   case "$host_os" in
3790   rhapsody* | darwin1.[012])
3791     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3792     ;;
3793   *) # Darwin 1.3 on
3794     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3795     ;;
3796   esac
3797   ;;
3798
3799 freebsd*)
3800   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3801     case $host_cpu in
3802     i*86 )
3803       # Not sure whether the presence of OpenBSD here was a mistake.
3804       # Let's accept both of them until this is cleared up.
3805       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3806       lt_cv_file_magic_cmd=/usr/bin/file
3807       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3808       ;;
3809     esac
3810   else
3811     lt_cv_deplibs_check_method=pass_all
3812   fi
3813   ;;
3814
3815 gnu*)
3816   lt_cv_deplibs_check_method=pass_all
3817   ;;
3818
3819 hpux10.20*|hpux11*)
3820   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3821   lt_cv_file_magic_cmd=/usr/bin/file
3822   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3823   ;;
3824
3825 irix5* | irix6*)
3826   case $host_os in
3827   irix5*)
3828     # this will be overridden with pass_all, but let us keep it just in case
3829     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3830     ;;
3831   *)
3832     case $LD in
3833     *-32|*"-32 ") libmagic=32-bit;;
3834     *-n32|*"-n32 ") libmagic=N32;;
3835     *-64|*"-64 ") libmagic=64-bit;;
3836     *) libmagic=never-match;;
3837     esac
3838     # this will be overridden with pass_all, but let us keep it just in case
3839     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3840     ;;
3841   esac
3842   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3843   lt_cv_deplibs_check_method=pass_all
3844   ;;
3845
3846 # This must be Linux ELF.
3847 linux-gnu*)
3848   case $host_cpu in
3849   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3850     lt_cv_deplibs_check_method=pass_all ;;
3851   *)
3852     # glibc up to 2.1.1 does not perform some relocations on ARM
3853     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3854   esac
3855   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3856   ;;
3857
3858 netbsd*)
3859   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3860     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3861   else
3862     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3863   fi
3864   ;;
3865
3866 newos6*)
3867   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3868   lt_cv_file_magic_cmd=/usr/bin/file
3869   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3870   ;;
3871
3872 openbsd*)
3873   lt_cv_file_magic_cmd=/usr/bin/file
3874   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3875   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3876     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3877   else
3878     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3879   fi
3880   ;;
3881
3882 osf3* | osf4* | osf5*)
3883   # this will be overridden with pass_all, but let us keep it just in case
3884   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3885   lt_cv_file_magic_test_file=/shlib/libc.so
3886   lt_cv_deplibs_check_method=pass_all
3887   ;;
3888
3889 sco3.2v5*)
3890   lt_cv_deplibs_check_method=pass_all
3891   ;;
3892
3893 solaris*)
3894   lt_cv_deplibs_check_method=pass_all
3895   lt_cv_file_magic_test_file=/lib/libc.so
3896   ;;
3897
3898 sysv5uw[78]* | sysv4*uw2*)
3899   lt_cv_deplibs_check_method=pass_all
3900   ;;
3901
3902 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3903   case $host_vendor in
3904   motorola)
3905     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]'
3906     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3907     ;;
3908   ncr)
3909     lt_cv_deplibs_check_method=pass_all
3910     ;;
3911   sequent)
3912     lt_cv_file_magic_cmd='/bin/file'
3913     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3914     ;;
3915   sni)
3916     lt_cv_file_magic_cmd='/bin/file'
3917     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3918     lt_cv_file_magic_test_file=/lib/libc.so
3919     ;;
3920   esac
3921   ;;
3922 esac
3923
3924 fi
3925
3926 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3927 file_magic_cmd=$lt_cv_file_magic_cmd
3928 deplibs_check_method=$lt_cv_deplibs_check_method
3929
3930 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3931 echo "configure:3932: checking for object suffix" >&5
3932 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3933   echo $ac_n "(cached) $ac_c" 1>&6
3934 else
3935   rm -f conftest*
3936 echo 'int i = 1;' > conftest.$ac_ext
3937 if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3938   for ac_file in conftest.*; do
3939     case $ac_file in
3940     *.c) ;;
3941     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3942     esac
3943   done
3944 else
3945   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3946 fi
3947 rm -f conftest*
3948 fi
3949
3950 echo "$ac_t""$ac_cv_objext" 1>&6
3951 OBJEXT=$ac_cv_objext
3952 ac_objext=$ac_cv_objext
3953
3954
3955
3956
3957 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3958 echo "configure:3959: checking for executable suffix" >&5
3959 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3963   ac_cv_exeext=.exe
3964 else
3965   rm -f conftest*
3966   echo 'int main () { return 0; }' > conftest.$ac_ext
3967   ac_cv_exeext=
3968   if { (eval echo configure:3969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3969     for file in conftest.*; do
3970       case $file in
3971       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3972       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3973       esac
3974     done
3975   else
3976     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3977   fi
3978   rm -f conftest*
3979   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3980 fi
3981 fi
3982
3983 EXEEXT=""
3984 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3985 echo "$ac_t""${ac_cv_exeext}" 1>&6
3986 ac_exeext=$EXEEXT
3987
3988 if test $host != $build; then
3989   ac_tool_prefix=${host_alias}-
3990 else
3991   ac_tool_prefix=
3992 fi
3993
3994
3995
3996
3997 # Check for command to grab the raw symbol name followed by C symbol from nm.
3998 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3999 echo "configure:4000: checking command to parse $NM output" >&5
4000 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4001   echo $ac_n "(cached) $ac_c" 1>&6
4002 else
4003   
4004 # These are sane defaults that work on at least a few old systems.
4005 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4006
4007 # Character class describing NM global symbol codes.
4008 symcode='[BCDEGRST]'
4009
4010 # Regexp to match symbols that can be accessed directly from C.
4011 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4012
4013 # Transform the above into a raw symbol and a C symbol.
4014 symxfrm='\1 \2\3 \3'
4015
4016 # Transform an extracted symbol line into a proper C declaration
4017 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4018
4019 # Transform an extracted symbol line into symbol name and symbol address
4020 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'"
4021
4022 # Define system-specific variables.
4023 case $host_os in
4024 aix*)
4025   symcode='[BCDT]'
4026   ;;
4027 cygwin* | mingw* | pw32*)
4028   symcode='[ABCDGISTW]'
4029   ;;
4030 hpux*) # Its linker distinguishes data from code symbols
4031   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4032   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'"
4033   ;;
4034 irix*)
4035   symcode='[BCDEGRST]'
4036   ;;
4037 solaris* | sysv5*)
4038   symcode='[BDT]'
4039   ;;
4040 sysv4)
4041   symcode='[DFNSTU]'
4042   ;;
4043 esac
4044
4045 # Handle CRLF in mingw tool chain
4046 opt_cr=
4047 case $host_os in
4048 mingw*)
4049   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4050   ;;
4051 esac
4052
4053 # If we're using GNU nm, then use its standard symbol codes.
4054 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4055   symcode='[ABCDGISTW]'
4056 fi
4057
4058 # Try without a prefix undercore, then with it.
4059 for ac_symprfx in "" "_"; do
4060
4061   # Write the raw and C identifiers.
4062 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4063
4064   # Check to see that the pipe works correctly.
4065   pipe_works=no
4066   rm -f conftest*
4067   cat > conftest.$ac_ext <<EOF
4068 #ifdef __cplusplus
4069 extern "C" {
4070 #endif
4071 char nm_test_var;
4072 void nm_test_func(){}
4073 #ifdef __cplusplus
4074 }
4075 #endif
4076 int main(){nm_test_var='a';nm_test_func();return(0);}
4077 EOF
4078
4079   if { (eval echo configure:4080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4080     # Now try to grab the symbols.
4081     nlist=conftest.nm
4082     if { (eval echo configure:4083: \"$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
4083       # Try sorting and uniquifying the output.
4084       if sort "$nlist" | uniq > "$nlist"T; then
4085         mv -f "$nlist"T "$nlist"
4086       else
4087         rm -f "$nlist"T
4088       fi
4089
4090       # Make sure that we snagged all the symbols we need.
4091       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4092         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4093           cat <<EOF > conftest.$ac_ext
4094 #ifdef __cplusplus
4095 extern "C" {
4096 #endif
4097
4098 EOF
4099           # Now generate the symbol file.
4100           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4101
4102           cat <<EOF >> conftest.$ac_ext
4103 #if defined (__STDC__) && __STDC__
4104 # define lt_ptr void *
4105 #else
4106 # define lt_ptr char *
4107 # define const
4108 #endif
4109
4110 /* The mapping between symbol names and symbols. */
4111 const struct {
4112   const char *name;
4113   lt_ptr address;
4114 }
4115 lt_preloaded_symbols[] =
4116 {
4117 EOF
4118           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4119           cat <<\EOF >> conftest.$ac_ext
4120   {0, (lt_ptr) 0}
4121 };
4122
4123 #ifdef __cplusplus
4124 }
4125 #endif
4126 EOF
4127           # Now try linking the two files.
4128           mv conftest.$ac_objext conftstm.$ac_objext
4129           save_LIBS="$LIBS"
4130           save_CFLAGS="$CFLAGS"
4131           LIBS="conftstm.$ac_objext"
4132           CFLAGS="$CFLAGS$no_builtin_flag"
4133           if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4134             pipe_works=yes
4135           fi
4136           LIBS="$save_LIBS"
4137           CFLAGS="$save_CFLAGS"
4138         else
4139           echo "cannot find nm_test_func in $nlist" >&5
4140         fi
4141       else
4142         echo "cannot find nm_test_var in $nlist" >&5
4143       fi
4144     else
4145       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4146     fi
4147   else
4148     echo "$progname: failed program was:" >&5
4149     cat conftest.$ac_ext >&5
4150   fi
4151   rm -f conftest* conftst*
4152
4153   # Do not use the global_symbol_pipe unless it works.
4154   if test "$pipe_works" = yes; then
4155     break
4156   else
4157     lt_cv_sys_global_symbol_pipe=
4158   fi
4159 done
4160
4161 fi
4162
4163 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4164 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4165   global_symbol_to_cdecl=
4166   global_symbol_to_c_name_address=
4167 else
4168   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4169   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4170 fi
4171 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4172 then
4173   echo "$ac_t""failed" 1>&6
4174 else
4175   echo "$ac_t""ok" 1>&6
4176 fi
4177
4178 for ac_hdr in dlfcn.h
4179 do
4180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4182 echo "configure:4183: checking for $ac_hdr" >&5
4183 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4184   echo $ac_n "(cached) $ac_c" 1>&6
4185 else
4186   cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <$ac_hdr>
4190 EOF
4191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4192 { (eval echo configure:4193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4194 if test -z "$ac_err"; then
4195   rm -rf conftest*
4196   eval "ac_cv_header_$ac_safe=yes"
4197 else
4198   echo "$ac_err" >&5
4199   echo "configure: failed program was:" >&5
4200   cat conftest.$ac_ext >&5
4201   rm -rf conftest*
4202   eval "ac_cv_header_$ac_safe=no"
4203 fi
4204 rm -f conftest*
4205 fi
4206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4207   echo "$ac_t""yes" 1>&6
4208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4209   cat >> confdefs.h <<EOF
4210 #define $ac_tr_hdr 1
4211 EOF
4212  
4213 else
4214   echo "$ac_t""no" 1>&6
4215 fi
4216 done
4217
4218
4219
4220
4221
4222 # Only perform the check for file, if the check method requires it
4223 case $deplibs_check_method in
4224 file_magic*)
4225   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4226     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4227 echo "configure:4228: checking for ${ac_tool_prefix}file" >&5
4228 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4229   echo $ac_n "(cached) $ac_c" 1>&6
4230 else
4231   case $MAGIC_CMD in
4232   /*)
4233   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4234   ;;
4235   ?:/*)
4236   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4237   ;;
4238   *)
4239   ac_save_MAGIC_CMD="$MAGIC_CMD"
4240   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4241   ac_dummy="/usr/bin:$PATH"
4242   for ac_dir in $ac_dummy; do
4243     test -z "$ac_dir" && ac_dir=.
4244     if test -f $ac_dir/${ac_tool_prefix}file; then
4245       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4246       if test -n "$file_magic_test_file"; then
4247         case $deplibs_check_method in
4248         "file_magic "*)
4249           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4250           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4251           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4252             egrep "$file_magic_regex" > /dev/null; then
4253             :
4254           else
4255             cat <<EOF 1>&2
4256
4257 *** Warning: the command libtool uses to detect shared libraries,
4258 *** $file_magic_cmd, produces output that libtool cannot recognize.
4259 *** The result is that libtool may fail to recognize shared libraries
4260 *** as such.  This will affect the creation of libtool libraries that
4261 *** depend on shared libraries, but programs linked with such libtool
4262 *** libraries will work regardless of this problem.  Nevertheless, you
4263 *** may want to report the problem to your system manager and/or to
4264 *** bug-libtool@gnu.org
4265
4266 EOF
4267           fi ;;
4268         esac
4269       fi
4270       break
4271     fi
4272   done
4273   IFS="$ac_save_ifs"
4274   MAGIC_CMD="$ac_save_MAGIC_CMD"
4275   ;;
4276 esac
4277 fi
4278
4279 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4280 if test -n "$MAGIC_CMD"; then
4281   echo "$ac_t""$MAGIC_CMD" 1>&6
4282 else
4283   echo "$ac_t""no" 1>&6
4284 fi
4285
4286 if test -z "$lt_cv_path_MAGIC_CMD"; then
4287   if test -n "$ac_tool_prefix"; then
4288     echo $ac_n "checking for file""... $ac_c" 1>&6
4289 echo "configure:4290: checking for file" >&5
4290 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4291   echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293   case $MAGIC_CMD in
4294   /*)
4295   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4296   ;;
4297   ?:/*)
4298   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4299   ;;
4300   *)
4301   ac_save_MAGIC_CMD="$MAGIC_CMD"
4302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4303   ac_dummy="/usr/bin:$PATH"
4304   for ac_dir in $ac_dummy; do
4305     test -z "$ac_dir" && ac_dir=.
4306     if test -f $ac_dir/file; then
4307       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4308       if test -n "$file_magic_test_file"; then
4309         case $deplibs_check_method in
4310         "file_magic "*)
4311           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4312           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4313           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4314             egrep "$file_magic_regex" > /dev/null; then
4315             :
4316           else
4317             cat <<EOF 1>&2
4318
4319 *** Warning: the command libtool uses to detect shared libraries,
4320 *** $file_magic_cmd, produces output that libtool cannot recognize.
4321 *** The result is that libtool may fail to recognize shared libraries
4322 *** as such.  This will affect the creation of libtool libraries that
4323 *** depend on shared libraries, but programs linked with such libtool
4324 *** libraries will work regardless of this problem.  Nevertheless, you
4325 *** may want to report the problem to your system manager and/or to
4326 *** bug-libtool@gnu.org
4327
4328 EOF
4329           fi ;;
4330         esac
4331       fi
4332       break
4333     fi
4334   done
4335   IFS="$ac_save_ifs"
4336   MAGIC_CMD="$ac_save_MAGIC_CMD"
4337   ;;
4338 esac
4339 fi
4340
4341 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4342 if test -n "$MAGIC_CMD"; then
4343   echo "$ac_t""$MAGIC_CMD" 1>&6
4344 else
4345   echo "$ac_t""no" 1>&6
4346 fi
4347
4348   else
4349     MAGIC_CMD=:
4350   fi
4351 fi
4352
4353   fi
4354   ;;
4355 esac
4356
4357 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4358 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4360 echo "configure:4361: checking for $ac_word" >&5
4361 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4362   echo $ac_n "(cached) $ac_c" 1>&6
4363 else
4364   if test -n "$RANLIB"; then
4365   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4366 else
4367   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4368   ac_dummy="$PATH"
4369   for ac_dir in $ac_dummy; do
4370     test -z "$ac_dir" && ac_dir=.
4371     if test -f $ac_dir/$ac_word; then
4372       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4373       break
4374     fi
4375   done
4376   IFS="$ac_save_ifs"
4377 fi
4378 fi
4379 RANLIB="$ac_cv_prog_RANLIB"
4380 if test -n "$RANLIB"; then
4381   echo "$ac_t""$RANLIB" 1>&6
4382 else
4383   echo "$ac_t""no" 1>&6
4384 fi
4385
4386
4387 if test -z "$ac_cv_prog_RANLIB"; then
4388 if test -n "$ac_tool_prefix"; then
4389   # Extract the first word of "ranlib", so it can be a program name with args.
4390 set dummy ranlib; ac_word=$2
4391 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4392 echo "configure:4393: checking for $ac_word" >&5
4393 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4394   echo $ac_n "(cached) $ac_c" 1>&6
4395 else
4396   if test -n "$RANLIB"; then
4397   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4398 else
4399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4400   ac_dummy="$PATH"
4401   for ac_dir in $ac_dummy; do
4402     test -z "$ac_dir" && ac_dir=.
4403     if test -f $ac_dir/$ac_word; then
4404       ac_cv_prog_RANLIB="ranlib"
4405       break
4406     fi
4407   done
4408   IFS="$ac_save_ifs"
4409   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4410 fi
4411 fi
4412 RANLIB="$ac_cv_prog_RANLIB"
4413 if test -n "$RANLIB"; then
4414   echo "$ac_t""$RANLIB" 1>&6
4415 else
4416   echo "$ac_t""no" 1>&6
4417 fi
4418
4419 else
4420   RANLIB=":"
4421 fi
4422 fi
4423
4424 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4425 set dummy ${ac_tool_prefix}strip; ac_word=$2
4426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4427 echo "configure:4428: checking for $ac_word" >&5
4428 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   if test -n "$STRIP"; then
4432   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4433 else
4434   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4435   ac_dummy="$PATH"
4436   for ac_dir in $ac_dummy; do
4437     test -z "$ac_dir" && ac_dir=.
4438     if test -f $ac_dir/$ac_word; then
4439       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4440       break
4441     fi
4442   done
4443   IFS="$ac_save_ifs"
4444 fi
4445 fi
4446 STRIP="$ac_cv_prog_STRIP"
4447 if test -n "$STRIP"; then
4448   echo "$ac_t""$STRIP" 1>&6
4449 else
4450   echo "$ac_t""no" 1>&6
4451 fi
4452
4453
4454 if test -z "$ac_cv_prog_STRIP"; then
4455 if test -n "$ac_tool_prefix"; then
4456   # Extract the first word of "strip", so it can be a program name with args.
4457 set dummy strip; ac_word=$2
4458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4459 echo "configure:4460: checking for $ac_word" >&5
4460 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   if test -n "$STRIP"; then
4464   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4465 else
4466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4467   ac_dummy="$PATH"
4468   for ac_dir in $ac_dummy; do
4469     test -z "$ac_dir" && ac_dir=.
4470     if test -f $ac_dir/$ac_word; then
4471       ac_cv_prog_STRIP="strip"
4472       break
4473     fi
4474   done
4475   IFS="$ac_save_ifs"
4476   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4477 fi
4478 fi
4479 STRIP="$ac_cv_prog_STRIP"
4480 if test -n "$STRIP"; then
4481   echo "$ac_t""$STRIP" 1>&6
4482 else
4483   echo "$ac_t""no" 1>&6
4484 fi
4485
4486 else
4487   STRIP=":"
4488 fi
4489 fi
4490
4491
4492 enable_dlopen=yes
4493 enable_win32_dll=yes
4494
4495 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4496 if test "${enable_libtool_lock+set}" = set; then
4497   enableval="$enable_libtool_lock"
4498   :
4499 fi
4500
4501 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4502
4503 # Some flags need to be propagated to the compiler or linker for good
4504 # libtool support.
4505 case $host in
4506 *-*-irix6*)
4507   # Find out which ABI we are using.
4508   echo '#line 4509 "configure"' > conftest.$ac_ext
4509   if { (eval echo configure:4510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4510     case `/usr/bin/file conftest.$ac_objext` in
4511     *32-bit*)
4512       LD="${LD-ld} -32"
4513       ;;
4514     *N32*)
4515       LD="${LD-ld} -n32"
4516       ;;
4517     *64-bit*)
4518       LD="${LD-ld} -64"
4519       ;;
4520     esac
4521   fi
4522   rm -rf conftest*
4523   ;;
4524
4525 *-*-sco3.2v5*)
4526   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4527   SAVE_CFLAGS="$CFLAGS"
4528   CFLAGS="$CFLAGS -belf"
4529   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4530 echo "configure:4531: checking whether the C compiler needs -belf" >&5
4531 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   
4535      ac_ext=c
4536 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4537 ac_cpp='$CPP $CPPFLAGS'
4538 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4539 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4540 cross_compiling=$ac_cv_prog_cc_cross
4541
4542      cat > conftest.$ac_ext <<EOF
4543 #line 4544 "configure"
4544 #include "confdefs.h"
4545
4546 int main() {
4547
4548 ; return 0; }
4549 EOF
4550 if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4551   rm -rf conftest*
4552   lt_cv_cc_needs_belf=yes
4553 else
4554   echo "configure: failed program was:" >&5
4555   cat conftest.$ac_ext >&5
4556   rm -rf conftest*
4557   lt_cv_cc_needs_belf=no
4558 fi
4559 rm -f conftest*
4560      ac_ext=c
4561 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4562 ac_cpp='$CPP $CPPFLAGS'
4563 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4564 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4565 cross_compiling=$ac_cv_prog_cc_cross
4566
4567 fi
4568
4569 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4570   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4571     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4572     CFLAGS="$SAVE_CFLAGS"
4573   fi
4574   ;;
4575
4576 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4577   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4578 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4580 echo "configure:4581: checking for $ac_word" >&5
4581 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4582   echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584   if test -n "$DLLTOOL"; then
4585   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4586 else
4587   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4588   ac_dummy="$PATH"
4589   for ac_dir in $ac_dummy; do
4590     test -z "$ac_dir" && ac_dir=.
4591     if test -f $ac_dir/$ac_word; then
4592       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4593       break
4594     fi
4595   done
4596   IFS="$ac_save_ifs"
4597 fi
4598 fi
4599 DLLTOOL="$ac_cv_prog_DLLTOOL"
4600 if test -n "$DLLTOOL"; then
4601   echo "$ac_t""$DLLTOOL" 1>&6
4602 else
4603   echo "$ac_t""no" 1>&6
4604 fi
4605
4606
4607 if test -z "$ac_cv_prog_DLLTOOL"; then
4608 if test -n "$ac_tool_prefix"; then
4609   # Extract the first word of "dlltool", so it can be a program name with args.
4610 set dummy dlltool; ac_word=$2
4611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4612 echo "configure:4613: checking for $ac_word" >&5
4613 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4614   echo $ac_n "(cached) $ac_c" 1>&6
4615 else
4616   if test -n "$DLLTOOL"; then
4617   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4618 else
4619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4620   ac_dummy="$PATH"
4621   for ac_dir in $ac_dummy; do
4622     test -z "$ac_dir" && ac_dir=.
4623     if test -f $ac_dir/$ac_word; then
4624       ac_cv_prog_DLLTOOL="dlltool"
4625       break
4626     fi
4627   done
4628   IFS="$ac_save_ifs"
4629   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4630 fi
4631 fi
4632 DLLTOOL="$ac_cv_prog_DLLTOOL"
4633 if test -n "$DLLTOOL"; then
4634   echo "$ac_t""$DLLTOOL" 1>&6
4635 else
4636   echo "$ac_t""no" 1>&6
4637 fi
4638
4639 else
4640   DLLTOOL="false"
4641 fi
4642 fi
4643
4644   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4645 set dummy ${ac_tool_prefix}as; ac_word=$2
4646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_word" >&5
4648 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   if test -n "$AS"; then
4652   ac_cv_prog_AS="$AS" # Let the user override the test.
4653 else
4654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4655   ac_dummy="$PATH"
4656   for ac_dir in $ac_dummy; do
4657     test -z "$ac_dir" && ac_dir=.
4658     if test -f $ac_dir/$ac_word; then
4659       ac_cv_prog_AS="${ac_tool_prefix}as"
4660       break
4661     fi
4662   done
4663   IFS="$ac_save_ifs"
4664 fi
4665 fi
4666 AS="$ac_cv_prog_AS"
4667 if test -n "$AS"; then
4668   echo "$ac_t""$AS" 1>&6
4669 else
4670   echo "$ac_t""no" 1>&6
4671 fi
4672
4673
4674 if test -z "$ac_cv_prog_AS"; then
4675 if test -n "$ac_tool_prefix"; then
4676   # Extract the first word of "as", so it can be a program name with args.
4677 set dummy as; ac_word=$2
4678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4679 echo "configure:4680: checking for $ac_word" >&5
4680 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   if test -n "$AS"; then
4684   ac_cv_prog_AS="$AS" # Let the user override the test.
4685 else
4686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4687   ac_dummy="$PATH"
4688   for ac_dir in $ac_dummy; do
4689     test -z "$ac_dir" && ac_dir=.
4690     if test -f $ac_dir/$ac_word; then
4691       ac_cv_prog_AS="as"
4692       break
4693     fi
4694   done
4695   IFS="$ac_save_ifs"
4696   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4697 fi
4698 fi
4699 AS="$ac_cv_prog_AS"
4700 if test -n "$AS"; then
4701   echo "$ac_t""$AS" 1>&6
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705
4706 else
4707   AS="false"
4708 fi
4709 fi
4710
4711   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4712 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4714 echo "configure:4715: checking for $ac_word" >&5
4715 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4716   echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718   if test -n "$OBJDUMP"; then
4719   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4720 else
4721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4722   ac_dummy="$PATH"
4723   for ac_dir in $ac_dummy; do
4724     test -z "$ac_dir" && ac_dir=.
4725     if test -f $ac_dir/$ac_word; then
4726       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4727       break
4728     fi
4729   done
4730   IFS="$ac_save_ifs"
4731 fi
4732 fi
4733 OBJDUMP="$ac_cv_prog_OBJDUMP"
4734 if test -n "$OBJDUMP"; then
4735   echo "$ac_t""$OBJDUMP" 1>&6
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739
4740
4741 if test -z "$ac_cv_prog_OBJDUMP"; then
4742 if test -n "$ac_tool_prefix"; then
4743   # Extract the first word of "objdump", so it can be a program name with args.
4744 set dummy objdump; ac_word=$2
4745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4746 echo "configure:4747: checking for $ac_word" >&5
4747 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   if test -n "$OBJDUMP"; then
4751   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4752 else
4753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4754   ac_dummy="$PATH"
4755   for ac_dir in $ac_dummy; do
4756     test -z "$ac_dir" && ac_dir=.
4757     if test -f $ac_dir/$ac_word; then
4758       ac_cv_prog_OBJDUMP="objdump"
4759       break
4760     fi
4761   done
4762   IFS="$ac_save_ifs"
4763   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4764 fi
4765 fi
4766 OBJDUMP="$ac_cv_prog_OBJDUMP"
4767 if test -n "$OBJDUMP"; then
4768   echo "$ac_t""$OBJDUMP" 1>&6
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772
4773 else
4774   OBJDUMP="false"
4775 fi
4776 fi
4777
4778
4779   # recent cygwin and mingw systems supply a stub DllMain which the user
4780   # can override, but on older systems we have to supply one
4781   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4782 echo "configure:4783: checking if libtool should supply DllMain function" >&5
4783 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4784   echo $ac_n "(cached) $ac_c" 1>&6
4785 else
4786   cat > conftest.$ac_ext <<EOF
4787 #line 4788 "configure"
4788 #include "confdefs.h"
4789
4790 int main() {
4791 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4792       DllMain (0, 0, 0);
4793 ; return 0; }
4794 EOF
4795 if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4796   rm -rf conftest*
4797   lt_cv_need_dllmain=no
4798 else
4799   echo "configure: failed program was:" >&5
4800   cat conftest.$ac_ext >&5
4801   rm -rf conftest*
4802   lt_cv_need_dllmain=yes
4803 fi
4804 rm -f conftest*
4805 fi
4806
4807 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4808
4809   case $host/$CC in
4810   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4811     # old mingw systems require "-dll" to link a DLL, while more recent ones
4812     # require "-mdll"
4813     SAVE_CFLAGS="$CFLAGS"
4814     CFLAGS="$CFLAGS -mdll"
4815     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4816 echo "configure:4817: checking how to link DLLs" >&5
4817 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4818   echo $ac_n "(cached) $ac_c" 1>&6
4819 else
4820   cat > conftest.$ac_ext <<EOF
4821 #line 4822 "configure"
4822 #include "confdefs.h"
4823
4824 int main() {
4825
4826 ; return 0; }
4827 EOF
4828 if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4829   rm -rf conftest*
4830   lt_cv_cc_dll_switch=-mdll
4831 else
4832   echo "configure: failed program was:" >&5
4833   cat conftest.$ac_ext >&5
4834   rm -rf conftest*
4835   lt_cv_cc_dll_switch=-dll
4836 fi
4837 rm -f conftest*
4838 fi
4839
4840 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4841     CFLAGS="$SAVE_CFLAGS" ;;
4842   *-*-cygwin* | *-*-pw32*)
4843     # cygwin systems need to pass --dll to the linker, and not link
4844     # crt.o which will require a WinMain@16 definition.
4845     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4846   esac
4847   ;;
4848   
4849 esac
4850
4851 # Sed substitution that helps us do robust quoting.  It backslashifies
4852 # metacharacters that are still active within double-quoted strings.
4853 Xsed='sed -e s/^X//'
4854 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4855
4856 # Same as above, but do not quote variable references.
4857 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4858
4859 # Sed substitution to delay expansion of an escaped shell variable in a
4860 # double_quote_subst'ed string.
4861 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4862
4863 # Constants:
4864 rm="rm -f"
4865
4866 # Global variables:
4867 default_ofile=libtool
4868 can_build_shared=yes
4869
4870 # All known linkers require a `.a' archive for static linking (except M$VC,
4871 # which needs '.lib').
4872 libext=a
4873 ltmain="$ac_aux_dir/ltmain.sh"
4874 ofile="$default_ofile"
4875 with_gnu_ld="$lt_cv_prog_gnu_ld"
4876 need_locks="$enable_libtool_lock"
4877
4878 old_CC="$CC"
4879 old_CFLAGS="$CFLAGS"
4880
4881 # Set sane defaults for various variables
4882 test -z "$AR" && AR=ar
4883 test -z "$AR_FLAGS" && AR_FLAGS=cru
4884 test -z "$AS" && AS=as
4885 test -z "$CC" && CC=cc
4886 test -z "$DLLTOOL" && DLLTOOL=dlltool
4887 test -z "$LD" && LD=ld
4888 test -z "$LN_S" && LN_S="ln -s"
4889 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4890 test -z "$NM" && NM=nm
4891 test -z "$OBJDUMP" && OBJDUMP=objdump
4892 test -z "$RANLIB" && RANLIB=:
4893 test -z "$STRIP" && STRIP=:
4894 test -z "$ac_objext" && ac_objext=o
4895
4896 if test x"$host" != x"$build"; then
4897   ac_tool_prefix=${host_alias}-
4898 else
4899   ac_tool_prefix=
4900 fi
4901
4902 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4903 case $host_os in
4904 linux-gnu*) ;;
4905 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4906 esac
4907
4908 case $host_os in
4909 aix3*)
4910   # AIX sometimes has problems with the GCC collect2 program.  For some
4911   # reason, if we set the COLLECT_NAMES environment variable, the problems
4912   # vanish in a puff of smoke.
4913   if test "X${COLLECT_NAMES+set}" != Xset; then
4914     COLLECT_NAMES=
4915     export COLLECT_NAMES
4916   fi
4917   ;;
4918 esac
4919
4920 # Determine commands to create old-style static archives.
4921 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4922 old_postinstall_cmds='chmod 644 $oldlib'
4923 old_postuninstall_cmds=
4924
4925 if test -n "$RANLIB"; then
4926   case $host_os in
4927   openbsd*)
4928     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4929     ;;
4930   *)
4931     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4932     ;;
4933   esac
4934   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4935 fi
4936
4937 # Allow CC to be a program name with arguments.
4938 set dummy $CC
4939 compiler="$2"
4940
4941 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4942 echo "configure:4943: checking for objdir" >&5
4943 rm -f .libs 2>/dev/null
4944 mkdir .libs 2>/dev/null
4945 if test -d .libs; then
4946   objdir=.libs
4947 else
4948   # MS-DOS does not allow filenames that begin with a dot.
4949   objdir=_libs
4950 fi
4951 rmdir .libs 2>/dev/null
4952 echo "$ac_t""$objdir" 1>&6
4953
4954
4955 # Check whether --with-pic or --without-pic was given.
4956 if test "${with_pic+set}" = set; then
4957   withval="$with_pic"
4958   pic_mode="$withval"
4959 else
4960   pic_mode=default
4961 fi
4962
4963 test -z "$pic_mode" && pic_mode=default
4964
4965 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4966 # in isolation, and that seeing it set (from the cache) indicates that
4967 # the associated values are set (in the cache) correctly too.
4968 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4969 echo "configure:4970: checking for $compiler option to produce PIC" >&5
4970 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4971   echo $ac_n "(cached) $ac_c" 1>&6
4972 else
4973    lt_cv_prog_cc_pic=
4974   lt_cv_prog_cc_shlib=
4975   lt_cv_prog_cc_wl=
4976   lt_cv_prog_cc_static=
4977   lt_cv_prog_cc_no_builtin=
4978   lt_cv_prog_cc_can_build_shared=$can_build_shared
4979
4980   if test "$GCC" = yes; then
4981     lt_cv_prog_cc_wl='-Wl,'
4982     lt_cv_prog_cc_static='-static'
4983
4984     case $host_os in
4985     aix*)
4986       # Below there is a dirty hack to force normal static linking with -ldl
4987       # The problem is because libdl dynamically linked with both libc and
4988       # libC (AIX C++ library), which obviously doesn't included in libraries
4989       # list by gcc. This cause undefined symbols with -static flags.
4990       # This hack allows C programs to be linked with "-static -ldl", but
4991       # not sure about C++ programs.
4992       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4993       ;;
4994     amigaos*)
4995       # FIXME: we need at least 68020 code to build shared libraries, but
4996       # adding the `-m68020' flag to GCC prevents building anything better,
4997       # like `-m68040'.
4998       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4999       ;;
5000     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5001       # PIC is the default for these OSes.
5002       ;;
5003     darwin* | rhapsody*)
5004       # PIC is the default on this platform
5005       # Common symbols not allowed in MH_DYLIB files
5006       lt_cv_prog_cc_pic='-fno-common'
5007       ;;
5008     cygwin* | mingw* | pw32* | os2*)
5009       # This hack is so that the source file can tell whether it is being
5010       # built for inclusion in a dll (and should export symbols for example).
5011       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5012       ;;
5013     sysv4*MP*)
5014       if test -d /usr/nec; then
5015          lt_cv_prog_cc_pic=-Kconform_pic
5016       fi
5017       ;;
5018     *)
5019       lt_cv_prog_cc_pic='-fPIC'
5020       ;;
5021     esac
5022   else
5023     # PORTME Check for PIC flags for the system compiler.
5024     case $host_os in
5025     aix3* | aix4* | aix5*)
5026       lt_cv_prog_cc_wl='-Wl,'
5027       # All AIX code is PIC.
5028       if test "$host_cpu" = ia64; then
5029         # AIX 5 now supports IA64 processor
5030         lt_cv_prog_cc_static='-Bstatic'
5031       else
5032         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5033       fi
5034       ;;
5035
5036     hpux9* | hpux10* | hpux11*)
5037       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5038       lt_cv_prog_cc_wl='-Wl,'
5039       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5040       lt_cv_prog_cc_pic='+Z'
5041       ;;
5042
5043     irix5* | irix6*)
5044       lt_cv_prog_cc_wl='-Wl,'
5045       lt_cv_prog_cc_static='-non_shared'
5046       # PIC (with -KPIC) is the default.
5047       ;;
5048
5049     cygwin* | mingw* | pw32* | os2*)
5050       # This hack is so that the source file can tell whether it is being
5051       # built for inclusion in a dll (and should export symbols for example).
5052       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5053       ;;
5054
5055     newsos6)
5056       lt_cv_prog_cc_pic='-KPIC'
5057       lt_cv_prog_cc_static='-Bstatic'
5058       ;;
5059
5060     osf3* | osf4* | osf5*)
5061       # All OSF/1 code is PIC.
5062       lt_cv_prog_cc_wl='-Wl,'
5063       lt_cv_prog_cc_static='-non_shared'
5064       ;;
5065
5066     sco3.2v5*)
5067       lt_cv_prog_cc_pic='-Kpic'
5068       lt_cv_prog_cc_static='-dn'
5069       lt_cv_prog_cc_shlib='-belf'
5070       ;;
5071
5072     solaris*)
5073       lt_cv_prog_cc_pic='-KPIC'
5074       lt_cv_prog_cc_static='-Bstatic'
5075       lt_cv_prog_cc_wl='-Wl,'
5076       ;;
5077
5078     sunos4*)
5079       lt_cv_prog_cc_pic='-PIC'
5080       lt_cv_prog_cc_static='-Bstatic'
5081       lt_cv_prog_cc_wl='-Qoption ld '
5082       ;;
5083
5084     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5085       lt_cv_prog_cc_pic='-KPIC'
5086       lt_cv_prog_cc_static='-Bstatic'
5087       if test "x$host_vendor" = xsni; then
5088         lt_cv_prog_cc_wl='-LD'
5089       else
5090         lt_cv_prog_cc_wl='-Wl,'
5091       fi
5092       ;;
5093
5094     uts4*)
5095       lt_cv_prog_cc_pic='-pic'
5096       lt_cv_prog_cc_static='-Bstatic'
5097       ;;
5098
5099     sysv4*MP*)
5100       if test -d /usr/nec ;then
5101         lt_cv_prog_cc_pic='-Kconform_pic'
5102         lt_cv_prog_cc_static='-Bstatic'
5103       fi
5104       ;;
5105
5106     *)
5107       lt_cv_prog_cc_can_build_shared=no
5108       ;;
5109     esac
5110   fi
5111
5112 fi
5113
5114 if test -z "$lt_cv_prog_cc_pic"; then
5115   echo "$ac_t""none" 1>&6
5116 else
5117   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5118
5119   # Check to make sure the pic_flag actually works.
5120   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5121 echo "configure:5122: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5122   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5123   echo $ac_n "(cached) $ac_c" 1>&6
5124 else
5125       save_CFLAGS="$CFLAGS"
5126     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5127     cat > conftest.$ac_ext <<EOF
5128 #line 5129 "configure"
5129 #include "confdefs.h"
5130
5131 int main() {
5132
5133 ; return 0; }
5134 EOF
5135 if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5136   rm -rf conftest*
5137         case $host_os in
5138       hpux9* | hpux10* | hpux11*)
5139         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5140         # they create non-PIC objects.  So, if there were any warnings, we
5141         # assume that PIC is not supported.
5142         if test -s conftest.err; then
5143           lt_cv_prog_cc_pic_works=no
5144         else
5145           lt_cv_prog_cc_pic_works=yes
5146         fi
5147         ;;
5148       *)
5149         lt_cv_prog_cc_pic_works=yes
5150         ;;
5151       esac
5152     
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157         lt_cv_prog_cc_pic_works=no
5158     
5159 fi
5160 rm -f conftest*
5161     CFLAGS="$save_CFLAGS"
5162   
5163 fi
5164
5165
5166   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5167     lt_cv_prog_cc_pic=
5168     lt_cv_prog_cc_can_build_shared=no
5169   else
5170     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5171   fi
5172
5173   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5174 fi
5175
5176 # Check for any special shared library compilation flags.
5177 if test -n "$lt_cv_prog_cc_shlib"; then
5178   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5179   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5180   else
5181    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5182     lt_cv_prog_cc_can_build_shared=no
5183   fi
5184 fi
5185
5186 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5187 echo "configure:5188: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5188 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5189   echo $ac_n "(cached) $ac_c" 1>&6
5190 else
5191     lt_cv_prog_cc_static_works=no
5192   save_LDFLAGS="$LDFLAGS"
5193   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5194   cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197
5198 int main() {
5199
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5203   rm -rf conftest*
5204   lt_cv_prog_cc_static_works=yes
5205 else
5206   echo "configure: failed program was:" >&5
5207   cat conftest.$ac_ext >&5
5208 fi
5209 rm -f conftest*
5210   LDFLAGS="$save_LDFLAGS"
5211
5212 fi
5213
5214
5215 # Belt *and* braces to stop my trousers falling down:
5216 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5217 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5218
5219 pic_flag="$lt_cv_prog_cc_pic"
5220 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5221 wl="$lt_cv_prog_cc_wl"
5222 link_static_flag="$lt_cv_prog_cc_static"
5223 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5224 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5225
5226
5227 # Check to see if options -o and -c are simultaneously supported by compiler
5228 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5229 echo "configure:5230: checking if $compiler supports -c -o file.$ac_objext" >&5
5230 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5231   echo $ac_n "(cached) $ac_c" 1>&6
5232 else
5233   
5234 $rm -r conftest 2>/dev/null
5235 mkdir conftest
5236 cd conftest
5237 echo "int some_variable = 0;" > conftest.$ac_ext
5238 mkdir out
5239 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5240 # that will create temporary files in the current directory regardless of
5241 # the output directory.  Thus, making CWD read-only will cause this test
5242 # to fail, enabling locking or at least warning the user not to do parallel
5243 # builds.
5244 chmod -w .
5245 save_CFLAGS="$CFLAGS"
5246 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5247 compiler_c_o=no
5248 if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5249   # The compiler can only warn and ignore the option if not recognized
5250   # So say no if there are warnings
5251   if test -s out/conftest.err; then
5252     lt_cv_compiler_c_o=no
5253   else
5254     lt_cv_compiler_c_o=yes
5255   fi
5256 else
5257   # Append any errors to the config.log.
5258   cat out/conftest.err 1>&5
5259   lt_cv_compiler_c_o=no
5260 fi
5261 CFLAGS="$save_CFLAGS"
5262 chmod u+w .
5263 $rm conftest* out/*
5264 rmdir out
5265 cd ..
5266 rmdir conftest
5267 $rm -r conftest 2>/dev/null
5268
5269 fi
5270
5271 compiler_c_o=$lt_cv_compiler_c_o
5272 echo "$ac_t""$compiler_c_o" 1>&6
5273
5274 if test x"$compiler_c_o" = x"yes"; then
5275   # Check to see if we can write to a .lo
5276   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5277 echo "configure:5278: checking if $compiler supports -c -o file.lo" >&5
5278   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5279   echo $ac_n "(cached) $ac_c" 1>&6
5280 else
5281   
5282   lt_cv_compiler_o_lo=no
5283   save_CFLAGS="$CFLAGS"
5284   CFLAGS="$CFLAGS -c -o conftest.lo"
5285   save_objext="$ac_objext"
5286   ac_objext=lo
5287   cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290
5291 int main() {
5292 int some_variable = 0;
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5296   rm -rf conftest*
5297       # The compiler can only warn and ignore the option if not recognized
5298     # So say no if there are warnings
5299     if test -s conftest.err; then
5300       lt_cv_compiler_o_lo=no
5301     else
5302       lt_cv_compiler_o_lo=yes
5303     fi
5304   
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308 fi
5309 rm -f conftest*
5310   ac_objext="$save_objext"
5311   CFLAGS="$save_CFLAGS"
5312   
5313 fi
5314
5315   compiler_o_lo=$lt_cv_compiler_o_lo
5316   echo "$ac_t""$compiler_o_lo" 1>&6
5317 else
5318   compiler_o_lo=no
5319 fi
5320
5321 # Check to see if we can do hard links to lock some files if needed
5322 hard_links="nottested"
5323 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5324   # do not overwrite the value of need_locks provided by the user
5325   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5326 echo "configure:5327: checking if we can lock with hard links" >&5
5327   hard_links=yes
5328   $rm conftest*
5329   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5330   touch conftest.a
5331   ln conftest.a conftest.b 2>&5 || hard_links=no
5332   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5333   echo "$ac_t""$hard_links" 1>&6
5334   if test "$hard_links" = no; then
5335     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5336     need_locks=warn
5337   fi
5338 else
5339   need_locks=no
5340 fi
5341
5342 if test "$GCC" = yes; then
5343   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5344   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5345 echo "configure:5346: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5346   echo "int some_variable = 0;" > conftest.$ac_ext
5347   save_CFLAGS="$CFLAGS"
5348   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5349   compiler_rtti_exceptions=no
5350   cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353
5354 int main() {
5355 int some_variable = 0;
5356 ; return 0; }
5357 EOF
5358 if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5359   rm -rf conftest*
5360       # The compiler can only warn and ignore the option if not recognized
5361     # So say no if there are warnings
5362     if test -s conftest.err; then
5363       compiler_rtti_exceptions=no
5364     else
5365       compiler_rtti_exceptions=yes
5366     fi
5367   
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371 fi
5372 rm -f conftest*
5373   CFLAGS="$save_CFLAGS"
5374   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5375
5376   if test "$compiler_rtti_exceptions" = "yes"; then
5377     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5378   else
5379     no_builtin_flag=' -fno-builtin'
5380   fi
5381 fi
5382
5383 # See if the linker supports building shared libraries.
5384 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5385 echo "configure:5386: checking whether the linker ($LD) supports shared libraries" >&5
5386
5387 allow_undefined_flag=
5388 no_undefined_flag=
5389 need_lib_prefix=unknown
5390 need_version=unknown
5391 # when you set need_version to no, make sure it does not cause -set_version
5392 # flags to be left without arguments
5393 archive_cmds=
5394 archive_expsym_cmds=
5395 old_archive_from_new_cmds=
5396 old_archive_from_expsyms_cmds=
5397 export_dynamic_flag_spec=
5398 whole_archive_flag_spec=
5399 thread_safe_flag_spec=
5400 hardcode_into_libs=no
5401 hardcode_libdir_flag_spec=
5402 hardcode_libdir_separator=
5403 hardcode_direct=no
5404 hardcode_minus_L=no
5405 hardcode_shlibpath_var=unsupported
5406 runpath_var=
5407 link_all_deplibs=unknown
5408 always_export_symbols=no
5409 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5410 # include_expsyms should be a list of space-separated symbols to be *always*
5411 # included in the symbol list
5412 include_expsyms=
5413 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5414 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5415 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5416 # as well as any symbol that contains `d'.
5417 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5418 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5419 # platforms (ab)use it in PIC code, but their linkers get confused if
5420 # the symbol is explicitly referenced.  Since portable code cannot
5421 # rely on this symbol name, it's probably fine to never include it in
5422 # preloaded symbol tables.
5423 extract_expsyms_cmds=
5424
5425 case $host_os in
5426 cygwin* | mingw* | pw32*)
5427   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5428   # When not using gcc, we currently assume that we are using
5429   # Microsoft Visual C++.
5430   if test "$GCC" != yes; then
5431     with_gnu_ld=no
5432   fi
5433   ;;
5434 openbsd*)
5435   with_gnu_ld=no
5436   ;;
5437 esac
5438
5439 ld_shlibs=yes
5440 if test "$with_gnu_ld" = yes; then
5441   # If archive_cmds runs LD, not CC, wlarc should be empty
5442   wlarc='${wl}'
5443
5444   # See if GNU ld supports shared libraries.
5445   case $host_os in
5446   aix3* | aix4* | aix5*)
5447     # On AIX, the GNU linker is very broken
5448     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5449     ld_shlibs=no
5450     cat <<EOF 1>&2
5451
5452 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5453 *** to be unable to reliably create shared libraries on AIX.
5454 *** Therefore, libtool is disabling shared libraries support.  If you
5455 *** really care for shared libraries, you may want to modify your PATH
5456 *** so that a non-GNU linker is found, and then restart.
5457
5458 EOF
5459     ;;
5460
5461   amigaos*)
5462     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)'
5463     hardcode_libdir_flag_spec='-L$libdir'
5464     hardcode_minus_L=yes
5465
5466     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5467     # that the semantics of dynamic libraries on AmigaOS, at least up
5468     # to version 4, is to share data among multiple programs linked
5469     # with the same dynamic library.  Since this doesn't match the
5470     # behavior of shared libraries on other platforms, we can use
5471     # them.
5472     ld_shlibs=no
5473     ;;
5474
5475   beos*)
5476     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5477       allow_undefined_flag=unsupported
5478       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5479       # support --undefined.  This deserves some investigation.  FIXME
5480       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5481     else
5482       ld_shlibs=no
5483     fi
5484     ;;
5485
5486   cygwin* | mingw* | pw32*)
5487     # hardcode_libdir_flag_spec is actually meaningless, as there is
5488     # no search path for DLLs.
5489     hardcode_libdir_flag_spec='-L$libdir'
5490     allow_undefined_flag=unsupported
5491     always_export_symbols=yes
5492
5493     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5494       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5495       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5496       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5497       else $CC -o impgen impgen.c ; fi)~
5498       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5499
5500     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5501
5502     # cygwin and mingw dlls have different entry points and sets of symbols
5503     # to exclude.
5504     # FIXME: what about values for MSVC?
5505     dll_entry=__cygwin_dll_entry@12
5506     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5507     case $host_os in
5508     mingw*)
5509       # mingw values
5510       dll_entry=_DllMainCRTStartup@12
5511       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5512       ;;
5513     esac
5514
5515     # mingw and cygwin differ, and it's simplest to just exclude the union
5516     # of the two symbol sets.
5517     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5518
5519     # recent cygwin and mingw systems supply a stub DllMain which the user
5520     # can override, but on older systems we have to supply one (in ltdll.c)
5521     if test "x$lt_cv_need_dllmain" = "xyes"; then
5522       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5523       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~
5524         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5525     else
5526       ltdll_obj=
5527       ltdll_cmds=
5528     fi
5529
5530     # Extract the symbol export list from an `--export-all' def file,
5531     # then regenerate the def file from the symbol export list, so that
5532     # the compiled dll only exports the symbol export list.
5533     # Be careful not to strip the DATA tag left be newer dlltools.
5534     export_symbols_cmds="$ltdll_cmds"'
5535       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5536       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5537
5538     # If the export-symbols file already is a .def file (1st line
5539     # is EXPORTS), use it as is.
5540     # If DATA tags from a recent dlltool are present, honour them!
5541     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5542         cp $export_symbols $output_objdir/$soname-def;
5543       else
5544         echo EXPORTS > $output_objdir/$soname-def;
5545         _lt_hint=1;
5546         cat $export_symbols | while read symbol; do
5547          set dummy \$symbol;
5548          case \$# in
5549            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5550            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5551          esac;
5552          _lt_hint=`expr 1 + \$_lt_hint`;
5553         done;
5554       fi~
5555       '"$ltdll_cmds"'
5556       $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~
5557       $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~
5558       $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~
5559       $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~
5560       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5561     ;;
5562
5563   netbsd*)
5564     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5565       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5566       wlarc=
5567     else
5568       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5569       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5570     fi
5571     ;;
5572
5573   solaris* | sysv5*)
5574     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5575       ld_shlibs=no
5576       cat <<EOF 1>&2
5577
5578 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5579 *** create shared libraries on Solaris systems.  Therefore, libtool
5580 *** is disabling shared libraries support.  We urge you to upgrade GNU
5581 *** binutils to release 2.9.1 or newer.  Another option is to modify
5582 *** your PATH or compiler configuration so that the native linker is
5583 *** used, and then restart.
5584
5585 EOF
5586     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5587       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5588       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5589     else
5590       ld_shlibs=no
5591     fi
5592     ;;
5593
5594   sunos4*)
5595     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5596     wlarc=
5597     hardcode_direct=yes
5598     hardcode_shlibpath_var=no
5599     ;;
5600
5601   *)
5602     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5603       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5604       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5605     else
5606       ld_shlibs=no
5607     fi
5608     ;;
5609   esac
5610
5611   if test "$ld_shlibs" = yes; then
5612     runpath_var=LD_RUN_PATH
5613     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5614     export_dynamic_flag_spec='${wl}--export-dynamic'
5615     case $host_os in
5616     cygwin* | mingw* | pw32*)
5617       # dlltool doesn't understand --whole-archive et. al.
5618       whole_archive_flag_spec=
5619       ;;
5620     *)
5621       # ancient GNU ld didn't support --whole-archive et. al.
5622       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5623         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5624       else
5625         whole_archive_flag_spec=
5626       fi
5627       ;;
5628     esac
5629   fi
5630 else
5631   # PORTME fill in a description of your system's linker (not GNU ld)
5632   case $host_os in
5633   aix3*)
5634     allow_undefined_flag=unsupported
5635     always_export_symbols=yes
5636     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'
5637     # Note: this linker hardcodes the directories in LIBPATH if there
5638     # are no directories specified by -L.
5639     hardcode_minus_L=yes
5640     if test "$GCC" = yes && test -z "$link_static_flag"; then
5641       # Neither direct hardcoding nor static linking is supported with a
5642       # broken collect2.
5643       hardcode_direct=unsupported
5644     fi
5645     ;;
5646
5647   aix4* | aix5*)
5648     if test "$host_cpu" = ia64; then
5649       # On IA64, the linker does run time linking by default, so we don't
5650       # have to do anything special.
5651       aix_use_runtimelinking=no
5652       exp_sym_flag='-Bexport'
5653       no_entry_flag=""
5654     else
5655       aix_use_runtimelinking=no
5656
5657       # Test if we are trying to use run time linking or normal
5658       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5659       # need to do runtime linking.
5660       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5661         for ld_flag in $LDFLAGS; do
5662           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5663             aix_use_runtimelinking=yes
5664             break
5665           fi
5666         done
5667       esac
5668
5669       exp_sym_flag='-bexport'
5670       no_entry_flag='-bnoentry'
5671     fi
5672
5673     # When large executables or shared objects are built, AIX ld can
5674     # have problems creating the table of contents.  If linking a library
5675     # or program results in "error TOC overflow" add -mminimal-toc to
5676     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5677     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5678
5679     hardcode_direct=yes
5680     archive_cmds=''
5681     hardcode_libdir_separator=':'
5682     if test "$GCC" = yes; then
5683       case $host_os in aix4.[012]|aix4.[012].*)
5684         collect2name=`${CC} -print-prog-name=collect2`
5685         if test -f "$collect2name" && \
5686           strings "$collect2name" | grep resolve_lib_name >/dev/null
5687         then
5688           # We have reworked collect2
5689           hardcode_direct=yes
5690         else
5691           # We have old collect2
5692           hardcode_direct=unsupported
5693           # It fails to find uninstalled libraries when the uninstalled
5694           # path is not listed in the libpath.  Setting hardcode_minus_L
5695           # to unsupported forces relinking
5696           hardcode_minus_L=yes
5697           hardcode_libdir_flag_spec='-L$libdir'
5698           hardcode_libdir_separator=
5699         fi
5700       esac
5701
5702       shared_flag='-shared'
5703     else
5704       # not using gcc
5705       if test "$host_cpu" = ia64; then
5706         shared_flag='${wl}-G'
5707       else
5708         if test "$aix_use_runtimelinking" = yes; then
5709           shared_flag='${wl}-G'
5710         else
5711           shared_flag='${wl}-bM:SRE'
5712         fi
5713       fi
5714     fi
5715
5716     # It seems that -bexpall can do strange things, so it is better to
5717     # generate a list of symbols to export.
5718     always_export_symbols=yes
5719     if test "$aix_use_runtimelinking" = yes; then
5720       # Warning - without using the other runtime loading flags (-brtl),
5721       # -berok will link without error, but may produce a broken library.
5722       allow_undefined_flag='-berok'
5723       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5724       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"
5725     else
5726       if test "$host_cpu" = ia64; then
5727         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5728         allow_undefined_flag="-z nodefs"
5729         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"
5730       else
5731         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5732         # Warning - without using the other run time loading flags,
5733         # -berok will link without error, but may produce a broken library.
5734         allow_undefined_flag='${wl}-berok'
5735         # This is a bit strange, but is similar to how AIX traditionally builds
5736         # it's shared libraries.
5737         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'
5738       fi
5739     fi
5740     ;;
5741
5742   amigaos*)
5743     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)'
5744     hardcode_libdir_flag_spec='-L$libdir'
5745     hardcode_minus_L=yes
5746     # see comment about different semantics on the GNU ld section
5747     ld_shlibs=no
5748     ;;
5749
5750   cygwin* | mingw* | pw32*)
5751     # When not using gcc, we currently assume that we are using
5752     # Microsoft Visual C++.
5753     # hardcode_libdir_flag_spec is actually meaningless, as there is
5754     # no search path for DLLs.
5755     hardcode_libdir_flag_spec=' '
5756     allow_undefined_flag=unsupported
5757     # Tell ltmain to make .lib files, not .a files.
5758     libext=lib
5759     # FIXME: Setting linknames here is a bad hack.
5760     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5761     # The linker will automatically build a .lib file if we build a DLL.
5762     old_archive_from_new_cmds='true'
5763     # FIXME: Should let the user specify the lib program.
5764     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5765     fix_srcfile_path='`cygpath -w "$srcfile"`'
5766     ;;
5767
5768   darwin* | rhapsody*)
5769     case "$host_os" in
5770     rhapsody* | darwin1.[012])
5771       allow_undefined_flag='-undefined suppress'
5772       ;;
5773     *) # Darwin 1.3 on
5774       allow_undefined_flag='-flat_namespace -undefined suppress'
5775       ;;
5776     esac
5777     # FIXME: Relying on posixy $() will cause problems for
5778     #        cross-compilation, but unfortunately the echo tests do not
5779     #        yet detect zsh echo's removal of \ escapes.
5780     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'
5781     # We need to add '_' to the symbols in $export_symbols first
5782     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5783     hardcode_direct=yes
5784     hardcode_shlibpath_var=no
5785     whole_archive_flag_spec='-all_load $convenience'
5786     ;;
5787
5788   freebsd1*)
5789     ld_shlibs=no
5790     ;;
5791
5792   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5793   # support.  Future versions do this automatically, but an explicit c++rt0.o
5794   # does not break anything, and helps significantly (at the cost of a little
5795   # extra space).
5796   freebsd2.2*)
5797     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5798     hardcode_libdir_flag_spec='-R$libdir'
5799     hardcode_direct=yes
5800     hardcode_shlibpath_var=no
5801     ;;
5802
5803   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5804   freebsd2*)
5805     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5806     hardcode_direct=yes
5807     hardcode_minus_L=yes
5808     hardcode_shlibpath_var=no
5809     ;;
5810
5811   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5812   freebsd*)
5813     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5814     hardcode_libdir_flag_spec='-R$libdir'
5815     hardcode_direct=yes
5816     hardcode_shlibpath_var=no
5817     ;;
5818
5819   hpux9* | hpux10* | hpux11*)
5820     case $host_os in
5821     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' ;;
5822     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5823     esac
5824     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5825     hardcode_libdir_separator=:
5826     hardcode_direct=yes
5827     hardcode_minus_L=yes # Not in the search PATH, but as the default
5828                          # location of the library.
5829     export_dynamic_flag_spec='${wl}-E'
5830     ;;
5831
5832   irix5* | irix6*)
5833     if test "$GCC" = yes; then
5834       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'
5835     else
5836       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'
5837     fi
5838     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5839     hardcode_libdir_separator=:
5840     link_all_deplibs=yes
5841     ;;
5842
5843   netbsd*)
5844     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5845       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5846     else
5847       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5848     fi
5849     hardcode_libdir_flag_spec='-R$libdir'
5850     hardcode_direct=yes
5851     hardcode_shlibpath_var=no
5852     ;;
5853
5854   newsos6)
5855     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5856     hardcode_direct=yes
5857     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5858     hardcode_libdir_separator=:
5859     hardcode_shlibpath_var=no
5860     ;;
5861
5862   openbsd*)
5863     hardcode_direct=yes
5864     hardcode_shlibpath_var=no
5865     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5866       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5867       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5868       export_dynamic_flag_spec='${wl}-E'
5869     else
5870       case "$host_os" in
5871       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5872         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5873         hardcode_libdir_flag_spec='-R$libdir'
5874         ;;
5875       *)
5876         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5877         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5878         ;;
5879       esac
5880     fi
5881     ;;
5882
5883   os2*)
5884     hardcode_libdir_flag_spec='-L$libdir'
5885     hardcode_minus_L=yes
5886     allow_undefined_flag=unsupported
5887     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'
5888     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5889     ;;
5890
5891   osf3*)
5892     if test "$GCC" = yes; then
5893       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5894       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'
5895     else
5896       allow_undefined_flag=' -expect_unresolved \*'
5897       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'
5898     fi
5899     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5900     hardcode_libdir_separator=:
5901     ;;
5902
5903   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5904     if test "$GCC" = yes; then
5905       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5906       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'
5907       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5908     else
5909       allow_undefined_flag=' -expect_unresolved \*'
5910       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'
5911       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5912       $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'
5913
5914       #Both c and cxx compiler support -rpath directly
5915       hardcode_libdir_flag_spec='-rpath $libdir'
5916     fi
5917     hardcode_libdir_separator=:
5918     ;;
5919
5920   sco3.2v5*)
5921     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5922     hardcode_shlibpath_var=no
5923     runpath_var=LD_RUN_PATH
5924     hardcode_runpath_var=yes
5925     export_dynamic_flag_spec='${wl}-Bexport'
5926     ;;
5927
5928   solaris*)
5929     # gcc --version < 3.0 without binutils cannot create self contained
5930     # shared libraries reliably, requiring libgcc.a to resolve some of
5931     # the object symbols generated in some cases.  Libraries that use
5932     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5933     # a copy of libgcc.a into every shared library to guarantee resolving
5934     # such symbols causes other problems:  According to Tim Van Holder
5935     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5936     # (to the application) exception stack for one thing.
5937     no_undefined_flag=' -z defs'
5938     if test "$GCC" = yes; then
5939       case `$CC --version 2>/dev/null` in
5940       [12].*)
5941         cat <<EOF 1>&2
5942
5943 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5944 *** create self contained shared libraries on Solaris systems, without
5945 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5946 *** -no-undefined support, which will at least allow you to build shared
5947 *** libraries.  However, you may find that when you link such libraries
5948 *** into an application without using GCC, you have to manually add
5949 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5950 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5951 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5952
5953 EOF
5954         no_undefined_flag=
5955         ;;
5956       esac
5957     fi
5958     # $CC -shared without GNU ld will not create a library from C++
5959     # object files and a static libstdc++, better avoid it by now
5960     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5961     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5962                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5963     hardcode_libdir_flag_spec='-R$libdir'
5964     hardcode_shlibpath_var=no
5965     case $host_os in
5966     solaris2.[0-5] | solaris2.[0-5].*) ;;
5967     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5968       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5969     esac
5970     link_all_deplibs=yes
5971     ;;
5972
5973   sunos4*)
5974     if test "x$host_vendor" = xsequent; then
5975       # Use $CC to link under sequent, because it throws in some extra .o
5976       # files that make .init and .fini sections work.
5977       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5978     else
5979       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5980     fi
5981     hardcode_libdir_flag_spec='-L$libdir'
5982     hardcode_direct=yes
5983     hardcode_minus_L=yes
5984     hardcode_shlibpath_var=no
5985     ;;
5986
5987   sysv4)
5988     if test "x$host_vendor" = xsno; then
5989       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990       hardcode_direct=yes # is this really true???
5991     else
5992       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5993       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5994     fi
5995     runpath_var='LD_RUN_PATH'
5996     hardcode_shlibpath_var=no
5997     ;;
5998
5999   sysv4.3*)
6000     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001     hardcode_shlibpath_var=no
6002     export_dynamic_flag_spec='-Bexport'
6003     ;;
6004
6005   sysv5*)
6006     no_undefined_flag=' -z text'
6007     # $CC -shared without GNU ld will not create a library from C++
6008     # object files and a static libstdc++, better avoid it by now
6009     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6010     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6011                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6012     hardcode_libdir_flag_spec=
6013     hardcode_shlibpath_var=no
6014     runpath_var='LD_RUN_PATH'
6015     ;;
6016
6017   uts4*)
6018     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     hardcode_libdir_flag_spec='-L$libdir'
6020     hardcode_shlibpath_var=no
6021     ;;
6022
6023   dgux*)
6024     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6025     hardcode_libdir_flag_spec='-L$libdir'
6026     hardcode_shlibpath_var=no
6027     ;;
6028
6029   sysv4*MP*)
6030     if test -d /usr/nec; then
6031       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6032       hardcode_shlibpath_var=no
6033       runpath_var=LD_RUN_PATH
6034       hardcode_runpath_var=yes
6035       ld_shlibs=yes
6036     fi
6037     ;;
6038
6039   sysv4.2uw2*)
6040     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6041     hardcode_direct=yes
6042     hardcode_minus_L=no
6043     hardcode_shlibpath_var=no
6044     hardcode_runpath_var=yes
6045     runpath_var=LD_RUN_PATH
6046     ;;
6047
6048   sysv5uw7* | unixware7*)
6049     no_undefined_flag='${wl}-z ${wl}text'
6050     if test "$GCC" = yes; then
6051       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6052     else
6053       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6054     fi
6055     runpath_var='LD_RUN_PATH'
6056     hardcode_shlibpath_var=no
6057     ;;
6058
6059   *)
6060     ld_shlibs=no
6061     ;;
6062   esac
6063 fi
6064 echo "$ac_t""$ld_shlibs" 1>&6
6065 test "$ld_shlibs" = no && can_build_shared=no
6066
6067 # Check hardcoding attributes.
6068 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6069 echo "configure:6070: checking how to hardcode library paths into programs" >&5
6070 hardcode_action=
6071 if test -n "$hardcode_libdir_flag_spec" || \
6072    test -n "$runpath_var"; then
6073
6074   # We can hardcode non-existant directories.
6075   if test "$hardcode_direct" != no &&
6076      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6077      # have to relink, otherwise we might link with an installed library
6078      # when we should be linking with a yet-to-be-installed one
6079      ## test "$hardcode_shlibpath_var" != no &&
6080      test "$hardcode_minus_L" != no; then
6081     # Linking always hardcodes the temporary library directory.
6082     hardcode_action=relink
6083   else
6084     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6085     hardcode_action=immediate
6086   fi
6087 else
6088   # We cannot hardcode anything, or else we can only hardcode existing
6089   # directories.
6090   hardcode_action=unsupported
6091 fi
6092 echo "$ac_t""$hardcode_action" 1>&6
6093
6094 striplib=
6095 old_striplib=
6096 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6097 echo "configure:6098: checking whether stripping libraries is possible" >&5
6098 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6099   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6100   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6101   echo "$ac_t""yes" 1>&6
6102 else
6103   echo "$ac_t""no" 1>&6
6104 fi
6105
6106 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6107 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6108
6109 # PORTME Fill in your ld.so characteristics
6110 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6111 echo "configure:6112: checking dynamic linker characteristics" >&5
6112 library_names_spec=
6113 libname_spec='lib$name'
6114 soname_spec=
6115 postinstall_cmds=
6116 postuninstall_cmds=
6117 finish_cmds=
6118 finish_eval=
6119 shlibpath_var=
6120 shlibpath_overrides_runpath=unknown
6121 version_type=none
6122 dynamic_linker="$host_os ld.so"
6123 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6124 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6125
6126 case $host_os in
6127 aix3*)
6128   version_type=linux
6129   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6130   shlibpath_var=LIBPATH
6131
6132   # AIX has no versioning support, so we append a major version to the name.
6133   soname_spec='${libname}${release}.so$major'
6134   ;;
6135
6136 aix4* | aix5*)
6137   version_type=linux
6138   if test "$host_cpu" = ia64; then
6139     # AIX 5 supports IA64
6140     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6141     shlibpath_var=LD_LIBRARY_PATH
6142   else
6143     # With GCC up to 2.95.x, collect2 would create an import file
6144     # for dependence libraries.  The import file would start with
6145     # the line `#! .'.  This would cause the generated library to
6146     # depend on `.', always an invalid library.  This was fixed in
6147     # development snapshots of GCC prior to 3.0.
6148     case $host_os in
6149       aix4 | aix4.[01] | aix4.[01].*)
6150         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6151              echo ' yes '
6152              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6153           :
6154         else
6155           can_build_shared=no
6156         fi
6157         ;;
6158     esac
6159     # AIX (on Power*) has no versioning support, so currently we can
6160     # not hardcode correct soname into executable. Probably we can
6161     # add versioning support to collect2, so additional links can
6162     # be useful in future.
6163     if test "$aix_use_runtimelinking" = yes; then
6164       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6165       # instead of lib<name>.a to let people know that these are not
6166       # typical AIX shared libraries.
6167       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6168     else
6169       # We preserve .a as extension for shared libraries through AIX4.2
6170       # and later when we are not doing run time linking.
6171       library_names_spec='${libname}${release}.a $libname.a'
6172       soname_spec='${libname}${release}.so$major'
6173     fi
6174     shlibpath_var=LIBPATH
6175   fi
6176   ;;
6177
6178 amigaos*)
6179   library_names_spec='$libname.ixlibrary $libname.a'
6180   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6181   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'
6182   ;;
6183
6184 beos*)
6185   library_names_spec='${libname}.so'
6186   dynamic_linker="$host_os ld.so"
6187   shlibpath_var=LIBRARY_PATH
6188   ;;
6189
6190 bsdi4*)
6191   version_type=linux
6192   need_version=no
6193   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6194   soname_spec='${libname}${release}.so$major'
6195   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6196   shlibpath_var=LD_LIBRARY_PATH
6197   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6198   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6199   export_dynamic_flag_spec=-rdynamic
6200   # the default ld.so.conf also contains /usr/contrib/lib and
6201   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6202   # libtool to hard-code these into programs
6203   ;;
6204
6205 cygwin* | mingw* | pw32*)
6206   version_type=windows
6207   need_version=no
6208   need_lib_prefix=no
6209   case $GCC,$host_os in
6210   yes,cygwin*)
6211     library_names_spec='$libname.dll.a'
6212     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6213     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6214       dldir=$destdir/`dirname \$dlpath`~
6215       test -d \$dldir || mkdir -p \$dldir~
6216       $install_prog .libs/$dlname \$dldir/$dlname'
6217     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6218       dlpath=$dir/\$dldll~
6219        $rm \$dlpath'
6220     ;;
6221   yes,mingw*)
6222     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6223     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6224     ;;
6225   yes,pw32*)
6226     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6227     ;;
6228   *)
6229     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6230     ;;
6231   esac
6232   dynamic_linker='Win32 ld.exe'
6233   # FIXME: first we should search . and the directory the executable is in
6234   shlibpath_var=PATH
6235   ;;
6236
6237 darwin* | rhapsody*)
6238   dynamic_linker="$host_os dyld"
6239   version_type=darwin
6240   need_lib_prefix=no
6241   need_version=no
6242   # FIXME: Relying on posixy $() will cause problems for
6243   #        cross-compilation, but unfortunately the echo tests do not
6244   #        yet detect zsh echo's removal of \ escapes.
6245   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)'
6246   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6247   shlibpath_overrides_runpath=yes
6248   shlibpath_var=DYLD_LIBRARY_PATH
6249   ;;
6250
6251 freebsd1*)
6252   dynamic_linker=no
6253   ;;
6254
6255 freebsd*)
6256   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6257   version_type=freebsd-$objformat
6258   case $version_type in
6259     freebsd-elf*)
6260       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6261       need_version=no
6262       need_lib_prefix=no
6263       ;;
6264     freebsd-*)
6265       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6266       need_version=yes
6267       ;;
6268   esac
6269   shlibpath_var=LD_LIBRARY_PATH
6270   case $host_os in
6271   freebsd2*)
6272     shlibpath_overrides_runpath=yes
6273     ;;
6274   *)
6275     shlibpath_overrides_runpath=no
6276     hardcode_into_libs=yes
6277     ;;
6278   esac
6279   ;;
6280
6281 gnu*)
6282   version_type=linux
6283   need_lib_prefix=no
6284   need_version=no
6285   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6286   soname_spec='${libname}${release}.so$major'
6287   shlibpath_var=LD_LIBRARY_PATH
6288   hardcode_into_libs=yes
6289   ;;
6290
6291 hpux9* | hpux10* | hpux11*)
6292   # Give a soname corresponding to the major version so that dld.sl refuses to
6293   # link against other versions.
6294   dynamic_linker="$host_os dld.sl"
6295   version_type=sunos
6296   need_lib_prefix=no
6297   need_version=no
6298   shlibpath_var=SHLIB_PATH
6299   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6300   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6301   soname_spec='${libname}${release}.sl$major'
6302   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6303   postinstall_cmds='chmod 555 $lib'
6304   ;;
6305
6306 irix5* | irix6*)
6307   version_type=irix
6308   need_lib_prefix=no
6309   need_version=no
6310   soname_spec='${libname}${release}.so$major'
6311   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6312   case $host_os in
6313   irix5*)
6314     libsuff= shlibsuff=
6315     ;;
6316   *)
6317     case $LD in # libtool.m4 will add one of these switches to LD
6318     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6319     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6320     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6321     *) libsuff= shlibsuff= libmagic=never-match;;
6322     esac
6323     ;;
6324   esac
6325   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6326   shlibpath_overrides_runpath=no
6327   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6328   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6329   ;;
6330
6331 # No shared lib support for Linux oldld, aout, or coff.
6332 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6333   dynamic_linker=no
6334   ;;
6335
6336 # This must be Linux ELF.
6337 linux-gnu*)
6338   version_type=linux
6339   need_lib_prefix=no
6340   need_version=no
6341   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6342   soname_spec='${libname}${release}.so$major'
6343   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6344   shlibpath_var=LD_LIBRARY_PATH
6345   shlibpath_overrides_runpath=no
6346   # This implies no fast_install, which is unacceptable.
6347   # Some rework will be needed to allow for fast_install
6348   # before this can be enabled.
6349   hardcode_into_libs=yes
6350
6351   # We used to test for /lib/ld.so.1 and disable shared libraries on
6352   # powerpc, because MkLinux only supported shared libraries with the
6353   # GNU dynamic linker.  Since this was broken with cross compilers,
6354   # most powerpc-linux boxes support dynamic linking these days and
6355   # people can always --disable-shared, the test was removed, and we
6356   # assume the GNU/Linux dynamic linker is in use.
6357   dynamic_linker='GNU/Linux ld.so'
6358   ;;
6359
6360 netbsd*)
6361   version_type=sunos
6362   need_lib_prefix=no
6363   need_version=no
6364   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6365     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6366     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6367     dynamic_linker='NetBSD (a.out) ld.so'
6368   else
6369     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6370     soname_spec='${libname}${release}.so$major'
6371     dynamic_linker='NetBSD ld.elf_so'
6372   fi
6373   shlibpath_var=LD_LIBRARY_PATH
6374   shlibpath_overrides_runpath=yes
6375   hardcode_into_libs=yes
6376   ;;
6377
6378 newsos6)
6379   version_type=linux
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   shlibpath_var=LD_LIBRARY_PATH
6382   shlibpath_overrides_runpath=yes
6383   ;;
6384
6385 openbsd*)
6386   version_type=sunos
6387   need_lib_prefix=no
6388   need_version=no
6389   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6390     case "$host_os" in
6391     openbsd2.[89] | openbsd2.[89].*)
6392       shlibpath_overrides_runpath=no
6393       ;;
6394     *)
6395       shlibpath_overrides_runpath=yes
6396       ;;
6397     esac
6398   else
6399     shlibpath_overrides_runpath=yes
6400   fi
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6402   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   ;;
6405
6406 os2*)
6407   libname_spec='$name'
6408   need_lib_prefix=no
6409   library_names_spec='$libname.dll $libname.a'
6410   dynamic_linker='OS/2 ld.exe'
6411   shlibpath_var=LIBPATH
6412   ;;
6413
6414 osf3* | osf4* | osf5*)
6415   version_type=osf
6416   need_version=no
6417   soname_spec='${libname}${release}.so'
6418   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6419   shlibpath_var=LD_LIBRARY_PATH
6420   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6421   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6422   ;;
6423
6424 sco3.2v5*)
6425   version_type=osf
6426   soname_spec='${libname}${release}.so$major'
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6428   shlibpath_var=LD_LIBRARY_PATH
6429   ;;
6430
6431 solaris*)
6432   version_type=linux
6433   need_lib_prefix=no
6434   need_version=no
6435   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6436   soname_spec='${libname}${release}.so$major'
6437   shlibpath_var=LD_LIBRARY_PATH
6438   shlibpath_overrides_runpath=yes
6439   hardcode_into_libs=yes
6440   # ldd complains unless libraries are executable
6441   postinstall_cmds='chmod +x $lib'
6442   ;;
6443
6444 sunos4*)
6445   version_type=sunos
6446   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6447   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6448   shlibpath_var=LD_LIBRARY_PATH
6449   shlibpath_overrides_runpath=yes
6450   if test "$with_gnu_ld" = yes; then
6451     need_lib_prefix=no
6452   fi
6453   need_version=yes
6454   ;;
6455
6456 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6457   version_type=linux
6458   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6459   soname_spec='${libname}${release}.so$major'
6460   shlibpath_var=LD_LIBRARY_PATH
6461   case $host_vendor in
6462     sni)
6463       shlibpath_overrides_runpath=no
6464       ;;
6465     motorola)
6466       need_lib_prefix=no
6467       need_version=no
6468       shlibpath_overrides_runpath=no
6469       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6470       ;;
6471   esac
6472   ;;
6473
6474 uts4*)
6475   version_type=linux
6476   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6477   soname_spec='${libname}${release}.so$major'
6478   shlibpath_var=LD_LIBRARY_PATH
6479   ;;
6480
6481 dgux*)
6482   version_type=linux
6483   need_lib_prefix=no
6484   need_version=no
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6486   soname_spec='${libname}${release}.so$major'
6487   shlibpath_var=LD_LIBRARY_PATH
6488   ;;
6489
6490 sysv4*MP*)
6491   if test -d /usr/nec ;then
6492     version_type=linux
6493     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6494     soname_spec='$libname.so.$major'
6495     shlibpath_var=LD_LIBRARY_PATH
6496   fi
6497   ;;
6498
6499 *)
6500   dynamic_linker=no
6501   ;;
6502 esac
6503 echo "$ac_t""$dynamic_linker" 1>&6
6504 test "$dynamic_linker" = no && can_build_shared=no
6505
6506 # Report the final consequences.
6507 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6508 echo "configure:6509: checking if libtool supports shared libraries" >&5
6509 echo "$ac_t""$can_build_shared" 1>&6
6510
6511 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6512 echo "configure:6513: checking whether to build shared libraries" >&5
6513 test "$can_build_shared" = "no" && enable_shared=no
6514
6515 # On AIX, shared libraries and static libraries use the same namespace, and
6516 # are all built from PIC.
6517 case "$host_os" in
6518 aix3*)
6519   test "$enable_shared" = yes && enable_static=no
6520   if test -n "$RANLIB"; then
6521     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6522     postinstall_cmds='$RANLIB $lib'
6523   fi
6524   ;;
6525
6526 aix4*)
6527   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6528     test "$enable_shared" = yes && enable_static=no
6529   fi
6530   ;;
6531 esac
6532 echo "$ac_t""$enable_shared" 1>&6
6533
6534 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6535 echo "configure:6536: checking whether to build static libraries" >&5
6536 # Make sure either enable_shared or enable_static is yes.
6537 test "$enable_shared" = yes || enable_static=yes
6538 echo "$ac_t""$enable_static" 1>&6
6539
6540 if test "$hardcode_action" = relink; then
6541   # Fast installation is not supported
6542   enable_fast_install=no
6543 elif test "$shlibpath_overrides_runpath" = yes ||
6544      test "$enable_shared" = no; then
6545   # Fast installation is not necessary
6546   enable_fast_install=needless
6547 fi
6548
6549 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6550 if test "$GCC" = yes; then
6551   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6552 fi
6553
6554 if test "x$enable_dlopen" != xyes; then
6555   enable_dlopen=unknown
6556   enable_dlopen_self=unknown
6557   enable_dlopen_self_static=unknown
6558 else
6559   lt_cv_dlopen=no
6560   lt_cv_dlopen_libs=
6561
6562   case $host_os in
6563   beos*)
6564     lt_cv_dlopen="load_add_on"
6565     lt_cv_dlopen_libs=
6566     lt_cv_dlopen_self=yes
6567     ;;
6568
6569   cygwin* | mingw* | pw32*)
6570     lt_cv_dlopen="LoadLibrary"
6571     lt_cv_dlopen_libs=
6572    ;;
6573
6574   *)
6575     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6576 echo "configure:6577: checking for shl_load" >&5
6577 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6578   echo $ac_n "(cached) $ac_c" 1>&6
6579 else
6580   cat > conftest.$ac_ext <<EOF
6581 #line 6582 "configure"
6582 #include "confdefs.h"
6583 /* System header to define __stub macros and hopefully few prototypes,
6584     which can conflict with char shl_load(); below.  */
6585 #include <assert.h>
6586 /* Override any gcc2 internal prototype to avoid an error.  */
6587 /* We use char because int might match the return type of a gcc2
6588     builtin and then its argument prototype would still apply.  */
6589 char shl_load();
6590 char (*f)();
6591
6592 int main() {
6593
6594 /* The GNU C library defines this for functions which it implements
6595     to always fail with ENOSYS.  Some functions are actually named
6596     something starting with __ and the normal name is an alias.  */
6597 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6598 choke me
6599 #else
6600 f = shl_load;
6601 #endif
6602
6603 ; return 0; }
6604 EOF
6605 if { (eval echo configure:6606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6606   rm -rf conftest*
6607   eval "ac_cv_func_shl_load=yes"
6608 else
6609   echo "configure: failed program was:" >&5
6610   cat conftest.$ac_ext >&5
6611   rm -rf conftest*
6612   eval "ac_cv_func_shl_load=no"
6613 fi
6614 rm -f conftest*
6615 fi
6616
6617 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6618   echo "$ac_t""yes" 1>&6
6619   lt_cv_dlopen="shl_load"
6620 else
6621   echo "$ac_t""no" 1>&6
6622 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6623 echo "configure:6624: checking for shl_load in -ldld" >&5
6624 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6626   echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628   ac_save_LIBS="$LIBS"
6629 LIBS="-ldld  $LIBS"
6630 cat > conftest.$ac_ext <<EOF
6631 #line 6632 "configure"
6632 #include "confdefs.h"
6633 /* Override any gcc2 internal prototype to avoid an error.  */
6634 /* We use char because int might match the return type of a gcc2
6635     builtin and then its argument prototype would still apply.  */
6636 char shl_load();
6637
6638 int main() {
6639 shl_load()
6640 ; return 0; }
6641 EOF
6642 if { (eval echo configure:6643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6643   rm -rf conftest*
6644   eval "ac_cv_lib_$ac_lib_var=yes"
6645 else
6646   echo "configure: failed program was:" >&5
6647   cat conftest.$ac_ext >&5
6648   rm -rf conftest*
6649   eval "ac_cv_lib_$ac_lib_var=no"
6650 fi
6651 rm -f conftest*
6652 LIBS="$ac_save_LIBS"
6653
6654 fi
6655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6656   echo "$ac_t""yes" 1>&6
6657   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6658 else
6659   echo "$ac_t""no" 1>&6
6660 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6661 echo "configure:6662: checking for dlopen" >&5
6662 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6663   echo $ac_n "(cached) $ac_c" 1>&6
6664 else
6665   cat > conftest.$ac_ext <<EOF
6666 #line 6667 "configure"
6667 #include "confdefs.h"
6668 /* System header to define __stub macros and hopefully few prototypes,
6669     which can conflict with char dlopen(); below.  */
6670 #include <assert.h>
6671 /* Override any gcc2 internal prototype to avoid an error.  */
6672 /* We use char because int might match the return type of a gcc2
6673     builtin and then its argument prototype would still apply.  */
6674 char dlopen();
6675 char (*f)();
6676
6677 int main() {
6678
6679 /* The GNU C library defines this for functions which it implements
6680     to always fail with ENOSYS.  Some functions are actually named
6681     something starting with __ and the normal name is an alias.  */
6682 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6683 choke me
6684 #else
6685 f = dlopen;
6686 #endif
6687
6688 ; return 0; }
6689 EOF
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6691   rm -rf conftest*
6692   eval "ac_cv_func_dlopen=yes"
6693 else
6694   echo "configure: failed program was:" >&5
6695   cat conftest.$ac_ext >&5
6696   rm -rf conftest*
6697   eval "ac_cv_func_dlopen=no"
6698 fi
6699 rm -f conftest*
6700 fi
6701
6702 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6703   echo "$ac_t""yes" 1>&6
6704   lt_cv_dlopen="dlopen"
6705 else
6706   echo "$ac_t""no" 1>&6
6707 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6708 echo "configure:6709: checking for dlopen in -ldl" >&5
6709 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6711   echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713   ac_save_LIBS="$LIBS"
6714 LIBS="-ldl  $LIBS"
6715 cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6718 /* Override any gcc2 internal prototype to avoid an error.  */
6719 /* We use char because int might match the return type of a gcc2
6720     builtin and then its argument prototype would still apply.  */
6721 char dlopen();
6722
6723 int main() {
6724 dlopen()
6725 ; return 0; }
6726 EOF
6727 if { (eval echo configure:6728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6728   rm -rf conftest*
6729   eval "ac_cv_lib_$ac_lib_var=yes"
6730 else
6731   echo "configure: failed program was:" >&5
6732   cat conftest.$ac_ext >&5
6733   rm -rf conftest*
6734   eval "ac_cv_lib_$ac_lib_var=no"
6735 fi
6736 rm -f conftest*
6737 LIBS="$ac_save_LIBS"
6738
6739 fi
6740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6741   echo "$ac_t""yes" 1>&6
6742   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6743 else
6744   echo "$ac_t""no" 1>&6
6745 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6746 echo "configure:6747: checking for dlopen in -lsvld" >&5
6747 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6749   echo $ac_n "(cached) $ac_c" 1>&6
6750 else
6751   ac_save_LIBS="$LIBS"
6752 LIBS="-lsvld  $LIBS"
6753 cat > conftest.$ac_ext <<EOF
6754 #line 6755 "configure"
6755 #include "confdefs.h"
6756 /* Override any gcc2 internal prototype to avoid an error.  */
6757 /* We use char because int might match the return type of a gcc2
6758     builtin and then its argument prototype would still apply.  */
6759 char dlopen();
6760
6761 int main() {
6762 dlopen()
6763 ; return 0; }
6764 EOF
6765 if { (eval echo configure:6766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6766   rm -rf conftest*
6767   eval "ac_cv_lib_$ac_lib_var=yes"
6768 else
6769   echo "configure: failed program was:" >&5
6770   cat conftest.$ac_ext >&5
6771   rm -rf conftest*
6772   eval "ac_cv_lib_$ac_lib_var=no"
6773 fi
6774 rm -f conftest*
6775 LIBS="$ac_save_LIBS"
6776
6777 fi
6778 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6779   echo "$ac_t""yes" 1>&6
6780   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6781 else
6782   echo "$ac_t""no" 1>&6
6783 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6784 echo "configure:6785: checking for dld_link in -ldld" >&5
6785 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   ac_save_LIBS="$LIBS"
6790 LIBS="-ldld  $LIBS"
6791 cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 /* Override any gcc2 internal prototype to avoid an error.  */
6795 /* We use char because int might match the return type of a gcc2
6796     builtin and then its argument prototype would still apply.  */
6797 char dld_link();
6798
6799 int main() {
6800 dld_link()
6801 ; return 0; }
6802 EOF
6803 if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804   rm -rf conftest*
6805   eval "ac_cv_lib_$ac_lib_var=yes"
6806 else
6807   echo "configure: failed program was:" >&5
6808   cat conftest.$ac_ext >&5
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=no"
6811 fi
6812 rm -f conftest*
6813 LIBS="$ac_save_LIBS"
6814
6815 fi
6816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6819 else
6820   echo "$ac_t""no" 1>&6
6821 fi
6822
6823               
6824 fi
6825
6826             
6827 fi
6828
6829           
6830 fi
6831
6832         
6833 fi
6834
6835       
6836 fi
6837
6838     ;;
6839   esac
6840
6841   if test "x$lt_cv_dlopen" != xno; then
6842     enable_dlopen=yes
6843   else
6844     enable_dlopen=no
6845   fi
6846
6847   case $lt_cv_dlopen in
6848   dlopen)
6849     save_CPPFLAGS="$CPPFLAGS"
6850         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6851
6852     save_LDFLAGS="$LDFLAGS"
6853     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6854
6855     save_LIBS="$LIBS"
6856     LIBS="$lt_cv_dlopen_libs $LIBS"
6857
6858     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6859 echo "configure:6860: checking whether a program can dlopen itself" >&5
6860 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6861   echo $ac_n "(cached) $ac_c" 1>&6
6862 else
6863           if test "$cross_compiling" = yes; then :
6864   lt_cv_dlopen_self=cross
6865 else
6866     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6867   lt_status=$lt_dlunknown
6868   cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871
6872 #if HAVE_DLFCN_H
6873 #include <dlfcn.h>
6874 #endif
6875
6876 #include <stdio.h>
6877
6878 #ifdef RTLD_GLOBAL
6879 #  define LT_DLGLOBAL           RTLD_GLOBAL
6880 #else
6881 #  ifdef DL_GLOBAL
6882 #    define LT_DLGLOBAL         DL_GLOBAL
6883 #  else
6884 #    define LT_DLGLOBAL         0
6885 #  endif
6886 #endif
6887
6888 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6889    find out it does not work in some platform. */
6890 #ifndef LT_DLLAZY_OR_NOW
6891 #  ifdef RTLD_LAZY
6892 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6893 #  else
6894 #    ifdef DL_LAZY
6895 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6896 #    else
6897 #      ifdef RTLD_NOW
6898 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6899 #      else
6900 #        ifdef DL_NOW
6901 #          define LT_DLLAZY_OR_NOW      DL_NOW
6902 #        else
6903 #          define LT_DLLAZY_OR_NOW      0
6904 #        endif
6905 #      endif
6906 #    endif
6907 #  endif
6908 #endif
6909
6910 #ifdef __cplusplus
6911 extern "C" void exit (int);
6912 #endif
6913
6914 void fnord() { int i=42;}
6915 int main ()
6916 {
6917   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6918   int status = $lt_dlunknown;
6919
6920   if (self)
6921     {
6922       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6923       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6924       /* dlclose (self); */
6925     }
6926
6927     exit (status);
6928 }
6929 EOF
6930   if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6931     (./conftest; exit; ) 2>/dev/null
6932     lt_status=$?
6933     case x$lt_status in
6934       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6935       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6936       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6937     esac
6938   else :
6939     # compilation failed
6940     lt_cv_dlopen_self=no
6941   fi
6942 fi
6943 rm -fr conftest*
6944
6945     
6946 fi
6947
6948 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6949
6950     if test "x$lt_cv_dlopen_self" = xyes; then
6951       LDFLAGS="$LDFLAGS $link_static_flag"
6952       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6953 echo "configure:6954: checking whether a statically linked program can dlopen itself" >&5
6954 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6955   echo $ac_n "(cached) $ac_c" 1>&6
6956 else
6957           if test "$cross_compiling" = yes; then :
6958   lt_cv_dlopen_self_static=cross
6959 else
6960     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6961   lt_status=$lt_dlunknown
6962   cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965
6966 #if HAVE_DLFCN_H
6967 #include <dlfcn.h>
6968 #endif
6969
6970 #include <stdio.h>
6971
6972 #ifdef RTLD_GLOBAL
6973 #  define LT_DLGLOBAL           RTLD_GLOBAL
6974 #else
6975 #  ifdef DL_GLOBAL
6976 #    define LT_DLGLOBAL         DL_GLOBAL
6977 #  else
6978 #    define LT_DLGLOBAL         0
6979 #  endif
6980 #endif
6981
6982 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6983    find out it does not work in some platform. */
6984 #ifndef LT_DLLAZY_OR_NOW
6985 #  ifdef RTLD_LAZY
6986 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6987 #  else
6988 #    ifdef DL_LAZY
6989 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6990 #    else
6991 #      ifdef RTLD_NOW
6992 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6993 #      else
6994 #        ifdef DL_NOW
6995 #          define LT_DLLAZY_OR_NOW      DL_NOW
6996 #        else
6997 #          define LT_DLLAZY_OR_NOW      0
6998 #        endif
6999 #      endif
7000 #    endif
7001 #  endif
7002 #endif
7003
7004 #ifdef __cplusplus
7005 extern "C" void exit (int);
7006 #endif
7007
7008 void fnord() { int i=42;}
7009 int main ()
7010 {
7011   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7012   int status = $lt_dlunknown;
7013
7014   if (self)
7015     {
7016       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7017       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7018       /* dlclose (self); */
7019     }
7020
7021     exit (status);
7022 }
7023 EOF
7024   if { (eval echo configure:7025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7025     (./conftest; exit; ) 2>/dev/null
7026     lt_status=$?
7027     case x$lt_status in
7028       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7029       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7030       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7031     esac
7032   else :
7033     # compilation failed
7034     lt_cv_dlopen_self_static=no
7035   fi
7036 fi
7037 rm -fr conftest*
7038
7039       
7040 fi
7041
7042 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7043     fi
7044
7045     CPPFLAGS="$save_CPPFLAGS"
7046     LDFLAGS="$save_LDFLAGS"
7047     LIBS="$save_LIBS"
7048     ;;
7049   esac
7050
7051   case $lt_cv_dlopen_self in
7052   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7053   *) enable_dlopen_self=unknown ;;
7054   esac
7055
7056   case $lt_cv_dlopen_self_static in
7057   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7058   *) enable_dlopen_self_static=unknown ;;
7059   esac
7060 fi
7061
7062
7063 if test "$enable_shared" = yes && test "$GCC" = yes; then
7064   case $archive_cmds in
7065   *'~'*)
7066     # FIXME: we may have to deal with multi-command sequences.
7067     ;;
7068   '$CC '*)
7069     # Test whether the compiler implicitly links with -lc since on some
7070     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7071     # to ld, don't add -lc before -lgcc.
7072     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7073 echo "configure:7074: checking whether -lc should be explicitly linked in" >&5
7074     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077   $rm conftest*
7078     echo 'static int dummy;' > conftest.$ac_ext
7079
7080     if { (eval echo configure:7081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7081       soname=conftest
7082       lib=conftest
7083       libobjs=conftest.$ac_objext
7084       deplibs=
7085       wl=$lt_cv_prog_cc_wl
7086       compiler_flags=-v
7087       linker_flags=-v
7088       verstring=
7089       output_objdir=.
7090       libname=conftest
7091       save_allow_undefined_flag=$allow_undefined_flag
7092       allow_undefined_flag=
7093       if { (eval echo configure:7094: \"$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; }
7094       then
7095         lt_cv_archive_cmds_need_lc=no
7096       else
7097         lt_cv_archive_cmds_need_lc=yes
7098       fi
7099       allow_undefined_flag=$save_allow_undefined_flag
7100     else
7101       cat conftest.err 1>&5
7102     fi
7103 fi
7104
7105     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7106     ;;
7107   esac
7108 fi
7109 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7110
7111 # The second clause should only fire when bootstrapping the
7112 # libtool distribution, otherwise you forgot to ship ltmain.sh
7113 # with your package, and you will get complaints that there are
7114 # no rules to generate ltmain.sh.
7115 if test -f "$ltmain"; then
7116   :
7117 else
7118   # If there is no Makefile yet, we rely on a make rule to execute
7119   # `config.status --recheck' to rerun these tests and create the
7120   # libtool script then.
7121   test -f Makefile && make "$ltmain"
7122 fi
7123
7124 if test -f "$ltmain"; then
7125   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7126   $rm -f "${ofile}T"
7127
7128   echo creating $ofile
7129
7130   # Now quote all the things that may contain metacharacters while being
7131   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7132   # variables and quote the copies for generation of the libtool script.
7133   for var in echo old_CC old_CFLAGS \
7134     AR AR_FLAGS CC LD LN_S NM SHELL \
7135     reload_flag reload_cmds wl \
7136     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7137     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7138     library_names_spec soname_spec \
7139     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7140     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7141     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7142     old_striplib striplib file_magic_cmd export_symbols_cmds \
7143     deplibs_check_method allow_undefined_flag no_undefined_flag \
7144     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7145     global_symbol_to_c_name_address \
7146     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7147     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7148     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7149
7150     case $var in
7151     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7152     old_postinstall_cmds | old_postuninstall_cmds | \
7153     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7154     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7155     postinstall_cmds | postuninstall_cmds | \
7156     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7157       # Double-quote double-evaled strings.
7158       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7159       ;;
7160     *)
7161       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7162       ;;
7163     esac
7164   done
7165
7166   cat <<__EOF__ > "${ofile}T"
7167 #! $SHELL
7168
7169 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7170 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7171 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7172 #
7173 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7174 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7175 #
7176 # This program is free software; you can redistribute it and/or modify
7177 # it under the terms of the GNU General Public License as published by
7178 # the Free Software Foundation; either version 2 of the License, or
7179 # (at your option) any later version.
7180 #
7181 # This program is distributed in the hope that it will be useful, but
7182 # WITHOUT ANY WARRANTY; without even the implied warranty of
7183 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7184 # General Public License for more details.
7185 #
7186 # You should have received a copy of the GNU General Public License
7187 # along with this program; if not, write to the Free Software
7188 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7189 #
7190 # As a special exception to the GNU General Public License, if you
7191 # distribute this file as part of a program that contains a
7192 # configuration script generated by Autoconf, you may include it under
7193 # the same distribution terms that you use for the rest of that program.
7194
7195 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7196 Xsed="sed -e s/^X//"
7197
7198 # The HP-UX ksh and POSIX shell print the target directory to stdout
7199 # if CDPATH is set.
7200 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7201
7202 # ### BEGIN LIBTOOL CONFIG
7203
7204 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7205
7206 # Shell to use when invoking shell scripts.
7207 SHELL=$lt_SHELL
7208
7209 # Whether or not to build shared libraries.
7210 build_libtool_libs=$enable_shared
7211
7212 # Whether or not to build static libraries.
7213 build_old_libs=$enable_static
7214
7215 # Whether or not to add -lc for building shared libraries.
7216 build_libtool_need_lc=$need_lc
7217
7218 # Whether or not to optimize for fast installation.
7219 fast_install=$enable_fast_install
7220
7221 # The host system.
7222 host_alias=$host_alias
7223 host=$host
7224
7225 # An echo program that does not interpret backslashes.
7226 echo=$lt_echo
7227
7228 # The archiver.
7229 AR=$lt_AR
7230 AR_FLAGS=$lt_AR_FLAGS
7231
7232 # The default C compiler.
7233 CC=$lt_CC
7234
7235 # Is the compiler the GNU C compiler?
7236 with_gcc=$GCC
7237
7238 # The linker used to build libraries.
7239 LD=$lt_LD
7240
7241 # Whether we need hard or soft links.
7242 LN_S=$lt_LN_S
7243
7244 # A BSD-compatible nm program.
7245 NM=$lt_NM
7246
7247 # A symbol stripping program
7248 STRIP=$STRIP
7249
7250 # Used to examine libraries when file_magic_cmd begins "file"
7251 MAGIC_CMD=$MAGIC_CMD
7252
7253 # Used on cygwin: DLL creation program.
7254 DLLTOOL="$DLLTOOL"
7255
7256 # Used on cygwin: object dumper.
7257 OBJDUMP="$OBJDUMP"
7258
7259 # Used on cygwin: assembler.
7260 AS="$AS"
7261
7262 # The name of the directory that contains temporary libtool files.
7263 objdir=$objdir
7264
7265 # How to create reloadable object files.
7266 reload_flag=$lt_reload_flag
7267 reload_cmds=$lt_reload_cmds
7268
7269 # How to pass a linker flag through the compiler.
7270 wl=$lt_wl
7271
7272 # Object file suffix (normally "o").
7273 objext="$ac_objext"
7274
7275 # Old archive suffix (normally "a").
7276 libext="$libext"
7277
7278 # Executable file suffix (normally "").
7279 exeext="$exeext"
7280
7281 # Additional compiler flags for building library objects.
7282 pic_flag=$lt_pic_flag
7283 pic_mode=$pic_mode
7284
7285 # Does compiler simultaneously support -c and -o options?
7286 compiler_c_o=$lt_compiler_c_o
7287
7288 # Can we write directly to a .lo ?
7289 compiler_o_lo=$lt_compiler_o_lo
7290
7291 # Must we lock files when doing compilation ?
7292 need_locks=$lt_need_locks
7293
7294 # Do we need the lib prefix for modules?
7295 need_lib_prefix=$need_lib_prefix
7296
7297 # Do we need a version for libraries?
7298 need_version=$need_version
7299
7300 # Whether dlopen is supported.
7301 dlopen_support=$enable_dlopen
7302
7303 # Whether dlopen of programs is supported.
7304 dlopen_self=$enable_dlopen_self
7305
7306 # Whether dlopen of statically linked programs is supported.
7307 dlopen_self_static=$enable_dlopen_self_static
7308
7309 # Compiler flag to prevent dynamic linking.
7310 link_static_flag=$lt_link_static_flag
7311
7312 # Compiler flag to turn off builtin functions.
7313 no_builtin_flag=$lt_no_builtin_flag
7314
7315 # Compiler flag to allow reflexive dlopens.
7316 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7317
7318 # Compiler flag to generate shared objects directly from archives.
7319 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7320
7321 # Compiler flag to generate thread-safe objects.
7322 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7323
7324 # Library versioning type.
7325 version_type=$version_type
7326
7327 # Format of library name prefix.
7328 libname_spec=$lt_libname_spec
7329
7330 # List of archive names.  First name is the real one, the rest are links.
7331 # The last name is the one that the linker finds with -lNAME.
7332 library_names_spec=$lt_library_names_spec
7333
7334 # The coded name of the library, if different from the real name.
7335 soname_spec=$lt_soname_spec
7336
7337 # Commands used to build and install an old-style archive.
7338 RANLIB=$lt_RANLIB
7339 old_archive_cmds=$lt_old_archive_cmds
7340 old_postinstall_cmds=$lt_old_postinstall_cmds
7341 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7342
7343 # Create an old-style archive from a shared archive.
7344 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7345
7346 # Create a temporary old-style archive to link instead of a shared archive.
7347 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7348
7349 # Commands used to build and install a shared archive.
7350 archive_cmds=$lt_archive_cmds
7351 archive_expsym_cmds=$lt_archive_expsym_cmds
7352 postinstall_cmds=$lt_postinstall_cmds
7353 postuninstall_cmds=$lt_postuninstall_cmds
7354
7355 # Commands to strip libraries.
7356 old_striplib=$lt_old_striplib
7357 striplib=$lt_striplib
7358
7359 # Method to check whether dependent libraries are shared objects.
7360 deplibs_check_method=$lt_deplibs_check_method
7361
7362 # Command to use when deplibs_check_method == file_magic.
7363 file_magic_cmd=$lt_file_magic_cmd
7364
7365 # Flag that allows shared libraries with undefined symbols to be built.
7366 allow_undefined_flag=$lt_allow_undefined_flag
7367
7368 # Flag that forces no undefined symbols.
7369 no_undefined_flag=$lt_no_undefined_flag
7370
7371 # Commands used to finish a libtool library installation in a directory.
7372 finish_cmds=$lt_finish_cmds
7373
7374 # Same as above, but a single script fragment to be evaled but not shown.
7375 finish_eval=$lt_finish_eval
7376
7377 # Take the output of nm and produce a listing of raw symbols and C names.
7378 global_symbol_pipe=$lt_global_symbol_pipe
7379
7380 # Transform the output of nm in a proper C declaration
7381 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7382
7383 # Transform the output of nm in a C name address pair
7384 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7385
7386 # This is the shared library runtime path variable.
7387 runpath_var=$runpath_var
7388
7389 # This is the shared library path variable.
7390 shlibpath_var=$shlibpath_var
7391
7392 # Is shlibpath searched before the hard-coded library search path?
7393 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7394
7395 # How to hardcode a shared library path into an executable.
7396 hardcode_action=$hardcode_action
7397
7398 # Whether we should hardcode library paths into libraries.
7399 hardcode_into_libs=$hardcode_into_libs
7400
7401 # Flag to hardcode \$libdir into a binary during linking.
7402 # This must work even if \$libdir does not exist.
7403 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7404
7405 # Whether we need a single -rpath flag with a separated argument.
7406 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7407
7408 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7409 # resulting binary.
7410 hardcode_direct=$hardcode_direct
7411
7412 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7413 # resulting binary.
7414 hardcode_minus_L=$hardcode_minus_L
7415
7416 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7417 # the resulting binary.
7418 hardcode_shlibpath_var=$hardcode_shlibpath_var
7419
7420 # Variables whose values should be saved in libtool wrapper scripts and
7421 # restored at relink time.
7422 variables_saved_for_relink="$variables_saved_for_relink"
7423
7424 # Whether libtool must link a program against all its dependency libraries.
7425 link_all_deplibs=$link_all_deplibs
7426
7427 # Compile-time system search path for libraries
7428 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7429
7430 # Run-time system search path for libraries
7431 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7432
7433 # Fix the shell variable \$srcfile for the compiler.
7434 fix_srcfile_path="$fix_srcfile_path"
7435
7436 # Set to yes if exported symbols are required.
7437 always_export_symbols=$always_export_symbols
7438
7439 # The commands to list exported symbols.
7440 export_symbols_cmds=$lt_export_symbols_cmds
7441
7442 # The commands to extract the exported symbol list from a shared archive.
7443 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7444
7445 # Symbols that should not be listed in the preloaded symbols.
7446 exclude_expsyms=$lt_exclude_expsyms
7447
7448 # Symbols that must always be exported.
7449 include_expsyms=$lt_include_expsyms
7450
7451 # ### END LIBTOOL CONFIG
7452
7453 __EOF__
7454
7455   case $host_os in
7456   aix3*)
7457     cat <<\EOF >> "${ofile}T"
7458
7459 # AIX sometimes has problems with the GCC collect2 program.  For some
7460 # reason, if we set the COLLECT_NAMES environment variable, the problems
7461 # vanish in a puff of smoke.
7462 if test "X${COLLECT_NAMES+set}" != Xset; then
7463   COLLECT_NAMES=
7464   export COLLECT_NAMES
7465 fi
7466 EOF
7467     ;;
7468   esac
7469
7470   case $host_os in
7471   cygwin* | mingw* | pw32* | os2*)
7472     cat <<'EOF' >> "${ofile}T"
7473       # This is a source program that is used to create dlls on Windows
7474       # Don't remove nor modify the starting and closing comments
7475 # /* ltdll.c starts here */
7476 # #define WIN32_LEAN_AND_MEAN
7477 # #include <windows.h>
7478 # #undef WIN32_LEAN_AND_MEAN
7479 # #include <stdio.h>
7480 #
7481 # #ifndef __CYGWIN__
7482 # #  ifdef __CYGWIN32__
7483 # #    define __CYGWIN__ __CYGWIN32__
7484 # #  endif
7485 # #endif
7486 #
7487 # #ifdef __cplusplus
7488 # extern "C" {
7489 # #endif
7490 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7491 # #ifdef __cplusplus
7492 # }
7493 # #endif
7494 #
7495 # #ifdef __CYGWIN__
7496 # #include <cygwin/cygwin_dll.h>
7497 # DECLARE_CYGWIN_DLL( DllMain );
7498 # #endif
7499 # HINSTANCE __hDllInstance_base;
7500 #
7501 # BOOL APIENTRY
7502 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7503 # {
7504 #   __hDllInstance_base = hInst;
7505 #   return TRUE;
7506 # }
7507 # /* ltdll.c ends here */
7508         # This is a source program that is used to create import libraries
7509         # on Windows for dlls which lack them. Don't remove nor modify the
7510         # starting and closing comments
7511 # /* impgen.c starts here */
7512 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7513 #
7514 #  This file is part of GNU libtool.
7515 #
7516 #  This program is free software; you can redistribute it and/or modify
7517 #  it under the terms of the GNU General Public License as published by
7518 #  the Free Software Foundation; either version 2 of the License, or
7519 #  (at your option) any later version.
7520 #
7521 #  This program is distributed in the hope that it will be useful,
7522 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7523 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7524 #  GNU General Public License for more details.
7525 #
7526 #  You should have received a copy of the GNU General Public License
7527 #  along with this program; if not, write to the Free Software
7528 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7529 #  */
7530 #
7531 # #include <stdio.h>            /* for printf() */
7532 # #include <unistd.h>           /* for open(), lseek(), read() */
7533 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7534 # #include <string.h>           /* for strdup() */
7535 #
7536 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7537 # #ifndef O_BINARY
7538 # #define O_BINARY 0
7539 # #endif
7540 #
7541 # static unsigned int
7542 # pe_get16 (fd, offset)
7543 #      int fd;
7544 #      int offset;
7545 # {
7546 #   unsigned char b[2];
7547 #   lseek (fd, offset, SEEK_SET);
7548 #   read (fd, b, 2);
7549 #   return b[0] + (b[1]<<8);
7550 # }
7551 #
7552 # static unsigned int
7553 # pe_get32 (fd, offset)
7554 #     int fd;
7555 #     int offset;
7556 # {
7557 #   unsigned char b[4];
7558 #   lseek (fd, offset, SEEK_SET);
7559 #   read (fd, b, 4);
7560 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7561 # }
7562 #
7563 # static unsigned int
7564 # pe_as32 (ptr)
7565 #      void *ptr;
7566 # {
7567 #   unsigned char *b = ptr;
7568 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7569 # }
7570 #
7571 # int
7572 # main (argc, argv)
7573 #     int argc;
7574 #     char *argv[];
7575 # {
7576 #     int dll;
7577 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7578 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7579 #     unsigned long name_rvas, nexp;
7580 #     unsigned char *expdata, *erva;
7581 #     char *filename, *dll_name;
7582 #
7583 #     filename = argv[1];
7584 #
7585 #     dll = open(filename, O_RDONLY|O_BINARY);
7586 #     if (dll < 1)
7587 #       return 1;
7588 #
7589 #     dll_name = filename;
7590 #
7591 #     for (i=0; filename[i]; i++)
7592 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7593 #           dll_name = filename + i +1;
7594 #
7595 #     pe_header_offset = pe_get32 (dll, 0x3c);
7596 #     opthdr_ofs = pe_header_offset + 4 + 20;
7597 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7598 #
7599 #     if (num_entries < 1) /* no exports */
7600 #       return 1;
7601 #
7602 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7603 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7604 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7605 #     secptr = (pe_header_offset + 4 + 20 +
7606 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7607 #
7608 #     expptr = 0;
7609 #     for (i = 0; i < nsections; i++)
7610 #     {
7611 #       char sname[8];
7612 #       unsigned long secptr1 = secptr + 40 * i;
7613 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7614 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7615 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7616 #       lseek(dll, secptr1, SEEK_SET);
7617 #       read(dll, sname, 8);
7618 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7619 #       {
7620 #           expptr = fptr + (export_rva - vaddr);
7621 #           if (export_rva + export_size > vaddr + vsize)
7622 #               export_size = vsize - (export_rva - vaddr);
7623 #           break;
7624 #       }
7625 #     }
7626 #
7627 #     expdata = (unsigned char*)malloc(export_size);
7628 #     lseek (dll, expptr, SEEK_SET);
7629 #     read (dll, expdata, export_size);
7630 #     erva = expdata - export_rva;
7631 #
7632 #     nexp = pe_as32 (expdata+24);
7633 #     name_rvas = pe_as32 (expdata+32);
7634 #
7635 #     printf ("EXPORTS\n");
7636 #     for (i = 0; i<nexp; i++)
7637 #     {
7638 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7639 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7640 #     }
7641 #
7642 #     return 0;
7643 # }
7644 # /* impgen.c ends here */
7645
7646 EOF
7647     ;;
7648   esac
7649
7650   # We use sed instead of cat because bash on DJGPP gets confused if
7651   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7652   # text mode, it properly converts lines to CR/LF.  This bash problem
7653   # is reportedly fixed, but why not run on old versions too?
7654   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7655
7656   mv -f "${ofile}T" "$ofile" || \
7657     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7658   chmod +x "$ofile"
7659 fi
7660
7661
7662
7663
7664
7665 # This can be used to rebuild libtool when needed
7666 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7667
7668 # Always use our own libtool.
7669 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7670
7671 # Prevent multiple expansion
7672
7673
7674
7675 for ac_prog in mawk gawk nawk awk
7676 do
7677 # Extract the first word of "$ac_prog", so it can be a program name with args.
7678 set dummy $ac_prog; ac_word=$2
7679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7680 echo "configure:7681: checking for $ac_word" >&5
7681 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684   if test -n "$AWK"; then
7685   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7686 else
7687   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7688   ac_dummy="$PATH"
7689   for ac_dir in $ac_dummy; do
7690     test -z "$ac_dir" && ac_dir=.
7691     if test -f $ac_dir/$ac_word; then
7692       ac_cv_prog_AWK="$ac_prog"
7693       break
7694     fi
7695   done
7696   IFS="$ac_save_ifs"
7697 fi
7698 fi
7699 AWK="$ac_cv_prog_AWK"
7700 if test -n "$AWK"; then
7701   echo "$ac_t""$AWK" 1>&6
7702 else
7703   echo "$ac_t""no" 1>&6
7704 fi
7705
7706 test -n "$AWK" && break
7707 done
7708
7709 # test for ln hardlink support
7710 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7711 echo "configure:7712: checking whether ln works" >&5
7712 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   rm -f conftest.src conftest.dst
7716 echo "conftest" > conftest.src
7717 if ln conftest.src conftest.dst 2>/dev/null
7718 then
7719   ol_cv_prog_LN_H="ln"
7720 else
7721   ol_cv_prog_LN_H="cp"
7722 fi
7723 rm -f conftest.src conftest.dst
7724
7725 fi
7726 LN_H="$ol_cv_prog_LN_H"
7727 if test "$ol_cv_prog_LN_H" = "ln"; then
7728         echo "$ac_t""yes" 1>&6
7729 else
7730         echo "$ac_t""no" 1>&6
7731 fi
7732
7733 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7734 echo "configure:7735: checking whether ln -s works" >&5
7735 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7736   echo $ac_n "(cached) $ac_c" 1>&6
7737 else
7738   rm -f conftestdata
7739 if ln -s X conftestdata 2>/dev/null
7740 then
7741   rm -f conftestdata
7742   ac_cv_prog_LN_S="ln -s"
7743 else
7744   ac_cv_prog_LN_S=ln
7745 fi
7746 fi
7747 LN_S="$ac_cv_prog_LN_S"
7748 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7749   echo "$ac_t""yes" 1>&6
7750 else
7751   echo "$ac_t""no" 1>&6
7752 fi
7753
7754
7755 # Extract the first word of "sendmail", so it can be a program name with args.
7756 set dummy sendmail; ac_word=$2
7757 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7758 echo "configure:7759: checking for $ac_word" >&5
7759 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   case "$SENDMAIL" in
7763   /*)
7764   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7765   ;;
7766   ?:/*)
7767   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7768   ;;
7769   *)
7770   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7771   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7772   for ac_dir in $ac_dummy; do 
7773     test -z "$ac_dir" && ac_dir=.
7774     if test -f $ac_dir/$ac_word; then
7775       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7776       break
7777     fi
7778   done
7779   IFS="$ac_save_ifs"
7780   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7781   ;;
7782 esac
7783 fi
7784 SENDMAIL="$ac_cv_path_SENDMAIL"
7785 if test -n "$SENDMAIL"; then
7786   echo "$ac_t""$SENDMAIL" 1>&6
7787 else
7788   echo "$ac_t""no" 1>&6
7789 fi
7790
7791 # Extract the first word of "vi", so it can be a program name with args.
7792 set dummy vi; ac_word=$2
7793 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7794 echo "configure:7795: checking for $ac_word" >&5
7795 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7796   echo $ac_n "(cached) $ac_c" 1>&6
7797 else
7798   case "$EDITOR" in
7799   /*)
7800   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7801   ;;
7802   ?:/*)
7803   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7804   ;;
7805   *)
7806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7807   ac_dummy="$PATH:/usr/ucb"
7808   for ac_dir in $ac_dummy; do 
7809     test -z "$ac_dir" && ac_dir=.
7810     if test -f $ac_dir/$ac_word; then
7811       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7812       break
7813     fi
7814   done
7815   IFS="$ac_save_ifs"
7816   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7817   ;;
7818 esac
7819 fi
7820 EDITOR="$ac_cv_path_EDITOR"
7821 if test -n "$EDITOR"; then
7822   echo "$ac_t""$EDITOR" 1>&6
7823 else
7824   echo "$ac_t""no" 1>&6
7825 fi
7826
7827
7828 ol_link_perl=no
7829 if test $ol_enable_perl != no ; then
7830         # Extract the first word of "perl", so it can be a program name with args.
7831 set dummy perl; ac_word=$2
7832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7833 echo "configure:7834: checking for $ac_word" >&5
7834 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837   case "$PERLBIN" in
7838   /*)
7839   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7840   ;;
7841   ?:/*)
7842   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7843   ;;
7844   *)
7845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7846   ac_dummy="$PATH"
7847   for ac_dir in $ac_dummy; do 
7848     test -z "$ac_dir" && ac_dir=.
7849     if test -f $ac_dir/$ac_word; then
7850       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7851       break
7852     fi
7853   done
7854   IFS="$ac_save_ifs"
7855   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7856   ;;
7857 esac
7858 fi
7859 PERLBIN="$ac_cv_path_PERLBIN"
7860 if test -n "$PERLBIN"; then
7861   echo "$ac_t""$PERLBIN" 1>&6
7862 else
7863   echo "$ac_t""no" 1>&6
7864 fi
7865
7866
7867         if test "no$PERLBIN" = "no" ; then
7868                 if test $ol_enable_perl = yes ; then
7869                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7870                 fi
7871
7872         else
7873                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7874                 if test x"$ol_with_perl_module" = "xstatic" ; then
7875                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7876                 else
7877                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7878                 fi
7879                                 ol_link_perl=yes
7880         fi
7881 fi
7882
7883 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7884 echo "configure:7885: checking how to run the C preprocessor" >&5
7885 # On Suns, sometimes $CPP names a directory.
7886 if test -n "$CPP" && test -d "$CPP"; then
7887   CPP=
7888 fi
7889 if test -z "$CPP"; then
7890 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7891   echo $ac_n "(cached) $ac_c" 1>&6
7892 else
7893     # This must be in double quotes, not single quotes, because CPP may get
7894   # substituted into the Makefile and "${CC-cc}" will confuse make.
7895   CPP="${CC-cc} -E"
7896   # On the NeXT, cc -E runs the code through the compiler's parser,
7897   # not just through cpp.
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 #include <assert.h>
7902 Syntax Error
7903 EOF
7904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7905 { (eval echo configure:7906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7907 if test -z "$ac_err"; then
7908   :
7909 else
7910   echo "$ac_err" >&5
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   CPP="${CC-cc} -E -traditional-cpp"
7915   cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7918 #include <assert.h>
7919 Syntax Error
7920 EOF
7921 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7922 { (eval echo configure:7923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7923 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7924 if test -z "$ac_err"; then
7925   :
7926 else
7927   echo "$ac_err" >&5
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -rf conftest*
7931   CPP="${CC-cc} -nologo -E"
7932   cat > conftest.$ac_ext <<EOF
7933 #line 7934 "configure"
7934 #include "confdefs.h"
7935 #include <assert.h>
7936 Syntax Error
7937 EOF
7938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7939 { (eval echo configure:7940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7941 if test -z "$ac_err"; then
7942   :
7943 else
7944   echo "$ac_err" >&5
7945   echo "configure: failed program was:" >&5
7946   cat conftest.$ac_ext >&5
7947   rm -rf conftest*
7948   CPP=/lib/cpp
7949 fi
7950 rm -f conftest*
7951 fi
7952 rm -f conftest*
7953 fi
7954 rm -f conftest*
7955   ac_cv_prog_CPP="$CPP"
7956 fi
7957   CPP="$ac_cv_prog_CPP"
7958 else
7959   ac_cv_prog_CPP="$CPP"
7960 fi
7961 echo "$ac_t""$CPP" 1>&6
7962
7963
7964 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7965         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7966
7967 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7968         echo "configure: warning: programs compiled here do run here..." 1>&2
7969         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7970
7971 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7972         echo "configure: warning: programs compiled here do not run here..." 1>&2
7973         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7974 fi
7975
7976
7977 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7978 echo "configure:7979: checking for Cygwin environment" >&5
7979 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7980   echo $ac_n "(cached) $ac_c" 1>&6
7981 else
7982   cat > conftest.$ac_ext <<EOF
7983 #line 7984 "configure"
7984 #include "confdefs.h"
7985
7986 int main() {
7987
7988 #ifndef __CYGWIN__
7989 #define __CYGWIN__ __CYGWIN32__
7990 #endif
7991 return __CYGWIN__;
7992 ; return 0; }
7993 EOF
7994 if { (eval echo configure:7995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7995   rm -rf conftest*
7996   ac_cv_cygwin=yes
7997 else
7998   echo "configure: failed program was:" >&5
7999   cat conftest.$ac_ext >&5
8000   rm -rf conftest*
8001   ac_cv_cygwin=no
8002 fi
8003 rm -f conftest*
8004 fi
8005
8006 echo "$ac_t""$ac_cv_cygwin" 1>&6
8007 CYGWIN=
8008 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8009 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8010 echo "configure:8011: checking for mingw32 environment" >&5
8011 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   cat > conftest.$ac_ext <<EOF
8015 #line 8016 "configure"
8016 #include "confdefs.h"
8017
8018 int main() {
8019 return __MINGW32__;
8020 ; return 0; }
8021 EOF
8022 if { (eval echo configure:8023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8023   rm -rf conftest*
8024   ac_cv_mingw32=yes
8025 else
8026   echo "configure: failed program was:" >&5
8027   cat conftest.$ac_ext >&5
8028   rm -rf conftest*
8029   ac_cv_mingw32=no
8030 fi
8031 rm -f conftest*
8032 fi
8033
8034 echo "$ac_t""$ac_cv_mingw32" 1>&6
8035 MINGW32=
8036 test "$ac_cv_mingw32" = yes && MINGW32=yes
8037
8038
8039
8040 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8041 echo "configure:8042: checking for executable suffix" >&5
8042 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8046   ac_cv_exeext=.exe
8047 else
8048   rm -f conftest*
8049   echo 'int main () { return 0; }' > conftest.$ac_ext
8050   ac_cv_exeext=
8051   if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8052     for file in conftest.*; do
8053       case $file in
8054       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8055       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8056       esac
8057     done
8058   else
8059     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8060   fi
8061   rm -f conftest*
8062   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8063 fi
8064 fi
8065
8066 EXEEXT=""
8067 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8068 echo "$ac_t""${ac_cv_exeext}" 1>&6
8069 ac_exeext=$EXEEXT
8070
8071 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8072 echo "configure:8073: checking for object suffix" >&5
8073 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8074   echo $ac_n "(cached) $ac_c" 1>&6
8075 else
8076   rm -f conftest*
8077 echo 'int i = 1;' > conftest.$ac_ext
8078 if { (eval echo configure:8079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8079   for ac_file in conftest.*; do
8080     case $ac_file in
8081     *.c) ;;
8082     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8083     esac
8084   done
8085 else
8086   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8087 fi
8088 rm -f conftest*
8089 fi
8090
8091 echo "$ac_t""$ac_cv_objext" 1>&6
8092 OBJEXT=$ac_cv_objext
8093 ac_objext=$ac_cv_objext
8094
8095
8096 cat >> confdefs.h <<EOF
8097 #define EXEEXT "${EXEEXT}"
8098 EOF
8099
8100
8101 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8102 echo "configure:8103: checking for be_app in -lbe" >&5
8103 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8105   echo $ac_n "(cached) $ac_c" 1>&6
8106 else
8107   ac_save_LIBS="$LIBS"
8108 LIBS="-lbe -lroot -lnet $LIBS"
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 /* Override any gcc2 internal prototype to avoid an error.  */
8113 /* We use char because int might match the return type of a gcc2
8114     builtin and then its argument prototype would still apply.  */
8115 char be_app();
8116
8117 int main() {
8118 be_app()
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=yes"
8124 else
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_lib_$ac_lib_var=no"
8129 fi
8130 rm -f conftest*
8131 LIBS="$ac_save_LIBS"
8132
8133 fi
8134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8135   echo "$ac_t""yes" 1>&6
8136   LIBS="$LIBS -lbe -lroot -lnet"
8137 else
8138   echo "$ac_t""no" 1>&6
8139 :
8140 fi
8141
8142
8143
8144
8145
8146 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8147 echo "configure:8148: checking for ${CC-cc} option to accept ANSI C" >&5
8148 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8149   echo $ac_n "(cached) $ac_c" 1>&6
8150 else
8151   am_cv_prog_cc_stdc=no
8152 ac_save_CC="$CC"
8153 # Don't try gcc -ansi; that turns off useful extensions and
8154 # breaks some systems' header files.
8155 # AIX                   -qlanglvl=ansi
8156 # Ultrix and OSF/1      -std1
8157 # HP-UX 10.20 and later -Ae
8158 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8159 # SVR4                  -Xc -D__EXTENSIONS__
8160 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8161 do
8162   CC="$ac_save_CC $ac_arg"
8163   cat > conftest.$ac_ext <<EOF
8164 #line 8165 "configure"
8165 #include "confdefs.h"
8166 #include <stdarg.h>
8167 #include <stdio.h>
8168 #include <sys/types.h>
8169 #include <sys/stat.h>
8170 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8171 struct buf { int x; };
8172 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8173 static char *e (p, i)
8174      char **p;
8175      int i;
8176 {
8177   return p[i];
8178 }
8179 static char *f (char * (*g) (char **, int), char **p, ...)
8180 {
8181   char *s;
8182   va_list v;
8183   va_start (v,p);
8184   s = g (p, va_arg (v,int));
8185   va_end (v);
8186   return s;
8187 }
8188 int test (int i, double x);
8189 struct s1 {int (*f) (int a);};
8190 struct s2 {int (*f) (double a);};
8191 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8192 int argc;
8193 char **argv;
8194
8195 int main() {
8196
8197 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8198
8199 ; return 0; }
8200 EOF
8201 if { (eval echo configure:8202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8202   rm -rf conftest*
8203   am_cv_prog_cc_stdc="$ac_arg"; break
8204 else
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207 fi
8208 rm -f conftest*
8209 done
8210 CC="$ac_save_CC"
8211
8212 fi
8213
8214 if test -z "$am_cv_prog_cc_stdc"; then
8215   echo "$ac_t""none needed" 1>&6
8216 else
8217   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8218 fi
8219 case "x$am_cv_prog_cc_stdc" in
8220   x|xno) ;;
8221   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8222 esac
8223
8224 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8225         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8226 fi
8227
8228 # test for make depend flag
8229 OL_MKDEP=
8230 OL_MKDEP_FLAGS=
8231 if test -z "${MKDEP}"; then
8232         OL_MKDEP="${CC-cc}"
8233         if test -z "${MKDEP_FLAGS}"; then
8234                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8235 echo "configure:8236: checking for ${OL_MKDEP} depend flag" >&5
8236 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8237   echo $ac_n "(cached) $ac_c" 1>&6
8238 else
8239   
8240                         ol_cv_mkdep=no
8241                         for flag in "-M" "-xM"; do
8242                                 cat > conftest.c <<EOF
8243  noCode;
8244 EOF
8245                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8246                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8247                                 then
8248                                         if test ! -f conftest."${ac_object}" ; then
8249                                                 ol_cv_mkdep=$flag
8250                                                 OL_MKDEP_FLAGS="$flag"
8251                                                 break
8252                                         fi
8253                                 fi
8254                         done
8255                         rm -f conftest*
8256                 
8257 fi
8258
8259 echo "$ac_t""$ol_cv_mkdep" 1>&6
8260         else
8261                 cc_cv_mkdep=yes
8262                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8263         fi
8264 else
8265         cc_cv_mkdep=yes
8266         OL_MKDEP="${MKDEP}"
8267         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8268 fi
8269
8270
8271
8272 if test "${ol_cv_mkdep}" = no ; then
8273         # this will soon become an error
8274         echo "configure: warning: do not know how to generate dependencies" 1>&2
8275 fi
8276
8277 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8278 echo "configure:8279: checking for afopen in -ls" >&5
8279 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8280 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8281   echo $ac_n "(cached) $ac_c" 1>&6
8282 else
8283   ac_save_LIBS="$LIBS"
8284 LIBS="-ls  $LIBS"
8285 cat > conftest.$ac_ext <<EOF
8286 #line 8287 "configure"
8287 #include "confdefs.h"
8288 /* Override any gcc2 internal prototype to avoid an error.  */
8289 /* We use char because int might match the return type of a gcc2
8290     builtin and then its argument prototype would still apply.  */
8291 char afopen();
8292
8293 int main() {
8294 afopen()
8295 ; return 0; }
8296 EOF
8297 if { (eval echo configure:8298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8298   rm -rf conftest*
8299   eval "ac_cv_lib_$ac_lib_var=yes"
8300 else
8301   echo "configure: failed program was:" >&5
8302   cat conftest.$ac_ext >&5
8303   rm -rf conftest*
8304   eval "ac_cv_lib_$ac_lib_var=no"
8305 fi
8306 rm -f conftest*
8307 LIBS="$ac_save_LIBS"
8308
8309 fi
8310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8311   echo "$ac_t""yes" 1>&6
8312   
8313         AUTH_LIBS=-ls
8314         cat >> confdefs.h <<\EOF
8315 #define HAVE_AIX_SECURITY 1
8316 EOF
8317
8318
8319 else
8320   echo "$ac_t""no" 1>&6
8321 fi
8322
8323
8324
8325 ol_link_modules=no
8326 if test $ol_enable_modules != no ; then
8327         for ac_hdr in ltdl.h
8328 do
8329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8331 echo "configure:8332: checking for $ac_hdr" >&5
8332 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 #include <$ac_hdr>
8339 EOF
8340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8341 { (eval echo configure:8342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8343 if test -z "$ac_err"; then
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=yes"
8346 else
8347   echo "$ac_err" >&5
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_header_$ac_safe=no"
8352 fi
8353 rm -f conftest*
8354 fi
8355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8358   cat >> confdefs.h <<EOF
8359 #define $ac_tr_hdr 1
8360 EOF
8361  
8362 else
8363   echo "$ac_t""no" 1>&6
8364 fi
8365 done
8366
8367
8368         if test $ac_cv_header_ltdl_h = no ; then
8369                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8370         fi
8371
8372         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8373 echo "configure:8374: checking for lt_dlinit in -lltdl" >&5
8374 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8376   echo $ac_n "(cached) $ac_c" 1>&6
8377 else
8378   ac_save_LIBS="$LIBS"
8379 LIBS="-lltdl  $LIBS"
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 /* Override any gcc2 internal prototype to avoid an error.  */
8384 /* We use char because int might match the return type of a gcc2
8385     builtin and then its argument prototype would still apply.  */
8386 char lt_dlinit();
8387
8388 int main() {
8389 lt_dlinit()
8390 ; return 0; }
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8393   rm -rf conftest*
8394   eval "ac_cv_lib_$ac_lib_var=yes"
8395 else
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -rf conftest*
8399   eval "ac_cv_lib_$ac_lib_var=no"
8400 fi
8401 rm -f conftest*
8402 LIBS="$ac_save_LIBS"
8403
8404 fi
8405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407   
8408                 MODULES_LIBS=-lltdl
8409                 cat >> confdefs.h <<\EOF
8410 #define HAVE_LIBLTDL 1
8411 EOF
8412
8413         
8414 else
8415   echo "$ac_t""no" 1>&6
8416 fi
8417
8418
8419         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8420                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8421         fi
8422         ol_link_modules=yes
8423 else
8424         ol_with_bdb_module=static
8425         ol_with_dnssrv_module=static
8426         ol_with_ldap_module=static
8427         ol_with_ldbm_module=static
8428         ol_with_meta_module=static
8429         ol_with_monitor_module=static
8430         ol_with_null_module=static
8431         ol_with_passwd_module=static
8432         ol_with_perl_module=static
8433         ol_with_shell_module=static
8434         ol_with_tcl_module=static
8435         ol_with_sql_module=static
8436 fi
8437
8438 # test for EBCDIC
8439 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8440 echo "configure:8441: checking for EBCDIC" >&5
8441 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   
8445         cat > conftest.$ac_ext <<EOF
8446 #line 8447 "configure"
8447 #include "confdefs.h"
8448
8449 #if !('M' == 0xd4)
8450 #include <__ASCII__/generate_error.h>
8451 #endif
8452
8453 EOF
8454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8455 { (eval echo configure:8456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8457 if test -z "$ac_err"; then
8458   rm -rf conftest*
8459   ol_cv_cpp_ebcdic=yes
8460 else
8461   echo "$ac_err" >&5
8462   echo "configure: failed program was:" >&5
8463   cat conftest.$ac_ext >&5
8464   rm -rf conftest*
8465   ol_cv_cpp_ebcdic=no
8466 fi
8467 rm -f conftest*
8468 fi
8469
8470 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8471 if test $ol_cv_cpp_ebcdic = yes ; then
8472         cat >> confdefs.h <<\EOF
8473 #define HAVE_EBCDIC 1
8474 EOF
8475
8476 fi
8477
8478 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8479 echo "configure:8480: checking for ANSI C header files" >&5
8480 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8481   echo $ac_n "(cached) $ac_c" 1>&6
8482 else
8483   cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 #include <stdlib.h>
8487 #include <stdarg.h>
8488 #include <string.h>
8489 #include <float.h>
8490 EOF
8491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8492 { (eval echo configure:8493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8494 if test -z "$ac_err"; then
8495   rm -rf conftest*
8496   ol_cv_header_stdc=yes
8497 else
8498   echo "$ac_err" >&5
8499   echo "configure: failed program was:" >&5
8500   cat conftest.$ac_ext >&5
8501   rm -rf conftest*
8502   ol_cv_header_stdc=no
8503 fi
8504 rm -f conftest*
8505
8506 if test $ol_cv_header_stdc = yes; then
8507   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8508 cat > conftest.$ac_ext <<EOF
8509 #line 8510 "configure"
8510 #include "confdefs.h"
8511 #include <string.h>
8512 EOF
8513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8514   egrep "memchr" >/dev/null 2>&1; then
8515   :
8516 else
8517   rm -rf conftest*
8518   ol_cv_header_stdc=no
8519 fi
8520 rm -f conftest*
8521
8522 fi
8523
8524 if test $ol_cv_header_stdc = yes; then
8525   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8526 cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 #include <stdlib.h>
8530 EOF
8531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8532   egrep "free" >/dev/null 2>&1; then
8533   :
8534 else
8535   rm -rf conftest*
8536   ol_cv_header_stdc=no
8537 fi
8538 rm -f conftest*
8539
8540 fi
8541
8542 if test $ol_cv_header_stdc = yes; then
8543   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8544 if test "$cross_compiling" = yes; then
8545   :
8546 else
8547   cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 #include <ctype.h>
8551 #ifndef HAVE_EBCDIC
8552 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8553 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8554 #else
8555 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8556                 || ('j' <= (c) && (c) <= 'r') \
8557                 || ('s' <= (c) && (c) <= 'z'))
8558 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8559 #endif
8560 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8561 int main () { int i; for (i = 0; i < 256; i++)
8562 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8563 exit (0); }
8564
8565 EOF
8566 if { (eval echo configure:8567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8567 then
8568   :
8569 else
8570   echo "configure: failed program was:" >&5
8571   cat conftest.$ac_ext >&5
8572   rm -fr conftest*
8573   ol_cv_header_stdc=no
8574 fi
8575 rm -fr conftest*
8576 fi
8577
8578 fi
8579 fi
8580
8581 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8582 if test $ol_cv_header_stdc = yes; then
8583   cat >> confdefs.h <<\EOF
8584 #define STDC_HEADERS 1
8585 EOF
8586
8587 fi
8588 ac_cv_header_stdc=disable
8589
8590
8591 if test $ol_cv_header_stdc != yes; then
8592         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8593 fi
8594
8595 ac_header_dirent=no
8596 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8597 do
8598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8599 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8600 echo "configure:8601: checking for $ac_hdr that defines DIR" >&5
8601 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8602   echo $ac_n "(cached) $ac_c" 1>&6
8603 else
8604   cat > conftest.$ac_ext <<EOF
8605 #line 8606 "configure"
8606 #include "confdefs.h"
8607 #include <sys/types.h>
8608 #include <$ac_hdr>
8609 int main() {
8610 DIR *dirp = 0;
8611 ; return 0; }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8614   rm -rf conftest*
8615   eval "ac_cv_header_dirent_$ac_safe=yes"
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   eval "ac_cv_header_dirent_$ac_safe=no"
8621 fi
8622 rm -f conftest*
8623 fi
8624 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8625   echo "$ac_t""yes" 1>&6
8626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8627   cat >> confdefs.h <<EOF
8628 #define $ac_tr_hdr 1
8629 EOF
8630  ac_header_dirent=$ac_hdr; break
8631 else
8632   echo "$ac_t""no" 1>&6
8633 fi
8634 done
8635 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8636 if test $ac_header_dirent = dirent.h; then
8637 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8638 echo "configure:8639: checking for opendir in -ldir" >&5
8639 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8641   echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643   ac_save_LIBS="$LIBS"
8644 LIBS="-ldir  $LIBS"
8645 cat > conftest.$ac_ext <<EOF
8646 #line 8647 "configure"
8647 #include "confdefs.h"
8648 /* Override any gcc2 internal prototype to avoid an error.  */
8649 /* We use char because int might match the return type of a gcc2
8650     builtin and then its argument prototype would still apply.  */
8651 char opendir();
8652
8653 int main() {
8654 opendir()
8655 ; return 0; }
8656 EOF
8657 if { (eval echo configure:8658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8658   rm -rf conftest*
8659   eval "ac_cv_lib_$ac_lib_var=yes"
8660 else
8661   echo "configure: failed program was:" >&5
8662   cat conftest.$ac_ext >&5
8663   rm -rf conftest*
8664   eval "ac_cv_lib_$ac_lib_var=no"
8665 fi
8666 rm -f conftest*
8667 LIBS="$ac_save_LIBS"
8668
8669 fi
8670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8671   echo "$ac_t""yes" 1>&6
8672   LIBS="$LIBS -ldir"
8673 else
8674   echo "$ac_t""no" 1>&6
8675 fi
8676
8677 else
8678 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8679 echo "configure:8680: checking for opendir in -lx" >&5
8680 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8682   echo $ac_n "(cached) $ac_c" 1>&6
8683 else
8684   ac_save_LIBS="$LIBS"
8685 LIBS="-lx  $LIBS"
8686 cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 /* Override any gcc2 internal prototype to avoid an error.  */
8690 /* We use char because int might match the return type of a gcc2
8691     builtin and then its argument prototype would still apply.  */
8692 char opendir();
8693
8694 int main() {
8695 opendir()
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8699   rm -rf conftest*
8700   eval "ac_cv_lib_$ac_lib_var=yes"
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   eval "ac_cv_lib_$ac_lib_var=no"
8706 fi
8707 rm -f conftest*
8708 LIBS="$ac_save_LIBS"
8709
8710 fi
8711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8712   echo "$ac_t""yes" 1>&6
8713   LIBS="$LIBS -lx"
8714 else
8715   echo "$ac_t""no" 1>&6
8716 fi
8717
8718 fi
8719
8720 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8721 echo "configure:8722: checking for sys/wait.h that is POSIX.1 compatible" >&5
8722 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8723   echo $ac_n "(cached) $ac_c" 1>&6
8724 else
8725   cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 #include <sys/types.h>
8729 #include <sys/wait.h>
8730 #ifndef WEXITSTATUS
8731 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8732 #endif
8733 #ifndef WIFEXITED
8734 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8735 #endif
8736 int main() {
8737 int s;
8738 wait (&s);
8739 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8740 ; return 0; }
8741 EOF
8742 if { (eval echo configure:8743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8743   rm -rf conftest*
8744   ac_cv_header_sys_wait_h=yes
8745 else
8746   echo "configure: failed program was:" >&5
8747   cat conftest.$ac_ext >&5
8748   rm -rf conftest*
8749   ac_cv_header_sys_wait_h=no
8750 fi
8751 rm -f conftest*
8752 fi
8753
8754 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8755 if test $ac_cv_header_sys_wait_h = yes; then
8756   cat >> confdefs.h <<\EOF
8757 #define HAVE_SYS_WAIT_H 1
8758 EOF
8759
8760 fi
8761
8762 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8763 echo "configure:8764: checking POSIX termios" >&5
8764 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <sys/types.h>
8771 #include <unistd.h>
8772 #include <termios.h>
8773 int main() {
8774 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8775    tcgetattr(0, 0);
8776 ; return 0; }
8777 EOF
8778 if { (eval echo configure:8779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8779   rm -rf conftest*
8780   am_cv_sys_posix_termios=yes
8781 else
8782   echo "configure: failed program was:" >&5
8783   cat conftest.$ac_ext >&5
8784   rm -rf conftest*
8785   am_cv_sys_posix_termios=no
8786 fi
8787 rm -f conftest*
8788 fi
8789
8790 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8791
8792
8793  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8794 echo "configure:8795: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8795 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8796   echo $ac_n "(cached) $ac_c" 1>&6
8797 else
8798   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8799
8800   gwinsz_in_termios_h=no
8801   if test $am_cv_sys_posix_termios = yes; then
8802     cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 #include <sys/types.h>
8806 #     include <termios.h>
8807 #     ifdef TIOCGWINSZ
8808         yes
8809 #     endif
8810     
8811 EOF
8812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8813   egrep "yes" >/dev/null 2>&1; then
8814   rm -rf conftest*
8815   gwinsz_in_termios_h=yes
8816 fi
8817 rm -f conftest*
8818
8819   fi
8820
8821   if test $gwinsz_in_termios_h = no; then
8822     cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8825 #include <sys/types.h>
8826 #     include <sys/ioctl.h>
8827 #     ifdef TIOCGWINSZ
8828         yes
8829 #     endif
8830     
8831 EOF
8832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8833   egrep "yes" >/dev/null 2>&1; then
8834   rm -rf conftest*
8835   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8836 fi
8837 rm -f conftest*
8838
8839   fi
8840   
8841 fi
8842
8843 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8844   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8845     cat >> confdefs.h <<\EOF
8846 #define GWINSZ_IN_SYS_IOCTL 1
8847 EOF
8848
8849   fi
8850
8851 if test $am_cv_sys_posix_termios = yes ; then
8852         cat >> confdefs.h <<\EOF
8853 #define HAVE_POSIX_TERMIOS 1
8854 EOF
8855
8856 fi
8857
8858 for ac_hdr in \
8859         arpa/inet.h             \
8860         arpa/nameser.h  \
8861         assert.h                \
8862         conio.h                 \
8863         crypt.h                 \
8864         direct.h                \
8865         errno.h                 \
8866         fcntl.h                 \
8867         filio.h                 \
8868         getopt.h                \
8869         grp.h                   \
8870         io.h                    \
8871         libutil.h               \
8872         limits.h                \
8873         locale.h                \
8874         netinet/tcp.h   \
8875         malloc.h                \
8876         memory.h                \
8877         psap.h                  \
8878         pwd.h                   \
8879         process.h               \
8880         resolv.h                \
8881         sgtty.h                 \
8882         shadow.h                \
8883         stddef.h                \
8884         string.h                \
8885         strings.h               \
8886         sysexits.h              \
8887         sys/file.h              \
8888         sys/filio.h             \
8889         sys/errno.h             \
8890         sys/ioctl.h             \
8891         sys/param.h             \
8892         sys/resource.h  \
8893         sys/select.h    \
8894         sys/socket.h    \
8895         sys/syslog.h    \
8896         sys/time.h              \
8897         sys/types.h             \
8898         syslog.h                \
8899         termios.h               \
8900         unistd.h                \
8901         winsock.h               \
8902         winsock2.h              \
8903
8904 do
8905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8907 echo "configure:8908: checking for $ac_hdr" >&5
8908 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8909   echo $ac_n "(cached) $ac_c" 1>&6
8910 else
8911   cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914 #include <$ac_hdr>
8915 EOF
8916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8917 { (eval echo configure:8918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8919 if test -z "$ac_err"; then
8920   rm -rf conftest*
8921   eval "ac_cv_header_$ac_safe=yes"
8922 else
8923   echo "$ac_err" >&5
8924   echo "configure: failed program was:" >&5
8925   cat conftest.$ac_ext >&5
8926   rm -rf conftest*
8927   eval "ac_cv_header_$ac_safe=no"
8928 fi
8929 rm -f conftest*
8930 fi
8931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8932   echo "$ac_t""yes" 1>&6
8933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8934   cat >> confdefs.h <<EOF
8935 #define $ac_tr_hdr 1
8936 EOF
8937  
8938 else
8939   echo "$ac_t""no" 1>&6
8940 fi
8941 done
8942
8943
8944
8945
8946 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8947 echo "configure:8948: checking for dlopen" >&5
8948 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8949   echo $ac_n "(cached) $ac_c" 1>&6
8950 else
8951   cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* System header to define __stub macros and hopefully few prototypes,
8955     which can conflict with char dlopen(); below.  */
8956 #include <assert.h>
8957 /* Override any gcc2 internal prototype to avoid an error.  */
8958 /* We use char because int might match the return type of a gcc2
8959     builtin and then its argument prototype would still apply.  */
8960 char dlopen();
8961 char (*f)();
8962
8963 int main() {
8964
8965 /* The GNU C library defines this for functions which it implements
8966     to always fail with ENOSYS.  Some functions are actually named
8967     something starting with __ and the normal name is an alias.  */
8968 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8969 choke me
8970 #else
8971 f = dlopen;
8972 #endif
8973
8974 ; return 0; }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8977   rm -rf conftest*
8978   eval "ac_cv_func_dlopen=yes"
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   eval "ac_cv_func_dlopen=no"
8984 fi
8985 rm -f conftest*
8986 fi
8987
8988 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8989   echo "$ac_t""yes" 1>&6
8990   :
8991 else
8992   echo "$ac_t""no" 1>&6
8993 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8994 echo "configure:8995: checking for dlopen in -ldl" >&5
8995 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8997   echo $ac_n "(cached) $ac_c" 1>&6
8998 else
8999   ac_save_LIBS="$LIBS"
9000 LIBS="-ldl  $LIBS"
9001 cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 /* Override any gcc2 internal prototype to avoid an error.  */
9005 /* We use char because int might match the return type of a gcc2
9006     builtin and then its argument prototype would still apply.  */
9007 char dlopen();
9008
9009 int main() {
9010 dlopen()
9011 ; return 0; }
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9014   rm -rf conftest*
9015   eval "ac_cv_lib_$ac_lib_var=yes"
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -rf conftest*
9020   eval "ac_cv_lib_$ac_lib_var=no"
9021 fi
9022 rm -f conftest*
9023 LIBS="$ac_save_LIBS"
9024
9025 fi
9026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9027   echo "$ac_t""yes" 1>&6
9028     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9029     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9030   cat >> confdefs.h <<EOF
9031 #define $ac_tr_lib 1
9032 EOF
9033
9034   LIBS="-ldl $LIBS"
9035
9036 else
9037   echo "$ac_t""no" 1>&6
9038 fi
9039
9040 fi
9041
9042
9043 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9044 echo "configure:9045: checking for sigset in -lV3" >&5
9045 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9047   echo $ac_n "(cached) $ac_c" 1>&6
9048 else
9049   ac_save_LIBS="$LIBS"
9050 LIBS="-lV3  $LIBS"
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 /* Override any gcc2 internal prototype to avoid an error.  */
9055 /* We use char because int might match the return type of a gcc2
9056     builtin and then its argument prototype would still apply.  */
9057 char sigset();
9058
9059 int main() {
9060 sigset()
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=yes"
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   eval "ac_cv_lib_$ac_lib_var=no"
9071 fi
9072 rm -f conftest*
9073 LIBS="$ac_save_LIBS"
9074
9075 fi
9076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9077   echo "$ac_t""yes" 1>&6
9078     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9079     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9080   cat >> confdefs.h <<EOF
9081 #define $ac_tr_lib 1
9082 EOF
9083
9084   LIBS="-lV3 $LIBS"
9085
9086 else
9087   echo "$ac_t""no" 1>&6
9088 fi
9089
9090
9091 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9092 echo "configure:9093: checking for winsock" >&5
9093 save_LIBS="$LIBS"
9094 for curlib in ws2_32 wsock32; do
9095         LIBS="$LIBS -l$curlib"
9096         cat > conftest.$ac_ext <<EOF
9097 #line 9098 "configure"
9098 #include "confdefs.h"
9099
9100                         char socket@12();
9101                         char select@20();
9102                         char closesocket@4();
9103                         char gethostname@8();
9104                         
9105 int main() {
9106
9107                         socket@12();
9108                         select@20();
9109                         closesocket@4();
9110                         gethostname@8();
9111                         
9112 ; return 0; }
9113 EOF
9114 if { (eval echo configure:9115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9115   rm -rf conftest*
9116   have_winsock=yes
9117 else
9118   echo "configure: failed program was:" >&5
9119   cat conftest.$ac_ext >&5
9120   rm -rf conftest*
9121   have_winsock=no
9122 fi
9123 rm -f conftest*
9124
9125         if test $have_winsock = yes; then
9126                 cat >> confdefs.h <<\EOF
9127 #define HAVE_WINSOCK 1
9128 EOF
9129
9130                 ac_cv_func_socket=yes
9131                 ac_cv_func_select=yes
9132                 ac_cv_func_closesocket=yes
9133                 ac_cv_func_gethostname=yes
9134                 if test $curlib = ws2_32; then
9135                         have_winsock=winsock2
9136                         cat >> confdefs.h <<\EOF
9137 #define HAVE_WINSOCK2 1
9138 EOF
9139
9140                 fi
9141                 break
9142         fi
9143         LIBS="$save_LIBS"
9144 done
9145 echo "$ac_t""$have_winsock" 1>&6
9146
9147
9148 echo $ac_n "checking for socket""... $ac_c" 1>&6
9149 echo "configure:9150: checking for socket" >&5
9150 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9151   echo $ac_n "(cached) $ac_c" 1>&6
9152 else
9153   cat > conftest.$ac_ext <<EOF
9154 #line 9155 "configure"
9155 #include "confdefs.h"
9156 /* System header to define __stub macros and hopefully few prototypes,
9157     which can conflict with char socket(); below.  */
9158 #include <assert.h>
9159 /* Override any gcc2 internal prototype to avoid an error.  */
9160 /* We use char because int might match the return type of a gcc2
9161     builtin and then its argument prototype would still apply.  */
9162 char socket();
9163 char (*f)();
9164
9165 int main() {
9166
9167 /* The GNU C library defines this for functions which it implements
9168     to always fail with ENOSYS.  Some functions are actually named
9169     something starting with __ and the normal name is an alias.  */
9170 #if defined (__stub_socket) || defined (__stub___socket)
9171 choke me
9172 #else
9173 f = socket;
9174 #endif
9175
9176 ; return 0; }
9177 EOF
9178 if { (eval echo configure:9179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9179   rm -rf conftest*
9180   eval "ac_cv_func_socket=yes"
9181 else
9182   echo "configure: failed program was:" >&5
9183   cat conftest.$ac_ext >&5
9184   rm -rf conftest*
9185   eval "ac_cv_func_socket=no"
9186 fi
9187 rm -f conftest*
9188 fi
9189
9190 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9191   echo "$ac_t""yes" 1>&6
9192   :
9193 else
9194   echo "$ac_t""no" 1>&6
9195         
9196         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9197 echo "configure:9198: checking for main in -lsocket" >&5
9198 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9199 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9200   echo $ac_n "(cached) $ac_c" 1>&6
9201 else
9202   ac_save_LIBS="$LIBS"
9203 LIBS="-lsocket  $LIBS"
9204 cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207
9208 int main() {
9209 main()
9210 ; return 0; }
9211 EOF
9212 if { (eval echo configure:9213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9213   rm -rf conftest*
9214   eval "ac_cv_lib_$ac_lib_var=yes"
9215 else
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -rf conftest*
9219   eval "ac_cv_lib_$ac_lib_var=no"
9220 fi
9221 rm -f conftest*
9222 LIBS="$ac_save_LIBS"
9223
9224 fi
9225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9226   echo "$ac_t""yes" 1>&6
9227     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9228     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9229   cat >> confdefs.h <<EOF
9230 #define $ac_tr_lib 1
9231 EOF
9232
9233   LIBS="-lsocket $LIBS"
9234
9235 else
9236   echo "$ac_t""no" 1>&6
9237 fi
9238
9239         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9240 echo "configure:9241: checking for main in -lnet" >&5
9241 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9243   echo $ac_n "(cached) $ac_c" 1>&6
9244 else
9245   ac_save_LIBS="$LIBS"
9246 LIBS="-lnet  $LIBS"
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250
9251 int main() {
9252 main()
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   eval "ac_cv_lib_$ac_lib_var=yes"
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_lib_$ac_lib_var=no"
9263 fi
9264 rm -f conftest*
9265 LIBS="$ac_save_LIBS"
9266
9267 fi
9268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9269   echo "$ac_t""yes" 1>&6
9270     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9272   cat >> confdefs.h <<EOF
9273 #define $ac_tr_lib 1
9274 EOF
9275
9276   LIBS="-lnet $LIBS"
9277
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9283 echo "configure:9284: checking for main in -lnsl_s" >&5
9284 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   ac_save_LIBS="$LIBS"
9289 LIBS="-lnsl_s  $LIBS"
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293
9294 int main() {
9295 main()
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9299   rm -rf conftest*
9300   eval "ac_cv_lib_$ac_lib_var=yes"
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_lib_$ac_lib_var=no"
9306 fi
9307 rm -f conftest*
9308 LIBS="$ac_save_LIBS"
9309
9310 fi
9311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9315   cat >> confdefs.h <<EOF
9316 #define $ac_tr_lib 1
9317 EOF
9318
9319   LIBS="-lnsl_s $LIBS"
9320
9321 else
9322   echo "$ac_t""no" 1>&6
9323 fi
9324
9325         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9326 echo "configure:9327: checking for main in -lnsl" >&5
9327 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   ac_save_LIBS="$LIBS"
9332 LIBS="-lnsl  $LIBS"
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336
9337 int main() {
9338 main()
9339 ; return 0; }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=yes"
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_lib_$ac_lib_var=no"
9349 fi
9350 rm -f conftest*
9351 LIBS="$ac_save_LIBS"
9352
9353 fi
9354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9358   cat >> confdefs.h <<EOF
9359 #define $ac_tr_lib 1
9360 EOF
9361
9362   LIBS="-lnsl $LIBS"
9363
9364 else
9365   echo "$ac_t""no" 1>&6
9366 fi
9367
9368         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9369 echo "configure:9370: checking for socket in -linet" >&5
9370 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   ac_save_LIBS="$LIBS"
9375 LIBS="-linet  $LIBS"
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379 /* Override any gcc2 internal prototype to avoid an error.  */
9380 /* We use char because int might match the return type of a gcc2
9381     builtin and then its argument prototype would still apply.  */
9382 char socket();
9383
9384 int main() {
9385 socket()
9386 ; return 0; }
9387 EOF
9388 if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9389   rm -rf conftest*
9390   eval "ac_cv_lib_$ac_lib_var=yes"
9391 else
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -rf conftest*
9395   eval "ac_cv_lib_$ac_lib_var=no"
9396 fi
9397 rm -f conftest*
9398 LIBS="$ac_save_LIBS"
9399
9400 fi
9401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9402   echo "$ac_t""yes" 1>&6
9403     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9404     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9405   cat >> confdefs.h <<EOF
9406 #define $ac_tr_lib 1
9407 EOF
9408
9409   LIBS="-linet $LIBS"
9410
9411 else
9412   echo "$ac_t""no" 1>&6
9413 fi
9414
9415         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9416 echo "configure:9417: checking for main in -lgen" >&5
9417 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9419   echo $ac_n "(cached) $ac_c" 1>&6
9420 else
9421   ac_save_LIBS="$LIBS"
9422 LIBS="-lgen  $LIBS"
9423 cat > conftest.$ac_ext <<EOF
9424 #line 9425 "configure"
9425 #include "confdefs.h"
9426
9427 int main() {
9428 main()
9429 ; return 0; }
9430 EOF
9431 if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9432   rm -rf conftest*
9433   eval "ac_cv_lib_$ac_lib_var=yes"
9434 else
9435   echo "configure: failed program was:" >&5
9436   cat conftest.$ac_ext >&5
9437   rm -rf conftest*
9438   eval "ac_cv_lib_$ac_lib_var=no"
9439 fi
9440 rm -f conftest*
9441 LIBS="$ac_save_LIBS"
9442
9443 fi
9444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9445   echo "$ac_t""yes" 1>&6
9446     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9448   cat >> confdefs.h <<EOF
9449 #define $ac_tr_lib 1
9450 EOF
9451
9452   LIBS="-lgen $LIBS"
9453
9454 else
9455   echo "$ac_t""no" 1>&6
9456 fi
9457
9458
9459 fi
9460
9461
9462 echo $ac_n "checking for select""... $ac_c" 1>&6
9463 echo "configure:9464: checking for select" >&5
9464 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9465   echo $ac_n "(cached) $ac_c" 1>&6
9466 else
9467   cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470 /* System header to define __stub macros and hopefully few prototypes,
9471     which can conflict with char select(); below.  */
9472 #include <assert.h>
9473 /* Override any gcc2 internal prototype to avoid an error.  */
9474 /* We use char because int might match the return type of a gcc2
9475     builtin and then its argument prototype would still apply.  */
9476 char select();
9477 char (*f)();
9478
9479 int main() {
9480
9481 /* The GNU C library defines this for functions which it implements
9482     to always fail with ENOSYS.  Some functions are actually named
9483     something starting with __ and the normal name is an alias.  */
9484 #if defined (__stub_select) || defined (__stub___select)
9485 choke me
9486 #else
9487 f = select;
9488 #endif
9489
9490 ; return 0; }
9491 EOF
9492 if { (eval echo configure:9493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9493   rm -rf conftest*
9494   eval "ac_cv_func_select=yes"
9495 else
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   eval "ac_cv_func_select=no"
9500 fi
9501 rm -f conftest*
9502 fi
9503
9504 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9505   echo "$ac_t""yes" 1>&6
9506   :
9507 else
9508   echo "$ac_t""no" 1>&6
9509 { echo "configure: error: select() required." 1>&2; exit 1; }
9510 fi
9511
9512
9513 if test "${ac_cv_header_winsock_h}" != yes; then
9514                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9515 echo "configure:9516: checking types of arguments for select()" >&5
9516  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9517   echo $ac_n "(cached) $ac_c" 1>&6
9518 else
9519    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9520   echo $ac_n "(cached) $ac_c" 1>&6
9521 else
9522     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9523   echo $ac_n "(cached) $ac_c" 1>&6
9524 else
9525      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9526      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9527       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9528        cat > conftest.$ac_ext <<EOF
9529 #line 9530 "configure"
9530 #include "confdefs.h"
9531 #ifdef HAVE_SYS_TYPES_H
9532 #include <sys/types.h>
9533 #endif
9534 #ifdef HAVE_SYS_TIME_H
9535 #include <sys/time.h>
9536 #endif
9537 #ifdef HAVE_SYS_SELECT_H
9538 #include <sys/select.h>
9539 #endif
9540 #ifdef HAVE_SYS_SOCKET_H
9541 #include <sys/socket.h>
9542 #endif
9543 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);
9544 int main() {
9545
9546 ; return 0; }
9547 EOF
9548 if { (eval echo configure:9549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9549   rm -rf conftest*
9550           ac_not_found=no ; break 3
9551 else
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   ac_not_found=yes
9556 fi
9557 rm -f conftest*
9558       done
9559      done
9560     done
9561    
9562 fi
9563   
9564 fi
9565  
9566 fi
9567  if test "$ac_not_found" = yes; then
9568   ac_cv_func_select_arg1=int 
9569   ac_cv_func_select_arg234='int *' 
9570   ac_cv_func_select_arg5='struct timeval *'
9571  fi
9572  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9573  cat >> confdefs.h <<EOF
9574 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9575 EOF
9576
9577  cat >> confdefs.h <<EOF
9578 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9579 EOF
9580
9581  cat >> confdefs.h <<EOF
9582 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9583 EOF
9584
9585
9586 fi
9587
9588
9589 for ac_hdr in regex.h 
9590 do
9591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9593 echo "configure:9594: checking for $ac_hdr" >&5
9594 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9595   echo $ac_n "(cached) $ac_c" 1>&6
9596 else
9597   cat > conftest.$ac_ext <<EOF
9598 #line 9599 "configure"
9599 #include "confdefs.h"
9600 #include <$ac_hdr>
9601 EOF
9602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9603 { (eval echo configure:9604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9605 if test -z "$ac_err"; then
9606   rm -rf conftest*
9607   eval "ac_cv_header_$ac_safe=yes"
9608 else
9609   echo "$ac_err" >&5
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612   rm -rf conftest*
9613   eval "ac_cv_header_$ac_safe=no"
9614 fi
9615 rm -f conftest*
9616 fi
9617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9618   echo "$ac_t""yes" 1>&6
9619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9620   cat >> confdefs.h <<EOF
9621 #define $ac_tr_hdr 1
9622 EOF
9623  
9624 else
9625   echo "$ac_t""no" 1>&6
9626 fi
9627 done
9628
9629 if test "$ac_cv_header_regex_h" != yes ; then
9630         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9631 fi
9632
9633 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9634 echo "configure:9635: checking for library containing regfree" >&5
9635 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9636   echo $ac_n "(cached) $ac_c" 1>&6
9637 else
9638   ac_func_search_save_LIBS="$LIBS"
9639 ac_cv_search_regfree="no"
9640 cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 /* Override any gcc2 internal prototype to avoid an error.  */
9644 /* We use char because int might match the return type of a gcc2
9645     builtin and then its argument prototype would still apply.  */
9646 char regfree();
9647
9648 int main() {
9649 regfree()
9650 ; return 0; }
9651 EOF
9652 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9653   rm -rf conftest*
9654   ac_cv_search_regfree="none required"
9655 else
9656   echo "configure: failed program was:" >&5
9657   cat conftest.$ac_ext >&5
9658 fi
9659 rm -f conftest*
9660 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9661 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9662 cat > conftest.$ac_ext <<EOF
9663 #line 9664 "configure"
9664 #include "confdefs.h"
9665 /* Override any gcc2 internal prototype to avoid an error.  */
9666 /* We use char because int might match the return type of a gcc2
9667     builtin and then its argument prototype would still apply.  */
9668 char regfree();
9669
9670 int main() {
9671 regfree()
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9675   rm -rf conftest*
9676   ac_cv_search_regfree="-l$ac_lib"
9677 break
9678 else
9679   echo "configure: failed program was:" >&5
9680   cat conftest.$ac_ext >&5
9681 fi
9682 rm -f conftest*
9683 done
9684 LIBS="$ac_func_search_save_LIBS"
9685 fi
9686
9687 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9688 if test "$ac_cv_search_regfree" != "no"; then
9689   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9690   :
9691 else :
9692   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9693 fi
9694
9695
9696 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9697 echo "configure:9698: checking for compatible POSIX regex" >&5
9698 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9699   echo $ac_n "(cached) $ac_c" 1>&6
9700 else
9701   
9702         if test "$cross_compiling" = yes; then
9703   ol_cv_c_posix_regex=cross
9704 else
9705   cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708
9709 #include <sys/types.h>
9710 #include <regex.h>
9711 static char *pattern, *string;
9712 main()
9713 {
9714         int rc;
9715         regex_t re;
9716
9717         pattern = "^A";
9718
9719         if(regcomp(&re, pattern, 0)) {
9720                 return -1;
9721         }
9722         
9723         string = "ALL MATCH";
9724         
9725         rc = regexec(&re, string, 0, (void*)0, 0);
9726
9727         regfree(&re);
9728
9729         return rc;
9730 }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9733 then
9734   ol_cv_c_posix_regex=yes
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -fr conftest*
9739   ol_cv_c_posix_regex=no
9740 fi
9741 rm -fr conftest*
9742 fi
9743
9744 fi
9745
9746 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9747
9748 if test "$ol_cv_c_posix_regex" = no ; then
9749         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9750 fi
9751
9752
9753 have_uuid=no
9754 for ac_hdr in sys/uuid.h
9755 do
9756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9758 echo "configure:9759: checking for $ac_hdr" >&5
9759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9760   echo $ac_n "(cached) $ac_c" 1>&6
9761 else
9762   cat > conftest.$ac_ext <<EOF
9763 #line 9764 "configure"
9764 #include "confdefs.h"
9765 #include <$ac_hdr>
9766 EOF
9767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9768 { (eval echo configure:9769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9770 if test -z "$ac_err"; then
9771   rm -rf conftest*
9772   eval "ac_cv_header_$ac_safe=yes"
9773 else
9774   echo "$ac_err" >&5
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -rf conftest*
9778   eval "ac_cv_header_$ac_safe=no"
9779 fi
9780 rm -f conftest*
9781 fi
9782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9783   echo "$ac_t""yes" 1>&6
9784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9785   cat >> confdefs.h <<EOF
9786 #define $ac_tr_hdr 1
9787 EOF
9788  
9789 else
9790   echo "$ac_t""no" 1>&6
9791 fi
9792 done
9793
9794 if test $ac_cv_header_sys_uuid_h = yes ; then
9795         save_LIBS="$LIBS"
9796         
9797 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9798 echo "configure:9799: checking for library containing uuid_to_str" >&5
9799 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9800   echo $ac_n "(cached) $ac_c" 1>&6
9801 else
9802   ac_func_search_save_LIBS="$LIBS"
9803 ac_cv_search_uuid_to_str="no"
9804 cat > conftest.$ac_ext <<EOF
9805 #line 9806 "configure"
9806 #include "confdefs.h"
9807 /* Override any gcc2 internal prototype to avoid an error.  */
9808 /* We use char because int might match the return type of a gcc2
9809     builtin and then its argument prototype would still apply.  */
9810 char uuid_to_str();
9811
9812 int main() {
9813 uuid_to_str()
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9817   rm -rf conftest*
9818   ac_cv_search_uuid_to_str="none required"
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822 fi
9823 rm -f conftest*
9824 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9825 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9826 cat > conftest.$ac_ext <<EOF
9827 #line 9828 "configure"
9828 #include "confdefs.h"
9829 /* Override any gcc2 internal prototype to avoid an error.  */
9830 /* We use char because int might match the return type of a gcc2
9831     builtin and then its argument prototype would still apply.  */
9832 char uuid_to_str();
9833
9834 int main() {
9835 uuid_to_str()
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   ac_cv_search_uuid_to_str="-l$ac_lib"
9841 break
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845 fi
9846 rm -f conftest*
9847 done
9848 LIBS="$ac_func_search_save_LIBS"
9849 fi
9850
9851 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9852 if test "$ac_cv_search_uuid_to_str" != "no"; then
9853   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9854   have_uuid=yes
9855 else :
9856   :
9857 fi
9858         LIBS="$save_LIBS"
9859
9860         if test have_uuid = yes ; then
9861                 cat >> confdefs.h <<\EOF
9862 #define HAVE_UUID_TO_STR 1
9863 EOF
9864
9865
9866                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9867                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9868         fi
9869 fi
9870
9871 if test $have_uuid = no ; then
9872         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9873 echo "configure:9874: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9874         save_LIBS="$LIBS"
9875         LIBS="$LIBS -lrpcrt4"
9876         cat > conftest.$ac_ext <<EOF
9877 #line 9878 "configure"
9878 #include "confdefs.h"
9879
9880                 char UuidCreate@4();
9881                 char UuidToStringA@8();
9882                 
9883 int main() {
9884
9885                 UuidCreate@4();
9886                 UuidToStringA@8();
9887                 
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   need_rpcrt=yes
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -rf conftest*
9897   need_rpcrt=no
9898 fi
9899 rm -f conftest*
9900         if test $need_rpcrt = yes; then
9901                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9902         fi
9903         LIBS="$save_LIBS"
9904         echo "$ac_t""$need_rpcrt" 1>&6
9905 fi
9906
9907 ol_link_dnssrv=no
9908 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9909 echo "configure:9910: checking for res_query" >&5
9910 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9911   echo $ac_n "(cached) $ac_c" 1>&6
9912 else
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 /* System header to define __stub macros and hopefully few prototypes,
9917     which can conflict with char res_query(); below.  */
9918 #include <assert.h>
9919 /* Override any gcc2 internal prototype to avoid an error.  */
9920 /* We use char because int might match the return type of a gcc2
9921     builtin and then its argument prototype would still apply.  */
9922 char res_query();
9923 char (*f)();
9924
9925 int main() {
9926
9927 /* The GNU C library defines this for functions which it implements
9928     to always fail with ENOSYS.  Some functions are actually named
9929     something starting with __ and the normal name is an alias.  */
9930 #if defined (__stub_res_query) || defined (__stub___res_query)
9931 choke me
9932 #else
9933 f = res_query;
9934 #endif
9935
9936 ; return 0; }
9937 EOF
9938 if { (eval echo configure:9939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9939   rm -rf conftest*
9940   eval "ac_cv_func_res_query=yes"
9941 else
9942   echo "configure: failed program was:" >&5
9943   cat conftest.$ac_ext >&5
9944   rm -rf conftest*
9945   eval "ac_cv_func_res_query=no"
9946 fi
9947 rm -f conftest*
9948 fi
9949
9950 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9951   echo "$ac_t""yes" 1>&6
9952   :
9953 else
9954   echo "$ac_t""no" 1>&6
9955 fi
9956
9957 if test $ac_cv_func_res_query = no ; then 
9958         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9959 echo "configure:9960: checking for __res_query" >&5
9960 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9961   echo $ac_n "(cached) $ac_c" 1>&6
9962 else
9963   cat > conftest.$ac_ext <<EOF
9964 #line 9965 "configure"
9965 #include "confdefs.h"
9966 /* System header to define __stub macros and hopefully few prototypes,
9967     which can conflict with char __res_query(); below.  */
9968 #include <assert.h>
9969 /* Override any gcc2 internal prototype to avoid an error.  */
9970 /* We use char because int might match the return type of a gcc2
9971     builtin and then its argument prototype would still apply.  */
9972 char __res_query();
9973 char (*f)();
9974
9975 int main() {
9976
9977 /* The GNU C library defines this for functions which it implements
9978     to always fail with ENOSYS.  Some functions are actually named
9979     something starting with __ and the normal name is an alias.  */
9980 #if defined (__stub___res_query) || defined (__stub_____res_query)
9981 choke me
9982 #else
9983 f = __res_query;
9984 #endif
9985
9986 ; return 0; }
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9989   rm -rf conftest*
9990   eval "ac_cv_func___res_query=yes"
9991 else
9992   echo "configure: failed program was:" >&5
9993   cat conftest.$ac_ext >&5
9994   rm -rf conftest*
9995   eval "ac_cv_func___res_query=no"
9996 fi
9997 rm -f conftest*
9998 fi
9999
10000 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002   :
10003 else
10004   echo "$ac_t""no" 1>&6
10005 fi
10006
10007         ac_cv_func_res_query=$ac_cv_func___res_query
10008 fi
10009
10010 if test $ac_cv_func_res_query = no ; then 
10011         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10012 echo "configure:10013: checking for res_query in -lbind" >&5
10013 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10015   echo $ac_n "(cached) $ac_c" 1>&6
10016 else
10017   ac_save_LIBS="$LIBS"
10018 LIBS="-lbind  $LIBS"
10019 cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022 /* Override any gcc2 internal prototype to avoid an error.  */
10023 /* We use char because int might match the return type of a gcc2
10024     builtin and then its argument prototype would still apply.  */
10025 char res_query();
10026
10027 int main() {
10028 res_query()
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10032   rm -rf conftest*
10033   eval "ac_cv_lib_$ac_lib_var=yes"
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=no"
10039 fi
10040 rm -f conftest*
10041 LIBS="$ac_save_LIBS"
10042
10043 fi
10044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10045   echo "$ac_t""yes" 1>&6
10046     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10047     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10048   cat >> confdefs.h <<EOF
10049 #define $ac_tr_lib 1
10050 EOF
10051
10052   LIBS="-lbind $LIBS"
10053
10054 else
10055   echo "$ac_t""no" 1>&6
10056 fi
10057
10058         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10059 fi
10060
10061 if test $ac_cv_func_res_query = no ; then 
10062         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10063 echo "configure:10064: checking for __res_query in -lbind" >&5
10064 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10066   echo $ac_n "(cached) $ac_c" 1>&6
10067 else
10068   ac_save_LIBS="$LIBS"
10069 LIBS="-lbind  $LIBS"
10070 cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 /* Override any gcc2 internal prototype to avoid an error.  */
10074 /* We use char because int might match the return type of a gcc2
10075     builtin and then its argument prototype would still apply.  */
10076 char __res_query();
10077
10078 int main() {
10079 __res_query()
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   eval "ac_cv_lib_$ac_lib_var=yes"
10085 else
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=no"
10090 fi
10091 rm -f conftest*
10092 LIBS="$ac_save_LIBS"
10093
10094 fi
10095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10096   echo "$ac_t""yes" 1>&6
10097     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10099   cat >> confdefs.h <<EOF
10100 #define $ac_tr_lib 1
10101 EOF
10102
10103   LIBS="-lbind $LIBS"
10104
10105 else
10106   echo "$ac_t""no" 1>&6
10107 fi
10108
10109         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10110 fi
10111
10112 if test $ac_cv_func_res_query = no ; then 
10113         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10114 echo "configure:10115: checking for res_query in -lresolv" >&5
10115 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   ac_save_LIBS="$LIBS"
10120 LIBS="-lresolv  $LIBS"
10121 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 /* Override any gcc2 internal prototype to avoid an error.  */
10125 /* We use char because int might match the return type of a gcc2
10126     builtin and then its argument prototype would still apply.  */
10127 char res_query();
10128
10129 int main() {
10130 res_query()
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=yes"
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=no"
10141 fi
10142 rm -f conftest*
10143 LIBS="$ac_save_LIBS"
10144
10145 fi
10146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10147   echo "$ac_t""yes" 1>&6
10148     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10150   cat >> confdefs.h <<EOF
10151 #define $ac_tr_lib 1
10152 EOF
10153
10154   LIBS="-lresolv $LIBS"
10155
10156 else
10157   echo "$ac_t""no" 1>&6
10158 fi
10159
10160         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10161 fi
10162
10163 if test $ac_cv_func_res_query = no ; then 
10164         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10165 echo "configure:10166: checking for __res_query in -lresolv" >&5
10166 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   ac_save_LIBS="$LIBS"
10171 LIBS="-lresolv  $LIBS"
10172 cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175 /* Override any gcc2 internal prototype to avoid an error.  */
10176 /* We use char because int might match the return type of a gcc2
10177     builtin and then its argument prototype would still apply.  */
10178 char __res_query();
10179
10180 int main() {
10181 __res_query()
10182 ; return 0; }
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10185   rm -rf conftest*
10186   eval "ac_cv_lib_$ac_lib_var=yes"
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=no"
10192 fi
10193 rm -f conftest*
10194 LIBS="$ac_save_LIBS"
10195
10196 fi
10197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10198   echo "$ac_t""yes" 1>&6
10199     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10200     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10201   cat >> confdefs.h <<EOF
10202 #define $ac_tr_lib 1
10203 EOF
10204
10205   LIBS="-lresolv $LIBS"
10206
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10212 fi
10213
10214 if test "$ac_cv_func_res_query" = yes ; then
10215         cat >> confdefs.h <<\EOF
10216 #define HAVE_RES_QUERY 1
10217 EOF
10218
10219
10220         if test $ol_enable_dnssrv != no ; then
10221                 ol_link_dnssrv=yes
10222         fi
10223 fi
10224
10225 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10226         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10227 fi
10228
10229 for ac_func in getaddrinfo gai_strerror inet_ntop 
10230 do
10231 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10232 echo "configure:10233: checking for $ac_func" >&5
10233 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10234   echo $ac_n "(cached) $ac_c" 1>&6
10235 else
10236   cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239 /* System header to define __stub macros and hopefully few prototypes,
10240     which can conflict with char $ac_func(); below.  */
10241 #include <assert.h>
10242 /* Override any gcc2 internal prototype to avoid an error.  */
10243 /* We use char because int might match the return type of a gcc2
10244     builtin and then its argument prototype would still apply.  */
10245 char $ac_func();
10246 char (*f)();
10247
10248 int main() {
10249
10250 /* The GNU C library defines this for functions which it implements
10251     to always fail with ENOSYS.  Some functions are actually named
10252     something starting with __ and the normal name is an alias.  */
10253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10254 choke me
10255 #else
10256 f = $ac_func;
10257 #endif
10258
10259 ; return 0; }
10260 EOF
10261 if { (eval echo configure:10262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10262   rm -rf conftest*
10263   eval "ac_cv_func_$ac_func=yes"
10264 else
10265   echo "configure: failed program was:" >&5
10266   cat conftest.$ac_ext >&5
10267   rm -rf conftest*
10268   eval "ac_cv_func_$ac_func=no"
10269 fi
10270 rm -f conftest*
10271 fi
10272
10273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10274   echo "$ac_t""yes" 1>&6
10275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10276   cat >> confdefs.h <<EOF
10277 #define $ac_tr_func 1
10278 EOF
10279  
10280 else
10281   echo "$ac_t""no" 1>&6
10282 fi
10283 done
10284
10285
10286 ol_link_ipv6=no
10287 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10288         if test $ol_enable_ipv6 = yes ; then
10289                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10290         fi
10291 elif test $ol_enable_ipv6 != no ; then
10292         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10293 echo "configure:10294: checking INET6_ADDRSTRLEN" >&5
10294 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10295   echo $ac_n "(cached) $ac_c" 1>&6
10296 else
10297   
10298                 cat > conftest.$ac_ext <<EOF
10299 #line 10300 "configure"
10300 #include "confdefs.h"
10301
10302 #                       include <netinet/in.h>
10303 #                       ifdef INET6_ADDRSTRLEN
10304                                 __has_inet6_addrstrlen__;
10305 #                       endif
10306                 
10307 EOF
10308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10309   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10310   rm -rf conftest*
10311   ol_cv_inet6_addrstrlen=yes
10312 else
10313   rm -rf conftest*
10314   ol_cv_inet6_addrstrlen=no
10315 fi
10316 rm -f conftest*
10317
10318 fi
10319
10320 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10321
10322         if test $ol_cv_inet6_addrstrlen = yes ; then
10323                 ol_link_ipv6=yes
10324         elif test $ol_enable_ipv6 = yes ; then
10325                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10326         fi
10327 fi
10328
10329 if test $ol_enable_local != no ; then
10330         for ac_hdr in sys/un.h 
10331 do
10332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10334 echo "configure:10335: checking for $ac_hdr" >&5
10335 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10336   echo $ac_n "(cached) $ac_c" 1>&6
10337 else
10338   cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 #include <$ac_hdr>
10342 EOF
10343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10344 { (eval echo configure:10345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10346 if test -z "$ac_err"; then
10347   rm -rf conftest*
10348   eval "ac_cv_header_$ac_safe=yes"
10349 else
10350   echo "$ac_err" >&5
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_header_$ac_safe=no"
10355 fi
10356 rm -f conftest*
10357 fi
10358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10359   echo "$ac_t""yes" 1>&6
10360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10361   cat >> confdefs.h <<EOF
10362 #define $ac_tr_hdr 1
10363 EOF
10364  
10365 else
10366   echo "$ac_t""no" 1>&6
10367 fi
10368 done
10369
10370
10371         if test $ol_enable_local = auto ; then
10372                 ol_enable_local=$ac_cv_header_sys_un_h
10373         elif test $ac_cv_header_sys_un_h = no ; then
10374                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10375         fi
10376 fi
10377
10378 ol_link_kbind=no
10379 ol_link_kpasswd=no
10380 ol_link_krb5=no
10381 ol_link_krb4=no
10382
10383 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10384         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10385         -o $ol_with_kerberos = k425 ; then
10386
10387         for ac_hdr in krb5.h
10388 do
10389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10391 echo "configure:10392: checking for $ac_hdr" >&5
10392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10393   echo $ac_n "(cached) $ac_c" 1>&6
10394 else
10395   cat > conftest.$ac_ext <<EOF
10396 #line 10397 "configure"
10397 #include "confdefs.h"
10398 #include <$ac_hdr>
10399 EOF
10400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10401 { (eval echo configure:10402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10403 if test -z "$ac_err"; then
10404   rm -rf conftest*
10405   eval "ac_cv_header_$ac_safe=yes"
10406 else
10407   echo "$ac_err" >&5
10408   echo "configure: failed program was:" >&5
10409   cat conftest.$ac_ext >&5
10410   rm -rf conftest*
10411   eval "ac_cv_header_$ac_safe=no"
10412 fi
10413 rm -f conftest*
10414 fi
10415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10416   echo "$ac_t""yes" 1>&6
10417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10418   cat >> confdefs.h <<EOF
10419 #define $ac_tr_hdr 1
10420 EOF
10421  
10422 else
10423   echo "$ac_t""no" 1>&6
10424 fi
10425 done
10426
10427
10428         if test $ac_cv_header_krb5_h = yes ; then
10429                                 for ac_hdr in heim_err.h
10430 do
10431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10433 echo "configure:10434: checking for $ac_hdr" >&5
10434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   cat > conftest.$ac_ext <<EOF
10438 #line 10439 "configure"
10439 #include "confdefs.h"
10440 #include <$ac_hdr>
10441 EOF
10442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10443 { (eval echo configure:10444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10445 if test -z "$ac_err"; then
10446   rm -rf conftest*
10447   eval "ac_cv_header_$ac_safe=yes"
10448 else
10449   echo "$ac_err" >&5
10450   echo "configure: failed program was:" >&5
10451   cat conftest.$ac_ext >&5
10452   rm -rf conftest*
10453   eval "ac_cv_header_$ac_safe=no"
10454 fi
10455 rm -f conftest*
10456 fi
10457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10458   echo "$ac_t""yes" 1>&6
10459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10460   cat >> confdefs.h <<EOF
10461 #define $ac_tr_hdr 1
10462 EOF
10463  
10464 else
10465   echo "$ac_t""no" 1>&6
10466 fi
10467 done
10468
10469                 if test $ac_cv_header_heim_err_h = yes ; then
10470                         krb5_impl=heimdal
10471                 else
10472                         krb5_impl=mit
10473                 fi
10474
10475                 if test $krb5_impl = mit; then
10476                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10477 echo "configure:10478: checking for main in -lk5crypto" >&5
10478 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10479 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   ac_save_LIBS="$LIBS"
10483 LIBS="-lk5crypto  $LIBS"
10484 cat > conftest.$ac_ext <<EOF
10485 #line 10486 "configure"
10486 #include "confdefs.h"
10487
10488 int main() {
10489 main()
10490 ; return 0; }
10491 EOF
10492 if { (eval echo configure:10493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10493   rm -rf conftest*
10494   eval "ac_cv_lib_$ac_lib_var=yes"
10495 else
10496   echo "configure: failed program was:" >&5
10497   cat conftest.$ac_ext >&5
10498   rm -rf conftest*
10499   eval "ac_cv_lib_$ac_lib_var=no"
10500 fi
10501 rm -f conftest*
10502 LIBS="$ac_save_LIBS"
10503
10504 fi
10505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10506   echo "$ac_t""yes" 1>&6
10507   krb5crypto=k5crypto
10508 else
10509   echo "$ac_t""no" 1>&6
10510 krb5crypto=crypto
10511 fi
10512
10513
10514                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10515 echo "configure:10516: checking for main in -lkrb5" >&5
10516 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10517 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10518   echo $ac_n "(cached) $ac_c" 1>&6
10519 else
10520   ac_save_LIBS="$LIBS"
10521 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10522 cat > conftest.$ac_ext <<EOF
10523 #line 10524 "configure"
10524 #include "confdefs.h"
10525
10526 int main() {
10527 main()
10528 ; return 0; }
10529 EOF
10530 if { (eval echo configure:10531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10531   rm -rf conftest*
10532   eval "ac_cv_lib_$ac_lib_var=yes"
10533 else
10534   echo "configure: failed program was:" >&5
10535   cat conftest.$ac_ext >&5
10536   rm -rf conftest*
10537   eval "ac_cv_lib_$ac_lib_var=no"
10538 fi
10539 rm -f conftest*
10540 LIBS="$ac_save_LIBS"
10541
10542 fi
10543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10544   echo "$ac_t""yes" 1>&6
10545   have_krb5=yes
10546                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10547 else
10548   echo "$ac_t""no" 1>&6
10549 have_krb5=no
10550 fi
10551
10552
10553                 elif test $krb5_impl = heimdal; then
10554                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10555 echo "configure:10556: checking for main in -ldes" >&5
10556 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10558   echo $ac_n "(cached) $ac_c" 1>&6
10559 else
10560   ac_save_LIBS="$LIBS"
10561 LIBS="-ldes  $LIBS"
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565
10566 int main() {
10567 main()
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_lib_$ac_lib_var=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=no"
10578 fi
10579 rm -f conftest*
10580 LIBS="$ac_save_LIBS"
10581
10582 fi
10583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585   krb5crypto=des
10586 else
10587   echo "$ac_t""no" 1>&6
10588 krb5crypto=crypto
10589 fi
10590
10591
10592                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10593 echo "configure:10594: checking for main in -lkrb5" >&5
10594 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10596   echo $ac_n "(cached) $ac_c" 1>&6
10597 else
10598   ac_save_LIBS="$LIBS"
10599 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10600 cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603
10604 int main() {
10605 main()
10606 ; return 0; }
10607 EOF
10608 if { (eval echo configure:10609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10609   rm -rf conftest*
10610   eval "ac_cv_lib_$ac_lib_var=yes"
10611 else
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   eval "ac_cv_lib_$ac_lib_var=no"
10616 fi
10617 rm -f conftest*
10618 LIBS="$ac_save_LIBS"
10619
10620 fi
10621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10622   echo "$ac_t""yes" 1>&6
10623   have_krb5=yes
10624                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10625 else
10626   echo "$ac_t""no" 1>&6
10627 have_krb5=no
10628 fi
10629
10630
10631                         cat >> confdefs.h <<\EOF
10632 #define HAVE_HEIMDAL_KERBEROS 1
10633 EOF
10634
10635
10636                 else
10637                         have_krb5=no
10638                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10639                 fi
10640
10641                 if test $have_krb5 = yes ; then
10642                         ol_link_krb5=yes
10643
10644                         cat >> confdefs.h <<\EOF
10645 #define HAVE_KRB5 1
10646 EOF
10647
10648
10649                         if test $ol_enable_kpasswd != no ; then
10650                                 ol_link_kpasswd=yes;
10651                         fi
10652
10653                         if test $ol_with_kerberos = k5only ; then
10654                                 ol_with_kerberos=found
10655                         fi
10656
10657                 elif test $ol_with_kerberos != auto ; then
10658                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10659                 fi
10660
10661         fi
10662 fi
10663
10664 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10665         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10666
10667         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10668 do
10669 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10670 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10671 echo "configure:10672: checking for $ac_hdr" >&5
10672 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10673   echo $ac_n "(cached) $ac_c" 1>&6
10674 else
10675   cat > conftest.$ac_ext <<EOF
10676 #line 10677 "configure"
10677 #include "confdefs.h"
10678 #include <$ac_hdr>
10679 EOF
10680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10681 { (eval echo configure:10682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10683 if test -z "$ac_err"; then
10684   rm -rf conftest*
10685   eval "ac_cv_header_$ac_safe=yes"
10686 else
10687   echo "$ac_err" >&5
10688   echo "configure: failed program was:" >&5
10689   cat conftest.$ac_ext >&5
10690   rm -rf conftest*
10691   eval "ac_cv_header_$ac_safe=no"
10692 fi
10693 rm -f conftest*
10694 fi
10695 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10696   echo "$ac_t""yes" 1>&6
10697     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10698   cat >> confdefs.h <<EOF
10699 #define $ac_tr_hdr 1
10700 EOF
10701  
10702 else
10703   echo "$ac_t""no" 1>&6
10704 fi
10705 done
10706
10707
10708         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10709                 if test $krb5_impl = mit; then
10710                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10711 echo "configure:10712: checking for main in -lkrb4" >&5
10712 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   ac_save_LIBS="$LIBS"
10717 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10718 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721
10722 int main() {
10723 main()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 LIBS="$ac_save_LIBS"
10737
10738 fi
10739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10740   echo "$ac_t""yes" 1>&6
10741   have_k425=yes
10742                                 KRB4_LIBS="-lkrb4 -ldes425"
10743 else
10744   echo "$ac_t""no" 1>&6
10745 have_k425=no
10746 fi
10747
10748
10749                 elif test $krb5_impl = heimdal; then
10750                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10751 echo "configure:10752: checking for main in -lkrb4" >&5
10752 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10754   echo $ac_n "(cached) $ac_c" 1>&6
10755 else
10756   ac_save_LIBS="$LIBS"
10757 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10758 cat > conftest.$ac_ext <<EOF
10759 #line 10760 "configure"
10760 #include "confdefs.h"
10761
10762 int main() {
10763 main()
10764 ; return 0; }
10765 EOF
10766 if { (eval echo configure:10767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10767   rm -rf conftest*
10768   eval "ac_cv_lib_$ac_lib_var=yes"
10769 else
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   eval "ac_cv_lib_$ac_lib_var=no"
10774 fi
10775 rm -f conftest*
10776 LIBS="$ac_save_LIBS"
10777
10778 fi
10779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10780   echo "$ac_t""yes" 1>&6
10781   have_k425=yes
10782                                 KRB4_LIBS="-lkrb4"
10783 else
10784   echo "$ac_t""no" 1>&6
10785 have_k425=no
10786 fi
10787
10788
10789                 else
10790                         have_425=no
10791                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10792                 fi
10793
10794                 if test $have_k425 = yes ; then
10795                         ol_with_kerberos=found
10796                         ol_link_krb4=yes
10797
10798                         cat >> confdefs.h <<\EOF
10799 #define HAVE_KRB425 1
10800 EOF
10801
10802                         cat >> confdefs.h <<\EOF
10803 #define HAVE_KRB4 1
10804 EOF
10805
10806
10807                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10808 echo "configure:10809: checking for des_debug in Kerberos libraries" >&5
10809 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10810   echo $ac_n "(cached) $ac_c" 1>&6
10811 else
10812   
10813                                                                 save_LIBS="$LIBS"
10814                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10815                                 cat > conftest.$ac_ext <<EOF
10816 #line 10817 "configure"
10817 #include "confdefs.h"
10818
10819 #include <kerberosIV/krb.h>
10820 #include <kerberosIV/des.h>
10821 extern int des_debug;
10822
10823 int main() {
10824
10825 des_debug = 1;
10826
10827 ; return 0; }
10828 EOF
10829 if { (eval echo configure:10830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10830   rm -rf conftest*
10831   ol_cv_var_des_debug=yes
10832 else
10833   echo "configure: failed program was:" >&5
10834   cat conftest.$ac_ext >&5
10835   rm -rf conftest*
10836   ol_cv_var_des_debug=no
10837 fi
10838 rm -f conftest*
10839                                                                 LIBS="$save_LIBS"
10840                         
10841 fi
10842
10843 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10844
10845                         if test $ol_cv_var_des_debug = yes ; then
10846                                 cat >> confdefs.h <<\EOF
10847 #define HAVE_DES_DEBUG 1
10848 EOF
10849
10850                         fi
10851
10852                         LIBS="$save_LIBS"
10853                 fi
10854         fi
10855 fi
10856
10857 if test $ol_link_krb5 = yes ; then
10858         ol_with_kerberos=found
10859 fi
10860
10861 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10862         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10863
10864         for ac_hdr in krb.h des.h krb-archaeology.h 
10865 do
10866 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10867 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10868 echo "configure:10869: checking for $ac_hdr" >&5
10869 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875 #include <$ac_hdr>
10876 EOF
10877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10878 { (eval echo configure:10879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10880 if test -z "$ac_err"; then
10881   rm -rf conftest*
10882   eval "ac_cv_header_$ac_safe=yes"
10883 else
10884   echo "$ac_err" >&5
10885   echo "configure: failed program was:" >&5
10886   cat conftest.$ac_ext >&5
10887   rm -rf conftest*
10888   eval "ac_cv_header_$ac_safe=no"
10889 fi
10890 rm -f conftest*
10891 fi
10892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10893   echo "$ac_t""yes" 1>&6
10894     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10895   cat >> confdefs.h <<EOF
10896 #define $ac_tr_hdr 1
10897 EOF
10898  
10899 else
10900   echo "$ac_t""no" 1>&6
10901 fi
10902 done
10903
10904
10905         if test $ac_cv_header_krb_h = yes ; then
10906                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10907 echo "configure:10908: checking for main in -lkrb" >&5
10908 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10910   echo $ac_n "(cached) $ac_c" 1>&6
10911 else
10912   ac_save_LIBS="$LIBS"
10913 LIBS="-lkrb -ldes $LIBS"
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917
10918 int main() {
10919 main()
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   eval "ac_cv_lib_$ac_lib_var=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_lib_$ac_lib_var=no"
10930 fi
10931 rm -f conftest*
10932 LIBS="$ac_save_LIBS"
10933
10934 fi
10935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10936   echo "$ac_t""yes" 1>&6
10937   have_k4=yes
10938 else
10939   echo "$ac_t""no" 1>&6
10940 have_k4=no
10941 fi
10942
10943
10944                 if test $have_k4 = yes ; then
10945                         ol_with_kerberos=found
10946                         ol_link_krb4=yes
10947
10948                         cat >> confdefs.h <<\EOF
10949 #define HAVE_KRB4 1
10950 EOF
10951
10952
10953                         KRB4_LIBS="-lkrb -ldes"
10954
10955                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10956                                 cat >> confdefs.h <<\EOF
10957 #define HAVE_KTH_KERBEROS 1
10958 EOF
10959
10960                         fi
10961                 fi
10962         fi
10963 fi
10964
10965 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10966         ol_link_kpasswd=yes
10967 fi
10968
10969 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10970         ol_link_kbind=yes
10971
10972 elif test $ol_enable_kbind = yes ; then
10973         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10974 fi
10975
10976 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10977         cat >> confdefs.h <<\EOF
10978 #define HAVE_KERBEROS 1
10979 EOF
10980
10981
10982 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10983         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10984 fi
10985
10986 ol_link_tls=no
10987 if test $ol_with_tls != no ; then
10988         for ac_hdr in openssl/ssl.h ssl.h
10989 do
10990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10992 echo "configure:10993: checking for $ac_hdr" >&5
10993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10994   echo $ac_n "(cached) $ac_c" 1>&6
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 #include <$ac_hdr>
11000 EOF
11001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11002 { (eval echo configure:11003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11004 if test -z "$ac_err"; then
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=yes"
11007 else
11008   echo "$ac_err" >&5
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -rf conftest*
11012   eval "ac_cv_header_$ac_safe=no"
11013 fi
11014 rm -f conftest*
11015 fi
11016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11017   echo "$ac_t""yes" 1>&6
11018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11019   cat >> confdefs.h <<EOF
11020 #define $ac_tr_hdr 1
11021 EOF
11022  
11023 else
11024   echo "$ac_t""no" 1>&6
11025 fi
11026 done
11027
11028         
11029         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11030                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11031 echo "configure:11032: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11032 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   ac_save_LIBS="$LIBS"
11037 LIBS="-lssl -lcrypto $LIBS"
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 /* Override any gcc2 internal prototype to avoid an error.  */
11042 /* We use char because int might match the return type of a gcc2
11043     builtin and then its argument prototype would still apply.  */
11044 char SSLeay_add_ssl_algorithms();
11045
11046 int main() {
11047 SSLeay_add_ssl_algorithms()
11048 ; return 0; }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11051   rm -rf conftest*
11052   eval "ac_cv_lib_$ac_lib_var=yes"
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_lib_$ac_lib_var=no"
11058 fi
11059 rm -f conftest*
11060 LIBS="$ac_save_LIBS"
11061
11062 fi
11063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11064   echo "$ac_t""yes" 1>&6
11065   have_ssleay=yes
11066                         need_rsaref=no
11067 else
11068   echo "$ac_t""no" 1>&6
11069 have_ssleay=no
11070 fi
11071
11072                         
11073                 if test $have_ssleay = no ; then
11074                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11075 echo "configure:11076: checking for SSL_library_init in -lssl" >&5
11076 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   ac_save_LIBS="$LIBS"
11081 LIBS="-lssl -lcrypto $LIBS"
11082 cat > conftest.$ac_ext <<EOF
11083 #line 11084 "configure"
11084 #include "confdefs.h"
11085 /* Override any gcc2 internal prototype to avoid an error.  */
11086 /* We use char because int might match the return type of a gcc2
11087     builtin and then its argument prototype would still apply.  */
11088 char SSL_library_init();
11089
11090 int main() {
11091 SSL_library_init()
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=yes"
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   eval "ac_cv_lib_$ac_lib_var=no"
11102 fi
11103 rm -f conftest*
11104 LIBS="$ac_save_LIBS"
11105
11106 fi
11107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11108   echo "$ac_t""yes" 1>&6
11109   have_ssleay=yes
11110                                 need_rsaref=no
11111 else
11112   echo "$ac_t""no" 1>&6
11113 have_ssleay=no
11114 fi
11115
11116                 fi
11117
11118                 if test $have_ssleay = no ; then
11119                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11120 echo "configure:11121: checking for ssl3_accept in -lssl" >&5
11121 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   ac_save_LIBS="$LIBS"
11126 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11127 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 /* Override any gcc2 internal prototype to avoid an error.  */
11131 /* We use char because int might match the return type of a gcc2
11132     builtin and then its argument prototype would still apply.  */
11133 char ssl3_accept();
11134
11135 int main() {
11136 ssl3_accept()
11137 ; return 0; }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11140   rm -rf conftest*
11141   eval "ac_cv_lib_$ac_lib_var=yes"
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=no"
11147 fi
11148 rm -f conftest*
11149 LIBS="$ac_save_LIBS"
11150
11151 fi
11152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   have_ssleay=yes
11155                                 need_rsaref=yes
11156 else
11157   echo "$ac_t""no" 1>&6
11158 have_ssleay=no
11159 fi
11160
11161                 fi
11162
11163                 if test $have_ssleay = yes ; then
11164                         ol_with_tls=found
11165                         ol_link_tls=yes
11166
11167                         cat >> confdefs.h <<\EOF
11168 #define HAVE_SSLEAY 1
11169 EOF
11170
11171
11172                         if test $need_rsaref = yes; then
11173                                 cat >> confdefs.h <<\EOF
11174 #define HAVE_RSAREF 1
11175 EOF
11176
11177
11178                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11179                         else
11180                                 TLS_LIBS="-lssl -lcrypto"
11181                         fi
11182                 fi
11183         fi
11184
11185 else
11186         echo "configure: warning: TLS data protection not supported!" 1>&2
11187 fi
11188
11189 if test $ol_link_tls = yes ; then
11190         cat >> confdefs.h <<\EOF
11191 #define HAVE_TLS 1
11192 EOF
11193
11194
11195 elif test $ol_with_tls = auto ; then
11196         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11197         echo "configure: warning: TLS data protection not supported!" 1>&2
11198
11199 elif test $ol_with_tls != no ; then
11200         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11201 fi
11202
11203 if test $ol_enable_lmpasswd != no; then
11204         if test $ol_link_tls != yes ; then
11205                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11206         fi
11207
11208         cat >> confdefs.h <<\EOF
11209 #define SLAPD_LMHASH 1
11210 EOF
11211
11212 fi
11213
11214 for ac_func in \
11215         ctime_r                 \
11216         gethostbyname_r gethostbyaddr_r \
11217
11218 do
11219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11220 echo "configure:11221: checking for $ac_func" >&5
11221 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11222   echo $ac_n "(cached) $ac_c" 1>&6
11223 else
11224   cat > conftest.$ac_ext <<EOF
11225 #line 11226 "configure"
11226 #include "confdefs.h"
11227 /* System header to define __stub macros and hopefully few prototypes,
11228     which can conflict with char $ac_func(); below.  */
11229 #include <assert.h>
11230 /* Override any gcc2 internal prototype to avoid an error.  */
11231 /* We use char because int might match the return type of a gcc2
11232     builtin and then its argument prototype would still apply.  */
11233 char $ac_func();
11234 char (*f)();
11235
11236 int main() {
11237
11238 /* The GNU C library defines this for functions which it implements
11239     to always fail with ENOSYS.  Some functions are actually named
11240     something starting with __ and the normal name is an alias.  */
11241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11242 choke me
11243 #else
11244 f = $ac_func;
11245 #endif
11246
11247 ; return 0; }
11248 EOF
11249 if { (eval echo configure:11250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11250   rm -rf conftest*
11251   eval "ac_cv_func_$ac_func=yes"
11252 else
11253   echo "configure: failed program was:" >&5
11254   cat conftest.$ac_ext >&5
11255   rm -rf conftest*
11256   eval "ac_cv_func_$ac_func=no"
11257 fi
11258 rm -f conftest*
11259 fi
11260
11261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11262   echo "$ac_t""yes" 1>&6
11263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11264   cat >> confdefs.h <<EOF
11265 #define $ac_tr_func 1
11266 EOF
11267  
11268 else
11269   echo "$ac_t""no" 1>&6
11270 fi
11271 done
11272
11273
11274 if test "$ac_cv_func_ctime_r" = no ; then
11275         ol_cv_func_ctime_r_nargs=0
11276 else
11277         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11278 echo "configure:11279: checking number of arguments of ctime_r" >&5
11279 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11280   echo $ac_n "(cached) $ac_c" 1>&6
11281 else
11282   cat > conftest.$ac_ext <<EOF
11283 #line 11284 "configure"
11284 #include "confdefs.h"
11285 #include <time.h>
11286 int main() {
11287 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11288 ; return 0; }
11289 EOF
11290 if { (eval echo configure:11291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11291   rm -rf conftest*
11292   ol_cv_func_ctime_r_nargs3=yes
11293 else
11294   echo "configure: failed program was:" >&5
11295   cat conftest.$ac_ext >&5
11296   rm -rf conftest*
11297   ol_cv_func_ctime_r_nargs3=no
11298 fi
11299 rm -f conftest*
11300
11301         cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 #include <time.h>
11305 int main() {
11306 time_t ti; char *buffer; ctime_r(&ti,buffer);
11307 ; return 0; }
11308 EOF
11309 if { (eval echo configure:11310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11310   rm -rf conftest*
11311   ol_cv_func_ctime_r_nargs2=yes
11312 else
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   ol_cv_func_ctime_r_nargs2=no
11317 fi
11318 rm -f conftest*
11319
11320         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11321                 $ol_cv_func_ctime_r_nargs2 = no ; then
11322
11323                 ol_cv_func_ctime_r_nargs=3
11324
11325         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11326                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11327
11328                 ol_cv_func_ctime_r_nargs=2
11329
11330         else
11331                 ol_cv_func_ctime_r_nargs=0
11332         fi
11333   
11334 fi
11335
11336 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11337
11338   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11339         cat >> confdefs.h <<EOF
11340 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11341 EOF
11342
11343   fi
11344
11345 fi
11346
11347 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11348         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11349 echo "configure:11350: checking number of arguments of gethostbyname_r" >&5
11350 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11351   echo $ac_n "(cached) $ac_c" 1>&6
11352 else
11353   cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 #include <sys/types.h>
11357 #include <sys/socket.h>
11358 #include <netinet/in.h>
11359 #include <netdb.h>
11360 #define BUFSIZE (sizeof(struct hostent)+10)
11361 int main() {
11362 struct hostent hent; char buffer[BUFSIZE];
11363                 int bufsize=BUFSIZE;int h_errno;
11364                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11365                         buffer, bufsize, &h_errno);
11366 ; return 0; }
11367 EOF
11368 if { (eval echo configure:11369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11369   rm -rf conftest*
11370   ol_cv_func_gethostbyname_r_nargs5=yes
11371 else
11372   echo "configure: failed program was:" >&5
11373   cat conftest.$ac_ext >&5
11374   rm -rf conftest*
11375   ol_cv_func_gethostbyname_r_nargs5=no
11376 fi
11377 rm -f conftest*
11378
11379         cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382 #include <sys/types.h>
11383 #include <sys/socket.h>
11384 #include <netinet/in.h>
11385 #include <netdb.h>
11386 #define BUFSIZE (sizeof(struct hostent)+10)
11387 int main() {
11388 struct hostent hent;struct hostent *rhent;
11389                 char buffer[BUFSIZE];
11390                 int bufsize=BUFSIZE;int h_errno;
11391                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11392                         &rhent, &h_errno);
11393 ; return 0; }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11396   rm -rf conftest*
11397   ol_cv_func_gethostbyname_r_nargs6=yes
11398 else
11399   echo "configure: failed program was:" >&5
11400   cat conftest.$ac_ext >&5
11401   rm -rf conftest*
11402   ol_cv_func_gethostbyname_r_nargs6=no
11403 fi
11404 rm -f conftest*
11405
11406         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11407                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11408
11409                 ol_cv_func_gethostbyname_r_nargs=5
11410
11411         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11412                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11413
11414                 ol_cv_func_gethostbyname_r_nargs=6
11415
11416         else
11417                 ol_cv_func_gethostbyname_r_nargs=0
11418         fi
11419   
11420 fi
11421
11422 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11423   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11424         cat >> confdefs.h <<EOF
11425 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11426 EOF
11427
11428   fi
11429
11430 else
11431         ol_cv_func_gethostbyname_r_nargs=0
11432 fi
11433  
11434 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11435         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11436 echo "configure:11437: checking number of arguments of gethostbyaddr_r" >&5
11437 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11438   echo $ac_n "(cached) $ac_c" 1>&6
11439 else
11440   cat > conftest.$ac_ext <<EOF
11441 #line 11442 "configure"
11442 #include "confdefs.h"
11443 #include <sys/types.h>
11444 #include <sys/socket.h>
11445 #include <netinet/in.h>
11446 #include <netdb.h>
11447 #define BUFSIZE (sizeof(struct hostent)+10)
11448 int main() {
11449 struct hostent hent; char buffer[BUFSIZE]; 
11450             struct in_addr add;
11451             size_t alen=sizeof(struct in_addr);
11452             int bufsize=BUFSIZE;int h_errno;
11453                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11454                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11455 ; return 0; }
11456 EOF
11457 if { (eval echo configure:11458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11458   rm -rf conftest*
11459   ol_cv_func_gethostbyaddr_r_nargs7=yes
11460 else
11461   echo "configure: failed program was:" >&5
11462   cat conftest.$ac_ext >&5
11463   rm -rf conftest*
11464   ol_cv_func_gethostbyaddr_r_nargs7=no
11465 fi
11466 rm -f conftest*
11467
11468         cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 #include <sys/types.h>
11472 #include <sys/socket.h>
11473 #include <netinet/in.h>
11474 #include <netdb.h>
11475 #define BUFSIZE (sizeof(struct hostent)+10)
11476 int main() {
11477 struct hostent hent;
11478                 struct hostent *rhent; char buffer[BUFSIZE]; 
11479                 struct in_addr add;
11480                 size_t alen=sizeof(struct in_addr);
11481                 int bufsize=BUFSIZE;int h_errno;
11482                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11483                         alen, AF_INET, &hent, buffer, bufsize, 
11484                         &rhent, &h_errno);
11485 ; return 0; }
11486 EOF
11487 if { (eval echo configure:11488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11488   rm -rf conftest*
11489   ol_cv_func_gethostbyaddr_r_nargs8=yes
11490 else
11491   echo "configure: failed program was:" >&5
11492   cat conftest.$ac_ext >&5
11493   rm -rf conftest*
11494   ol_cv_func_gethostbyaddr_r_nargs8=no
11495 fi
11496 rm -f conftest*
11497
11498         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11499                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11500
11501                 ol_cv_func_gethostbyaddr_r_nargs=7
11502
11503         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11504                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11505
11506                 ol_cv_func_gethostbyaddr_r_nargs=8
11507
11508         else
11509                 ol_cv_func_gethostbyaddr_r_nargs=0
11510         fi
11511   
11512 fi
11513
11514 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11515   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11516     cat >> confdefs.h <<EOF
11517 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11518 EOF
11519
11520   fi
11521
11522 else
11523         ol_cv_func_gethostbyaddr_r_nargs=0
11524 fi
11525
11526 if test "$ac_cv_func_ctime_r" = yes \
11527         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11528         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11529         -a "$ac_cv_func_gethostbyname_r" = yes \
11530         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11531         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11532         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11533         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11534         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11535         ; then
11536  
11537         cat >> confdefs.h <<\EOF
11538 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11539 EOF
11540
11541 fi
11542
11543 ol_link_threads=no
11544
11545 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11546         -o $ol_with_threads = nt ; then
11547
11548         
11549         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11550 echo "configure:11551: checking for _beginthread" >&5
11551 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11552   echo $ac_n "(cached) $ac_c" 1>&6
11553 else
11554   cat > conftest.$ac_ext <<EOF
11555 #line 11556 "configure"
11556 #include "confdefs.h"
11557 /* System header to define __stub macros and hopefully few prototypes,
11558     which can conflict with char _beginthread(); below.  */
11559 #include <assert.h>
11560 /* Override any gcc2 internal prototype to avoid an error.  */
11561 /* We use char because int might match the return type of a gcc2
11562     builtin and then its argument prototype would still apply.  */
11563 char _beginthread();
11564 char (*f)();
11565
11566 int main() {
11567
11568 /* The GNU C library defines this for functions which it implements
11569     to always fail with ENOSYS.  Some functions are actually named
11570     something starting with __ and the normal name is an alias.  */
11571 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11572 choke me
11573 #else
11574 f = _beginthread;
11575 #endif
11576
11577 ; return 0; }
11578 EOF
11579 if { (eval echo configure:11580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11580   rm -rf conftest*
11581   eval "ac_cv_func__beginthread=yes"
11582 else
11583   echo "configure: failed program was:" >&5
11584   cat conftest.$ac_ext >&5
11585   rm -rf conftest*
11586   eval "ac_cv_func__beginthread=no"
11587 fi
11588 rm -f conftest*
11589 fi
11590
11591 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11592   echo "$ac_t""yes" 1>&6
11593   :
11594 else
11595   echo "$ac_t""no" 1>&6
11596 fi
11597
11598
11599         if test $ac_cv_func__beginthread = yes ; then
11600                 cat >> confdefs.h <<\EOF
11601 #define HAVE_NT_THREADS 1
11602 EOF
11603
11604                 ol_cv_nt_threads=yes
11605         fi
11606
11607
11608         if test "$ol_cv_nt_threads" = yes ; then
11609                 ol_link_threads=nt
11610                 ol_with_threads=found
11611                 ol_with_yielding_select=yes
11612
11613                 cat >> confdefs.h <<\EOF
11614 #define HAVE_NT_SERVICE_MANAGER 1
11615 EOF
11616
11617                 cat >> confdefs.h <<\EOF
11618 #define HAVE_NT_EVENT_LOG 1
11619 EOF
11620
11621         fi
11622
11623         if test $ol_with_threads = nt ; then
11624                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11625         fi
11626 fi
11627
11628 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11629         -o $ol_with_threads = posix ; then
11630
11631         for ac_hdr in pthread.h
11632 do
11633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11635 echo "configure:11636: checking for $ac_hdr" >&5
11636 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11637   echo $ac_n "(cached) $ac_c" 1>&6
11638 else
11639   cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642 #include <$ac_hdr>
11643 EOF
11644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11645 { (eval echo configure:11646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11647 if test -z "$ac_err"; then
11648   rm -rf conftest*
11649   eval "ac_cv_header_$ac_safe=yes"
11650 else
11651   echo "$ac_err" >&5
11652   echo "configure: failed program was:" >&5
11653   cat conftest.$ac_ext >&5
11654   rm -rf conftest*
11655   eval "ac_cv_header_$ac_safe=no"
11656 fi
11657 rm -f conftest*
11658 fi
11659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11660   echo "$ac_t""yes" 1>&6
11661     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11662   cat >> confdefs.h <<EOF
11663 #define $ac_tr_hdr 1
11664 EOF
11665  
11666 else
11667   echo "$ac_t""no" 1>&6
11668 fi
11669 done
11670
11671
11672         if test $ac_cv_header_pthread_h = yes ; then
11673                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11674 echo "configure:11675: checking POSIX thread version" >&5
11675 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11676   echo $ac_n "(cached) $ac_c" 1>&6
11677 else
11678   
11679         cat > conftest.$ac_ext <<EOF
11680 #line 11681 "configure"
11681 #include "confdefs.h"
11682
11683 #               include <pthread.h>
11684                 /* this check could be improved */
11685 #               ifdef PTHREAD_ONCE_INIT
11686                         pthread_version_final;
11687 #               endif
11688         
11689 EOF
11690 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11691   egrep "pthread_version_final" >/dev/null 2>&1; then
11692   rm -rf conftest*
11693   ol_pthread_final=yes
11694 else
11695   rm -rf conftest*
11696   ol_pthread_final=no
11697 fi
11698 rm -f conftest*
11699
11700
11701         cat > conftest.$ac_ext <<EOF
11702 #line 11703 "configure"
11703 #include "confdefs.h"
11704
11705 #               include <pthread.h>
11706                 /* this check could be improved */
11707 #               ifdef pthread_once_init
11708                         pthread_version_draft4;
11709 #               endif
11710         
11711 EOF
11712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11713   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11714   rm -rf conftest*
11715   ol_pthread_draft4=yes
11716 else
11717   rm -rf conftest*
11718   ol_pthread_draft4=no
11719 fi
11720 rm -f conftest*
11721
11722
11723         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11724                 ol_cv_pthread_version=final
11725         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11726                 ol_cv_pthread_version=draft4
11727         else
11728                 ol_cv_pthread_version=unknown
11729         fi
11730
11731 fi
11732
11733 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11734
11735
11736                 if test $ol_cv_pthread_version = final ; then
11737                         cat >> confdefs.h <<\EOF
11738 #define HAVE_PTHREADS_FINAL 1
11739 EOF
11740
11741                 elif test $ol_cv_pthread_version = draft4 ; then
11742                         cat >> confdefs.h <<\EOF
11743 #define HAVE_PTHREADS_D4 1
11744 EOF
11745
11746                 else
11747                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11748                 fi
11749
11750                 # consider threads found
11751                 ol_with_threads=found
11752
11753                 
11754         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11755 echo "configure:11756: checking for LinuxThreads pthread.h" >&5
11756 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11757   echo $ac_n "(cached) $ac_c" 1>&6
11758 else
11759   cat > conftest.$ac_ext <<EOF
11760 #line 11761 "configure"
11761 #include "confdefs.h"
11762 #include <pthread.h>
11763 EOF
11764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11765   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11766   rm -rf conftest*
11767   ol_cv_header_linux_threads=yes
11768 else
11769   rm -rf conftest*
11770   ol_cv_header_linux_threads=no
11771 fi
11772 rm -f conftest*
11773
11774                 
11775 fi
11776
11777 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11778         if test $ol_cv_header_linux_threads = yes; then
11779                 cat >> confdefs.h <<\EOF
11780 #define HAVE_LINUX_THREADS 1
11781 EOF
11782
11783         fi
11784
11785                 
11786         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11787 echo "configure:11788: checking for GNU Pth pthread.h" >&5
11788 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11789   echo $ac_n "(cached) $ac_c" 1>&6
11790 else
11791   cat > conftest.$ac_ext <<EOF
11792 #line 11793 "configure"
11793 #include "confdefs.h"
11794 #include <pthread.h>
11795 #ifdef _POSIX_THREAD_IS_GNU_PTH
11796         __gnu_pth__;
11797 #endif
11798
11799 EOF
11800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11801   egrep "__gnu_pth__" >/dev/null 2>&1; then
11802   rm -rf conftest*
11803   ol_cv_header_gnu_pth_pthread_h=yes
11804 else
11805   rm -rf conftest*
11806   ol_cv_header_gnu_pth_pthread_h=no
11807 fi
11808 rm -f conftest*
11809
11810                 
11811 fi
11812
11813 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11814
11815
11816                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11817                         for ac_hdr in sched.h
11818 do
11819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11821 echo "configure:11822: checking for $ac_hdr" >&5
11822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11823   echo $ac_n "(cached) $ac_c" 1>&6
11824 else
11825   cat > conftest.$ac_ext <<EOF
11826 #line 11827 "configure"
11827 #include "confdefs.h"
11828 #include <$ac_hdr>
11829 EOF
11830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11831 { (eval echo configure:11832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11833 if test -z "$ac_err"; then
11834   rm -rf conftest*
11835   eval "ac_cv_header_$ac_safe=yes"
11836 else
11837   echo "$ac_err" >&5
11838   echo "configure: failed program was:" >&5
11839   cat conftest.$ac_ext >&5
11840   rm -rf conftest*
11841   eval "ac_cv_header_$ac_safe=no"
11842 fi
11843 rm -f conftest*
11844 fi
11845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11846   echo "$ac_t""yes" 1>&6
11847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11848   cat >> confdefs.h <<EOF
11849 #define $ac_tr_hdr 1
11850 EOF
11851  
11852 else
11853   echo "$ac_t""no" 1>&6
11854 fi
11855 done
11856
11857                 fi
11858
11859                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11860                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11861 echo "configure:11862: checking for pthread_create in default libraries" >&5
11862 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11863   echo $ac_n "(cached) $ac_c" 1>&6
11864 else
11865   
11866                 if test "$cross_compiling" = yes; then
11867   cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 /* pthread test headers */
11871 #include <pthread.h>
11872 #ifndef NULL
11873 #define NULL (void*)0
11874 #endif
11875
11876 static void *task(p)
11877         void *p;
11878 {
11879         return (void *) (p == NULL);
11880 }
11881
11882 int main() {
11883
11884         /* pthread test function */
11885         pthread_t t;
11886         int status;
11887         int detach = 1;
11888
11889 #ifdef HAVE_PTHREADS_FINAL
11890         /* Final pthreads */
11891         pthread_attr_t attr;
11892
11893         status = pthread_attr_init(&attr);
11894         if( status ) return status;
11895
11896 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11897         if( !detach ) {
11898 #if defined( PTHREAD_CREATE_JOINABLE )
11899                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11900 #else
11901                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11902 #endif
11903
11904 #ifdef PTHREAD_CREATE_DETACHED
11905         } else {
11906                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11907 #endif
11908         }
11909         if( status ) return status;
11910 #endif
11911
11912         status = pthread_create( &t, &attr, task, NULL );
11913         if( status ) return status;
11914
11915 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11916         if( detach ) {
11917                 /* give thread a chance to complete */
11918                 /* it should remain joinable and hence detachable */
11919                 sleep( 1 );
11920
11921                 status = pthread_detach( t );
11922                 if( status ) return status;
11923         }
11924 #endif
11925
11926 #else
11927         /* Draft 4 pthreads */
11928         status = pthread_create( &t, pthread_attr_default, task, NULL );
11929         if( status ) return status;
11930
11931         if( detach ) {
11932                 /* give thread a chance to complete */
11933                 /* it should remain joinable and hence detachable */
11934                 sleep( 1 );
11935
11936                 status = pthread_detach( &t );
11937                 if( status ) return status;
11938         }
11939 #endif
11940
11941 #ifdef HAVE_LINUX_THREADS
11942         pthread_kill_other_threads_np();
11943 #endif
11944
11945         return 0;
11946
11947 ; return 0; }
11948 EOF
11949 if { (eval echo configure:11950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11950   rm -rf conftest*
11951   ol_cv_pthread_create=yes
11952 else
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -rf conftest*
11956   ol_cv_pthread_create=no
11957 fi
11958 rm -f conftest*
11959 else
11960   cat > conftest.$ac_ext <<EOF
11961 #line 11962 "configure"
11962 #include "confdefs.h"
11963 /* pthread test headers */
11964 #include <pthread.h>
11965 #ifndef NULL
11966 #define NULL (void*)0
11967 #endif
11968
11969 static void *task(p)
11970         void *p;
11971 {
11972         return (void *) (p == NULL);
11973 }
11974
11975
11976 int main(argc, argv)
11977         int argc;
11978         char **argv;
11979 {
11980
11981         /* pthread test function */
11982         pthread_t t;
11983         int status;
11984         int detach = 1;
11985
11986 #ifdef HAVE_PTHREADS_FINAL
11987         /* Final pthreads */
11988         pthread_attr_t attr;
11989
11990         status = pthread_attr_init(&attr);
11991         if( status ) return status;
11992
11993 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11994         if( !detach ) {
11995 #if defined( PTHREAD_CREATE_JOINABLE )
11996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11997 #else
11998                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11999 #endif
12000
12001 #ifdef PTHREAD_CREATE_DETACHED
12002         } else {
12003                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12004 #endif
12005         }
12006         if( status ) return status;
12007 #endif
12008
12009         status = pthread_create( &t, &attr, task, NULL );
12010         if( status ) return status;
12011
12012 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12013         if( detach ) {
12014                 /* give thread a chance to complete */
12015                 /* it should remain joinable and hence detachable */
12016                 sleep( 1 );
12017
12018                 status = pthread_detach( t );
12019                 if( status ) return status;
12020         }
12021 #endif
12022
12023 #else
12024         /* Draft 4 pthreads */
12025         status = pthread_create( &t, pthread_attr_default, task, NULL );
12026         if( status ) return status;
12027
12028         if( detach ) {
12029                 /* give thread a chance to complete */
12030                 /* it should remain joinable and hence detachable */
12031                 sleep( 1 );
12032
12033                 status = pthread_detach( &t );
12034                 if( status ) return status;
12035         }
12036 #endif
12037
12038 #ifdef HAVE_LINUX_THREADS
12039         pthread_kill_other_threads_np();
12040 #endif
12041
12042         return 0;
12043
12044 }
12045
12046 EOF
12047 if { (eval echo configure:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12048 then
12049   ol_cv_pthread_create=yes
12050 else
12051   echo "configure: failed program was:" >&5
12052   cat conftest.$ac_ext >&5
12053   rm -fr conftest*
12054   ol_cv_pthread_create=no
12055 fi
12056 rm -fr conftest*
12057 fi
12058
12059 fi
12060
12061 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12062
12063                 if test $ol_cv_pthread_create != no ; then
12064                         ol_link_threads=posix
12065                         ol_link_pthreads=""
12066                 fi
12067                 
12068                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12069 if test "$ol_link_threads" = no ; then
12070         # try -kthread
12071         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12072 echo "configure:12073: checking for pthread link with -kthread" >&5
12073 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12074   echo $ac_n "(cached) $ac_c" 1>&6
12075 else
12076   
12077                 # save the flags
12078                 ol_LIBS="$LIBS"
12079                 LIBS="-kthread $LIBS"
12080
12081                 if test "$cross_compiling" = yes; then
12082   cat > conftest.$ac_ext <<EOF
12083 #line 12084 "configure"
12084 #include "confdefs.h"
12085 /* pthread test headers */
12086 #include <pthread.h>
12087 #ifndef NULL
12088 #define NULL (void*)0
12089 #endif
12090
12091 static void *task(p)
12092         void *p;
12093 {
12094         return (void *) (p == NULL);
12095 }
12096
12097 int main() {
12098
12099         /* pthread test function */
12100         pthread_t t;
12101         int status;
12102         int detach = 1;
12103
12104 #ifdef HAVE_PTHREADS_FINAL
12105         /* Final pthreads */
12106         pthread_attr_t attr;
12107
12108         status = pthread_attr_init(&attr);
12109         if( status ) return status;
12110
12111 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12112         if( !detach ) {
12113 #if defined( PTHREAD_CREATE_JOINABLE )
12114                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12115 #else
12116                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12117 #endif
12118
12119 #ifdef PTHREAD_CREATE_DETACHED
12120         } else {
12121                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12122 #endif
12123         }
12124         if( status ) return status;
12125 #endif
12126
12127         status = pthread_create( &t, &attr, task, NULL );
12128         if( status ) return status;
12129
12130 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12131         if( detach ) {
12132                 /* give thread a chance to complete */
12133                 /* it should remain joinable and hence detachable */
12134                 sleep( 1 );
12135
12136                 status = pthread_detach( t );
12137                 if( status ) return status;
12138         }
12139 #endif
12140
12141 #else
12142         /* Draft 4 pthreads */
12143         status = pthread_create( &t, pthread_attr_default, task, NULL );
12144         if( status ) return status;
12145
12146         if( detach ) {
12147                 /* give thread a chance to complete */
12148                 /* it should remain joinable and hence detachable */
12149                 sleep( 1 );
12150
12151                 status = pthread_detach( &t );
12152                 if( status ) return status;
12153         }
12154 #endif
12155
12156 #ifdef HAVE_LINUX_THREADS
12157         pthread_kill_other_threads_np();
12158 #endif
12159
12160         return 0;
12161
12162 ; return 0; }
12163 EOF
12164 if { (eval echo configure:12165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12165   rm -rf conftest*
12166   ol_cv_pthread_kthread=yes
12167 else
12168   echo "configure: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   rm -rf conftest*
12171   ol_cv_pthread_kthread=no
12172 fi
12173 rm -f conftest*
12174 else
12175   cat > conftest.$ac_ext <<EOF
12176 #line 12177 "configure"
12177 #include "confdefs.h"
12178 /* pthread test headers */
12179 #include <pthread.h>
12180 #ifndef NULL
12181 #define NULL (void*)0
12182 #endif
12183
12184 static void *task(p)
12185         void *p;
12186 {
12187         return (void *) (p == NULL);
12188 }
12189
12190
12191 int main(argc, argv)
12192         int argc;
12193         char **argv;
12194 {
12195
12196         /* pthread test function */
12197         pthread_t t;
12198         int status;
12199         int detach = 1;
12200
12201 #ifdef HAVE_PTHREADS_FINAL
12202         /* Final pthreads */
12203         pthread_attr_t attr;
12204
12205         status = pthread_attr_init(&attr);
12206         if( status ) return status;
12207
12208 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12209         if( !detach ) {
12210 #if defined( PTHREAD_CREATE_JOINABLE )
12211                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12212 #else
12213                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12214 #endif
12215
12216 #ifdef PTHREAD_CREATE_DETACHED
12217         } else {
12218                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12219 #endif
12220         }
12221         if( status ) return status;
12222 #endif
12223
12224         status = pthread_create( &t, &attr, task, NULL );
12225         if( status ) return status;
12226
12227 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12228         if( detach ) {
12229                 /* give thread a chance to complete */
12230                 /* it should remain joinable and hence detachable */
12231                 sleep( 1 );
12232
12233                 status = pthread_detach( t );
12234                 if( status ) return status;
12235         }
12236 #endif
12237
12238 #else
12239         /* Draft 4 pthreads */
12240         status = pthread_create( &t, pthread_attr_default, task, NULL );
12241         if( status ) return status;
12242
12243         if( detach ) {
12244                 /* give thread a chance to complete */
12245                 /* it should remain joinable and hence detachable */
12246                 sleep( 1 );
12247
12248                 status = pthread_detach( &t );
12249                 if( status ) return status;
12250         }
12251 #endif
12252
12253 #ifdef HAVE_LINUX_THREADS
12254         pthread_kill_other_threads_np();
12255 #endif
12256
12257         return 0;
12258
12259 }
12260
12261 EOF
12262 if { (eval echo configure:12263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12263 then
12264   ol_cv_pthread_kthread=yes
12265 else
12266   echo "configure: failed program was:" >&5
12267   cat conftest.$ac_ext >&5
12268   rm -fr conftest*
12269   ol_cv_pthread_kthread=no
12270 fi
12271 rm -fr conftest*
12272 fi
12273
12274
12275                 # restore the LIBS
12276                 LIBS="$ol_LIBS"
12277         
12278 fi
12279
12280 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12281
12282         if test $ol_cv_pthread_kthread = yes ; then
12283                 ol_link_pthreads="-kthread"
12284                 ol_link_threads=posix
12285         fi
12286 fi
12287
12288                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12289 if test "$ol_link_threads" = no ; then
12290         # try -pthread
12291         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12292 echo "configure:12293: checking for pthread link with -pthread" >&5
12293 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12294   echo $ac_n "(cached) $ac_c" 1>&6
12295 else
12296   
12297                 # save the flags
12298                 ol_LIBS="$LIBS"
12299                 LIBS="-pthread $LIBS"
12300
12301                 if test "$cross_compiling" = yes; then
12302   cat > conftest.$ac_ext <<EOF
12303 #line 12304 "configure"
12304 #include "confdefs.h"
12305 /* pthread test headers */
12306 #include <pthread.h>
12307 #ifndef NULL
12308 #define NULL (void*)0
12309 #endif
12310
12311 static void *task(p)
12312         void *p;
12313 {
12314         return (void *) (p == NULL);
12315 }
12316
12317 int main() {
12318
12319         /* pthread test function */
12320         pthread_t t;
12321         int status;
12322         int detach = 1;
12323
12324 #ifdef HAVE_PTHREADS_FINAL
12325         /* Final pthreads */
12326         pthread_attr_t attr;
12327
12328         status = pthread_attr_init(&attr);
12329         if( status ) return status;
12330
12331 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12332         if( !detach ) {
12333 #if defined( PTHREAD_CREATE_JOINABLE )
12334                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12335 #else
12336                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12337 #endif
12338
12339 #ifdef PTHREAD_CREATE_DETACHED
12340         } else {
12341                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12342 #endif
12343         }
12344         if( status ) return status;
12345 #endif
12346
12347         status = pthread_create( &t, &attr, task, NULL );
12348         if( status ) return status;
12349
12350 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12351         if( detach ) {
12352                 /* give thread a chance to complete */
12353                 /* it should remain joinable and hence detachable */
12354                 sleep( 1 );
12355
12356                 status = pthread_detach( t );
12357                 if( status ) return status;
12358         }
12359 #endif
12360
12361 #else
12362         /* Draft 4 pthreads */
12363         status = pthread_create( &t, pthread_attr_default, task, NULL );
12364         if( status ) return status;
12365
12366         if( detach ) {
12367                 /* give thread a chance to complete */
12368                 /* it should remain joinable and hence detachable */
12369                 sleep( 1 );
12370
12371                 status = pthread_detach( &t );
12372                 if( status ) return status;
12373         }
12374 #endif
12375
12376 #ifdef HAVE_LINUX_THREADS
12377         pthread_kill_other_threads_np();
12378 #endif
12379
12380         return 0;
12381
12382 ; return 0; }
12383 EOF
12384 if { (eval echo configure:12385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12385   rm -rf conftest*
12386   ol_cv_pthread_pthread=yes
12387 else
12388   echo "configure: failed program was:" >&5
12389   cat conftest.$ac_ext >&5
12390   rm -rf conftest*
12391   ol_cv_pthread_pthread=no
12392 fi
12393 rm -f conftest*
12394 else
12395   cat > conftest.$ac_ext <<EOF
12396 #line 12397 "configure"
12397 #include "confdefs.h"
12398 /* pthread test headers */
12399 #include <pthread.h>
12400 #ifndef NULL
12401 #define NULL (void*)0
12402 #endif
12403
12404 static void *task(p)
12405         void *p;
12406 {
12407         return (void *) (p == NULL);
12408 }
12409
12410
12411 int main(argc, argv)
12412         int argc;
12413         char **argv;
12414 {
12415
12416         /* pthread test function */
12417         pthread_t t;
12418         int status;
12419         int detach = 1;
12420
12421 #ifdef HAVE_PTHREADS_FINAL
12422         /* Final pthreads */
12423         pthread_attr_t attr;
12424
12425         status = pthread_attr_init(&attr);
12426         if( status ) return status;
12427
12428 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12429         if( !detach ) {
12430 #if defined( PTHREAD_CREATE_JOINABLE )
12431                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12432 #else
12433                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12434 #endif
12435
12436 #ifdef PTHREAD_CREATE_DETACHED
12437         } else {
12438                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12439 #endif
12440         }
12441         if( status ) return status;
12442 #endif
12443
12444         status = pthread_create( &t, &attr, task, NULL );
12445         if( status ) return status;
12446
12447 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12448         if( detach ) {
12449                 /* give thread a chance to complete */
12450                 /* it should remain joinable and hence detachable */
12451                 sleep( 1 );
12452
12453                 status = pthread_detach( t );
12454                 if( status ) return status;
12455         }
12456 #endif
12457
12458 #else
12459         /* Draft 4 pthreads */
12460         status = pthread_create( &t, pthread_attr_default, task, NULL );
12461         if( status ) return status;
12462
12463         if( detach ) {
12464                 /* give thread a chance to complete */
12465                 /* it should remain joinable and hence detachable */
12466                 sleep( 1 );
12467
12468                 status = pthread_detach( &t );
12469                 if( status ) return status;
12470         }
12471 #endif
12472
12473 #ifdef HAVE_LINUX_THREADS
12474         pthread_kill_other_threads_np();
12475 #endif
12476
12477         return 0;
12478
12479 }
12480
12481 EOF
12482 if { (eval echo configure:12483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12483 then
12484   ol_cv_pthread_pthread=yes
12485 else
12486   echo "configure: failed program was:" >&5
12487   cat conftest.$ac_ext >&5
12488   rm -fr conftest*
12489   ol_cv_pthread_pthread=no
12490 fi
12491 rm -fr conftest*
12492 fi
12493
12494
12495                 # restore the LIBS
12496                 LIBS="$ol_LIBS"
12497         
12498 fi
12499
12500 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12501
12502         if test $ol_cv_pthread_pthread = yes ; then
12503                 ol_link_pthreads="-pthread"
12504                 ol_link_threads=posix
12505         fi
12506 fi
12507
12508                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12509 if test "$ol_link_threads" = no ; then
12510         # try -pthreads
12511         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12512 echo "configure:12513: checking for pthread link with -pthreads" >&5
12513 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12514   echo $ac_n "(cached) $ac_c" 1>&6
12515 else
12516   
12517                 # save the flags
12518                 ol_LIBS="$LIBS"
12519                 LIBS="-pthreads $LIBS"
12520
12521                 if test "$cross_compiling" = yes; then
12522   cat > conftest.$ac_ext <<EOF
12523 #line 12524 "configure"
12524 #include "confdefs.h"
12525 /* pthread test headers */
12526 #include <pthread.h>
12527 #ifndef NULL
12528 #define NULL (void*)0
12529 #endif
12530
12531 static void *task(p)
12532         void *p;
12533 {
12534         return (void *) (p == NULL);
12535 }
12536
12537 int main() {
12538
12539         /* pthread test function */
12540         pthread_t t;
12541         int status;
12542         int detach = 1;
12543
12544 #ifdef HAVE_PTHREADS_FINAL
12545         /* Final pthreads */
12546         pthread_attr_t attr;
12547
12548         status = pthread_attr_init(&attr);
12549         if( status ) return status;
12550
12551 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12552         if( !detach ) {
12553 #if defined( PTHREAD_CREATE_JOINABLE )
12554                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12555 #else
12556                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12557 #endif
12558
12559 #ifdef PTHREAD_CREATE_DETACHED
12560         } else {
12561                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12562 #endif
12563         }
12564         if( status ) return status;
12565 #endif
12566
12567         status = pthread_create( &t, &attr, task, NULL );
12568         if( status ) return status;
12569
12570 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12571         if( detach ) {
12572                 /* give thread a chance to complete */
12573                 /* it should remain joinable and hence detachable */
12574                 sleep( 1 );
12575
12576                 status = pthread_detach( t );
12577                 if( status ) return status;
12578         }
12579 #endif
12580
12581 #else
12582         /* Draft 4 pthreads */
12583         status = pthread_create( &t, pthread_attr_default, task, NULL );
12584         if( status ) return status;
12585
12586         if( detach ) {
12587                 /* give thread a chance to complete */
12588                 /* it should remain joinable and hence detachable */
12589                 sleep( 1 );
12590
12591                 status = pthread_detach( &t );
12592                 if( status ) return status;
12593         }
12594 #endif
12595
12596 #ifdef HAVE_LINUX_THREADS
12597         pthread_kill_other_threads_np();
12598 #endif
12599
12600         return 0;
12601
12602 ; return 0; }
12603 EOF
12604 if { (eval echo configure:12605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12605   rm -rf conftest*
12606   ol_cv_pthread_pthreads=yes
12607 else
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   ol_cv_pthread_pthreads=no
12612 fi
12613 rm -f conftest*
12614 else
12615   cat > conftest.$ac_ext <<EOF
12616 #line 12617 "configure"
12617 #include "confdefs.h"
12618 /* pthread test headers */
12619 #include <pthread.h>
12620 #ifndef NULL
12621 #define NULL (void*)0
12622 #endif
12623
12624 static void *task(p)
12625         void *p;
12626 {
12627         return (void *) (p == NULL);
12628 }
12629
12630
12631 int main(argc, argv)
12632         int argc;
12633         char **argv;
12634 {
12635
12636         /* pthread test function */
12637         pthread_t t;
12638         int status;
12639         int detach = 1;
12640
12641 #ifdef HAVE_PTHREADS_FINAL
12642         /* Final pthreads */
12643         pthread_attr_t attr;
12644
12645         status = pthread_attr_init(&attr);
12646         if( status ) return status;
12647
12648 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12649         if( !detach ) {
12650 #if defined( PTHREAD_CREATE_JOINABLE )
12651                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12652 #else
12653                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12654 #endif
12655
12656 #ifdef PTHREAD_CREATE_DETACHED
12657         } else {
12658                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12659 #endif
12660         }
12661         if( status ) return status;
12662 #endif
12663
12664         status = pthread_create( &t, &attr, task, NULL );
12665         if( status ) return status;
12666
12667 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12668         if( detach ) {
12669                 /* give thread a chance to complete */
12670                 /* it should remain joinable and hence detachable */
12671                 sleep( 1 );
12672
12673                 status = pthread_detach( t );
12674                 if( status ) return status;
12675         }
12676 #endif
12677
12678 #else
12679         /* Draft 4 pthreads */
12680         status = pthread_create( &t, pthread_attr_default, task, NULL );
12681         if( status ) return status;
12682
12683         if( detach ) {
12684                 /* give thread a chance to complete */
12685                 /* it should remain joinable and hence detachable */
12686                 sleep( 1 );
12687
12688                 status = pthread_detach( &t );
12689                 if( status ) return status;
12690         }
12691 #endif
12692
12693 #ifdef HAVE_LINUX_THREADS
12694         pthread_kill_other_threads_np();
12695 #endif
12696
12697         return 0;
12698
12699 }
12700
12701 EOF
12702 if { (eval echo configure:12703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12703 then
12704   ol_cv_pthread_pthreads=yes
12705 else
12706   echo "configure: failed program was:" >&5
12707   cat conftest.$ac_ext >&5
12708   rm -fr conftest*
12709   ol_cv_pthread_pthreads=no
12710 fi
12711 rm -fr conftest*
12712 fi
12713
12714
12715                 # restore the LIBS
12716                 LIBS="$ol_LIBS"
12717         
12718 fi
12719
12720 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12721
12722         if test $ol_cv_pthread_pthreads = yes ; then
12723                 ol_link_pthreads="-pthreads"
12724                 ol_link_threads=posix
12725         fi
12726 fi
12727
12728                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12729 if test "$ol_link_threads" = no ; then
12730         # try -mthreads
12731         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12732 echo "configure:12733: checking for pthread link with -mthreads" >&5
12733 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12734   echo $ac_n "(cached) $ac_c" 1>&6
12735 else
12736   
12737                 # save the flags
12738                 ol_LIBS="$LIBS"
12739                 LIBS="-mthreads $LIBS"
12740
12741                 if test "$cross_compiling" = yes; then
12742   cat > conftest.$ac_ext <<EOF
12743 #line 12744 "configure"
12744 #include "confdefs.h"
12745 /* pthread test headers */
12746 #include <pthread.h>
12747 #ifndef NULL
12748 #define NULL (void*)0
12749 #endif
12750
12751 static void *task(p)
12752         void *p;
12753 {
12754         return (void *) (p == NULL);
12755 }
12756
12757 int main() {
12758
12759         /* pthread test function */
12760         pthread_t t;
12761         int status;
12762         int detach = 1;
12763
12764 #ifdef HAVE_PTHREADS_FINAL
12765         /* Final pthreads */
12766         pthread_attr_t attr;
12767
12768         status = pthread_attr_init(&attr);
12769         if( status ) return status;
12770
12771 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12772         if( !detach ) {
12773 #if defined( PTHREAD_CREATE_JOINABLE )
12774                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12775 #else
12776                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12777 #endif
12778
12779 #ifdef PTHREAD_CREATE_DETACHED
12780         } else {
12781                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12782 #endif
12783         }
12784         if( status ) return status;
12785 #endif
12786
12787         status = pthread_create( &t, &attr, task, NULL );
12788         if( status ) return status;
12789
12790 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12791         if( detach ) {
12792                 /* give thread a chance to complete */
12793                 /* it should remain joinable and hence detachable */
12794                 sleep( 1 );
12795
12796                 status = pthread_detach( t );
12797                 if( status ) return status;
12798         }
12799 #endif
12800
12801 #else
12802         /* Draft 4 pthreads */
12803         status = pthread_create( &t, pthread_attr_default, task, NULL );
12804         if( status ) return status;
12805
12806         if( detach ) {
12807                 /* give thread a chance to complete */
12808                 /* it should remain joinable and hence detachable */
12809                 sleep( 1 );
12810
12811                 status = pthread_detach( &t );
12812                 if( status ) return status;
12813         }
12814 #endif
12815
12816 #ifdef HAVE_LINUX_THREADS
12817         pthread_kill_other_threads_np();
12818 #endif
12819
12820         return 0;
12821
12822 ; return 0; }
12823 EOF
12824 if { (eval echo configure:12825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12825   rm -rf conftest*
12826   ol_cv_pthread_mthreads=yes
12827 else
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   ol_cv_pthread_mthreads=no
12832 fi
12833 rm -f conftest*
12834 else
12835   cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 /* pthread test headers */
12839 #include <pthread.h>
12840 #ifndef NULL
12841 #define NULL (void*)0
12842 #endif
12843
12844 static void *task(p)
12845         void *p;
12846 {
12847         return (void *) (p == NULL);
12848 }
12849
12850
12851 int main(argc, argv)
12852         int argc;
12853         char **argv;
12854 {
12855
12856         /* pthread test function */
12857         pthread_t t;
12858         int status;
12859         int detach = 1;
12860
12861 #ifdef HAVE_PTHREADS_FINAL
12862         /* Final pthreads */
12863         pthread_attr_t attr;
12864
12865         status = pthread_attr_init(&attr);
12866         if( status ) return status;
12867
12868 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12869         if( !detach ) {
12870 #if defined( PTHREAD_CREATE_JOINABLE )
12871                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12872 #else
12873                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12874 #endif
12875
12876 #ifdef PTHREAD_CREATE_DETACHED
12877         } else {
12878                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12879 #endif
12880         }
12881         if( status ) return status;
12882 #endif
12883
12884         status = pthread_create( &t, &attr, task, NULL );
12885         if( status ) return status;
12886
12887 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12888         if( detach ) {
12889                 /* give thread a chance to complete */
12890                 /* it should remain joinable and hence detachable */
12891                 sleep( 1 );
12892
12893                 status = pthread_detach( t );
12894                 if( status ) return status;
12895         }
12896 #endif
12897
12898 #else
12899         /* Draft 4 pthreads */
12900         status = pthread_create( &t, pthread_attr_default, task, NULL );
12901         if( status ) return status;
12902
12903         if( detach ) {
12904                 /* give thread a chance to complete */
12905                 /* it should remain joinable and hence detachable */
12906                 sleep( 1 );
12907
12908                 status = pthread_detach( &t );
12909                 if( status ) return status;
12910         }
12911 #endif
12912
12913 #ifdef HAVE_LINUX_THREADS
12914         pthread_kill_other_threads_np();
12915 #endif
12916
12917         return 0;
12918
12919 }
12920
12921 EOF
12922 if { (eval echo configure:12923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12923 then
12924   ol_cv_pthread_mthreads=yes
12925 else
12926   echo "configure: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   rm -fr conftest*
12929   ol_cv_pthread_mthreads=no
12930 fi
12931 rm -fr conftest*
12932 fi
12933
12934
12935                 # restore the LIBS
12936                 LIBS="$ol_LIBS"
12937         
12938 fi
12939
12940 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12941
12942         if test $ol_cv_pthread_mthreads = yes ; then
12943                 ol_link_pthreads="-mthreads"
12944                 ol_link_threads=posix
12945         fi
12946 fi
12947
12948                 # Pthread try link: -thread (ol_cv_pthread_thread)
12949 if test "$ol_link_threads" = no ; then
12950         # try -thread
12951         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12952 echo "configure:12953: checking for pthread link with -thread" >&5
12953 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12954   echo $ac_n "(cached) $ac_c" 1>&6
12955 else
12956   
12957                 # save the flags
12958                 ol_LIBS="$LIBS"
12959                 LIBS="-thread $LIBS"
12960
12961                 if test "$cross_compiling" = yes; then
12962   cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965 /* pthread test headers */
12966 #include <pthread.h>
12967 #ifndef NULL
12968 #define NULL (void*)0
12969 #endif
12970
12971 static void *task(p)
12972         void *p;
12973 {
12974         return (void *) (p == NULL);
12975 }
12976
12977 int main() {
12978
12979         /* pthread test function */
12980         pthread_t t;
12981         int status;
12982         int detach = 1;
12983
12984 #ifdef HAVE_PTHREADS_FINAL
12985         /* Final pthreads */
12986         pthread_attr_t attr;
12987
12988         status = pthread_attr_init(&attr);
12989         if( status ) return status;
12990
12991 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12992         if( !detach ) {
12993 #if defined( PTHREAD_CREATE_JOINABLE )
12994                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12995 #else
12996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12997 #endif
12998
12999 #ifdef PTHREAD_CREATE_DETACHED
13000         } else {
13001                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13002 #endif
13003         }
13004         if( status ) return status;
13005 #endif
13006
13007         status = pthread_create( &t, &attr, task, NULL );
13008         if( status ) return status;
13009
13010 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13011         if( detach ) {
13012                 /* give thread a chance to complete */
13013                 /* it should remain joinable and hence detachable */
13014                 sleep( 1 );
13015
13016                 status = pthread_detach( t );
13017                 if( status ) return status;
13018         }
13019 #endif
13020
13021 #else
13022         /* Draft 4 pthreads */
13023         status = pthread_create( &t, pthread_attr_default, task, NULL );
13024         if( status ) return status;
13025
13026         if( detach ) {
13027                 /* give thread a chance to complete */
13028                 /* it should remain joinable and hence detachable */
13029                 sleep( 1 );
13030
13031                 status = pthread_detach( &t );
13032                 if( status ) return status;
13033         }
13034 #endif
13035
13036 #ifdef HAVE_LINUX_THREADS
13037         pthread_kill_other_threads_np();
13038 #endif
13039
13040         return 0;
13041
13042 ; return 0; }
13043 EOF
13044 if { (eval echo configure:13045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13045   rm -rf conftest*
13046   ol_cv_pthread_thread=yes
13047 else
13048   echo "configure: failed program was:" >&5
13049   cat conftest.$ac_ext >&5
13050   rm -rf conftest*
13051   ol_cv_pthread_thread=no
13052 fi
13053 rm -f conftest*
13054 else
13055   cat > conftest.$ac_ext <<EOF
13056 #line 13057 "configure"
13057 #include "confdefs.h"
13058 /* pthread test headers */
13059 #include <pthread.h>
13060 #ifndef NULL
13061 #define NULL (void*)0
13062 #endif
13063
13064 static void *task(p)
13065         void *p;
13066 {
13067         return (void *) (p == NULL);
13068 }
13069
13070
13071 int main(argc, argv)
13072         int argc;
13073         char **argv;
13074 {
13075
13076         /* pthread test function */
13077         pthread_t t;
13078         int status;
13079         int detach = 1;
13080
13081 #ifdef HAVE_PTHREADS_FINAL
13082         /* Final pthreads */
13083         pthread_attr_t attr;
13084
13085         status = pthread_attr_init(&attr);
13086         if( status ) return status;
13087
13088 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13089         if( !detach ) {
13090 #if defined( PTHREAD_CREATE_JOINABLE )
13091                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13092 #else
13093                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13094 #endif
13095
13096 #ifdef PTHREAD_CREATE_DETACHED
13097         } else {
13098                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13099 #endif
13100         }
13101         if( status ) return status;
13102 #endif
13103
13104         status = pthread_create( &t, &attr, task, NULL );
13105         if( status ) return status;
13106
13107 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13108         if( detach ) {
13109                 /* give thread a chance to complete */
13110                 /* it should remain joinable and hence detachable */
13111                 sleep( 1 );
13112
13113                 status = pthread_detach( t );
13114                 if( status ) return status;
13115         }
13116 #endif
13117
13118 #else
13119         /* Draft 4 pthreads */
13120         status = pthread_create( &t, pthread_attr_default, task, NULL );
13121         if( status ) return status;
13122
13123         if( detach ) {
13124                 /* give thread a chance to complete */
13125                 /* it should remain joinable and hence detachable */
13126                 sleep( 1 );
13127
13128                 status = pthread_detach( &t );
13129                 if( status ) return status;
13130         }
13131 #endif
13132
13133 #ifdef HAVE_LINUX_THREADS
13134         pthread_kill_other_threads_np();
13135 #endif
13136
13137         return 0;
13138
13139 }
13140
13141 EOF
13142 if { (eval echo configure:13143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13143 then
13144   ol_cv_pthread_thread=yes
13145 else
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -fr conftest*
13149   ol_cv_pthread_thread=no
13150 fi
13151 rm -fr conftest*
13152 fi
13153
13154
13155                 # restore the LIBS
13156                 LIBS="$ol_LIBS"
13157         
13158 fi
13159
13160 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13161
13162         if test $ol_cv_pthread_thread = yes ; then
13163                 ol_link_pthreads="-thread"
13164                 ol_link_threads=posix
13165         fi
13166 fi
13167
13168
13169                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13170 if test "$ol_link_threads" = no ; then
13171         # try -lpthread -lmach -lexc -lc_r
13172         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13173 echo "configure:13174: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13174 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13175   echo $ac_n "(cached) $ac_c" 1>&6
13176 else
13177   
13178                 # save the flags
13179                 ol_LIBS="$LIBS"
13180                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13181
13182                 if test "$cross_compiling" = yes; then
13183   cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186 /* pthread test headers */
13187 #include <pthread.h>
13188 #ifndef NULL
13189 #define NULL (void*)0
13190 #endif
13191
13192 static void *task(p)
13193         void *p;
13194 {
13195         return (void *) (p == NULL);
13196 }
13197
13198 int main() {
13199
13200         /* pthread test function */
13201         pthread_t t;
13202         int status;
13203         int detach = 1;
13204
13205 #ifdef HAVE_PTHREADS_FINAL
13206         /* Final pthreads */
13207         pthread_attr_t attr;
13208
13209         status = pthread_attr_init(&attr);
13210         if( status ) return status;
13211
13212 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13213         if( !detach ) {
13214 #if defined( PTHREAD_CREATE_JOINABLE )
13215                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13216 #else
13217                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13218 #endif
13219
13220 #ifdef PTHREAD_CREATE_DETACHED
13221         } else {
13222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13223 #endif
13224         }
13225         if( status ) return status;
13226 #endif
13227
13228         status = pthread_create( &t, &attr, task, NULL );
13229         if( status ) return status;
13230
13231 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13232         if( detach ) {
13233                 /* give thread a chance to complete */
13234                 /* it should remain joinable and hence detachable */
13235                 sleep( 1 );
13236
13237                 status = pthread_detach( t );
13238                 if( status ) return status;
13239         }
13240 #endif
13241
13242 #else
13243         /* Draft 4 pthreads */
13244         status = pthread_create( &t, pthread_attr_default, task, NULL );
13245         if( status ) return status;
13246
13247         if( detach ) {
13248                 /* give thread a chance to complete */
13249                 /* it should remain joinable and hence detachable */
13250                 sleep( 1 );
13251
13252                 status = pthread_detach( &t );
13253                 if( status ) return status;
13254         }
13255 #endif
13256
13257 #ifdef HAVE_LINUX_THREADS
13258         pthread_kill_other_threads_np();
13259 #endif
13260
13261         return 0;
13262
13263 ; return 0; }
13264 EOF
13265 if { (eval echo configure:13266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13266   rm -rf conftest*
13267   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13268 else
13269   echo "configure: failed program was:" >&5
13270   cat conftest.$ac_ext >&5
13271   rm -rf conftest*
13272   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13273 fi
13274 rm -f conftest*
13275 else
13276   cat > conftest.$ac_ext <<EOF
13277 #line 13278 "configure"
13278 #include "confdefs.h"
13279 /* pthread test headers */
13280 #include <pthread.h>
13281 #ifndef NULL
13282 #define NULL (void*)0
13283 #endif
13284
13285 static void *task(p)
13286         void *p;
13287 {
13288         return (void *) (p == NULL);
13289 }
13290
13291
13292 int main(argc, argv)
13293         int argc;
13294         char **argv;
13295 {
13296
13297         /* pthread test function */
13298         pthread_t t;
13299         int status;
13300         int detach = 1;
13301
13302 #ifdef HAVE_PTHREADS_FINAL
13303         /* Final pthreads */
13304         pthread_attr_t attr;
13305
13306         status = pthread_attr_init(&attr);
13307         if( status ) return status;
13308
13309 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13310         if( !detach ) {
13311 #if defined( PTHREAD_CREATE_JOINABLE )
13312                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13313 #else
13314                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13315 #endif
13316
13317 #ifdef PTHREAD_CREATE_DETACHED
13318         } else {
13319                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13320 #endif
13321         }
13322         if( status ) return status;
13323 #endif
13324
13325         status = pthread_create( &t, &attr, task, NULL );
13326         if( status ) return status;
13327
13328 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13329         if( detach ) {
13330                 /* give thread a chance to complete */
13331                 /* it should remain joinable and hence detachable */
13332                 sleep( 1 );
13333
13334                 status = pthread_detach( t );
13335                 if( status ) return status;
13336         }
13337 #endif
13338
13339 #else
13340         /* Draft 4 pthreads */
13341         status = pthread_create( &t, pthread_attr_default, task, NULL );
13342         if( status ) return status;
13343
13344         if( detach ) {
13345                 /* give thread a chance to complete */
13346                 /* it should remain joinable and hence detachable */
13347                 sleep( 1 );
13348
13349                 status = pthread_detach( &t );
13350                 if( status ) return status;
13351         }
13352 #endif
13353
13354 #ifdef HAVE_LINUX_THREADS
13355         pthread_kill_other_threads_np();
13356 #endif
13357
13358         return 0;
13359
13360 }
13361
13362 EOF
13363 if { (eval echo configure:13364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13364 then
13365   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13366 else
13367   echo "configure: failed program was:" >&5
13368   cat conftest.$ac_ext >&5
13369   rm -fr conftest*
13370   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13371 fi
13372 rm -fr conftest*
13373 fi
13374
13375
13376                 # restore the LIBS
13377                 LIBS="$ol_LIBS"
13378         
13379 fi
13380
13381 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13382
13383         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13384                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13385                 ol_link_threads=posix
13386         fi
13387 fi
13388
13389                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13390 if test "$ol_link_threads" = no ; then
13391         # try -lpthread -lmach -lexc
13392         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13393 echo "configure:13394: checking for pthread link with -lpthread -lmach -lexc" >&5
13394 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13395   echo $ac_n "(cached) $ac_c" 1>&6
13396 else
13397   
13398                 # save the flags
13399                 ol_LIBS="$LIBS"
13400                 LIBS="-lpthread -lmach -lexc $LIBS"
13401
13402                 if test "$cross_compiling" = yes; then
13403   cat > conftest.$ac_ext <<EOF
13404 #line 13405 "configure"
13405 #include "confdefs.h"
13406 /* pthread test headers */
13407 #include <pthread.h>
13408 #ifndef NULL
13409 #define NULL (void*)0
13410 #endif
13411
13412 static void *task(p)
13413         void *p;
13414 {
13415         return (void *) (p == NULL);
13416 }
13417
13418 int main() {
13419
13420         /* pthread test function */
13421         pthread_t t;
13422         int status;
13423         int detach = 1;
13424
13425 #ifdef HAVE_PTHREADS_FINAL
13426         /* Final pthreads */
13427         pthread_attr_t attr;
13428
13429         status = pthread_attr_init(&attr);
13430         if( status ) return status;
13431
13432 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13433         if( !detach ) {
13434 #if defined( PTHREAD_CREATE_JOINABLE )
13435                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13436 #else
13437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13438 #endif
13439
13440 #ifdef PTHREAD_CREATE_DETACHED
13441         } else {
13442                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13443 #endif
13444         }
13445         if( status ) return status;
13446 #endif
13447
13448         status = pthread_create( &t, &attr, task, NULL );
13449         if( status ) return status;
13450
13451 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13452         if( detach ) {
13453                 /* give thread a chance to complete */
13454                 /* it should remain joinable and hence detachable */
13455                 sleep( 1 );
13456
13457                 status = pthread_detach( t );
13458                 if( status ) return status;
13459         }
13460 #endif
13461
13462 #else
13463         /* Draft 4 pthreads */
13464         status = pthread_create( &t, pthread_attr_default, task, NULL );
13465         if( status ) return status;
13466
13467         if( detach ) {
13468                 /* give thread a chance to complete */
13469                 /* it should remain joinable and hence detachable */
13470                 sleep( 1 );
13471
13472                 status = pthread_detach( &t );
13473                 if( status ) return status;
13474         }
13475 #endif
13476
13477 #ifdef HAVE_LINUX_THREADS
13478         pthread_kill_other_threads_np();
13479 #endif
13480
13481         return 0;
13482
13483 ; return 0; }
13484 EOF
13485 if { (eval echo configure:13486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13486   rm -rf conftest*
13487   ol_cv_pthread_lpthread_lmach_lexc=yes
13488 else
13489   echo "configure: failed program was:" >&5
13490   cat conftest.$ac_ext >&5
13491   rm -rf conftest*
13492   ol_cv_pthread_lpthread_lmach_lexc=no
13493 fi
13494 rm -f conftest*
13495 else
13496   cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 /* pthread test headers */
13500 #include <pthread.h>
13501 #ifndef NULL
13502 #define NULL (void*)0
13503 #endif
13504
13505 static void *task(p)
13506         void *p;
13507 {
13508         return (void *) (p == NULL);
13509 }
13510
13511
13512 int main(argc, argv)
13513         int argc;
13514         char **argv;
13515 {
13516
13517         /* pthread test function */
13518         pthread_t t;
13519         int status;
13520         int detach = 1;
13521
13522 #ifdef HAVE_PTHREADS_FINAL
13523         /* Final pthreads */
13524         pthread_attr_t attr;
13525
13526         status = pthread_attr_init(&attr);
13527         if( status ) return status;
13528
13529 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13530         if( !detach ) {
13531 #if defined( PTHREAD_CREATE_JOINABLE )
13532                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13533 #else
13534                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13535 #endif
13536
13537 #ifdef PTHREAD_CREATE_DETACHED
13538         } else {
13539                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13540 #endif
13541         }
13542         if( status ) return status;
13543 #endif
13544
13545         status = pthread_create( &t, &attr, task, NULL );
13546         if( status ) return status;
13547
13548 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13549         if( detach ) {
13550                 /* give thread a chance to complete */
13551                 /* it should remain joinable and hence detachable */
13552                 sleep( 1 );
13553
13554                 status = pthread_detach( t );
13555                 if( status ) return status;
13556         }
13557 #endif
13558
13559 #else
13560         /* Draft 4 pthreads */
13561         status = pthread_create( &t, pthread_attr_default, task, NULL );
13562         if( status ) return status;
13563
13564         if( detach ) {
13565                 /* give thread a chance to complete */
13566                 /* it should remain joinable and hence detachable */
13567                 sleep( 1 );
13568
13569                 status = pthread_detach( &t );
13570                 if( status ) return status;
13571         }
13572 #endif
13573
13574 #ifdef HAVE_LINUX_THREADS
13575         pthread_kill_other_threads_np();
13576 #endif
13577
13578         return 0;
13579
13580 }
13581
13582 EOF
13583 if { (eval echo configure:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13584 then
13585   ol_cv_pthread_lpthread_lmach_lexc=yes
13586 else
13587   echo "configure: failed program was:" >&5
13588   cat conftest.$ac_ext >&5
13589   rm -fr conftest*
13590   ol_cv_pthread_lpthread_lmach_lexc=no
13591 fi
13592 rm -fr conftest*
13593 fi
13594
13595
13596                 # restore the LIBS
13597                 LIBS="$ol_LIBS"
13598         
13599 fi
13600
13601 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13602
13603         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13604                 ol_link_pthreads="-lpthread -lmach -lexc"
13605                 ol_link_threads=posix
13606         fi
13607 fi
13608
13609
13610                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13611 if test "$ol_link_threads" = no ; then
13612         # try -lpthread -Wl,-woff,85
13613         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13614 echo "configure:13615: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13615 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13616   echo $ac_n "(cached) $ac_c" 1>&6
13617 else
13618   
13619                 # save the flags
13620                 ol_LIBS="$LIBS"
13621                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13622
13623                 if test "$cross_compiling" = yes; then
13624   cat > conftest.$ac_ext <<EOF
13625 #line 13626 "configure"
13626 #include "confdefs.h"
13627 /* pthread test headers */
13628 #include <pthread.h>
13629 #ifndef NULL
13630 #define NULL (void*)0
13631 #endif
13632
13633 static void *task(p)
13634         void *p;
13635 {
13636         return (void *) (p == NULL);
13637 }
13638
13639 int main() {
13640
13641         /* pthread test function */
13642         pthread_t t;
13643         int status;
13644         int detach = 1;
13645
13646 #ifdef HAVE_PTHREADS_FINAL
13647         /* Final pthreads */
13648         pthread_attr_t attr;
13649
13650         status = pthread_attr_init(&attr);
13651         if( status ) return status;
13652
13653 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13654         if( !detach ) {
13655 #if defined( PTHREAD_CREATE_JOINABLE )
13656                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13657 #else
13658                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13659 #endif
13660
13661 #ifdef PTHREAD_CREATE_DETACHED
13662         } else {
13663                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13664 #endif
13665         }
13666         if( status ) return status;
13667 #endif
13668
13669         status = pthread_create( &t, &attr, task, NULL );
13670         if( status ) return status;
13671
13672 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13673         if( detach ) {
13674                 /* give thread a chance to complete */
13675                 /* it should remain joinable and hence detachable */
13676                 sleep( 1 );
13677
13678                 status = pthread_detach( t );
13679                 if( status ) return status;
13680         }
13681 #endif
13682
13683 #else
13684         /* Draft 4 pthreads */
13685         status = pthread_create( &t, pthread_attr_default, task, NULL );
13686         if( status ) return status;
13687
13688         if( detach ) {
13689                 /* give thread a chance to complete */
13690                 /* it should remain joinable and hence detachable */
13691                 sleep( 1 );
13692
13693                 status = pthread_detach( &t );
13694                 if( status ) return status;
13695         }
13696 #endif
13697
13698 #ifdef HAVE_LINUX_THREADS
13699         pthread_kill_other_threads_np();
13700 #endif
13701
13702         return 0;
13703
13704 ; return 0; }
13705 EOF
13706 if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13707   rm -rf conftest*
13708   ol_cv_pthread_lib_lpthread_woff=yes
13709 else
13710   echo "configure: failed program was:" >&5
13711   cat conftest.$ac_ext >&5
13712   rm -rf conftest*
13713   ol_cv_pthread_lib_lpthread_woff=no
13714 fi
13715 rm -f conftest*
13716 else
13717   cat > conftest.$ac_ext <<EOF
13718 #line 13719 "configure"
13719 #include "confdefs.h"
13720 /* pthread test headers */
13721 #include <pthread.h>
13722 #ifndef NULL
13723 #define NULL (void*)0
13724 #endif
13725
13726 static void *task(p)
13727         void *p;
13728 {
13729         return (void *) (p == NULL);
13730 }
13731
13732
13733 int main(argc, argv)
13734         int argc;
13735         char **argv;
13736 {
13737
13738         /* pthread test function */
13739         pthread_t t;
13740         int status;
13741         int detach = 1;
13742
13743 #ifdef HAVE_PTHREADS_FINAL
13744         /* Final pthreads */
13745         pthread_attr_t attr;
13746
13747         status = pthread_attr_init(&attr);
13748         if( status ) return status;
13749
13750 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13751         if( !detach ) {
13752 #if defined( PTHREAD_CREATE_JOINABLE )
13753                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13754 #else
13755                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13756 #endif
13757
13758 #ifdef PTHREAD_CREATE_DETACHED
13759         } else {
13760                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13761 #endif
13762         }
13763         if( status ) return status;
13764 #endif
13765
13766         status = pthread_create( &t, &attr, task, NULL );
13767         if( status ) return status;
13768
13769 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13770         if( detach ) {
13771                 /* give thread a chance to complete */
13772                 /* it should remain joinable and hence detachable */
13773                 sleep( 1 );
13774
13775                 status = pthread_detach( t );
13776                 if( status ) return status;
13777         }
13778 #endif
13779
13780 #else
13781         /* Draft 4 pthreads */
13782         status = pthread_create( &t, pthread_attr_default, task, NULL );
13783         if( status ) return status;
13784
13785         if( detach ) {
13786                 /* give thread a chance to complete */
13787                 /* it should remain joinable and hence detachable */
13788                 sleep( 1 );
13789
13790                 status = pthread_detach( &t );
13791                 if( status ) return status;
13792         }
13793 #endif
13794
13795 #ifdef HAVE_LINUX_THREADS
13796         pthread_kill_other_threads_np();
13797 #endif
13798
13799         return 0;
13800
13801 }
13802
13803 EOF
13804 if { (eval echo configure:13805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13805 then
13806   ol_cv_pthread_lib_lpthread_woff=yes
13807 else
13808   echo "configure: failed program was:" >&5
13809   cat conftest.$ac_ext >&5
13810   rm -fr conftest*
13811   ol_cv_pthread_lib_lpthread_woff=no
13812 fi
13813 rm -fr conftest*
13814 fi
13815
13816
13817                 # restore the LIBS
13818                 LIBS="$ol_LIBS"
13819         
13820 fi
13821
13822 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13823
13824         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13825                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13826                 ol_link_threads=posix
13827         fi
13828 fi
13829
13830
13831                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13832 if test "$ol_link_threads" = no ; then
13833         # try -lpthread
13834         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13835 echo "configure:13836: checking for pthread link with -lpthread" >&5
13836 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13837   echo $ac_n "(cached) $ac_c" 1>&6
13838 else
13839   
13840                 # save the flags
13841                 ol_LIBS="$LIBS"
13842                 LIBS="-lpthread $LIBS"
13843
13844                 if test "$cross_compiling" = yes; then
13845   cat > conftest.$ac_ext <<EOF
13846 #line 13847 "configure"
13847 #include "confdefs.h"
13848 /* pthread test headers */
13849 #include <pthread.h>
13850 #ifndef NULL
13851 #define NULL (void*)0
13852 #endif
13853
13854 static void *task(p)
13855         void *p;
13856 {
13857         return (void *) (p == NULL);
13858 }
13859
13860 int main() {
13861
13862         /* pthread test function */
13863         pthread_t t;
13864         int status;
13865         int detach = 1;
13866
13867 #ifdef HAVE_PTHREADS_FINAL
13868         /* Final pthreads */
13869         pthread_attr_t attr;
13870
13871         status = pthread_attr_init(&attr);
13872         if( status ) return status;
13873
13874 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13875         if( !detach ) {
13876 #if defined( PTHREAD_CREATE_JOINABLE )
13877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13878 #else
13879                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13880 #endif
13881
13882 #ifdef PTHREAD_CREATE_DETACHED
13883         } else {
13884                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13885 #endif
13886         }
13887         if( status ) return status;
13888 #endif
13889
13890         status = pthread_create( &t, &attr, task, NULL );
13891         if( status ) return status;
13892
13893 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13894         if( detach ) {
13895                 /* give thread a chance to complete */
13896                 /* it should remain joinable and hence detachable */
13897                 sleep( 1 );
13898
13899                 status = pthread_detach( t );
13900                 if( status ) return status;
13901         }
13902 #endif
13903
13904 #else
13905         /* Draft 4 pthreads */
13906         status = pthread_create( &t, pthread_attr_default, task, NULL );
13907         if( status ) return status;
13908
13909         if( detach ) {
13910                 /* give thread a chance to complete */
13911                 /* it should remain joinable and hence detachable */
13912                 sleep( 1 );
13913
13914                 status = pthread_detach( &t );
13915                 if( status ) return status;
13916         }
13917 #endif
13918
13919 #ifdef HAVE_LINUX_THREADS
13920         pthread_kill_other_threads_np();
13921 #endif
13922
13923         return 0;
13924
13925 ; return 0; }
13926 EOF
13927 if { (eval echo configure:13928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13928   rm -rf conftest*
13929   ol_cv_pthread_lpthread=yes
13930 else
13931   echo "configure: failed program was:" >&5
13932   cat conftest.$ac_ext >&5
13933   rm -rf conftest*
13934   ol_cv_pthread_lpthread=no
13935 fi
13936 rm -f conftest*
13937 else
13938   cat > conftest.$ac_ext <<EOF
13939 #line 13940 "configure"
13940 #include "confdefs.h"
13941 /* pthread test headers */
13942 #include <pthread.h>
13943 #ifndef NULL
13944 #define NULL (void*)0
13945 #endif
13946
13947 static void *task(p)
13948         void *p;
13949 {
13950         return (void *) (p == NULL);
13951 }
13952
13953
13954 int main(argc, argv)
13955         int argc;
13956         char **argv;
13957 {
13958
13959         /* pthread test function */
13960         pthread_t t;
13961         int status;
13962         int detach = 1;
13963
13964 #ifdef HAVE_PTHREADS_FINAL
13965         /* Final pthreads */
13966         pthread_attr_t attr;
13967
13968         status = pthread_attr_init(&attr);
13969         if( status ) return status;
13970
13971 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13972         if( !detach ) {
13973 #if defined( PTHREAD_CREATE_JOINABLE )
13974                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13975 #else
13976                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13977 #endif
13978
13979 #ifdef PTHREAD_CREATE_DETACHED
13980         } else {
13981                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13982 #endif
13983         }
13984         if( status ) return status;
13985 #endif
13986
13987         status = pthread_create( &t, &attr, task, NULL );
13988         if( status ) return status;
13989
13990 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13991         if( detach ) {
13992                 /* give thread a chance to complete */
13993                 /* it should remain joinable and hence detachable */
13994                 sleep( 1 );
13995
13996                 status = pthread_detach( t );
13997                 if( status ) return status;
13998         }
13999 #endif
14000
14001 #else
14002         /* Draft 4 pthreads */
14003         status = pthread_create( &t, pthread_attr_default, task, NULL );
14004         if( status ) return status;
14005
14006         if( detach ) {
14007                 /* give thread a chance to complete */
14008                 /* it should remain joinable and hence detachable */
14009                 sleep( 1 );
14010
14011                 status = pthread_detach( &t );
14012                 if( status ) return status;
14013         }
14014 #endif
14015
14016 #ifdef HAVE_LINUX_THREADS
14017         pthread_kill_other_threads_np();
14018 #endif
14019
14020         return 0;
14021
14022 }
14023
14024 EOF
14025 if { (eval echo configure:14026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14026 then
14027   ol_cv_pthread_lpthread=yes
14028 else
14029   echo "configure: failed program was:" >&5
14030   cat conftest.$ac_ext >&5
14031   rm -fr conftest*
14032   ol_cv_pthread_lpthread=no
14033 fi
14034 rm -fr conftest*
14035 fi
14036
14037
14038                 # restore the LIBS
14039                 LIBS="$ol_LIBS"
14040         
14041 fi
14042
14043 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14044
14045         if test $ol_cv_pthread_lpthread = yes ; then
14046                 ol_link_pthreads="-lpthread"
14047                 ol_link_threads=posix
14048         fi
14049 fi
14050
14051                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14052 if test "$ol_link_threads" = no ; then
14053         # try -lc_r
14054         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14055 echo "configure:14056: checking for pthread link with -lc_r" >&5
14056 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14057   echo $ac_n "(cached) $ac_c" 1>&6
14058 else
14059   
14060                 # save the flags
14061                 ol_LIBS="$LIBS"
14062                 LIBS="-lc_r $LIBS"
14063
14064                 if test "$cross_compiling" = yes; then
14065   cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 /* pthread test headers */
14069 #include <pthread.h>
14070 #ifndef NULL
14071 #define NULL (void*)0
14072 #endif
14073
14074 static void *task(p)
14075         void *p;
14076 {
14077         return (void *) (p == NULL);
14078 }
14079
14080 int main() {
14081
14082         /* pthread test function */
14083         pthread_t t;
14084         int status;
14085         int detach = 1;
14086
14087 #ifdef HAVE_PTHREADS_FINAL
14088         /* Final pthreads */
14089         pthread_attr_t attr;
14090
14091         status = pthread_attr_init(&attr);
14092         if( status ) return status;
14093
14094 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14095         if( !detach ) {
14096 #if defined( PTHREAD_CREATE_JOINABLE )
14097                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14098 #else
14099                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14100 #endif
14101
14102 #ifdef PTHREAD_CREATE_DETACHED
14103         } else {
14104                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14105 #endif
14106         }
14107         if( status ) return status;
14108 #endif
14109
14110         status = pthread_create( &t, &attr, task, NULL );
14111         if( status ) return status;
14112
14113 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14114         if( detach ) {
14115                 /* give thread a chance to complete */
14116                 /* it should remain joinable and hence detachable */
14117                 sleep( 1 );
14118
14119                 status = pthread_detach( t );
14120                 if( status ) return status;
14121         }
14122 #endif
14123
14124 #else
14125         /* Draft 4 pthreads */
14126         status = pthread_create( &t, pthread_attr_default, task, NULL );
14127         if( status ) return status;
14128
14129         if( detach ) {
14130                 /* give thread a chance to complete */
14131                 /* it should remain joinable and hence detachable */
14132                 sleep( 1 );
14133
14134                 status = pthread_detach( &t );
14135                 if( status ) return status;
14136         }
14137 #endif
14138
14139 #ifdef HAVE_LINUX_THREADS
14140         pthread_kill_other_threads_np();
14141 #endif
14142
14143         return 0;
14144
14145 ; return 0; }
14146 EOF
14147 if { (eval echo configure:14148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14148   rm -rf conftest*
14149   ol_cv_pthread_lc_r=yes
14150 else
14151   echo "configure: failed program was:" >&5
14152   cat conftest.$ac_ext >&5
14153   rm -rf conftest*
14154   ol_cv_pthread_lc_r=no
14155 fi
14156 rm -f conftest*
14157 else
14158   cat > conftest.$ac_ext <<EOF
14159 #line 14160 "configure"
14160 #include "confdefs.h"
14161 /* pthread test headers */
14162 #include <pthread.h>
14163 #ifndef NULL
14164 #define NULL (void*)0
14165 #endif
14166
14167 static void *task(p)
14168         void *p;
14169 {
14170         return (void *) (p == NULL);
14171 }
14172
14173
14174 int main(argc, argv)
14175         int argc;
14176         char **argv;
14177 {
14178
14179         /* pthread test function */
14180         pthread_t t;
14181         int status;
14182         int detach = 1;
14183
14184 #ifdef HAVE_PTHREADS_FINAL
14185         /* Final pthreads */
14186         pthread_attr_t attr;
14187
14188         status = pthread_attr_init(&attr);
14189         if( status ) return status;
14190
14191 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14192         if( !detach ) {
14193 #if defined( PTHREAD_CREATE_JOINABLE )
14194                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14195 #else
14196                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14197 #endif
14198
14199 #ifdef PTHREAD_CREATE_DETACHED
14200         } else {
14201                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14202 #endif
14203         }
14204         if( status ) return status;
14205 #endif
14206
14207         status = pthread_create( &t, &attr, task, NULL );
14208         if( status ) return status;
14209
14210 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14211         if( detach ) {
14212                 /* give thread a chance to complete */
14213                 /* it should remain joinable and hence detachable */
14214                 sleep( 1 );
14215
14216                 status = pthread_detach( t );
14217                 if( status ) return status;
14218         }
14219 #endif
14220
14221 #else
14222         /* Draft 4 pthreads */
14223         status = pthread_create( &t, pthread_attr_default, task, NULL );
14224         if( status ) return status;
14225
14226         if( detach ) {
14227                 /* give thread a chance to complete */
14228                 /* it should remain joinable and hence detachable */
14229                 sleep( 1 );
14230
14231                 status = pthread_detach( &t );
14232                 if( status ) return status;
14233         }
14234 #endif
14235
14236 #ifdef HAVE_LINUX_THREADS
14237         pthread_kill_other_threads_np();
14238 #endif
14239
14240         return 0;
14241
14242 }
14243
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14246 then
14247   ol_cv_pthread_lc_r=yes
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -fr conftest*
14252   ol_cv_pthread_lc_r=no
14253 fi
14254 rm -fr conftest*
14255 fi
14256
14257
14258                 # restore the LIBS
14259                 LIBS="$ol_LIBS"
14260         
14261 fi
14262
14263 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14264
14265         if test $ol_cv_pthread_lc_r = yes ; then
14266                 ol_link_pthreads="-lc_r"
14267                 ol_link_threads=posix
14268         fi
14269 fi
14270
14271
14272                 # Pthread try link: -threads (ol_cv_pthread_threads)
14273 if test "$ol_link_threads" = no ; then
14274         # try -threads
14275         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14276 echo "configure:14277: checking for pthread link with -threads" >&5
14277 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14278   echo $ac_n "(cached) $ac_c" 1>&6
14279 else
14280   
14281                 # save the flags
14282                 ol_LIBS="$LIBS"
14283                 LIBS="-threads $LIBS"
14284
14285                 if test "$cross_compiling" = yes; then
14286   cat > conftest.$ac_ext <<EOF
14287 #line 14288 "configure"
14288 #include "confdefs.h"
14289 /* pthread test headers */
14290 #include <pthread.h>
14291 #ifndef NULL
14292 #define NULL (void*)0
14293 #endif
14294
14295 static void *task(p)
14296         void *p;
14297 {
14298         return (void *) (p == NULL);
14299 }
14300
14301 int main() {
14302
14303         /* pthread test function */
14304         pthread_t t;
14305         int status;
14306         int detach = 1;
14307
14308 #ifdef HAVE_PTHREADS_FINAL
14309         /* Final pthreads */
14310         pthread_attr_t attr;
14311
14312         status = pthread_attr_init(&attr);
14313         if( status ) return status;
14314
14315 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14316         if( !detach ) {
14317 #if defined( PTHREAD_CREATE_JOINABLE )
14318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14319 #else
14320                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14321 #endif
14322
14323 #ifdef PTHREAD_CREATE_DETACHED
14324         } else {
14325                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14326 #endif
14327         }
14328         if( status ) return status;
14329 #endif
14330
14331         status = pthread_create( &t, &attr, task, NULL );
14332         if( status ) return status;
14333
14334 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14335         if( detach ) {
14336                 /* give thread a chance to complete */
14337                 /* it should remain joinable and hence detachable */
14338                 sleep( 1 );
14339
14340                 status = pthread_detach( t );
14341                 if( status ) return status;
14342         }
14343 #endif
14344
14345 #else
14346         /* Draft 4 pthreads */
14347         status = pthread_create( &t, pthread_attr_default, task, NULL );
14348         if( status ) return status;
14349
14350         if( detach ) {
14351                 /* give thread a chance to complete */
14352                 /* it should remain joinable and hence detachable */
14353                 sleep( 1 );
14354
14355                 status = pthread_detach( &t );
14356                 if( status ) return status;
14357         }
14358 #endif
14359
14360 #ifdef HAVE_LINUX_THREADS
14361         pthread_kill_other_threads_np();
14362 #endif
14363
14364         return 0;
14365
14366 ; return 0; }
14367 EOF
14368 if { (eval echo configure:14369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14369   rm -rf conftest*
14370   ol_cv_pthread_threads=yes
14371 else
14372   echo "configure: failed program was:" >&5
14373   cat conftest.$ac_ext >&5
14374   rm -rf conftest*
14375   ol_cv_pthread_threads=no
14376 fi
14377 rm -f conftest*
14378 else
14379   cat > conftest.$ac_ext <<EOF
14380 #line 14381 "configure"
14381 #include "confdefs.h"
14382 /* pthread test headers */
14383 #include <pthread.h>
14384 #ifndef NULL
14385 #define NULL (void*)0
14386 #endif
14387
14388 static void *task(p)
14389         void *p;
14390 {
14391         return (void *) (p == NULL);
14392 }
14393
14394
14395 int main(argc, argv)
14396         int argc;
14397         char **argv;
14398 {
14399
14400         /* pthread test function */
14401         pthread_t t;
14402         int status;
14403         int detach = 1;
14404
14405 #ifdef HAVE_PTHREADS_FINAL
14406         /* Final pthreads */
14407         pthread_attr_t attr;
14408
14409         status = pthread_attr_init(&attr);
14410         if( status ) return status;
14411
14412 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14413         if( !detach ) {
14414 #if defined( PTHREAD_CREATE_JOINABLE )
14415                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14416 #else
14417                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14418 #endif
14419
14420 #ifdef PTHREAD_CREATE_DETACHED
14421         } else {
14422                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14423 #endif
14424         }
14425         if( status ) return status;
14426 #endif
14427
14428         status = pthread_create( &t, &attr, task, NULL );
14429         if( status ) return status;
14430
14431 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14432         if( detach ) {
14433                 /* give thread a chance to complete */
14434                 /* it should remain joinable and hence detachable */
14435                 sleep( 1 );
14436
14437                 status = pthread_detach( t );
14438                 if( status ) return status;
14439         }
14440 #endif
14441
14442 #else
14443         /* Draft 4 pthreads */
14444         status = pthread_create( &t, pthread_attr_default, task, NULL );
14445         if( status ) return status;
14446
14447         if( detach ) {
14448                 /* give thread a chance to complete */
14449                 /* it should remain joinable and hence detachable */
14450                 sleep( 1 );
14451
14452                 status = pthread_detach( &t );
14453                 if( status ) return status;
14454         }
14455 #endif
14456
14457 #ifdef HAVE_LINUX_THREADS
14458         pthread_kill_other_threads_np();
14459 #endif
14460
14461         return 0;
14462
14463 }
14464
14465 EOF
14466 if { (eval echo configure:14467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14467 then
14468   ol_cv_pthread_threads=yes
14469 else
14470   echo "configure: failed program was:" >&5
14471   cat conftest.$ac_ext >&5
14472   rm -fr conftest*
14473   ol_cv_pthread_threads=no
14474 fi
14475 rm -fr conftest*
14476 fi
14477
14478
14479                 # restore the LIBS
14480                 LIBS="$ol_LIBS"
14481         
14482 fi
14483
14484 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14485
14486         if test $ol_cv_pthread_threads = yes ; then
14487                 ol_link_pthreads="-threads"
14488                 ol_link_threads=posix
14489         fi
14490 fi
14491
14492
14493                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14494 if test "$ol_link_threads" = no ; then
14495         # try -lpthreads -lmach -lexc -lc_r
14496         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14497 echo "configure:14498: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14498 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14499   echo $ac_n "(cached) $ac_c" 1>&6
14500 else
14501   
14502                 # save the flags
14503                 ol_LIBS="$LIBS"
14504                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14505
14506                 if test "$cross_compiling" = yes; then
14507   cat > conftest.$ac_ext <<EOF
14508 #line 14509 "configure"
14509 #include "confdefs.h"
14510 /* pthread test headers */
14511 #include <pthread.h>
14512 #ifndef NULL
14513 #define NULL (void*)0
14514 #endif
14515
14516 static void *task(p)
14517         void *p;
14518 {
14519         return (void *) (p == NULL);
14520 }
14521
14522 int main() {
14523
14524         /* pthread test function */
14525         pthread_t t;
14526         int status;
14527         int detach = 1;
14528
14529 #ifdef HAVE_PTHREADS_FINAL
14530         /* Final pthreads */
14531         pthread_attr_t attr;
14532
14533         status = pthread_attr_init(&attr);
14534         if( status ) return status;
14535
14536 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14537         if( !detach ) {
14538 #if defined( PTHREAD_CREATE_JOINABLE )
14539                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14540 #else
14541                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14542 #endif
14543
14544 #ifdef PTHREAD_CREATE_DETACHED
14545         } else {
14546                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14547 #endif
14548         }
14549         if( status ) return status;
14550 #endif
14551
14552         status = pthread_create( &t, &attr, task, NULL );
14553         if( status ) return status;
14554
14555 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14556         if( detach ) {
14557                 /* give thread a chance to complete */
14558                 /* it should remain joinable and hence detachable */
14559                 sleep( 1 );
14560
14561                 status = pthread_detach( t );
14562                 if( status ) return status;
14563         }
14564 #endif
14565
14566 #else
14567         /* Draft 4 pthreads */
14568         status = pthread_create( &t, pthread_attr_default, task, NULL );
14569         if( status ) return status;
14570
14571         if( detach ) {
14572                 /* give thread a chance to complete */
14573                 /* it should remain joinable and hence detachable */
14574                 sleep( 1 );
14575
14576                 status = pthread_detach( &t );
14577                 if( status ) return status;
14578         }
14579 #endif
14580
14581 #ifdef HAVE_LINUX_THREADS
14582         pthread_kill_other_threads_np();
14583 #endif
14584
14585         return 0;
14586
14587 ; return 0; }
14588 EOF
14589 if { (eval echo configure:14590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14590   rm -rf conftest*
14591   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14592 else
14593   echo "configure: failed program was:" >&5
14594   cat conftest.$ac_ext >&5
14595   rm -rf conftest*
14596   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14597 fi
14598 rm -f conftest*
14599 else
14600   cat > conftest.$ac_ext <<EOF
14601 #line 14602 "configure"
14602 #include "confdefs.h"
14603 /* pthread test headers */
14604 #include <pthread.h>
14605 #ifndef NULL
14606 #define NULL (void*)0
14607 #endif
14608
14609 static void *task(p)
14610         void *p;
14611 {
14612         return (void *) (p == NULL);
14613 }
14614
14615
14616 int main(argc, argv)
14617         int argc;
14618         char **argv;
14619 {
14620
14621         /* pthread test function */
14622         pthread_t t;
14623         int status;
14624         int detach = 1;
14625
14626 #ifdef HAVE_PTHREADS_FINAL
14627         /* Final pthreads */
14628         pthread_attr_t attr;
14629
14630         status = pthread_attr_init(&attr);
14631         if( status ) return status;
14632
14633 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14634         if( !detach ) {
14635 #if defined( PTHREAD_CREATE_JOINABLE )
14636                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14637 #else
14638                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14639 #endif
14640
14641 #ifdef PTHREAD_CREATE_DETACHED
14642         } else {
14643                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14644 #endif
14645         }
14646         if( status ) return status;
14647 #endif
14648
14649         status = pthread_create( &t, &attr, task, NULL );
14650         if( status ) return status;
14651
14652 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14653         if( detach ) {
14654                 /* give thread a chance to complete */
14655                 /* it should remain joinable and hence detachable */
14656                 sleep( 1 );
14657
14658                 status = pthread_detach( t );
14659                 if( status ) return status;
14660         }
14661 #endif
14662
14663 #else
14664         /* Draft 4 pthreads */
14665         status = pthread_create( &t, pthread_attr_default, task, NULL );
14666         if( status ) return status;
14667
14668         if( detach ) {
14669                 /* give thread a chance to complete */
14670                 /* it should remain joinable and hence detachable */
14671                 sleep( 1 );
14672
14673                 status = pthread_detach( &t );
14674                 if( status ) return status;
14675         }
14676 #endif
14677
14678 #ifdef HAVE_LINUX_THREADS
14679         pthread_kill_other_threads_np();
14680 #endif
14681
14682         return 0;
14683
14684 }
14685
14686 EOF
14687 if { (eval echo configure:14688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14688 then
14689   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14690 else
14691   echo "configure: failed program was:" >&5
14692   cat conftest.$ac_ext >&5
14693   rm -fr conftest*
14694   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14695 fi
14696 rm -fr conftest*
14697 fi
14698
14699
14700                 # restore the LIBS
14701                 LIBS="$ol_LIBS"
14702         
14703 fi
14704
14705 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14706
14707         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14708                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14709                 ol_link_threads=posix
14710         fi
14711 fi
14712
14713                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14714 if test "$ol_link_threads" = no ; then
14715         # try -lpthreads -lmach -lexc
14716         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14717 echo "configure:14718: checking for pthread link with -lpthreads -lmach -lexc" >&5
14718 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14719   echo $ac_n "(cached) $ac_c" 1>&6
14720 else
14721   
14722                 # save the flags
14723                 ol_LIBS="$LIBS"
14724                 LIBS="-lpthreads -lmach -lexc $LIBS"
14725
14726                 if test "$cross_compiling" = yes; then
14727   cat > conftest.$ac_ext <<EOF
14728 #line 14729 "configure"
14729 #include "confdefs.h"
14730 /* pthread test headers */
14731 #include <pthread.h>
14732 #ifndef NULL
14733 #define NULL (void*)0
14734 #endif
14735
14736 static void *task(p)
14737         void *p;
14738 {
14739         return (void *) (p == NULL);
14740 }
14741
14742 int main() {
14743
14744         /* pthread test function */
14745         pthread_t t;
14746         int status;
14747         int detach = 1;
14748
14749 #ifdef HAVE_PTHREADS_FINAL
14750         /* Final pthreads */
14751         pthread_attr_t attr;
14752
14753         status = pthread_attr_init(&attr);
14754         if( status ) return status;
14755
14756 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14757         if( !detach ) {
14758 #if defined( PTHREAD_CREATE_JOINABLE )
14759                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14760 #else
14761                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14762 #endif
14763
14764 #ifdef PTHREAD_CREATE_DETACHED
14765         } else {
14766                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14767 #endif
14768         }
14769         if( status ) return status;
14770 #endif
14771
14772         status = pthread_create( &t, &attr, task, NULL );
14773         if( status ) return status;
14774
14775 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14776         if( detach ) {
14777                 /* give thread a chance to complete */
14778                 /* it should remain joinable and hence detachable */
14779                 sleep( 1 );
14780
14781                 status = pthread_detach( t );
14782                 if( status ) return status;
14783         }
14784 #endif
14785
14786 #else
14787         /* Draft 4 pthreads */
14788         status = pthread_create( &t, pthread_attr_default, task, NULL );
14789         if( status ) return status;
14790
14791         if( detach ) {
14792                 /* give thread a chance to complete */
14793                 /* it should remain joinable and hence detachable */
14794                 sleep( 1 );
14795
14796                 status = pthread_detach( &t );
14797                 if( status ) return status;
14798         }
14799 #endif
14800
14801 #ifdef HAVE_LINUX_THREADS
14802         pthread_kill_other_threads_np();
14803 #endif
14804
14805         return 0;
14806
14807 ; return 0; }
14808 EOF
14809 if { (eval echo configure:14810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14810   rm -rf conftest*
14811   ol_cv_pthread_lpthreads_lmach_lexc=yes
14812 else
14813   echo "configure: failed program was:" >&5
14814   cat conftest.$ac_ext >&5
14815   rm -rf conftest*
14816   ol_cv_pthread_lpthreads_lmach_lexc=no
14817 fi
14818 rm -f conftest*
14819 else
14820   cat > conftest.$ac_ext <<EOF
14821 #line 14822 "configure"
14822 #include "confdefs.h"
14823 /* pthread test headers */
14824 #include <pthread.h>
14825 #ifndef NULL
14826 #define NULL (void*)0
14827 #endif
14828
14829 static void *task(p)
14830         void *p;
14831 {
14832         return (void *) (p == NULL);
14833 }
14834
14835
14836 int main(argc, argv)
14837         int argc;
14838         char **argv;
14839 {
14840
14841         /* pthread test function */
14842         pthread_t t;
14843         int status;
14844         int detach = 1;
14845
14846 #ifdef HAVE_PTHREADS_FINAL
14847         /* Final pthreads */
14848         pthread_attr_t attr;
14849
14850         status = pthread_attr_init(&attr);
14851         if( status ) return status;
14852
14853 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14854         if( !detach ) {
14855 #if defined( PTHREAD_CREATE_JOINABLE )
14856                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14857 #else
14858                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14859 #endif
14860
14861 #ifdef PTHREAD_CREATE_DETACHED
14862         } else {
14863                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14864 #endif
14865         }
14866         if( status ) return status;
14867 #endif
14868
14869         status = pthread_create( &t, &attr, task, NULL );
14870         if( status ) return status;
14871
14872 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14873         if( detach ) {
14874                 /* give thread a chance to complete */
14875                 /* it should remain joinable and hence detachable */
14876                 sleep( 1 );
14877
14878                 status = pthread_detach( t );
14879                 if( status ) return status;
14880         }
14881 #endif
14882
14883 #else
14884         /* Draft 4 pthreads */
14885         status = pthread_create( &t, pthread_attr_default, task, NULL );
14886         if( status ) return status;
14887
14888         if( detach ) {
14889                 /* give thread a chance to complete */
14890                 /* it should remain joinable and hence detachable */
14891                 sleep( 1 );
14892
14893                 status = pthread_detach( &t );
14894                 if( status ) return status;
14895         }
14896 #endif
14897
14898 #ifdef HAVE_LINUX_THREADS
14899         pthread_kill_other_threads_np();
14900 #endif
14901
14902         return 0;
14903
14904 }
14905
14906 EOF
14907 if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14908 then
14909   ol_cv_pthread_lpthreads_lmach_lexc=yes
14910 else
14911   echo "configure: failed program was:" >&5
14912   cat conftest.$ac_ext >&5
14913   rm -fr conftest*
14914   ol_cv_pthread_lpthreads_lmach_lexc=no
14915 fi
14916 rm -fr conftest*
14917 fi
14918
14919
14920                 # restore the LIBS
14921                 LIBS="$ol_LIBS"
14922         
14923 fi
14924
14925 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14926
14927         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14928                 ol_link_pthreads="-lpthreads -lmach -lexc"
14929                 ol_link_threads=posix
14930         fi
14931 fi
14932
14933                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14934 if test "$ol_link_threads" = no ; then
14935         # try -lpthreads -lexc
14936         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14937 echo "configure:14938: checking for pthread link with -lpthreads -lexc" >&5
14938 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   
14942                 # save the flags
14943                 ol_LIBS="$LIBS"
14944                 LIBS="-lpthreads -lexc $LIBS"
14945
14946                 if test "$cross_compiling" = yes; then
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* pthread test headers */
14951 #include <pthread.h>
14952 #ifndef NULL
14953 #define NULL (void*)0
14954 #endif
14955
14956 static void *task(p)
14957         void *p;
14958 {
14959         return (void *) (p == NULL);
14960 }
14961
14962 int main() {
14963
14964         /* pthread test function */
14965         pthread_t t;
14966         int status;
14967         int detach = 1;
14968
14969 #ifdef HAVE_PTHREADS_FINAL
14970         /* Final pthreads */
14971         pthread_attr_t attr;
14972
14973         status = pthread_attr_init(&attr);
14974         if( status ) return status;
14975
14976 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14977         if( !detach ) {
14978 #if defined( PTHREAD_CREATE_JOINABLE )
14979                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14980 #else
14981                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14982 #endif
14983
14984 #ifdef PTHREAD_CREATE_DETACHED
14985         } else {
14986                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14987 #endif
14988         }
14989         if( status ) return status;
14990 #endif
14991
14992         status = pthread_create( &t, &attr, task, NULL );
14993         if( status ) return status;
14994
14995 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14996         if( detach ) {
14997                 /* give thread a chance to complete */
14998                 /* it should remain joinable and hence detachable */
14999                 sleep( 1 );
15000
15001                 status = pthread_detach( t );
15002                 if( status ) return status;
15003         }
15004 #endif
15005
15006 #else
15007         /* Draft 4 pthreads */
15008         status = pthread_create( &t, pthread_attr_default, task, NULL );
15009         if( status ) return status;
15010
15011         if( detach ) {
15012                 /* give thread a chance to complete */
15013                 /* it should remain joinable and hence detachable */
15014                 sleep( 1 );
15015
15016                 status = pthread_detach( &t );
15017                 if( status ) return status;
15018         }
15019 #endif
15020
15021 #ifdef HAVE_LINUX_THREADS
15022         pthread_kill_other_threads_np();
15023 #endif
15024
15025         return 0;
15026
15027 ; return 0; }
15028 EOF
15029 if { (eval echo configure:15030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15030   rm -rf conftest*
15031   ol_cv_pthread_lpthreads_lexc=yes
15032 else
15033   echo "configure: failed program was:" >&5
15034   cat conftest.$ac_ext >&5
15035   rm -rf conftest*
15036   ol_cv_pthread_lpthreads_lexc=no
15037 fi
15038 rm -f conftest*
15039 else
15040   cat > conftest.$ac_ext <<EOF
15041 #line 15042 "configure"
15042 #include "confdefs.h"
15043 /* pthread test headers */
15044 #include <pthread.h>
15045 #ifndef NULL
15046 #define NULL (void*)0
15047 #endif
15048
15049 static void *task(p)
15050         void *p;
15051 {
15052         return (void *) (p == NULL);
15053 }
15054
15055
15056 int main(argc, argv)
15057         int argc;
15058         char **argv;
15059 {
15060
15061         /* pthread test function */
15062         pthread_t t;
15063         int status;
15064         int detach = 1;
15065
15066 #ifdef HAVE_PTHREADS_FINAL
15067         /* Final pthreads */
15068         pthread_attr_t attr;
15069
15070         status = pthread_attr_init(&attr);
15071         if( status ) return status;
15072
15073 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15074         if( !detach ) {
15075 #if defined( PTHREAD_CREATE_JOINABLE )
15076                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15077 #else
15078                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15079 #endif
15080
15081 #ifdef PTHREAD_CREATE_DETACHED
15082         } else {
15083                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15084 #endif
15085         }
15086         if( status ) return status;
15087 #endif
15088
15089         status = pthread_create( &t, &attr, task, NULL );
15090         if( status ) return status;
15091
15092 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15093         if( detach ) {
15094                 /* give thread a chance to complete */
15095                 /* it should remain joinable and hence detachable */
15096                 sleep( 1 );
15097
15098                 status = pthread_detach( t );
15099                 if( status ) return status;
15100         }
15101 #endif
15102
15103 #else
15104         /* Draft 4 pthreads */
15105         status = pthread_create( &t, pthread_attr_default, task, NULL );
15106         if( status ) return status;
15107
15108         if( detach ) {
15109                 /* give thread a chance to complete */
15110                 /* it should remain joinable and hence detachable */
15111                 sleep( 1 );
15112
15113                 status = pthread_detach( &t );
15114                 if( status ) return status;
15115         }
15116 #endif
15117
15118 #ifdef HAVE_LINUX_THREADS
15119         pthread_kill_other_threads_np();
15120 #endif
15121
15122         return 0;
15123
15124 }
15125
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15128 then
15129   ol_cv_pthread_lpthreads_lexc=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -fr conftest*
15134   ol_cv_pthread_lpthreads_lexc=no
15135 fi
15136 rm -fr conftest*
15137 fi
15138
15139
15140                 # restore the LIBS
15141                 LIBS="$ol_LIBS"
15142         
15143 fi
15144
15145 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15146
15147         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15148                 ol_link_pthreads="-lpthreads -lexc"
15149                 ol_link_threads=posix
15150         fi
15151 fi
15152
15153
15154                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15155 if test "$ol_link_threads" = no ; then
15156         # try -lpthreads
15157         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15158 echo "configure:15159: checking for pthread link with -lpthreads" >&5
15159 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15160   echo $ac_n "(cached) $ac_c" 1>&6
15161 else
15162   
15163                 # save the flags
15164                 ol_LIBS="$LIBS"
15165                 LIBS="-lpthreads $LIBS"
15166
15167                 if test "$cross_compiling" = yes; then
15168   cat > conftest.$ac_ext <<EOF
15169 #line 15170 "configure"
15170 #include "confdefs.h"
15171 /* pthread test headers */
15172 #include <pthread.h>
15173 #ifndef NULL
15174 #define NULL (void*)0
15175 #endif
15176
15177 static void *task(p)
15178         void *p;
15179 {
15180         return (void *) (p == NULL);
15181 }
15182
15183 int main() {
15184
15185         /* pthread test function */
15186         pthread_t t;
15187         int status;
15188         int detach = 1;
15189
15190 #ifdef HAVE_PTHREADS_FINAL
15191         /* Final pthreads */
15192         pthread_attr_t attr;
15193
15194         status = pthread_attr_init(&attr);
15195         if( status ) return status;
15196
15197 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15198         if( !detach ) {
15199 #if defined( PTHREAD_CREATE_JOINABLE )
15200                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15201 #else
15202                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15203 #endif
15204
15205 #ifdef PTHREAD_CREATE_DETACHED
15206         } else {
15207                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15208 #endif
15209         }
15210         if( status ) return status;
15211 #endif
15212
15213         status = pthread_create( &t, &attr, task, NULL );
15214         if( status ) return status;
15215
15216 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15217         if( detach ) {
15218                 /* give thread a chance to complete */
15219                 /* it should remain joinable and hence detachable */
15220                 sleep( 1 );
15221
15222                 status = pthread_detach( t );
15223                 if( status ) return status;
15224         }
15225 #endif
15226
15227 #else
15228         /* Draft 4 pthreads */
15229         status = pthread_create( &t, pthread_attr_default, task, NULL );
15230         if( status ) return status;
15231
15232         if( detach ) {
15233                 /* give thread a chance to complete */
15234                 /* it should remain joinable and hence detachable */
15235                 sleep( 1 );
15236
15237                 status = pthread_detach( &t );
15238                 if( status ) return status;
15239         }
15240 #endif
15241
15242 #ifdef HAVE_LINUX_THREADS
15243         pthread_kill_other_threads_np();
15244 #endif
15245
15246         return 0;
15247
15248 ; return 0; }
15249 EOF
15250 if { (eval echo configure:15251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15251   rm -rf conftest*
15252   ol_cv_pthread_lib_lpthreads=yes
15253 else
15254   echo "configure: failed program was:" >&5
15255   cat conftest.$ac_ext >&5
15256   rm -rf conftest*
15257   ol_cv_pthread_lib_lpthreads=no
15258 fi
15259 rm -f conftest*
15260 else
15261   cat > conftest.$ac_ext <<EOF
15262 #line 15263 "configure"
15263 #include "confdefs.h"
15264 /* pthread test headers */
15265 #include <pthread.h>
15266 #ifndef NULL
15267 #define NULL (void*)0
15268 #endif
15269
15270 static void *task(p)
15271         void *p;
15272 {
15273         return (void *) (p == NULL);
15274 }
15275
15276
15277 int main(argc, argv)
15278         int argc;
15279         char **argv;
15280 {
15281
15282         /* pthread test function */
15283         pthread_t t;
15284         int status;
15285         int detach = 1;
15286
15287 #ifdef HAVE_PTHREADS_FINAL
15288         /* Final pthreads */
15289         pthread_attr_t attr;
15290
15291         status = pthread_attr_init(&attr);
15292         if( status ) return status;
15293
15294 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15295         if( !detach ) {
15296 #if defined( PTHREAD_CREATE_JOINABLE )
15297                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15298 #else
15299                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15300 #endif
15301
15302 #ifdef PTHREAD_CREATE_DETACHED
15303         } else {
15304                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15305 #endif
15306         }
15307         if( status ) return status;
15308 #endif
15309
15310         status = pthread_create( &t, &attr, task, NULL );
15311         if( status ) return status;
15312
15313 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15314         if( detach ) {
15315                 /* give thread a chance to complete */
15316                 /* it should remain joinable and hence detachable */
15317                 sleep( 1 );
15318
15319                 status = pthread_detach( t );
15320                 if( status ) return status;
15321         }
15322 #endif
15323
15324 #else
15325         /* Draft 4 pthreads */
15326         status = pthread_create( &t, pthread_attr_default, task, NULL );
15327         if( status ) return status;
15328
15329         if( detach ) {
15330                 /* give thread a chance to complete */
15331                 /* it should remain joinable and hence detachable */
15332                 sleep( 1 );
15333
15334                 status = pthread_detach( &t );
15335                 if( status ) return status;
15336         }
15337 #endif
15338
15339 #ifdef HAVE_LINUX_THREADS
15340         pthread_kill_other_threads_np();
15341 #endif
15342
15343         return 0;
15344
15345 }
15346
15347 EOF
15348 if { (eval echo configure:15349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15349 then
15350   ol_cv_pthread_lib_lpthreads=yes
15351 else
15352   echo "configure: failed program was:" >&5
15353   cat conftest.$ac_ext >&5
15354   rm -fr conftest*
15355   ol_cv_pthread_lib_lpthreads=no
15356 fi
15357 rm -fr conftest*
15358 fi
15359
15360
15361                 # restore the LIBS
15362                 LIBS="$ol_LIBS"
15363         
15364 fi
15365
15366 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15367
15368         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15369                 ol_link_pthreads="-lpthreads"
15370                 ol_link_threads=posix
15371         fi
15372 fi
15373
15374
15375                 if test $ol_link_threads != no ; then
15376                         cat >> confdefs.h <<\EOF
15377 #define HAVE_PTHREADS 1
15378 EOF
15379
15380
15381                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15382
15383                                                 save_CPPFLAGS="$CPPFLAGS"
15384                         save_LIBS="$LIBS"
15385                         LIBS="$LTHREAD_LIBS $LIBS"
15386
15387                                                                                                 for ac_func in sched_yield pthread_yield
15388 do
15389 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15390 echo "configure:15391: checking for $ac_func" >&5
15391 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15392   echo $ac_n "(cached) $ac_c" 1>&6
15393 else
15394   cat > conftest.$ac_ext <<EOF
15395 #line 15396 "configure"
15396 #include "confdefs.h"
15397 /* System header to define __stub macros and hopefully few prototypes,
15398     which can conflict with char $ac_func(); below.  */
15399 #include <assert.h>
15400 /* Override any gcc2 internal prototype to avoid an error.  */
15401 /* We use char because int might match the return type of a gcc2
15402     builtin and then its argument prototype would still apply.  */
15403 char $ac_func();
15404 char (*f)();
15405
15406 int main() {
15407
15408 /* The GNU C library defines this for functions which it implements
15409     to always fail with ENOSYS.  Some functions are actually named
15410     something starting with __ and the normal name is an alias.  */
15411 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15412 choke me
15413 #else
15414 f = $ac_func;
15415 #endif
15416
15417 ; return 0; }
15418 EOF
15419 if { (eval echo configure:15420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15420   rm -rf conftest*
15421   eval "ac_cv_func_$ac_func=yes"
15422 else
15423   echo "configure: failed program was:" >&5
15424   cat conftest.$ac_ext >&5
15425   rm -rf conftest*
15426   eval "ac_cv_func_$ac_func=no"
15427 fi
15428 rm -f conftest*
15429 fi
15430
15431 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15432   echo "$ac_t""yes" 1>&6
15433     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15434   cat >> confdefs.h <<EOF
15435 #define $ac_tr_func 1
15436 EOF
15437  
15438 else
15439   echo "$ac_t""no" 1>&6
15440 fi
15441 done
15442
15443
15444                         if test $ac_cv_func_sched_yield = no -a \
15445                                 $ac_cv_func_pthread_yield = no ; then
15446                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15447 echo "configure:15448: checking for sched_yield in -lrt" >&5
15448 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15450   echo $ac_n "(cached) $ac_c" 1>&6
15451 else
15452   ac_save_LIBS="$LIBS"
15453 LIBS="-lrt  $LIBS"
15454 cat > conftest.$ac_ext <<EOF
15455 #line 15456 "configure"
15456 #include "confdefs.h"
15457 /* Override any gcc2 internal prototype to avoid an error.  */
15458 /* We use char because int might match the return type of a gcc2
15459     builtin and then its argument prototype would still apply.  */
15460 char sched_yield();
15461
15462 int main() {
15463 sched_yield()
15464 ; return 0; }
15465 EOF
15466 if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15467   rm -rf conftest*
15468   eval "ac_cv_lib_$ac_lib_var=yes"
15469 else
15470   echo "configure: failed program was:" >&5
15471   cat conftest.$ac_ext >&5
15472   rm -rf conftest*
15473   eval "ac_cv_lib_$ac_lib_var=no"
15474 fi
15475 rm -f conftest*
15476 LIBS="$ac_save_LIBS"
15477
15478 fi
15479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15480   echo "$ac_t""yes" 1>&6
15481   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15482                                         cat >> confdefs.h <<\EOF
15483 #define HAVE_SCHED_YIELD 1
15484 EOF
15485
15486                                         ac_cv_func_sched_yield=yes
15487 else
15488   echo "$ac_t""no" 1>&6
15489 ac_cv_func_sched_yield=no
15490 fi
15491
15492                         fi
15493                         if test $ac_cv_func_sched_yield = no -a \
15494                                 $ac_cv_func_pthread_yield = no ; then
15495                                                                                                 for ac_func in thr_yield
15496 do
15497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15498 echo "configure:15499: checking for $ac_func" >&5
15499 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15500   echo $ac_n "(cached) $ac_c" 1>&6
15501 else
15502   cat > conftest.$ac_ext <<EOF
15503 #line 15504 "configure"
15504 #include "confdefs.h"
15505 /* System header to define __stub macros and hopefully few prototypes,
15506     which can conflict with char $ac_func(); below.  */
15507 #include <assert.h>
15508 /* Override any gcc2 internal prototype to avoid an error.  */
15509 /* We use char because int might match the return type of a gcc2
15510     builtin and then its argument prototype would still apply.  */
15511 char $ac_func();
15512 char (*f)();
15513
15514 int main() {
15515
15516 /* The GNU C library defines this for functions which it implements
15517     to always fail with ENOSYS.  Some functions are actually named
15518     something starting with __ and the normal name is an alias.  */
15519 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15520 choke me
15521 #else
15522 f = $ac_func;
15523 #endif
15524
15525 ; return 0; }
15526 EOF
15527 if { (eval echo configure:15528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15528   rm -rf conftest*
15529   eval "ac_cv_func_$ac_func=yes"
15530 else
15531   echo "configure: failed program was:" >&5
15532   cat conftest.$ac_ext >&5
15533   rm -rf conftest*
15534   eval "ac_cv_func_$ac_func=no"
15535 fi
15536 rm -f conftest*
15537 fi
15538
15539 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15540   echo "$ac_t""yes" 1>&6
15541     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15542   cat >> confdefs.h <<EOF
15543 #define $ac_tr_func 1
15544 EOF
15545  
15546 else
15547   echo "$ac_t""no" 1>&6
15548 fi
15549 done
15550
15551                         fi
15552                         if test $ac_cv_func_sched_yield = no -a \
15553                                 $ac_cv_func_pthread_yield = no -a \
15554                                 "$ac_cv_func_thr_yield" = no ; then
15555                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15556                         fi
15557
15558                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15559 do
15560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15561 echo "configure:15562: checking for $ac_func" >&5
15562 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15563   echo $ac_n "(cached) $ac_c" 1>&6
15564 else
15565   cat > conftest.$ac_ext <<EOF
15566 #line 15567 "configure"
15567 #include "confdefs.h"
15568 /* System header to define __stub macros and hopefully few prototypes,
15569     which can conflict with char $ac_func(); below.  */
15570 #include <assert.h>
15571 /* Override any gcc2 internal prototype to avoid an error.  */
15572 /* We use char because int might match the return type of a gcc2
15573     builtin and then its argument prototype would still apply.  */
15574 char $ac_func();
15575 char (*f)();
15576
15577 int main() {
15578
15579 /* The GNU C library defines this for functions which it implements
15580     to always fail with ENOSYS.  Some functions are actually named
15581     something starting with __ and the normal name is an alias.  */
15582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15583 choke me
15584 #else
15585 f = $ac_func;
15586 #endif
15587
15588 ; return 0; }
15589 EOF
15590 if { (eval echo configure:15591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15591   rm -rf conftest*
15592   eval "ac_cv_func_$ac_func=yes"
15593 else
15594   echo "configure: failed program was:" >&5
15595   cat conftest.$ac_ext >&5
15596   rm -rf conftest*
15597   eval "ac_cv_func_$ac_func=no"
15598 fi
15599 rm -f conftest*
15600 fi
15601
15602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15603   echo "$ac_t""yes" 1>&6
15604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15605   cat >> confdefs.h <<EOF
15606 #define $ac_tr_func 1
15607 EOF
15608  
15609 else
15610   echo "$ac_t""no" 1>&6
15611 fi
15612 done
15613
15614
15615                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15616 echo "configure:15617: checking for pthread_detach with <pthread.h>" >&5
15617 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15618   echo $ac_n "(cached) $ac_c" 1>&6
15619 else
15620   
15621                                                                 cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624
15625 #include <pthread.h>
15626 #ifndef NULL
15627 #define NULL (void*)0
15628 #endif
15629
15630 int main() {
15631 pthread_detach(NULL);
15632 ; return 0; }
15633 EOF
15634 if { (eval echo configure:15635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15635   rm -rf conftest*
15636   ol_cv_func_pthread_detach=yes
15637 else
15638   echo "configure: failed program was:" >&5
15639   cat conftest.$ac_ext >&5
15640   rm -rf conftest*
15641   ol_cv_func_pthread_detach=no
15642 fi
15643 rm -f conftest*
15644                         
15645 fi
15646
15647 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15648
15649                         if test $ol_cv_func_pthread_detach = no ; then
15650                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15651                         fi
15652
15653                         cat >> confdefs.h <<\EOF
15654 #define HAVE_PTHREAD_DETACH 1
15655 EOF
15656
15657
15658                                                 for ac_func in \
15659                                 pthread_setconcurrency \
15660                                 pthread_getconcurrency \
15661                                 thr_setconcurrency \
15662                                 thr_getconcurrency \
15663                         
15664 do
15665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15666 echo "configure:15667: checking for $ac_func" >&5
15667 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15668   echo $ac_n "(cached) $ac_c" 1>&6
15669 else
15670   cat > conftest.$ac_ext <<EOF
15671 #line 15672 "configure"
15672 #include "confdefs.h"
15673 /* System header to define __stub macros and hopefully few prototypes,
15674     which can conflict with char $ac_func(); below.  */
15675 #include <assert.h>
15676 /* Override any gcc2 internal prototype to avoid an error.  */
15677 /* We use char because int might match the return type of a gcc2
15678     builtin and then its argument prototype would still apply.  */
15679 char $ac_func();
15680 char (*f)();
15681
15682 int main() {
15683
15684 /* The GNU C library defines this for functions which it implements
15685     to always fail with ENOSYS.  Some functions are actually named
15686     something starting with __ and the normal name is an alias.  */
15687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15688 choke me
15689 #else
15690 f = $ac_func;
15691 #endif
15692
15693 ; return 0; }
15694 EOF
15695 if { (eval echo configure:15696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15696   rm -rf conftest*
15697   eval "ac_cv_func_$ac_func=yes"
15698 else
15699   echo "configure: failed program was:" >&5
15700   cat conftest.$ac_ext >&5
15701   rm -rf conftest*
15702   eval "ac_cv_func_$ac_func=no"
15703 fi
15704 rm -f conftest*
15705 fi
15706
15707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15708   echo "$ac_t""yes" 1>&6
15709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15710   cat >> confdefs.h <<EOF
15711 #define $ac_tr_func 1
15712 EOF
15713  
15714 else
15715   echo "$ac_t""no" 1>&6
15716 fi
15717 done
15718
15719
15720                         
15721         for ac_func in pthread_kill_other_threads_np
15722 do
15723 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15724 echo "configure:15725: checking for $ac_func" >&5
15725 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15726   echo $ac_n "(cached) $ac_c" 1>&6
15727 else
15728   cat > conftest.$ac_ext <<EOF
15729 #line 15730 "configure"
15730 #include "confdefs.h"
15731 /* System header to define __stub macros and hopefully few prototypes,
15732     which can conflict with char $ac_func(); below.  */
15733 #include <assert.h>
15734 /* Override any gcc2 internal prototype to avoid an error.  */
15735 /* We use char because int might match the return type of a gcc2
15736     builtin and then its argument prototype would still apply.  */
15737 char $ac_func();
15738 char (*f)();
15739
15740 int main() {
15741
15742 /* The GNU C library defines this for functions which it implements
15743     to always fail with ENOSYS.  Some functions are actually named
15744     something starting with __ and the normal name is an alias.  */
15745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15746 choke me
15747 #else
15748 f = $ac_func;
15749 #endif
15750
15751 ; return 0; }
15752 EOF
15753 if { (eval echo configure:15754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15754   rm -rf conftest*
15755   eval "ac_cv_func_$ac_func=yes"
15756 else
15757   echo "configure: failed program was:" >&5
15758   cat conftest.$ac_ext >&5
15759   rm -rf conftest*
15760   eval "ac_cv_func_$ac_func=no"
15761 fi
15762 rm -f conftest*
15763 fi
15764
15765 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15766   echo "$ac_t""yes" 1>&6
15767     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15768   cat >> confdefs.h <<EOF
15769 #define $ac_tr_func 1
15770 EOF
15771  
15772 else
15773   echo "$ac_t""no" 1>&6
15774 fi
15775 done
15776
15777         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15778 echo "configure:15779: checking for LinuxThreads implementation" >&5
15779 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15780   echo $ac_n "(cached) $ac_c" 1>&6
15781 else
15782   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15783 fi
15784
15785 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15786
15787                         
15788         
15789         
15790         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15791 echo "configure:15792: checking for LinuxThreads consistency" >&5
15792 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15793   echo $ac_n "(cached) $ac_c" 1>&6
15794 else
15795   
15796                 if test $ol_cv_header_linux_threads = yes -a \
15797                         $ol_cv_sys_linux_threads = yes; then
15798                         ol_cv_linux_threads=yes
15799                 elif test $ol_cv_header_linux_threads = no -a \
15800                         $ol_cv_sys_linux_threads = no; then
15801                         ol_cv_linux_threads=no
15802                 else
15803                         ol_cv_linux_threads=error
15804                 fi
15805         
15806 fi
15807
15808 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15809
15810
15811                         if test $ol_cv_linux_threads = error; then
15812                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15813                         fi
15814
15815                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15816 echo "configure:15817: checking if pthread_create() works" >&5
15817 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15818   echo $ac_n "(cached) $ac_c" 1>&6
15819 else
15820   
15821                         if test "$cross_compiling" = yes; then
15822                                 ol_cv_pthread_create_works=yes
15823 else
15824   cat > conftest.$ac_ext <<EOF
15825 #line 15826 "configure"
15826 #include "confdefs.h"
15827 /* pthread test headers */
15828 #include <pthread.h>
15829 #ifndef NULL
15830 #define NULL (void*)0
15831 #endif
15832
15833 static void *task(p)
15834         void *p;
15835 {
15836         return (void *) (p == NULL);
15837 }
15838
15839
15840 int main(argc, argv)
15841         int argc;
15842         char **argv;
15843 {
15844
15845         /* pthread test function */
15846         pthread_t t;
15847         int status;
15848         int detach = 1;
15849
15850 #ifdef HAVE_PTHREADS_FINAL
15851         /* Final pthreads */
15852         pthread_attr_t attr;
15853
15854         status = pthread_attr_init(&attr);
15855         if( status ) return status;
15856
15857 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15858         if( !detach ) {
15859 #if defined( PTHREAD_CREATE_JOINABLE )
15860                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15861 #else
15862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15863 #endif
15864
15865 #ifdef PTHREAD_CREATE_DETACHED
15866         } else {
15867                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15868 #endif
15869         }
15870         if( status ) return status;
15871 #endif
15872
15873         status = pthread_create( &t, &attr, task, NULL );
15874         if( status ) return status;
15875
15876 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15877         if( detach ) {
15878                 /* give thread a chance to complete */
15879                 /* it should remain joinable and hence detachable */
15880                 sleep( 1 );
15881
15882                 status = pthread_detach( t );
15883                 if( status ) return status;
15884         }
15885 #endif
15886
15887 #else
15888         /* Draft 4 pthreads */
15889         status = pthread_create( &t, pthread_attr_default, task, NULL );
15890         if( status ) return status;
15891
15892         if( detach ) {
15893                 /* give thread a chance to complete */
15894                 /* it should remain joinable and hence detachable */
15895                 sleep( 1 );
15896
15897                 status = pthread_detach( &t );
15898                 if( status ) return status;
15899         }
15900 #endif
15901
15902 #ifdef HAVE_LINUX_THREADS
15903         pthread_kill_other_threads_np();
15904 #endif
15905
15906         return 0;
15907
15908 }
15909
15910 EOF
15911 if { (eval echo configure:15912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15912 then
15913   ol_cv_pthread_create_works=yes
15914 else
15915   echo "configure: failed program was:" >&5
15916   cat conftest.$ac_ext >&5
15917   rm -fr conftest*
15918   ol_cv_pthread_create_works=no
15919 fi
15920 rm -fr conftest*
15921 fi
15922
15923 fi
15924
15925 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15926
15927                         if test $ol_cv_pthread_create_works = no ; then
15928                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15929                         fi
15930
15931                                                 if test $ol_with_yielding_select = auto ; then
15932                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15933 echo "configure:15934: checking if select yields when using pthreads" >&5
15934 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15935   echo $ac_n "(cached) $ac_c" 1>&6
15936 else
15937   
15938                                 if test "$cross_compiling" = yes; then
15939   ol_cv_pthread_select_yields=cross
15940 else
15941   cat > conftest.$ac_ext <<EOF
15942 #line 15943 "configure"
15943 #include "confdefs.h"
15944
15945 #include <sys/types.h>
15946 #include <sys/time.h>
15947 #include <unistd.h>
15948 #include <pthread.h>
15949 #ifndef NULL
15950 #define NULL (void*) 0
15951 #endif
15952
15953 static int fildes[2];
15954
15955 static void *task(p)
15956         void *p;
15957 {
15958         int i;
15959         struct timeval tv;
15960
15961         fd_set rfds;
15962
15963         tv.tv_sec=10;
15964         tv.tv_usec=0;
15965
15966         FD_ZERO(&rfds);
15967         FD_SET(fildes[0], &rfds);
15968
15969         /* we're not interested in any fds */
15970         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15971
15972         if(i < 0) {
15973                 perror("select");
15974                 exit(10);
15975         }
15976
15977         exit(0); /* if we exit here, the select blocked the whole process */
15978 }
15979
15980 int main(argc, argv)
15981         int argc;
15982         char **argv;
15983 {
15984         pthread_t t;
15985
15986         /* create a pipe to select */
15987         if(pipe(&fildes[0])) {
15988                 perror("select");
15989                 exit(1);
15990         }
15991
15992 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15993         (void) pthread_setconcurrency(2);
15994 #else
15995 #ifdef HAVE_THR_SETCONCURRENCY
15996         /* Set Solaris LWP concurrency to 2 */
15997         thr_setconcurrency(2);
15998 #endif
15999 #endif
16000
16001 #if HAVE_PTHREADS_D4
16002         pthread_create(&t, pthread_attr_default, task, NULL);
16003 #else
16004         pthread_create(&t, NULL, task, NULL);
16005 #endif
16006
16007 #if HAVE_SCHED_YIELD
16008         sched_yield();  /* make sure task runs first */
16009 #else
16010 #ifdef HAVE_PTHREAD_YIELD
16011         pthread_yield();        /* make sure task runs first */
16012 #endif
16013 #endif
16014
16015         exit(2);
16016 }
16017 EOF
16018 if { (eval echo configure:16019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16019 then
16020   ol_cv_pthread_select_yields=no
16021 else
16022   echo "configure: failed program was:" >&5
16023   cat conftest.$ac_ext >&5
16024   rm -fr conftest*
16025   ol_cv_pthread_select_yields=yes
16026 fi
16027 rm -fr conftest*
16028 fi
16029
16030 fi
16031
16032 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16033
16034                                 if test $ol_cv_pthread_select_yields = cross ; then
16035                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16036                                 fi
16037
16038                                 if test $ol_cv_pthread_select_yields = yes ; then
16039                                         ol_with_yielding_select=yes
16040                                 fi
16041                         fi
16042
16043                                                 CPPFLAGS="$save_CPPFLAGS"
16044                         LIBS="$save_LIBS"
16045                 else
16046                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16047                 fi
16048         fi
16049
16050         if test $ol_with_threads = posix ; then
16051                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16052         fi
16053 fi
16054
16055 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16056         -o $ol_with_threads = mach ; then
16057
16058                 for ac_hdr in mach/cthreads.h cthreads.h
16059 do
16060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16062 echo "configure:16063: checking for $ac_hdr" >&5
16063 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16064   echo $ac_n "(cached) $ac_c" 1>&6
16065 else
16066   cat > conftest.$ac_ext <<EOF
16067 #line 16068 "configure"
16068 #include "confdefs.h"
16069 #include <$ac_hdr>
16070 EOF
16071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16072 { (eval echo configure:16073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16074 if test -z "$ac_err"; then
16075   rm -rf conftest*
16076   eval "ac_cv_header_$ac_safe=yes"
16077 else
16078   echo "$ac_err" >&5
16079   echo "configure: failed program was:" >&5
16080   cat conftest.$ac_ext >&5
16081   rm -rf conftest*
16082   eval "ac_cv_header_$ac_safe=no"
16083 fi
16084 rm -f conftest*
16085 fi
16086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16087   echo "$ac_t""yes" 1>&6
16088     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16089   cat >> confdefs.h <<EOF
16090 #define $ac_tr_hdr 1
16091 EOF
16092  
16093 else
16094   echo "$ac_t""no" 1>&6
16095 fi
16096 done
16097
16098         if test $ac_cv_header_mach_cthreads_h = yes ; then
16099                 ol_with_threads=found
16100
16101                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16102 echo "configure:16103: checking for cthread_fork" >&5
16103 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   cat > conftest.$ac_ext <<EOF
16107 #line 16108 "configure"
16108 #include "confdefs.h"
16109 /* System header to define __stub macros and hopefully few prototypes,
16110     which can conflict with char cthread_fork(); below.  */
16111 #include <assert.h>
16112 /* Override any gcc2 internal prototype to avoid an error.  */
16113 /* We use char because int might match the return type of a gcc2
16114     builtin and then its argument prototype would still apply.  */
16115 char cthread_fork();
16116 char (*f)();
16117
16118 int main() {
16119
16120 /* The GNU C library defines this for functions which it implements
16121     to always fail with ENOSYS.  Some functions are actually named
16122     something starting with __ and the normal name is an alias.  */
16123 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16124 choke me
16125 #else
16126 f = cthread_fork;
16127 #endif
16128
16129 ; return 0; }
16130 EOF
16131 if { (eval echo configure:16132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16132   rm -rf conftest*
16133   eval "ac_cv_func_cthread_fork=yes"
16134 else
16135   echo "configure: failed program was:" >&5
16136   cat conftest.$ac_ext >&5
16137   rm -rf conftest*
16138   eval "ac_cv_func_cthread_fork=no"
16139 fi
16140 rm -f conftest*
16141 fi
16142
16143 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16144   echo "$ac_t""yes" 1>&6
16145   ol_link_threads=yes
16146 else
16147   echo "$ac_t""no" 1>&6
16148 fi
16149
16150
16151                 if test $ol_link_threads = no ; then
16152                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16153 echo "configure:16154: checking for cthread_fork with -all_load" >&5
16154 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16155   echo $ac_n "(cached) $ac_c" 1>&6
16156 else
16157   
16158                                                                 save_LIBS="$LIBS"
16159                                 LIBS="-all_load $LIBS"
16160                                 cat > conftest.$ac_ext <<EOF
16161 #line 16162 "configure"
16162 #include "confdefs.h"
16163 #include <mach/cthreads.h>
16164 int main() {
16165
16166                                         cthread_fork((void *)0, (void *)0);
16167                                         
16168 ; return 0; }
16169 EOF
16170 if { (eval echo configure:16171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16171   rm -rf conftest*
16172   ol_cv_cthread_all_load=yes
16173 else
16174   echo "configure: failed program was:" >&5
16175   cat conftest.$ac_ext >&5
16176   rm -rf conftest*
16177   ol_cv_cthread_all_load=no
16178 fi
16179 rm -f conftest*
16180                                                                 LIBS="$save_LIBS"
16181                         
16182 fi
16183
16184 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16185
16186                         if test $ol_cv_cthread_all_load = yes ; then
16187                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16188                                 ol_link_threads=mach
16189                                 ol_with_threads=found
16190                         fi
16191                 fi
16192
16193         elif test $ac_cv_header_cthreads_h = yes ; then
16194                                 
16195                 ol_with_threads=found
16196  
16197                                 save_LIBS="$LIBS"
16198                 LIBS="$LIBS -lthreads"
16199                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16200 echo "configure:16201: checking for cthread_fork" >&5
16201 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16202   echo $ac_n "(cached) $ac_c" 1>&6
16203 else
16204   cat > conftest.$ac_ext <<EOF
16205 #line 16206 "configure"
16206 #include "confdefs.h"
16207 /* System header to define __stub macros and hopefully few prototypes,
16208     which can conflict with char cthread_fork(); below.  */
16209 #include <assert.h>
16210 /* Override any gcc2 internal prototype to avoid an error.  */
16211 /* We use char because int might match the return type of a gcc2
16212     builtin and then its argument prototype would still apply.  */
16213 char cthread_fork();
16214 char (*f)();
16215
16216 int main() {
16217
16218 /* The GNU C library defines this for functions which it implements
16219     to always fail with ENOSYS.  Some functions are actually named
16220     something starting with __ and the normal name is an alias.  */
16221 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16222 choke me
16223 #else
16224 f = cthread_fork;
16225 #endif
16226
16227 ; return 0; }
16228 EOF
16229 if { (eval echo configure:16230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16230   rm -rf conftest*
16231   eval "ac_cv_func_cthread_fork=yes"
16232 else
16233   echo "configure: failed program was:" >&5
16234   cat conftest.$ac_ext >&5
16235   rm -rf conftest*
16236   eval "ac_cv_func_cthread_fork=no"
16237 fi
16238 rm -f conftest*
16239 fi
16240
16241 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16242   echo "$ac_t""yes" 1>&6
16243   ol_link_threads=yes
16244 else
16245   echo "$ac_t""no" 1>&6
16246 fi
16247
16248                 LIBS="$save_LIBS"
16249
16250                 if test $ol_link_threads = yes ; then
16251                         LTHREAD_LIBS="-lthreads"
16252                         ol_link_threads=mach
16253                         ol_with_threads=found
16254                 else
16255                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16256                 fi
16257
16258         elif test $ol_with_threads = mach ; then
16259                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16260         fi
16261
16262         if test $ol_link_threads = mach ; then
16263                 cat >> confdefs.h <<\EOF
16264 #define HAVE_MACH_CTHREADS 1
16265 EOF
16266
16267         elif test $ol_with_threads = found ; then
16268                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16269         fi
16270 fi
16271
16272 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16273         -o $ol_with_threads = pth ; then
16274
16275         for ac_hdr in pth.h
16276 do
16277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16279 echo "configure:16280: checking for $ac_hdr" >&5
16280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16281   echo $ac_n "(cached) $ac_c" 1>&6
16282 else
16283   cat > conftest.$ac_ext <<EOF
16284 #line 16285 "configure"
16285 #include "confdefs.h"
16286 #include <$ac_hdr>
16287 EOF
16288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16289 { (eval echo configure:16290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16291 if test -z "$ac_err"; then
16292   rm -rf conftest*
16293   eval "ac_cv_header_$ac_safe=yes"
16294 else
16295   echo "$ac_err" >&5
16296   echo "configure: failed program was:" >&5
16297   cat conftest.$ac_ext >&5
16298   rm -rf conftest*
16299   eval "ac_cv_header_$ac_safe=no"
16300 fi
16301 rm -f conftest*
16302 fi
16303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16304   echo "$ac_t""yes" 1>&6
16305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16306   cat >> confdefs.h <<EOF
16307 #define $ac_tr_hdr 1
16308 EOF
16309  
16310 else
16311   echo "$ac_t""no" 1>&6
16312 fi
16313 done
16314
16315
16316         if test $ac_cv_header_pth_h = yes ; then
16317                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16318 echo "configure:16319: checking for pth_version in -lpth" >&5
16319 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16321   echo $ac_n "(cached) $ac_c" 1>&6
16322 else
16323   ac_save_LIBS="$LIBS"
16324 LIBS="-lpth  $LIBS"
16325 cat > conftest.$ac_ext <<EOF
16326 #line 16327 "configure"
16327 #include "confdefs.h"
16328 /* Override any gcc2 internal prototype to avoid an error.  */
16329 /* We use char because int might match the return type of a gcc2
16330     builtin and then its argument prototype would still apply.  */
16331 char pth_version();
16332
16333 int main() {
16334 pth_version()
16335 ; return 0; }
16336 EOF
16337 if { (eval echo configure:16338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16338   rm -rf conftest*
16339   eval "ac_cv_lib_$ac_lib_var=yes"
16340 else
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   eval "ac_cv_lib_$ac_lib_var=no"
16345 fi
16346 rm -f conftest*
16347 LIBS="$ac_save_LIBS"
16348
16349 fi
16350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16351   echo "$ac_t""yes" 1>&6
16352   have_pth=yes
16353 else
16354   echo "$ac_t""no" 1>&6
16355 have_pth=no
16356 fi
16357
16358
16359                 if test $have_pth = yes ; then
16360                         cat >> confdefs.h <<\EOF
16361 #define HAVE_GNU_PTH 1
16362 EOF
16363
16364                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16365                         ol_link_threads=pth
16366                         ol_with_threads=found
16367
16368                         if test $ol_with_yielding_select = auto ; then
16369                                 ol_with_yielding_select=yes
16370                         fi
16371                 fi
16372         fi
16373 fi
16374
16375 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16376         -o $ol_with_threads = lwp ; then
16377
16378                 for ac_hdr in thread.h synch.h
16379 do
16380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16382 echo "configure:16383: checking for $ac_hdr" >&5
16383 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 #include <$ac_hdr>
16390 EOF
16391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16392 { (eval echo configure:16393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16394 if test -z "$ac_err"; then
16395   rm -rf conftest*
16396   eval "ac_cv_header_$ac_safe=yes"
16397 else
16398   echo "$ac_err" >&5
16399   echo "configure: failed program was:" >&5
16400   cat conftest.$ac_ext >&5
16401   rm -rf conftest*
16402   eval "ac_cv_header_$ac_safe=no"
16403 fi
16404 rm -f conftest*
16405 fi
16406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16407   echo "$ac_t""yes" 1>&6
16408     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16409   cat >> confdefs.h <<EOF
16410 #define $ac_tr_hdr 1
16411 EOF
16412  
16413 else
16414   echo "$ac_t""no" 1>&6
16415 fi
16416 done
16417
16418         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16419                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16420 echo "configure:16421: checking for thr_create in -lthread" >&5
16421 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16423   echo $ac_n "(cached) $ac_c" 1>&6
16424 else
16425   ac_save_LIBS="$LIBS"
16426 LIBS="-lthread  $LIBS"
16427 cat > conftest.$ac_ext <<EOF
16428 #line 16429 "configure"
16429 #include "confdefs.h"
16430 /* Override any gcc2 internal prototype to avoid an error.  */
16431 /* We use char because int might match the return type of a gcc2
16432     builtin and then its argument prototype would still apply.  */
16433 char thr_create();
16434
16435 int main() {
16436 thr_create()
16437 ; return 0; }
16438 EOF
16439 if { (eval echo configure:16440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16440   rm -rf conftest*
16441   eval "ac_cv_lib_$ac_lib_var=yes"
16442 else
16443   echo "configure: failed program was:" >&5
16444   cat conftest.$ac_ext >&5
16445   rm -rf conftest*
16446   eval "ac_cv_lib_$ac_lib_var=no"
16447 fi
16448 rm -f conftest*
16449 LIBS="$ac_save_LIBS"
16450
16451 fi
16452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16453   echo "$ac_t""yes" 1>&6
16454   have_thr=yes
16455 else
16456   echo "$ac_t""no" 1>&6
16457 have_thr=no
16458 fi
16459
16460
16461                 if test $have_thr = yes ; then
16462                         cat >> confdefs.h <<\EOF
16463 #define HAVE_THR 1
16464 EOF
16465
16466                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16467                         ol_link_threads=thr
16468
16469                         if test $ol_with_yielding_select = auto ; then
16470                                 ol_with_yielding_select=yes
16471                         fi
16472
16473                                                 for ac_func in \
16474                                 thr_setconcurrency \
16475                                 thr_getconcurrency \
16476                         
16477 do
16478 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16479 echo "configure:16480: checking for $ac_func" >&5
16480 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16481   echo $ac_n "(cached) $ac_c" 1>&6
16482 else
16483   cat > conftest.$ac_ext <<EOF
16484 #line 16485 "configure"
16485 #include "confdefs.h"
16486 /* System header to define __stub macros and hopefully few prototypes,
16487     which can conflict with char $ac_func(); below.  */
16488 #include <assert.h>
16489 /* Override any gcc2 internal prototype to avoid an error.  */
16490 /* We use char because int might match the return type of a gcc2
16491     builtin and then its argument prototype would still apply.  */
16492 char $ac_func();
16493 char (*f)();
16494
16495 int main() {
16496
16497 /* The GNU C library defines this for functions which it implements
16498     to always fail with ENOSYS.  Some functions are actually named
16499     something starting with __ and the normal name is an alias.  */
16500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16501 choke me
16502 #else
16503 f = $ac_func;
16504 #endif
16505
16506 ; return 0; }
16507 EOF
16508 if { (eval echo configure:16509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16509   rm -rf conftest*
16510   eval "ac_cv_func_$ac_func=yes"
16511 else
16512   echo "configure: failed program was:" >&5
16513   cat conftest.$ac_ext >&5
16514   rm -rf conftest*
16515   eval "ac_cv_func_$ac_func=no"
16516 fi
16517 rm -f conftest*
16518 fi
16519
16520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16521   echo "$ac_t""yes" 1>&6
16522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16523   cat >> confdefs.h <<EOF
16524 #define $ac_tr_func 1
16525 EOF
16526  
16527 else
16528   echo "$ac_t""no" 1>&6
16529 fi
16530 done
16531
16532                 fi
16533         fi
16534
16535                 for ac_hdr in lwp/lwp.h
16536 do
16537 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16538 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16539 echo "configure:16540: checking for $ac_hdr" >&5
16540 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16541   echo $ac_n "(cached) $ac_c" 1>&6
16542 else
16543   cat > conftest.$ac_ext <<EOF
16544 #line 16545 "configure"
16545 #include "confdefs.h"
16546 #include <$ac_hdr>
16547 EOF
16548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16549 { (eval echo configure:16550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16551 if test -z "$ac_err"; then
16552   rm -rf conftest*
16553   eval "ac_cv_header_$ac_safe=yes"
16554 else
16555   echo "$ac_err" >&5
16556   echo "configure: failed program was:" >&5
16557   cat conftest.$ac_ext >&5
16558   rm -rf conftest*
16559   eval "ac_cv_header_$ac_safe=no"
16560 fi
16561 rm -f conftest*
16562 fi
16563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16564   echo "$ac_t""yes" 1>&6
16565     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16566   cat >> confdefs.h <<EOF
16567 #define $ac_tr_hdr 1
16568 EOF
16569  
16570 else
16571   echo "$ac_t""no" 1>&6
16572 fi
16573 done
16574
16575         if test $ac_cv_header_lwp_lwp_h = yes ; then
16576                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16577 echo "configure:16578: checking for lwp_create in -llwp" >&5
16578 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16580   echo $ac_n "(cached) $ac_c" 1>&6
16581 else
16582   ac_save_LIBS="$LIBS"
16583 LIBS="-llwp  $LIBS"
16584 cat > conftest.$ac_ext <<EOF
16585 #line 16586 "configure"
16586 #include "confdefs.h"
16587 /* Override any gcc2 internal prototype to avoid an error.  */
16588 /* We use char because int might match the return type of a gcc2
16589     builtin and then its argument prototype would still apply.  */
16590 char lwp_create();
16591
16592 int main() {
16593 lwp_create()
16594 ; return 0; }
16595 EOF
16596 if { (eval echo configure:16597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16597   rm -rf conftest*
16598   eval "ac_cv_lib_$ac_lib_var=yes"
16599 else
16600   echo "configure: failed program was:" >&5
16601   cat conftest.$ac_ext >&5
16602   rm -rf conftest*
16603   eval "ac_cv_lib_$ac_lib_var=no"
16604 fi
16605 rm -f conftest*
16606 LIBS="$ac_save_LIBS"
16607
16608 fi
16609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16610   echo "$ac_t""yes" 1>&6
16611   have_lwp=yes
16612 else
16613   echo "$ac_t""no" 1>&6
16614 have_lwp=no
16615 fi
16616
16617
16618                 if test $have_lwp = yes ; then
16619                         cat >> confdefs.h <<\EOF
16620 #define HAVE_LWP 1
16621 EOF
16622
16623                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16624                         ol_link_threads=lwp
16625
16626                         if test $ol_with_yielding_select = auto ; then
16627                                 ol_with_yielding_select=no
16628                         fi
16629                 fi
16630         fi
16631 fi
16632
16633 if test $ol_with_yielding_select = yes ; then
16634         cat >> confdefs.h <<\EOF
16635 #define HAVE_YIELDING_SELECT 1
16636 EOF
16637
16638 fi
16639
16640 if test $ol_with_threads = manual ; then
16641                 ol_link_threads=yes
16642
16643         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16644
16645         for ac_hdr in pthread.h sched.h
16646 do
16647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16649 echo "configure:16650: checking for $ac_hdr" >&5
16650 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16651   echo $ac_n "(cached) $ac_c" 1>&6
16652 else
16653   cat > conftest.$ac_ext <<EOF
16654 #line 16655 "configure"
16655 #include "confdefs.h"
16656 #include <$ac_hdr>
16657 EOF
16658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16659 { (eval echo configure:16660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16661 if test -z "$ac_err"; then
16662   rm -rf conftest*
16663   eval "ac_cv_header_$ac_safe=yes"
16664 else
16665   echo "$ac_err" >&5
16666   echo "configure: failed program was:" >&5
16667   cat conftest.$ac_ext >&5
16668   rm -rf conftest*
16669   eval "ac_cv_header_$ac_safe=no"
16670 fi
16671 rm -f conftest*
16672 fi
16673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16674   echo "$ac_t""yes" 1>&6
16675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16676   cat >> confdefs.h <<EOF
16677 #define $ac_tr_hdr 1
16678 EOF
16679  
16680 else
16681   echo "$ac_t""no" 1>&6
16682 fi
16683 done
16684
16685         for ac_func in sched_yield pthread_yield
16686 do
16687 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16688 echo "configure:16689: checking for $ac_func" >&5
16689 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16690   echo $ac_n "(cached) $ac_c" 1>&6
16691 else
16692   cat > conftest.$ac_ext <<EOF
16693 #line 16694 "configure"
16694 #include "confdefs.h"
16695 /* System header to define __stub macros and hopefully few prototypes,
16696     which can conflict with char $ac_func(); below.  */
16697 #include <assert.h>
16698 /* Override any gcc2 internal prototype to avoid an error.  */
16699 /* We use char because int might match the return type of a gcc2
16700     builtin and then its argument prototype would still apply.  */
16701 char $ac_func();
16702 char (*f)();
16703
16704 int main() {
16705
16706 /* The GNU C library defines this for functions which it implements
16707     to always fail with ENOSYS.  Some functions are actually named
16708     something starting with __ and the normal name is an alias.  */
16709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16710 choke me
16711 #else
16712 f = $ac_func;
16713 #endif
16714
16715 ; return 0; }
16716 EOF
16717 if { (eval echo configure:16718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16718   rm -rf conftest*
16719   eval "ac_cv_func_$ac_func=yes"
16720 else
16721   echo "configure: failed program was:" >&5
16722   cat conftest.$ac_ext >&5
16723   rm -rf conftest*
16724   eval "ac_cv_func_$ac_func=no"
16725 fi
16726 rm -f conftest*
16727 fi
16728
16729 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16730   echo "$ac_t""yes" 1>&6
16731     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16732   cat >> confdefs.h <<EOF
16733 #define $ac_tr_func 1
16734 EOF
16735  
16736 else
16737   echo "$ac_t""no" 1>&6
16738 fi
16739 done
16740
16741         
16742         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16743 echo "configure:16744: checking for LinuxThreads pthread.h" >&5
16744 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16745   echo $ac_n "(cached) $ac_c" 1>&6
16746 else
16747   cat > conftest.$ac_ext <<EOF
16748 #line 16749 "configure"
16749 #include "confdefs.h"
16750 #include <pthread.h>
16751 EOF
16752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16753   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16754   rm -rf conftest*
16755   ol_cv_header_linux_threads=yes
16756 else
16757   rm -rf conftest*
16758   ol_cv_header_linux_threads=no
16759 fi
16760 rm -f conftest*
16761
16762                 
16763 fi
16764
16765 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16766         if test $ol_cv_header_linux_threads = yes; then
16767                 cat >> confdefs.h <<\EOF
16768 #define HAVE_LINUX_THREADS 1
16769 EOF
16770
16771         fi
16772
16773
16774         for ac_hdr in mach/cthreads.h
16775 do
16776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16778 echo "configure:16779: checking for $ac_hdr" >&5
16779 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16780   echo $ac_n "(cached) $ac_c" 1>&6
16781 else
16782   cat > conftest.$ac_ext <<EOF
16783 #line 16784 "configure"
16784 #include "confdefs.h"
16785 #include <$ac_hdr>
16786 EOF
16787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16788 { (eval echo configure:16789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16790 if test -z "$ac_err"; then
16791   rm -rf conftest*
16792   eval "ac_cv_header_$ac_safe=yes"
16793 else
16794   echo "$ac_err" >&5
16795   echo "configure: failed program was:" >&5
16796   cat conftest.$ac_ext >&5
16797   rm -rf conftest*
16798   eval "ac_cv_header_$ac_safe=no"
16799 fi
16800 rm -f conftest*
16801 fi
16802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16803   echo "$ac_t""yes" 1>&6
16804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16805   cat >> confdefs.h <<EOF
16806 #define $ac_tr_hdr 1
16807 EOF
16808  
16809 else
16810   echo "$ac_t""no" 1>&6
16811 fi
16812 done
16813
16814         for ac_hdr in lwp/lwp.h
16815 do
16816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16818 echo "configure:16819: checking for $ac_hdr" >&5
16819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16820   echo $ac_n "(cached) $ac_c" 1>&6
16821 else
16822   cat > conftest.$ac_ext <<EOF
16823 #line 16824 "configure"
16824 #include "confdefs.h"
16825 #include <$ac_hdr>
16826 EOF
16827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16828 { (eval echo configure:16829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16830 if test -z "$ac_err"; then
16831   rm -rf conftest*
16832   eval "ac_cv_header_$ac_safe=yes"
16833 else
16834   echo "$ac_err" >&5
16835   echo "configure: failed program was:" >&5
16836   cat conftest.$ac_ext >&5
16837   rm -rf conftest*
16838   eval "ac_cv_header_$ac_safe=no"
16839 fi
16840 rm -f conftest*
16841 fi
16842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16843   echo "$ac_t""yes" 1>&6
16844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16845   cat >> confdefs.h <<EOF
16846 #define $ac_tr_hdr 1
16847 EOF
16848  
16849 else
16850   echo "$ac_t""no" 1>&6
16851 fi
16852 done
16853
16854         for ac_hdr in thread.h synch.h
16855 do
16856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16858 echo "configure:16859: checking for $ac_hdr" >&5
16859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16860   echo $ac_n "(cached) $ac_c" 1>&6
16861 else
16862   cat > conftest.$ac_ext <<EOF
16863 #line 16864 "configure"
16864 #include "confdefs.h"
16865 #include <$ac_hdr>
16866 EOF
16867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16868 { (eval echo configure:16869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16870 if test -z "$ac_err"; then
16871   rm -rf conftest*
16872   eval "ac_cv_header_$ac_safe=yes"
16873 else
16874   echo "$ac_err" >&5
16875   echo "configure: failed program was:" >&5
16876   cat conftest.$ac_ext >&5
16877   rm -rf conftest*
16878   eval "ac_cv_header_$ac_safe=no"
16879 fi
16880 rm -f conftest*
16881 fi
16882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16883   echo "$ac_t""yes" 1>&6
16884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16885   cat >> confdefs.h <<EOF
16886 #define $ac_tr_hdr 1
16887 EOF
16888  
16889 else
16890   echo "$ac_t""no" 1>&6
16891 fi
16892 done
16893
16894 fi
16895
16896 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16897                         cat >> confdefs.h <<\EOF
16898 #define REENTRANT 1
16899 EOF
16900
16901         cat >> confdefs.h <<\EOF
16902 #define _REENTRANT 1
16903 EOF
16904
16905         cat >> confdefs.h <<\EOF
16906 #define THREAD_SAFE 1
16907 EOF
16908
16909         cat >> confdefs.h <<\EOF
16910 #define _THREAD_SAFE 1
16911 EOF
16912
16913         cat >> confdefs.h <<\EOF
16914 #define THREADSAFE 1
16915 EOF
16916
16917         cat >> confdefs.h <<\EOF
16918 #define _THREADSAFE 1
16919 EOF
16920
16921         cat >> confdefs.h <<\EOF
16922 #define _SGI_MP_SOURCE 1
16923 EOF
16924
16925
16926                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16927 echo "configure:16928: checking for thread specific errno" >&5
16928 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16929   echo $ac_n "(cached) $ac_c" 1>&6
16930 else
16931   
16932                 cat > conftest.$ac_ext <<EOF
16933 #line 16934 "configure"
16934 #include "confdefs.h"
16935 #include <errno.h>
16936 int main() {
16937 errno = 0;
16938 ; return 0; }
16939 EOF
16940 if { (eval echo configure:16941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16941   rm -rf conftest*
16942   ol_cv_errno_thread_specific=yes
16943 else
16944   echo "configure: failed program was:" >&5
16945   cat conftest.$ac_ext >&5
16946   rm -rf conftest*
16947   ol_cv_errno_thread_specific=no
16948 fi
16949 rm -f conftest*
16950         
16951 fi
16952
16953 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16954
16955                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16956 echo "configure:16957: checking for thread specific h_errno" >&5
16957 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16958   echo $ac_n "(cached) $ac_c" 1>&6
16959 else
16960   
16961                 cat > conftest.$ac_ext <<EOF
16962 #line 16963 "configure"
16963 #include "confdefs.h"
16964 #include <netdb.h>
16965 int main() {
16966 h_errno = 0;
16967 ; return 0; }
16968 EOF
16969 if { (eval echo configure:16970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16970   rm -rf conftest*
16971   ol_cv_h_errno_thread_specific=yes
16972 else
16973   echo "configure: failed program was:" >&5
16974   cat conftest.$ac_ext >&5
16975   rm -rf conftest*
16976   ol_cv_h_errno_thread_specific=no
16977 fi
16978 rm -f conftest*
16979         
16980 fi
16981
16982 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16983
16984         if test $ol_cv_errno_thread_specific != yes \
16985                 -o $ol_cv_h_errno_thread_specific != yes ; then
16986                 LIBS="$LTHREAD_LIBS $LIBS"
16987                 LTHREAD_LIBS=""
16988         fi
16989
16990 fi  
16991
16992 if test $ol_link_threads = no ; then
16993         if test $ol_with_threads = yes ; then
16994                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16995         fi
16996
16997         if test $ol_with_threads = auto ; then
16998                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16999                 ol_with_threads=no
17000         fi
17001
17002         cat >> confdefs.h <<\EOF
17003 #define NO_THREADS 1
17004 EOF
17005
17006         LTHREAD_LIBS=""
17007 fi
17008
17009 if test $ol_link_threads != no ; then
17010         cat >> confdefs.h <<\EOF
17011 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17012 EOF
17013
17014 fi
17015
17016 ol_link_ldbm=no 
17017
17018 if test $ol_with_ldbm_api = auto \
17019         -o $ol_with_ldbm_api = berkeley \
17020         -o $ol_with_ldbm_api = bcompat ; then
17021
17022         if test $ol_with_ldbm_api = bcompat; then \
17023                 for ac_hdr in db_185.h db.h
17024 do
17025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17027 echo "configure:17028: checking for $ac_hdr" >&5
17028 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17029   echo $ac_n "(cached) $ac_c" 1>&6
17030 else
17031   cat > conftest.$ac_ext <<EOF
17032 #line 17033 "configure"
17033 #include "confdefs.h"
17034 #include <$ac_hdr>
17035 EOF
17036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17037 { (eval echo configure:17038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17039 if test -z "$ac_err"; then
17040   rm -rf conftest*
17041   eval "ac_cv_header_$ac_safe=yes"
17042 else
17043   echo "$ac_err" >&5
17044   echo "configure: failed program was:" >&5
17045   cat conftest.$ac_ext >&5
17046   rm -rf conftest*
17047   eval "ac_cv_header_$ac_safe=no"
17048 fi
17049 rm -f conftest*
17050 fi
17051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17052   echo "$ac_t""yes" 1>&6
17053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17054   cat >> confdefs.h <<EOF
17055 #define $ac_tr_hdr 1
17056 EOF
17057  
17058 else
17059   echo "$ac_t""no" 1>&6
17060 fi
17061 done
17062
17063 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17064         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17065 echo "configure:17066: checking if Berkeley DB header compatibility" >&5
17066 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17067   echo $ac_n "(cached) $ac_c" 1>&6
17068 else
17069   
17070                 cat > conftest.$ac_ext <<EOF
17071 #line 17072 "configure"
17072 #include "confdefs.h"
17073
17074 #if HAVE_DB_185_H
17075 #       include <db_185.h>
17076 #else
17077 #       include <db.h>
17078 #endif
17079
17080  /* this check could be improved */
17081 #ifndef DB_VERSION_MAJOR
17082 #       define DB_VERSION_MAJOR 1
17083 #endif
17084
17085 #if DB_VERSION_MAJOR == 1 
17086         __db_version_1
17087 #endif
17088
17089 EOF
17090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17091   egrep "__db_version_1" >/dev/null 2>&1; then
17092   rm -rf conftest*
17093   ol_cv_header_db1=yes
17094 else
17095   rm -rf conftest*
17096   ol_cv_header_db1=no
17097 fi
17098 rm -f conftest*
17099
17100 fi
17101
17102 echo "$ac_t""$ol_cv_header_db1" 1>&6
17103
17104         if test $ol_cv_header_db1 = yes ; then
17105                 ol_cv_lib_db=no
17106 if test $ol_cv_lib_db = no ; then
17107         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17108 echo "configure:17109: checking for Berkeley DB link (default)" >&5
17109 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17110   echo $ac_n "(cached) $ac_c" 1>&6
17111 else
17112   
17113         ol_DB_LIB=
17114         ol_LIBS=$LIBS
17115         LIBS="$ol_DB_LIB $LIBS"
17116
17117         cat > conftest.$ac_ext <<EOF
17118 #line 17119 "configure"
17119 #include "confdefs.h"
17120
17121 #ifdef HAVE_DB_185_H
17122 # include <db_185.h>
17123 #else
17124 # include <db.h>
17125 #endif
17126
17127 #ifndef DB_VERSION_MAJOR
17128 # define DB_VERSION_MAJOR 1
17129 #endif
17130
17131 #ifndef NULL
17132 #define NULL ((void*)0)
17133 #endif
17134
17135 int main() {
17136
17137 #if DB_VERSION_MAJOR > 1
17138         {
17139                 char *version;
17140                 int major, minor, patch;
17141
17142                 version = db_version( &major, &minor, &patch );
17143
17144                 if( major != DB_VERSION_MAJOR ||
17145                         minor < DB_VERSION_MINOR )
17146                 {
17147                         printf("Berkeley DB version mismatch\n"
17148                                 "\texpected: %s\n\tgot: %s\n",
17149                                 DB_VERSION_STRING, version);
17150                         return 1;
17151                 }
17152         }
17153 #endif
17154
17155 #if DB_VERSION_MAJOR > 2
17156         db_env_create( NULL, 0 );
17157 #elif DB_VERSION_MAJOR > 1
17158         db_appexit( NULL );
17159 #else
17160         (void) dbopen( NULL, 0, 0, 0, NULL);
17161 #endif
17162
17163 ; return 0; }
17164 EOF
17165 if { (eval echo configure:17166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17166   rm -rf conftest*
17167   ol_cv_db_none=yes
17168 else
17169   echo "configure: failed program was:" >&5
17170   cat conftest.$ac_ext >&5
17171   rm -rf conftest*
17172   ol_cv_db_none=no
17173 fi
17174 rm -f conftest*
17175
17176         LIBS="$ol_LIBS"
17177
17178 fi
17179
17180 echo "$ac_t""$ol_cv_db_none" 1>&6
17181
17182         if test $ol_cv_db_none = yes ; then
17183                 ol_cv_lib_db=yes
17184         fi
17185 fi
17186
17187 if test $ol_cv_lib_db = no ; then
17188         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17189 echo "configure:17190: checking for Berkeley DB link (-ldb4)" >&5
17190 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17191   echo $ac_n "(cached) $ac_c" 1>&6
17192 else
17193   
17194         ol_DB_LIB=-ldb4
17195         ol_LIBS=$LIBS
17196         LIBS="$ol_DB_LIB $LIBS"
17197
17198         cat > conftest.$ac_ext <<EOF
17199 #line 17200 "configure"
17200 #include "confdefs.h"
17201
17202 #ifdef HAVE_DB_185_H
17203 # include <db_185.h>
17204 #else
17205 # include <db.h>
17206 #endif
17207
17208 #ifndef DB_VERSION_MAJOR
17209 # define DB_VERSION_MAJOR 1
17210 #endif
17211
17212 #ifndef NULL
17213 #define NULL ((void*)0)
17214 #endif
17215
17216 int main() {
17217
17218 #if DB_VERSION_MAJOR > 1
17219         {
17220                 char *version;
17221                 int major, minor, patch;
17222
17223                 version = db_version( &major, &minor, &patch );
17224
17225                 if( major != DB_VERSION_MAJOR ||
17226                         minor < DB_VERSION_MINOR )
17227                 {
17228                         printf("Berkeley DB version mismatch\n"
17229                                 "\texpected: %s\n\tgot: %s\n",
17230                                 DB_VERSION_STRING, version);
17231                         return 1;
17232                 }
17233         }
17234 #endif
17235
17236 #if DB_VERSION_MAJOR > 2
17237         db_env_create( NULL, 0 );
17238 #elif DB_VERSION_MAJOR > 1
17239         db_appexit( NULL );
17240 #else
17241         (void) dbopen( NULL, 0, 0, 0, NULL);
17242 #endif
17243
17244 ; return 0; }
17245 EOF
17246 if { (eval echo configure:17247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17247   rm -rf conftest*
17248   ol_cv_db_db4=yes
17249 else
17250   echo "configure: failed program was:" >&5
17251   cat conftest.$ac_ext >&5
17252   rm -rf conftest*
17253   ol_cv_db_db4=no
17254 fi
17255 rm -f conftest*
17256
17257         LIBS="$ol_LIBS"
17258
17259 fi
17260
17261 echo "$ac_t""$ol_cv_db_db4" 1>&6
17262
17263         if test $ol_cv_db_db4 = yes ; then
17264                 ol_cv_lib_db=-ldb4
17265         fi
17266 fi
17267
17268 if test $ol_cv_lib_db = no ; then
17269         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17270 echo "configure:17271: checking for Berkeley DB link (-ldb)" >&5
17271 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17272   echo $ac_n "(cached) $ac_c" 1>&6
17273 else
17274   
17275         ol_DB_LIB=-ldb
17276         ol_LIBS=$LIBS
17277         LIBS="$ol_DB_LIB $LIBS"
17278
17279         cat > conftest.$ac_ext <<EOF
17280 #line 17281 "configure"
17281 #include "confdefs.h"
17282
17283 #ifdef HAVE_DB_185_H
17284 # include <db_185.h>
17285 #else
17286 # include <db.h>
17287 #endif
17288
17289 #ifndef DB_VERSION_MAJOR
17290 # define DB_VERSION_MAJOR 1
17291 #endif
17292
17293 #ifndef NULL
17294 #define NULL ((void*)0)
17295 #endif
17296
17297 int main() {
17298
17299 #if DB_VERSION_MAJOR > 1
17300         {
17301                 char *version;
17302                 int major, minor, patch;
17303
17304                 version = db_version( &major, &minor, &patch );
17305
17306                 if( major != DB_VERSION_MAJOR ||
17307                         minor < DB_VERSION_MINOR )
17308                 {
17309                         printf("Berkeley DB version mismatch\n"
17310                                 "\texpected: %s\n\tgot: %s\n",
17311                                 DB_VERSION_STRING, version);
17312                         return 1;
17313                 }
17314         }
17315 #endif
17316
17317 #if DB_VERSION_MAJOR > 2
17318         db_env_create( NULL, 0 );
17319 #elif DB_VERSION_MAJOR > 1
17320         db_appexit( NULL );
17321 #else
17322         (void) dbopen( NULL, 0, 0, 0, NULL);
17323 #endif
17324
17325 ; return 0; }
17326 EOF
17327 if { (eval echo configure:17328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17328   rm -rf conftest*
17329   ol_cv_db_db=yes
17330 else
17331   echo "configure: failed program was:" >&5
17332   cat conftest.$ac_ext >&5
17333   rm -rf conftest*
17334   ol_cv_db_db=no
17335 fi
17336 rm -f conftest*
17337
17338         LIBS="$ol_LIBS"
17339
17340 fi
17341
17342 echo "$ac_t""$ol_cv_db_db" 1>&6
17343
17344         if test $ol_cv_db_db = yes ; then
17345                 ol_cv_lib_db=-ldb
17346         fi
17347 fi
17348
17349 if test $ol_cv_lib_db = no ; then
17350         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17351 echo "configure:17352: checking for Berkeley DB link (-ldb3)" >&5
17352 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17353   echo $ac_n "(cached) $ac_c" 1>&6
17354 else
17355   
17356         ol_DB_LIB=-ldb3
17357         ol_LIBS=$LIBS
17358         LIBS="$ol_DB_LIB $LIBS"
17359
17360         cat > conftest.$ac_ext <<EOF
17361 #line 17362 "configure"
17362 #include "confdefs.h"
17363
17364 #ifdef HAVE_DB_185_H
17365 # include <db_185.h>
17366 #else
17367 # include <db.h>
17368 #endif
17369
17370 #ifndef DB_VERSION_MAJOR
17371 # define DB_VERSION_MAJOR 1
17372 #endif
17373
17374 #ifndef NULL
17375 #define NULL ((void*)0)
17376 #endif
17377
17378 int main() {
17379
17380 #if DB_VERSION_MAJOR > 1
17381         {
17382                 char *version;
17383                 int major, minor, patch;
17384
17385                 version = db_version( &major, &minor, &patch );
17386
17387                 if( major != DB_VERSION_MAJOR ||
17388                         minor < DB_VERSION_MINOR )
17389                 {
17390                         printf("Berkeley DB version mismatch\n"
17391                                 "\texpected: %s\n\tgot: %s\n",
17392                                 DB_VERSION_STRING, version);
17393                         return 1;
17394                 }
17395         }
17396 #endif
17397
17398 #if DB_VERSION_MAJOR > 2
17399         db_env_create( NULL, 0 );
17400 #elif DB_VERSION_MAJOR > 1
17401         db_appexit( NULL );
17402 #else
17403         (void) dbopen( NULL, 0, 0, 0, NULL);
17404 #endif
17405
17406 ; return 0; }
17407 EOF
17408 if { (eval echo configure:17409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17409   rm -rf conftest*
17410   ol_cv_db_db3=yes
17411 else
17412   echo "configure: failed program was:" >&5
17413   cat conftest.$ac_ext >&5
17414   rm -rf conftest*
17415   ol_cv_db_db3=no
17416 fi
17417 rm -f conftest*
17418
17419         LIBS="$ol_LIBS"
17420
17421 fi
17422
17423 echo "$ac_t""$ol_cv_db_db3" 1>&6
17424
17425         if test $ol_cv_db_db3 = yes ; then
17426                 ol_cv_lib_db=-ldb3
17427         fi
17428 fi
17429
17430 if test $ol_cv_lib_db = no ; then
17431         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17432 echo "configure:17433: checking for Berkeley DB link (-ldb2)" >&5
17433 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17434   echo $ac_n "(cached) $ac_c" 1>&6
17435 else
17436   
17437         ol_DB_LIB=-ldb2
17438         ol_LIBS=$LIBS
17439         LIBS="$ol_DB_LIB $LIBS"
17440
17441         cat > conftest.$ac_ext <<EOF
17442 #line 17443 "configure"
17443 #include "confdefs.h"
17444
17445 #ifdef HAVE_DB_185_H
17446 # include <db_185.h>
17447 #else
17448 # include <db.h>
17449 #endif
17450
17451 #ifndef DB_VERSION_MAJOR
17452 # define DB_VERSION_MAJOR 1
17453 #endif
17454
17455 #ifndef NULL
17456 #define NULL ((void*)0)
17457 #endif
17458
17459 int main() {
17460
17461 #if DB_VERSION_MAJOR > 1
17462         {
17463                 char *version;
17464                 int major, minor, patch;
17465
17466                 version = db_version( &major, &minor, &patch );
17467
17468                 if( major != DB_VERSION_MAJOR ||
17469                         minor < DB_VERSION_MINOR )
17470                 {
17471                         printf("Berkeley DB version mismatch\n"
17472                                 "\texpected: %s\n\tgot: %s\n",
17473                                 DB_VERSION_STRING, version);
17474                         return 1;
17475                 }
17476         }
17477 #endif
17478
17479 #if DB_VERSION_MAJOR > 2
17480         db_env_create( NULL, 0 );
17481 #elif DB_VERSION_MAJOR > 1
17482         db_appexit( NULL );
17483 #else
17484         (void) dbopen( NULL, 0, 0, 0, NULL);
17485 #endif
17486
17487 ; return 0; }
17488 EOF
17489 if { (eval echo configure:17490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17490   rm -rf conftest*
17491   ol_cv_db_db2=yes
17492 else
17493   echo "configure: failed program was:" >&5
17494   cat conftest.$ac_ext >&5
17495   rm -rf conftest*
17496   ol_cv_db_db2=no
17497 fi
17498 rm -f conftest*
17499
17500         LIBS="$ol_LIBS"
17501
17502 fi
17503
17504 echo "$ac_t""$ol_cv_db_db2" 1>&6
17505
17506         if test $ol_cv_db_db2 = yes ; then
17507                 ol_cv_lib_db=-ldb2
17508         fi
17509 fi
17510
17511 if test $ol_cv_lib_db = no ; then
17512         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17513 echo "configure:17514: checking for Berkeley DB link (-ldb1)" >&5
17514 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17515   echo $ac_n "(cached) $ac_c" 1>&6
17516 else
17517   
17518         ol_DB_LIB=-ldb1
17519         ol_LIBS=$LIBS
17520         LIBS="$ol_DB_LIB $LIBS"
17521
17522         cat > conftest.$ac_ext <<EOF
17523 #line 17524 "configure"
17524 #include "confdefs.h"
17525
17526 #ifdef HAVE_DB_185_H
17527 # include <db_185.h>
17528 #else
17529 # include <db.h>
17530 #endif
17531
17532 #ifndef DB_VERSION_MAJOR
17533 # define DB_VERSION_MAJOR 1
17534 #endif
17535
17536 #ifndef NULL
17537 #define NULL ((void*)0)
17538 #endif
17539
17540 int main() {
17541
17542 #if DB_VERSION_MAJOR > 1
17543         {
17544                 char *version;
17545                 int major, minor, patch;
17546
17547                 version = db_version( &major, &minor, &patch );
17548
17549                 if( major != DB_VERSION_MAJOR ||
17550                         minor < DB_VERSION_MINOR )
17551                 {
17552                         printf("Berkeley DB version mismatch\n"
17553                                 "\texpected: %s\n\tgot: %s\n",
17554                                 DB_VERSION_STRING, version);
17555                         return 1;
17556                 }
17557         }
17558 #endif
17559
17560 #if DB_VERSION_MAJOR > 2
17561         db_env_create( NULL, 0 );
17562 #elif DB_VERSION_MAJOR > 1
17563         db_appexit( NULL );
17564 #else
17565         (void) dbopen( NULL, 0, 0, 0, NULL);
17566 #endif
17567
17568 ; return 0; }
17569 EOF
17570 if { (eval echo configure:17571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17571   rm -rf conftest*
17572   ol_cv_db_db1=yes
17573 else
17574   echo "configure: failed program was:" >&5
17575   cat conftest.$ac_ext >&5
17576   rm -rf conftest*
17577   ol_cv_db_db1=no
17578 fi
17579 rm -f conftest*
17580
17581         LIBS="$ol_LIBS"
17582
17583 fi
17584
17585 echo "$ac_t""$ol_cv_db_db1" 1>&6
17586
17587         if test $ol_cv_db_db1 = yes ; then
17588                 ol_cv_lib_db=-ldb1
17589         fi
17590 fi
17591
17592
17593                 if test "$ol_cv_lib_db" != no ; then
17594                         ol_cv_berkeley_db=yes
17595                 fi
17596         fi
17597 fi
17598
17599         else
17600                 ol_cv_berkeley_db=no
17601 for ac_hdr in db.h
17602 do
17603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17605 echo "configure:17606: checking for $ac_hdr" >&5
17606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17607   echo $ac_n "(cached) $ac_c" 1>&6
17608 else
17609   cat > conftest.$ac_ext <<EOF
17610 #line 17611 "configure"
17611 #include "confdefs.h"
17612 #include <$ac_hdr>
17613 EOF
17614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17615 { (eval echo configure:17616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17617 if test -z "$ac_err"; then
17618   rm -rf conftest*
17619   eval "ac_cv_header_$ac_safe=yes"
17620 else
17621   echo "$ac_err" >&5
17622   echo "configure: failed program was:" >&5
17623   cat conftest.$ac_ext >&5
17624   rm -rf conftest*
17625   eval "ac_cv_header_$ac_safe=no"
17626 fi
17627 rm -f conftest*
17628 fi
17629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17630   echo "$ac_t""yes" 1>&6
17631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17632   cat >> confdefs.h <<EOF
17633 #define $ac_tr_hdr 1
17634 EOF
17635  
17636 else
17637   echo "$ac_t""no" 1>&6
17638 fi
17639 done
17640
17641 if test $ac_cv_header_db_h = yes; then
17642         ol_cv_lib_db=no
17643 if test $ol_cv_lib_db = no ; then
17644         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17645 echo "configure:17646: checking for Berkeley DB link (default)" >&5
17646 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17647   echo $ac_n "(cached) $ac_c" 1>&6
17648 else
17649   
17650         ol_DB_LIB=
17651         ol_LIBS=$LIBS
17652         LIBS="$ol_DB_LIB $LIBS"
17653
17654         cat > conftest.$ac_ext <<EOF
17655 #line 17656 "configure"
17656 #include "confdefs.h"
17657
17658 #ifdef HAVE_DB_185_H
17659 # include <db_185.h>
17660 #else
17661 # include <db.h>
17662 #endif
17663
17664 #ifndef DB_VERSION_MAJOR
17665 # define DB_VERSION_MAJOR 1
17666 #endif
17667
17668 #ifndef NULL
17669 #define NULL ((void*)0)
17670 #endif
17671
17672 int main() {
17673
17674 #if DB_VERSION_MAJOR > 1
17675         {
17676                 char *version;
17677                 int major, minor, patch;
17678
17679                 version = db_version( &major, &minor, &patch );
17680
17681                 if( major != DB_VERSION_MAJOR ||
17682                         minor < DB_VERSION_MINOR )
17683                 {
17684                         printf("Berkeley DB version mismatch\n"
17685                                 "\texpected: %s\n\tgot: %s\n",
17686                                 DB_VERSION_STRING, version);
17687                         return 1;
17688                 }
17689         }
17690 #endif
17691
17692 #if DB_VERSION_MAJOR > 2
17693         db_env_create( NULL, 0 );
17694 #elif DB_VERSION_MAJOR > 1
17695         db_appexit( NULL );
17696 #else
17697         (void) dbopen( NULL, 0, 0, 0, NULL);
17698 #endif
17699
17700 ; return 0; }
17701 EOF
17702 if { (eval echo configure:17703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17703   rm -rf conftest*
17704   ol_cv_db_none=yes
17705 else
17706   echo "configure: failed program was:" >&5
17707   cat conftest.$ac_ext >&5
17708   rm -rf conftest*
17709   ol_cv_db_none=no
17710 fi
17711 rm -f conftest*
17712
17713         LIBS="$ol_LIBS"
17714
17715 fi
17716
17717 echo "$ac_t""$ol_cv_db_none" 1>&6
17718
17719         if test $ol_cv_db_none = yes ; then
17720                 ol_cv_lib_db=yes
17721         fi
17722 fi
17723
17724 if test $ol_cv_lib_db = no ; then
17725         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17726 echo "configure:17727: checking for Berkeley DB link (-ldb4)" >&5
17727 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17728   echo $ac_n "(cached) $ac_c" 1>&6
17729 else
17730   
17731         ol_DB_LIB=-ldb4
17732         ol_LIBS=$LIBS
17733         LIBS="$ol_DB_LIB $LIBS"
17734
17735         cat > conftest.$ac_ext <<EOF
17736 #line 17737 "configure"
17737 #include "confdefs.h"
17738
17739 #ifdef HAVE_DB_185_H
17740 # include <db_185.h>
17741 #else
17742 # include <db.h>
17743 #endif
17744
17745 #ifndef DB_VERSION_MAJOR
17746 # define DB_VERSION_MAJOR 1
17747 #endif
17748
17749 #ifndef NULL
17750 #define NULL ((void*)0)
17751 #endif
17752
17753 int main() {
17754
17755 #if DB_VERSION_MAJOR > 1
17756         {
17757                 char *version;
17758                 int major, minor, patch;
17759
17760                 version = db_version( &major, &minor, &patch );
17761
17762                 if( major != DB_VERSION_MAJOR ||
17763                         minor < DB_VERSION_MINOR )
17764                 {
17765                         printf("Berkeley DB version mismatch\n"
17766                                 "\texpected: %s\n\tgot: %s\n",
17767                                 DB_VERSION_STRING, version);
17768                         return 1;
17769                 }
17770         }
17771 #endif
17772
17773 #if DB_VERSION_MAJOR > 2
17774         db_env_create( NULL, 0 );
17775 #elif DB_VERSION_MAJOR > 1
17776         db_appexit( NULL );
17777 #else
17778         (void) dbopen( NULL, 0, 0, 0, NULL);
17779 #endif
17780
17781 ; return 0; }
17782 EOF
17783 if { (eval echo configure:17784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17784   rm -rf conftest*
17785   ol_cv_db_db4=yes
17786 else
17787   echo "configure: failed program was:" >&5
17788   cat conftest.$ac_ext >&5
17789   rm -rf conftest*
17790   ol_cv_db_db4=no
17791 fi
17792 rm -f conftest*
17793
17794         LIBS="$ol_LIBS"
17795
17796 fi
17797
17798 echo "$ac_t""$ol_cv_db_db4" 1>&6
17799
17800         if test $ol_cv_db_db4 = yes ; then
17801                 ol_cv_lib_db=-ldb4
17802         fi
17803 fi
17804
17805 if test $ol_cv_lib_db = no ; then
17806         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17807 echo "configure:17808: checking for Berkeley DB link (-ldb)" >&5
17808 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17809   echo $ac_n "(cached) $ac_c" 1>&6
17810 else
17811   
17812         ol_DB_LIB=-ldb
17813         ol_LIBS=$LIBS
17814         LIBS="$ol_DB_LIB $LIBS"
17815
17816         cat > conftest.$ac_ext <<EOF
17817 #line 17818 "configure"
17818 #include "confdefs.h"
17819
17820 #ifdef HAVE_DB_185_H
17821 # include <db_185.h>
17822 #else
17823 # include <db.h>
17824 #endif
17825
17826 #ifndef DB_VERSION_MAJOR
17827 # define DB_VERSION_MAJOR 1
17828 #endif
17829
17830 #ifndef NULL
17831 #define NULL ((void*)0)
17832 #endif
17833
17834 int main() {
17835
17836 #if DB_VERSION_MAJOR > 1
17837         {
17838                 char *version;
17839                 int major, minor, patch;
17840
17841                 version = db_version( &major, &minor, &patch );
17842
17843                 if( major != DB_VERSION_MAJOR ||
17844                         minor < DB_VERSION_MINOR )
17845                 {
17846                         printf("Berkeley DB version mismatch\n"
17847                                 "\texpected: %s\n\tgot: %s\n",
17848                                 DB_VERSION_STRING, version);
17849                         return 1;
17850                 }
17851         }
17852 #endif
17853
17854 #if DB_VERSION_MAJOR > 2
17855         db_env_create( NULL, 0 );
17856 #elif DB_VERSION_MAJOR > 1
17857         db_appexit( NULL );
17858 #else
17859         (void) dbopen( NULL, 0, 0, 0, NULL);
17860 #endif
17861
17862 ; return 0; }
17863 EOF
17864 if { (eval echo configure:17865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17865   rm -rf conftest*
17866   ol_cv_db_db=yes
17867 else
17868   echo "configure: failed program was:" >&5
17869   cat conftest.$ac_ext >&5
17870   rm -rf conftest*
17871   ol_cv_db_db=no
17872 fi
17873 rm -f conftest*
17874
17875         LIBS="$ol_LIBS"
17876
17877 fi
17878
17879 echo "$ac_t""$ol_cv_db_db" 1>&6
17880
17881         if test $ol_cv_db_db = yes ; then
17882                 ol_cv_lib_db=-ldb
17883         fi
17884 fi
17885
17886 if test $ol_cv_lib_db = no ; then
17887         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17888 echo "configure:17889: checking for Berkeley DB link (-ldb3)" >&5
17889 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17890   echo $ac_n "(cached) $ac_c" 1>&6
17891 else
17892   
17893         ol_DB_LIB=-ldb3
17894         ol_LIBS=$LIBS
17895         LIBS="$ol_DB_LIB $LIBS"
17896
17897         cat > conftest.$ac_ext <<EOF
17898 #line 17899 "configure"
17899 #include "confdefs.h"
17900
17901 #ifdef HAVE_DB_185_H
17902 # include <db_185.h>
17903 #else
17904 # include <db.h>
17905 #endif
17906
17907 #ifndef DB_VERSION_MAJOR
17908 # define DB_VERSION_MAJOR 1
17909 #endif
17910
17911 #ifndef NULL
17912 #define NULL ((void*)0)
17913 #endif
17914
17915 int main() {
17916
17917 #if DB_VERSION_MAJOR > 1
17918         {
17919                 char *version;
17920                 int major, minor, patch;
17921
17922                 version = db_version( &major, &minor, &patch );
17923
17924                 if( major != DB_VERSION_MAJOR ||
17925                         minor < DB_VERSION_MINOR )
17926                 {
17927                         printf("Berkeley DB version mismatch\n"
17928                                 "\texpected: %s\n\tgot: %s\n",
17929                                 DB_VERSION_STRING, version);
17930                         return 1;
17931                 }
17932         }
17933 #endif
17934
17935 #if DB_VERSION_MAJOR > 2
17936         db_env_create( NULL, 0 );
17937 #elif DB_VERSION_MAJOR > 1
17938         db_appexit( NULL );
17939 #else
17940         (void) dbopen( NULL, 0, 0, 0, NULL);
17941 #endif
17942
17943 ; return 0; }
17944 EOF
17945 if { (eval echo configure:17946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17946   rm -rf conftest*
17947   ol_cv_db_db3=yes
17948 else
17949   echo "configure: failed program was:" >&5
17950   cat conftest.$ac_ext >&5
17951   rm -rf conftest*
17952   ol_cv_db_db3=no
17953 fi
17954 rm -f conftest*
17955
17956         LIBS="$ol_LIBS"
17957
17958 fi
17959
17960 echo "$ac_t""$ol_cv_db_db3" 1>&6
17961
17962         if test $ol_cv_db_db3 = yes ; then
17963                 ol_cv_lib_db=-ldb3
17964         fi
17965 fi
17966
17967 if test $ol_cv_lib_db = no ; then
17968         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17969 echo "configure:17970: checking for Berkeley DB link (-ldb2)" >&5
17970 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17971   echo $ac_n "(cached) $ac_c" 1>&6
17972 else
17973   
17974         ol_DB_LIB=-ldb2
17975         ol_LIBS=$LIBS
17976         LIBS="$ol_DB_LIB $LIBS"
17977
17978         cat > conftest.$ac_ext <<EOF
17979 #line 17980 "configure"
17980 #include "confdefs.h"
17981
17982 #ifdef HAVE_DB_185_H
17983 # include <db_185.h>
17984 #else
17985 # include <db.h>
17986 #endif
17987
17988 #ifndef DB_VERSION_MAJOR
17989 # define DB_VERSION_MAJOR 1
17990 #endif
17991
17992 #ifndef NULL
17993 #define NULL ((void*)0)
17994 #endif
17995
17996 int main() {
17997
17998 #if DB_VERSION_MAJOR > 1
17999         {
18000                 char *version;
18001                 int major, minor, patch;
18002
18003                 version = db_version( &major, &minor, &patch );
18004
18005                 if( major != DB_VERSION_MAJOR ||
18006                         minor < DB_VERSION_MINOR )
18007                 {
18008                         printf("Berkeley DB version mismatch\n"
18009                                 "\texpected: %s\n\tgot: %s\n",
18010                                 DB_VERSION_STRING, version);
18011                         return 1;
18012                 }
18013         }
18014 #endif
18015
18016 #if DB_VERSION_MAJOR > 2
18017         db_env_create( NULL, 0 );
18018 #elif DB_VERSION_MAJOR > 1
18019         db_appexit( NULL );
18020 #else
18021         (void) dbopen( NULL, 0, 0, 0, NULL);
18022 #endif
18023
18024 ; return 0; }
18025 EOF
18026 if { (eval echo configure:18027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18027   rm -rf conftest*
18028   ol_cv_db_db2=yes
18029 else
18030   echo "configure: failed program was:" >&5
18031   cat conftest.$ac_ext >&5
18032   rm -rf conftest*
18033   ol_cv_db_db2=no
18034 fi
18035 rm -f conftest*
18036
18037         LIBS="$ol_LIBS"
18038
18039 fi
18040
18041 echo "$ac_t""$ol_cv_db_db2" 1>&6
18042
18043         if test $ol_cv_db_db2 = yes ; then
18044                 ol_cv_lib_db=-ldb2
18045         fi
18046 fi
18047
18048 if test $ol_cv_lib_db = no ; then
18049         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18050 echo "configure:18051: checking for Berkeley DB link (-ldb1)" >&5
18051 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18052   echo $ac_n "(cached) $ac_c" 1>&6
18053 else
18054   
18055         ol_DB_LIB=-ldb1
18056         ol_LIBS=$LIBS
18057         LIBS="$ol_DB_LIB $LIBS"
18058
18059         cat > conftest.$ac_ext <<EOF
18060 #line 18061 "configure"
18061 #include "confdefs.h"
18062
18063 #ifdef HAVE_DB_185_H
18064 # include <db_185.h>
18065 #else
18066 # include <db.h>
18067 #endif
18068
18069 #ifndef DB_VERSION_MAJOR
18070 # define DB_VERSION_MAJOR 1
18071 #endif
18072
18073 #ifndef NULL
18074 #define NULL ((void*)0)
18075 #endif
18076
18077 int main() {
18078
18079 #if DB_VERSION_MAJOR > 1
18080         {
18081                 char *version;
18082                 int major, minor, patch;
18083
18084                 version = db_version( &major, &minor, &patch );
18085
18086                 if( major != DB_VERSION_MAJOR ||
18087                         minor < DB_VERSION_MINOR )
18088                 {
18089                         printf("Berkeley DB version mismatch\n"
18090                                 "\texpected: %s\n\tgot: %s\n",
18091                                 DB_VERSION_STRING, version);
18092                         return 1;
18093                 }
18094         }
18095 #endif
18096
18097 #if DB_VERSION_MAJOR > 2
18098         db_env_create( NULL, 0 );
18099 #elif DB_VERSION_MAJOR > 1
18100         db_appexit( NULL );
18101 #else
18102         (void) dbopen( NULL, 0, 0, 0, NULL);
18103 #endif
18104
18105 ; return 0; }
18106 EOF
18107 if { (eval echo configure:18108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18108   rm -rf conftest*
18109   ol_cv_db_db1=yes
18110 else
18111   echo "configure: failed program was:" >&5
18112   cat conftest.$ac_ext >&5
18113   rm -rf conftest*
18114   ol_cv_db_db1=no
18115 fi
18116 rm -f conftest*
18117
18118         LIBS="$ol_LIBS"
18119
18120 fi
18121
18122 echo "$ac_t""$ol_cv_db_db1" 1>&6
18123
18124         if test $ol_cv_db_db1 = yes ; then
18125                 ol_cv_lib_db=-ldb1
18126         fi
18127 fi
18128
18129
18130         if test "$ol_cv_lib_db" != no ; then
18131                 ol_cv_berkeley_db=yes
18132                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18133 echo "configure:18134: checking for Berkeley DB thread support" >&5
18134 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18135   echo $ac_n "(cached) $ac_c" 1>&6
18136 else
18137   
18138         ol_LIBS="$LIBS"
18139         if test $ol_cv_lib_db != yes ; then
18140                 LIBS="$ol_cv_lib_db"
18141         fi
18142
18143         if test "$cross_compiling" = yes; then
18144   ol_cv_berkeley_db_thread=cross
18145 else
18146   cat > conftest.$ac_ext <<EOF
18147 #line 18148 "configure"
18148 #include "confdefs.h"
18149
18150 #ifdef HAVE_DB_185_H
18151         choke me;
18152 #else
18153 #include <db.h>
18154 #endif
18155 #ifndef NULL
18156 #define NULL ((void *)0)
18157 #endif
18158 main()
18159 {
18160         int rc;
18161         u_int32_t flags = DB_CREATE |
18162 #ifdef DB_PRIVATE
18163                 DB_PRIVATE |
18164 #endif
18165                 DB_THREAD;
18166
18167 #if DB_VERSION_MAJOR > 2
18168         DB_ENV *env = NULL;
18169
18170         rc = db_env_create( &env, 0 );
18171
18172         flags |= DB_INIT_MPOOL;
18173 #ifdef DB_MPOOL_PRIVATE
18174         flags |= DB_MPOOL_PRIVATE;
18175 #endif
18176
18177         if( rc ) {
18178                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18179                 return rc;
18180         }
18181
18182 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18183         rc = env->open( env, NULL, flags, 0 );
18184 #else
18185         rc = env->open( env, NULL, NULL, flags, 0 );
18186 #endif
18187
18188         if ( rc == 0 ) {
18189                 rc = env->close( env, 0 );
18190         }
18191
18192         if( rc ) {
18193                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18194                 return rc;
18195         }
18196
18197 #else
18198         DB_ENV env;
18199         memset( &env, '\0', sizeof(env) );
18200
18201         rc = db_appinit( NULL, NULL, &env, flags );
18202
18203         if( rc == 0 ) {
18204                 db_appexit( &env );
18205         }
18206
18207         unlink("__db_mpool.share");
18208         unlink("__db_lock.share");
18209 #endif
18210
18211         return rc;
18212 }
18213 EOF
18214 if { (eval echo configure:18215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18215 then
18216   ol_cv_berkeley_db_thread=yes
18217 else
18218   echo "configure: failed program was:" >&5
18219   cat conftest.$ac_ext >&5
18220   rm -fr conftest*
18221   ol_cv_berkeley_db_thread=no
18222 fi
18223 rm -fr conftest*
18224 fi
18225
18226
18227         LIBS="$ol_LIBS"
18228
18229         if test $ol_cv_berkeley_db_thread != no ; then
18230                 cat >> confdefs.h <<\EOF
18231 #define HAVE_BERKELEY_DB_THREAD 1
18232 EOF
18233
18234         fi
18235
18236 fi
18237
18238 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18239         fi
18240 fi
18241
18242         fi
18243
18244         if test $ol_cv_berkeley_db != no ; then
18245                 cat >> confdefs.h <<\EOF
18246 #define HAVE_BERKELEY_DB 1
18247 EOF
18248
18249
18250                 ol_link_ldbm=berkeley
18251                 ol_with_ldbm_api=berkeley
18252
18253                 if test $ol_with_ldbm_type = hash ; then
18254                         cat >> confdefs.h <<\EOF
18255 #define LDBM_USE_DBHASH 1
18256 EOF
18257
18258                 else
18259                         cat >> confdefs.h <<\EOF
18260 #define LDBM_USE_DBBTREE 1
18261 EOF
18262
18263                 fi
18264
18265                                                 if test $ol_cv_lib_db != yes ; then
18266                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18267                 fi
18268         fi
18269 fi
18270
18271 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18272         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18273 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18274         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18275 echo "configure:18276: checking Berkeley DB version for BDB backend" >&5
18276 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18277   echo $ac_n "(cached) $ac_c" 1>&6
18278 else
18279   
18280         cat > conftest.$ac_ext <<EOF
18281 #line 18282 "configure"
18282 #include "confdefs.h"
18283
18284 #include <db.h>
18285
18286  /* this check could be improved */
18287 #ifndef DB_VERSION_MAJOR
18288 #       define DB_VERSION_MAJOR 1
18289 #endif
18290
18291 /* require 4.0 or later */
18292 #if DB_VERSION_MAJOR >= 4 
18293         __db_version_compat
18294 #endif
18295         
18296 EOF
18297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18298   egrep "__db_version_compat" >/dev/null 2>&1; then
18299   rm -rf conftest*
18300   ol_cv_bdb_compat=yes
18301 else
18302   rm -rf conftest*
18303   ol_cv_bdb_compat=no
18304 fi
18305 rm -f conftest*
18306
18307 fi
18308
18309 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18310
18311
18312         if test $ol_cv_bdb_compat = yes ; then
18313                 ol_enable_bdb=yes
18314         elif test $ol_enable_bdb = yes ; then
18315                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18316         else
18317                 ol_enable_bdb=no
18318         fi
18319 fi
18320
18321 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18322         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18323         ol_with_ldbm_api=none
18324 fi
18325
18326 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18327         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18328 echo "configure:18329: checking for MDBM library" >&5
18329 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18330   echo $ac_n "(cached) $ac_c" 1>&6
18331 else
18332         ol_LIBS="$LIBS"
18333         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18334 echo "configure:18335: checking for mdbm_set_chain" >&5
18335 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18336   echo $ac_n "(cached) $ac_c" 1>&6
18337 else
18338   cat > conftest.$ac_ext <<EOF
18339 #line 18340 "configure"
18340 #include "confdefs.h"
18341 /* System header to define __stub macros and hopefully few prototypes,
18342     which can conflict with char mdbm_set_chain(); below.  */
18343 #include <assert.h>
18344 /* Override any gcc2 internal prototype to avoid an error.  */
18345 /* We use char because int might match the return type of a gcc2
18346     builtin and then its argument prototype would still apply.  */
18347 char mdbm_set_chain();
18348 char (*f)();
18349
18350 int main() {
18351
18352 /* The GNU C library defines this for functions which it implements
18353     to always fail with ENOSYS.  Some functions are actually named
18354     something starting with __ and the normal name is an alias.  */
18355 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18356 choke me
18357 #else
18358 f = mdbm_set_chain;
18359 #endif
18360
18361 ; return 0; }
18362 EOF
18363 if { (eval echo configure:18364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18364   rm -rf conftest*
18365   eval "ac_cv_func_mdbm_set_chain=yes"
18366 else
18367   echo "configure: failed program was:" >&5
18368   cat conftest.$ac_ext >&5
18369   rm -rf conftest*
18370   eval "ac_cv_func_mdbm_set_chain=no"
18371 fi
18372 rm -f conftest*
18373 fi
18374
18375 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18376   echo "$ac_t""yes" 1>&6
18377   ol_cv_lib_mdbm=yes
18378 else
18379   echo "$ac_t""no" 1>&6
18380
18381                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18382 echo "configure:18383: checking for mdbm_set_chain in -lmdbm" >&5
18383 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18385   echo $ac_n "(cached) $ac_c" 1>&6
18386 else
18387   ac_save_LIBS="$LIBS"
18388 LIBS="-lmdbm  $LIBS"
18389 cat > conftest.$ac_ext <<EOF
18390 #line 18391 "configure"
18391 #include "confdefs.h"
18392 /* Override any gcc2 internal prototype to avoid an error.  */
18393 /* We use char because int might match the return type of a gcc2
18394     builtin and then its argument prototype would still apply.  */
18395 char mdbm_set_chain();
18396
18397 int main() {
18398 mdbm_set_chain()
18399 ; return 0; }
18400 EOF
18401 if { (eval echo configure:18402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18402   rm -rf conftest*
18403   eval "ac_cv_lib_$ac_lib_var=yes"
18404 else
18405   echo "configure: failed program was:" >&5
18406   cat conftest.$ac_ext >&5
18407   rm -rf conftest*
18408   eval "ac_cv_lib_$ac_lib_var=no"
18409 fi
18410 rm -f conftest*
18411 LIBS="$ac_save_LIBS"
18412
18413 fi
18414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18415   echo "$ac_t""yes" 1>&6
18416   ol_cv_lib_mdbm=-lmdbm
18417 else
18418   echo "$ac_t""no" 1>&6
18419 ol_cv_lib_mdbm=no
18420 fi
18421
18422         
18423 fi
18424
18425         LIBS="$ol_LIBS"
18426
18427 fi
18428
18429 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18430
18431
18432  for ac_hdr in mdbm.h
18433 do
18434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18436 echo "configure:18437: checking for $ac_hdr" >&5
18437 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18438   echo $ac_n "(cached) $ac_c" 1>&6
18439 else
18440   cat > conftest.$ac_ext <<EOF
18441 #line 18442 "configure"
18442 #include "confdefs.h"
18443 #include <$ac_hdr>
18444 EOF
18445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18446 { (eval echo configure:18447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18448 if test -z "$ac_err"; then
18449   rm -rf conftest*
18450   eval "ac_cv_header_$ac_safe=yes"
18451 else
18452   echo "$ac_err" >&5
18453   echo "configure: failed program was:" >&5
18454   cat conftest.$ac_ext >&5
18455   rm -rf conftest*
18456   eval "ac_cv_header_$ac_safe=no"
18457 fi
18458 rm -f conftest*
18459 fi
18460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18461   echo "$ac_t""yes" 1>&6
18462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18463   cat >> confdefs.h <<EOF
18464 #define $ac_tr_hdr 1
18465 EOF
18466  
18467 else
18468   echo "$ac_t""no" 1>&6
18469 fi
18470 done
18471
18472  echo $ac_n "checking for db""... $ac_c" 1>&6
18473 echo "configure:18474: checking for db" >&5
18474 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18475   echo $ac_n "(cached) $ac_c" 1>&6
18476 else
18477   
18478         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18479                 ol_cv_mdbm=no
18480         else
18481                 ol_cv_mdbm=yes
18482         fi
18483
18484 fi
18485
18486 echo "$ac_t""$ol_cv_mdbm" 1>&6
18487  if test $ol_cv_mdbm = yes ; then
18488         cat >> confdefs.h <<\EOF
18489 #define HAVE_MDBM 1
18490 EOF
18491
18492  fi
18493
18494
18495         if test $ol_cv_mdbm = yes ; then
18496                 ol_link_ldbm=mdbm
18497                 ol_with_ldbm_api=mdbm
18498                 if test $ol_cv_lib_mdbm != yes ; then
18499                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18500                 fi
18501         fi
18502 fi
18503
18504 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18505         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18506 echo "configure:18507: checking for GDBM library" >&5
18507 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18508   echo $ac_n "(cached) $ac_c" 1>&6
18509 else
18510         ol_LIBS="$LIBS"
18511         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18512 echo "configure:18513: checking for gdbm_open" >&5
18513 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18514   echo $ac_n "(cached) $ac_c" 1>&6
18515 else
18516   cat > conftest.$ac_ext <<EOF
18517 #line 18518 "configure"
18518 #include "confdefs.h"
18519 /* System header to define __stub macros and hopefully few prototypes,
18520     which can conflict with char gdbm_open(); below.  */
18521 #include <assert.h>
18522 /* Override any gcc2 internal prototype to avoid an error.  */
18523 /* We use char because int might match the return type of a gcc2
18524     builtin and then its argument prototype would still apply.  */
18525 char gdbm_open();
18526 char (*f)();
18527
18528 int main() {
18529
18530 /* The GNU C library defines this for functions which it implements
18531     to always fail with ENOSYS.  Some functions are actually named
18532     something starting with __ and the normal name is an alias.  */
18533 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18534 choke me
18535 #else
18536 f = gdbm_open;
18537 #endif
18538
18539 ; return 0; }
18540 EOF
18541 if { (eval echo configure:18542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18542   rm -rf conftest*
18543   eval "ac_cv_func_gdbm_open=yes"
18544 else
18545   echo "configure: failed program was:" >&5
18546   cat conftest.$ac_ext >&5
18547   rm -rf conftest*
18548   eval "ac_cv_func_gdbm_open=no"
18549 fi
18550 rm -f conftest*
18551 fi
18552
18553 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18554   echo "$ac_t""yes" 1>&6
18555   ol_cv_lib_gdbm=yes
18556 else
18557   echo "$ac_t""no" 1>&6
18558
18559                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18560 echo "configure:18561: checking for gdbm_open in -lgdbm" >&5
18561 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18563   echo $ac_n "(cached) $ac_c" 1>&6
18564 else
18565   ac_save_LIBS="$LIBS"
18566 LIBS="-lgdbm  $LIBS"
18567 cat > conftest.$ac_ext <<EOF
18568 #line 18569 "configure"
18569 #include "confdefs.h"
18570 /* Override any gcc2 internal prototype to avoid an error.  */
18571 /* We use char because int might match the return type of a gcc2
18572     builtin and then its argument prototype would still apply.  */
18573 char gdbm_open();
18574
18575 int main() {
18576 gdbm_open()
18577 ; return 0; }
18578 EOF
18579 if { (eval echo configure:18580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18580   rm -rf conftest*
18581   eval "ac_cv_lib_$ac_lib_var=yes"
18582 else
18583   echo "configure: failed program was:" >&5
18584   cat conftest.$ac_ext >&5
18585   rm -rf conftest*
18586   eval "ac_cv_lib_$ac_lib_var=no"
18587 fi
18588 rm -f conftest*
18589 LIBS="$ac_save_LIBS"
18590
18591 fi
18592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18593   echo "$ac_t""yes" 1>&6
18594   ol_cv_lib_gdbm=-lgdbm
18595 else
18596   echo "$ac_t""no" 1>&6
18597 ol_cv_lib_gdbm=no
18598 fi
18599
18600         
18601 fi
18602
18603         LIBS="$ol_LIBS"
18604
18605 fi
18606
18607 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18608
18609
18610  for ac_hdr in gdbm.h
18611 do
18612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18614 echo "configure:18615: checking for $ac_hdr" >&5
18615 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18616   echo $ac_n "(cached) $ac_c" 1>&6
18617 else
18618   cat > conftest.$ac_ext <<EOF
18619 #line 18620 "configure"
18620 #include "confdefs.h"
18621 #include <$ac_hdr>
18622 EOF
18623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18624 { (eval echo configure:18625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18626 if test -z "$ac_err"; then
18627   rm -rf conftest*
18628   eval "ac_cv_header_$ac_safe=yes"
18629 else
18630   echo "$ac_err" >&5
18631   echo "configure: failed program was:" >&5
18632   cat conftest.$ac_ext >&5
18633   rm -rf conftest*
18634   eval "ac_cv_header_$ac_safe=no"
18635 fi
18636 rm -f conftest*
18637 fi
18638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18639   echo "$ac_t""yes" 1>&6
18640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18641   cat >> confdefs.h <<EOF
18642 #define $ac_tr_hdr 1
18643 EOF
18644  
18645 else
18646   echo "$ac_t""no" 1>&6
18647 fi
18648 done
18649
18650  echo $ac_n "checking for db""... $ac_c" 1>&6
18651 echo "configure:18652: checking for db" >&5
18652 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18653   echo $ac_n "(cached) $ac_c" 1>&6
18654 else
18655   
18656         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18657                 ol_cv_gdbm=no
18658         else
18659                 ol_cv_gdbm=yes
18660         fi
18661
18662 fi
18663
18664 echo "$ac_t""$ol_cv_gdbm" 1>&6
18665  if test $ol_cv_gdbm = yes ; then
18666         cat >> confdefs.h <<\EOF
18667 #define HAVE_GDBM 1
18668 EOF
18669
18670  fi
18671
18672
18673         if test $ol_cv_gdbm = yes ; then
18674                 ol_link_ldbm=gdbm
18675                 ol_with_ldbm_api=gdbm
18676
18677                 if test $ol_cv_lib_gdbm != yes ; then
18678                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18679                 fi
18680         fi
18681 fi
18682
18683 if test $ol_with_ldbm_api = ndbm ; then
18684         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18685 echo "configure:18686: checking for NDBM library" >&5
18686 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18687   echo $ac_n "(cached) $ac_c" 1>&6
18688 else
18689         ol_LIBS="$LIBS"
18690         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18691 echo "configure:18692: checking for dbm_open" >&5
18692 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18693   echo $ac_n "(cached) $ac_c" 1>&6
18694 else
18695   cat > conftest.$ac_ext <<EOF
18696 #line 18697 "configure"
18697 #include "confdefs.h"
18698 /* System header to define __stub macros and hopefully few prototypes,
18699     which can conflict with char dbm_open(); below.  */
18700 #include <assert.h>
18701 /* Override any gcc2 internal prototype to avoid an error.  */
18702 /* We use char because int might match the return type of a gcc2
18703     builtin and then its argument prototype would still apply.  */
18704 char dbm_open();
18705 char (*f)();
18706
18707 int main() {
18708
18709 /* The GNU C library defines this for functions which it implements
18710     to always fail with ENOSYS.  Some functions are actually named
18711     something starting with __ and the normal name is an alias.  */
18712 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18713 choke me
18714 #else
18715 f = dbm_open;
18716 #endif
18717
18718 ; return 0; }
18719 EOF
18720 if { (eval echo configure:18721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18721   rm -rf conftest*
18722   eval "ac_cv_func_dbm_open=yes"
18723 else
18724   echo "configure: failed program was:" >&5
18725   cat conftest.$ac_ext >&5
18726   rm -rf conftest*
18727   eval "ac_cv_func_dbm_open=no"
18728 fi
18729 rm -f conftest*
18730 fi
18731
18732 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18733   echo "$ac_t""yes" 1>&6
18734   ol_cv_lib_ndbm=yes
18735 else
18736   echo "$ac_t""no" 1>&6
18737
18738                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18739 echo "configure:18740: checking for dbm_open in -lndbm" >&5
18740 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18742   echo $ac_n "(cached) $ac_c" 1>&6
18743 else
18744   ac_save_LIBS="$LIBS"
18745 LIBS="-lndbm  $LIBS"
18746 cat > conftest.$ac_ext <<EOF
18747 #line 18748 "configure"
18748 #include "confdefs.h"
18749 /* Override any gcc2 internal prototype to avoid an error.  */
18750 /* We use char because int might match the return type of a gcc2
18751     builtin and then its argument prototype would still apply.  */
18752 char dbm_open();
18753
18754 int main() {
18755 dbm_open()
18756 ; return 0; }
18757 EOF
18758 if { (eval echo configure:18759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18759   rm -rf conftest*
18760   eval "ac_cv_lib_$ac_lib_var=yes"
18761 else
18762   echo "configure: failed program was:" >&5
18763   cat conftest.$ac_ext >&5
18764   rm -rf conftest*
18765   eval "ac_cv_lib_$ac_lib_var=no"
18766 fi
18767 rm -f conftest*
18768 LIBS="$ac_save_LIBS"
18769
18770 fi
18771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18772   echo "$ac_t""yes" 1>&6
18773   ol_cv_lib_ndbm=-lndbm
18774 else
18775   echo "$ac_t""no" 1>&6
18776
18777                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18778 echo "configure:18779: checking for dbm_open in -ldbm" >&5
18779 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18780 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18781   echo $ac_n "(cached) $ac_c" 1>&6
18782 else
18783   ac_save_LIBS="$LIBS"
18784 LIBS="-ldbm  $LIBS"
18785 cat > conftest.$ac_ext <<EOF
18786 #line 18787 "configure"
18787 #include "confdefs.h"
18788 /* Override any gcc2 internal prototype to avoid an error.  */
18789 /* We use char because int might match the return type of a gcc2
18790     builtin and then its argument prototype would still apply.  */
18791 char dbm_open();
18792
18793 int main() {
18794 dbm_open()
18795 ; return 0; }
18796 EOF
18797 if { (eval echo configure:18798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18798   rm -rf conftest*
18799   eval "ac_cv_lib_$ac_lib_var=yes"
18800 else
18801   echo "configure: failed program was:" >&5
18802   cat conftest.$ac_ext >&5
18803   rm -rf conftest*
18804   eval "ac_cv_lib_$ac_lib_var=no"
18805 fi
18806 rm -f conftest*
18807 LIBS="$ac_save_LIBS"
18808
18809 fi
18810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18811   echo "$ac_t""yes" 1>&6
18812   ol_cv_lib_ndbm=-ldbm
18813 else
18814   echo "$ac_t""no" 1>&6
18815 ol_cv_lib_ndbm=no
18816 fi
18817                 
18818 fi
18819
18820         
18821 fi
18822
18823         LIBS="$ol_LIBS"
18824
18825 fi
18826
18827 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18828
18829
18830  for ac_hdr in ndbm.h
18831 do
18832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18834 echo "configure:18835: checking for $ac_hdr" >&5
18835 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18836   echo $ac_n "(cached) $ac_c" 1>&6
18837 else
18838   cat > conftest.$ac_ext <<EOF
18839 #line 18840 "configure"
18840 #include "confdefs.h"
18841 #include <$ac_hdr>
18842 EOF
18843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18844 { (eval echo configure:18845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18846 if test -z "$ac_err"; then
18847   rm -rf conftest*
18848   eval "ac_cv_header_$ac_safe=yes"
18849 else
18850   echo "$ac_err" >&5
18851   echo "configure: failed program was:" >&5
18852   cat conftest.$ac_ext >&5
18853   rm -rf conftest*
18854   eval "ac_cv_header_$ac_safe=no"
18855 fi
18856 rm -f conftest*
18857 fi
18858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18859   echo "$ac_t""yes" 1>&6
18860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18861   cat >> confdefs.h <<EOF
18862 #define $ac_tr_hdr 1
18863 EOF
18864  
18865 else
18866   echo "$ac_t""no" 1>&6
18867 fi
18868 done
18869
18870  echo $ac_n "checking for db""... $ac_c" 1>&6
18871 echo "configure:18872: checking for db" >&5
18872 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18873   echo $ac_n "(cached) $ac_c" 1>&6
18874 else
18875   
18876         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18877                 ol_cv_ndbm=no
18878         else
18879                 ol_cv_ndbm=yes
18880         fi
18881
18882 fi
18883
18884 echo "$ac_t""$ol_cv_ndbm" 1>&6
18885  if test $ol_cv_ndbm = yes ; then
18886         cat >> confdefs.h <<\EOF
18887 #define HAVE_NDBM 1
18888 EOF
18889
18890  fi
18891
18892
18893         if test $ol_cv_ndbm = yes ; then
18894                 ol_link_ldbm=ndbm
18895                 ol_with_ldbm_api=ndbm
18896
18897                 if test $ol_cv_lib_ndbm != yes ; then
18898                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18899                 fi
18900         fi
18901 fi
18902
18903 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18904         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18905         if test $ol_enable_ldbm = yes ; then
18906                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18907         fi
18908
18909         echo "configure: warning: disabling LDBM" 1>&2
18910         ol_enable_ldbm=no
18911 fi
18912
18913 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18914         BUILD_LIBS_DYNAMIC=shared
18915         cat >> confdefs.h <<\EOF
18916 #define LDAP_LIBS_DYNAMIC 1
18917 EOF
18918
18919 else
18920         BUILD_LIBS_DYNAMIC=static
18921 fi
18922
18923 if test $ol_enable_wrappers != no ; then
18924         for ac_hdr in tcpd.h
18925 do
18926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18928 echo "configure:18929: checking for $ac_hdr" >&5
18929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18930   echo $ac_n "(cached) $ac_c" 1>&6
18931 else
18932   cat > conftest.$ac_ext <<EOF
18933 #line 18934 "configure"
18934 #include "confdefs.h"
18935 #include <$ac_hdr>
18936 EOF
18937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18938 { (eval echo configure:18939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18940 if test -z "$ac_err"; then
18941   rm -rf conftest*
18942   eval "ac_cv_header_$ac_safe=yes"
18943 else
18944   echo "$ac_err" >&5
18945   echo "configure: failed program was:" >&5
18946   cat conftest.$ac_ext >&5
18947   rm -rf conftest*
18948   eval "ac_cv_header_$ac_safe=no"
18949 fi
18950 rm -f conftest*
18951 fi
18952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18953   echo "$ac_t""yes" 1>&6
18954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18955   cat >> confdefs.h <<EOF
18956 #define $ac_tr_hdr 1
18957 EOF
18958  
18959                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18960 echo "configure:18961: checking for TCP wrappers library" >&5
18961                 save_LIBS="$LIBS"
18962                 LIBS="$LIBS -lwrap"
18963                 cat > conftest.$ac_ext <<EOF
18964 #line 18965 "configure"
18965 #include "confdefs.h"
18966
18967 #include <tcpd.h>
18968 int allow_severity = 0;
18969 int deny_severity  = 0;
18970
18971 struct request_info *req;
18972                 
18973 int main() {
18974
18975 hosts_access(req)
18976                 
18977 ; return 0; }
18978 EOF
18979 if { (eval echo configure:18980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18980   rm -rf conftest*
18981   echo "$ac_t""-lwrap" 1>&6
18982                 have_wrappers=yes
18983                 LIBS="$save_LIBS"
18984 else
18985   echo "configure: failed program was:" >&5
18986   cat conftest.$ac_ext >&5
18987   rm -rf conftest*
18988   
18989                                 LIBS="$LIBS -lnsl"
18990                 cat > conftest.$ac_ext <<EOF
18991 #line 18992 "configure"
18992 #include "confdefs.h"
18993
18994 #include <tcpd.h>
18995 int allow_severity = 0;
18996 int deny_severity  = 0;
18997
18998 struct request_info *req;
18999                 
19000 int main() {
19001
19002 hosts_access(req)
19003                 
19004 ; return 0; }
19005 EOF
19006 if { (eval echo configure:19007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19007   rm -rf conftest*
19008   echo "$ac_t""-lwrap -lnsl" 1>&6
19009                 have_wrappers=yes
19010                 LIBS="$save_LIBS -lnsl"
19011 else
19012   echo "configure: failed program was:" >&5
19013   cat conftest.$ac_ext >&5
19014   rm -rf conftest*
19015   
19016                 echo "$ac_t""no" 1>&6
19017                 have_wrappers=no
19018                 LIBS=$save_LIBS
19019 fi
19020 rm -f conftest*
19021 fi
19022 rm -f conftest*
19023 else
19024   echo "$ac_t""no" 1>&6
19025 have_wrappers=no
19026 fi
19027 done
19028
19029
19030         if test $have_wrappers = yes ; then
19031                 cat >> confdefs.h <<\EOF
19032 #define HAVE_TCPD 1
19033 EOF
19034
19035                 WRAP_LIBS="-lwrap"
19036         elif test $ol_enable_wrappers = yes ; then
19037                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19038         else
19039                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19040                 WRAP_LIBS=""
19041         fi
19042 fi
19043
19044 if test $ol_enable_syslog != no ; then
19045         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19046 echo "configure:19047: checking for openlog" >&5
19047 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19048   echo $ac_n "(cached) $ac_c" 1>&6
19049 else
19050   cat > conftest.$ac_ext <<EOF
19051 #line 19052 "configure"
19052 #include "confdefs.h"
19053 /* System header to define __stub macros and hopefully few prototypes,
19054     which can conflict with char openlog(); below.  */
19055 #include <assert.h>
19056 /* Override any gcc2 internal prototype to avoid an error.  */
19057 /* We use char because int might match the return type of a gcc2
19058     builtin and then its argument prototype would still apply.  */
19059 char openlog();
19060 char (*f)();
19061
19062 int main() {
19063
19064 /* The GNU C library defines this for functions which it implements
19065     to always fail with ENOSYS.  Some functions are actually named
19066     something starting with __ and the normal name is an alias.  */
19067 #if defined (__stub_openlog) || defined (__stub___openlog)
19068 choke me
19069 #else
19070 f = openlog;
19071 #endif
19072
19073 ; return 0; }
19074 EOF
19075 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19076   rm -rf conftest*
19077   eval "ac_cv_func_openlog=yes"
19078 else
19079   echo "configure: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   rm -rf conftest*
19082   eval "ac_cv_func_openlog=no"
19083 fi
19084 rm -f conftest*
19085 fi
19086
19087 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19088   echo "$ac_t""yes" 1>&6
19089   :
19090 else
19091   echo "$ac_t""no" 1>&6
19092 fi
19093
19094         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19095                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19096         fi
19097         ol_enable_syslog=$ac_cv_func_openlog
19098 fi
19099
19100
19101 ol_link_sql=no
19102 if test $ol_enable_sql != no ; then
19103         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19104 echo "configure:19105: checking for SQLDriverConnect in -liodbc" >&5
19105 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19107   echo $ac_n "(cached) $ac_c" 1>&6
19108 else
19109   ac_save_LIBS="$LIBS"
19110 LIBS="-liodbc  $LIBS"
19111 cat > conftest.$ac_ext <<EOF
19112 #line 19113 "configure"
19113 #include "confdefs.h"
19114 /* Override any gcc2 internal prototype to avoid an error.  */
19115 /* We use char because int might match the return type of a gcc2
19116     builtin and then its argument prototype would still apply.  */
19117 char SQLDriverConnect();
19118
19119 int main() {
19120 SQLDriverConnect()
19121 ; return 0; }
19122 EOF
19123 if { (eval echo configure:19124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19124   rm -rf conftest*
19125   eval "ac_cv_lib_$ac_lib_var=yes"
19126 else
19127   echo "configure: failed program was:" >&5
19128   cat conftest.$ac_ext >&5
19129   rm -rf conftest*
19130   eval "ac_cv_lib_$ac_lib_var=no"
19131 fi
19132 rm -f conftest*
19133 LIBS="$ac_save_LIBS"
19134
19135 fi
19136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19137   echo "$ac_t""yes" 1>&6
19138   have_iodbc=yes
19139 else
19140   echo "$ac_t""no" 1>&6
19141 have_iodbc=no
19142 fi
19143
19144         if test $have_iodbc = yes ; then
19145                 ol_link_sql="-liodbc"
19146         else
19147                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19148 echo "configure:19149: checking for SQLDriverConnect in -lodbc" >&5
19149 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19151   echo $ac_n "(cached) $ac_c" 1>&6
19152 else
19153   ac_save_LIBS="$LIBS"
19154 LIBS="-lodbc  $LIBS"
19155 cat > conftest.$ac_ext <<EOF
19156 #line 19157 "configure"
19157 #include "confdefs.h"
19158 /* Override any gcc2 internal prototype to avoid an error.  */
19159 /* We use char because int might match the return type of a gcc2
19160     builtin and then its argument prototype would still apply.  */
19161 char SQLDriverConnect();
19162
19163 int main() {
19164 SQLDriverConnect()
19165 ; return 0; }
19166 EOF
19167 if { (eval echo configure:19168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19168   rm -rf conftest*
19169   eval "ac_cv_lib_$ac_lib_var=yes"
19170 else
19171   echo "configure: failed program was:" >&5
19172   cat conftest.$ac_ext >&5
19173   rm -rf conftest*
19174   eval "ac_cv_lib_$ac_lib_var=no"
19175 fi
19176 rm -f conftest*
19177 LIBS="$ac_save_LIBS"
19178
19179 fi
19180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19181   echo "$ac_t""yes" 1>&6
19182   have_odbc=yes
19183 else
19184   echo "$ac_t""no" 1>&6
19185 have_odbc=no
19186 fi
19187
19188                 if test $have_odbc = yes ; then
19189                         ol_link_sql="-lodbc"
19190                 fi
19191         fi
19192
19193         if test $ol_link_sql != no ; then
19194                 SLAPD_SQL_LIBS="$ol_link_sql"
19195
19196         elif test $ol_enable_sql != auto ; then
19197                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19198         fi
19199 fi
19200
19201 if test $ol_enable_tcl != no ; then
19202         for ac_hdr in tcl.h
19203 do
19204 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19205 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19206 echo "configure:19207: checking for $ac_hdr" >&5
19207 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19208   echo $ac_n "(cached) $ac_c" 1>&6
19209 else
19210   cat > conftest.$ac_ext <<EOF
19211 #line 19212 "configure"
19212 #include "confdefs.h"
19213 #include <$ac_hdr>
19214 EOF
19215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19216 { (eval echo configure:19217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19218 if test -z "$ac_err"; then
19219   rm -rf conftest*
19220   eval "ac_cv_header_$ac_safe=yes"
19221 else
19222   echo "$ac_err" >&5
19223   echo "configure: failed program was:" >&5
19224   cat conftest.$ac_ext >&5
19225   rm -rf conftest*
19226   eval "ac_cv_header_$ac_safe=no"
19227 fi
19228 rm -f conftest*
19229 fi
19230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19231   echo "$ac_t""yes" 1>&6
19232     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19233   cat >> confdefs.h <<EOF
19234 #define $ac_tr_hdr 1
19235 EOF
19236  
19237 else
19238   echo "$ac_t""no" 1>&6
19239 fi
19240 done
19241
19242
19243         if test $ac_cv_header_tcl_h != yes ; then
19244                 have_tcl=no
19245         else
19246                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19247                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19248 echo "configure:19249: checking for main in -l$lib" >&5
19249 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19251   echo $ac_n "(cached) $ac_c" 1>&6
19252 else
19253   ac_save_LIBS="$LIBS"
19254 LIBS="-l$lib  $LIBS"
19255 cat > conftest.$ac_ext <<EOF
19256 #line 19257 "configure"
19257 #include "confdefs.h"
19258
19259 int main() {
19260 main()
19261 ; return 0; }
19262 EOF
19263 if { (eval echo configure:19264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19264   rm -rf conftest*
19265   eval "ac_cv_lib_$ac_lib_var=yes"
19266 else
19267   echo "configure: failed program was:" >&5
19268   cat conftest.$ac_ext >&5
19269   rm -rf conftest*
19270   eval "ac_cv_lib_$ac_lib_var=no"
19271 fi
19272 rm -f conftest*
19273 LIBS="$ac_save_LIBS"
19274
19275 fi
19276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19277   echo "$ac_t""yes" 1>&6
19278   have_tcl=yes
19279                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19280                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19281                            else
19282                                         MOD_TCL_LIB="-l${lib}"
19283                            fi;break
19284 else
19285   echo "$ac_t""no" 1>&6
19286 have_tcl=no
19287 fi
19288
19289                 done
19290         fi
19291
19292         if test $have_tcl != yes ; then
19293                 echo "configure: warning: could not find -ltcl" 1>&2
19294                 if test $ol_enable_tcl = yes ; then
19295                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19296                 fi
19297
19298                 ol_enable_tcl=no
19299         fi
19300 fi
19301
19302 ol_link_termcap=no
19303 for ac_hdr in termcap.h ncurses.h
19304 do
19305 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19306 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19307 echo "configure:19308: checking for $ac_hdr" >&5
19308 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19309   echo $ac_n "(cached) $ac_c" 1>&6
19310 else
19311   cat > conftest.$ac_ext <<EOF
19312 #line 19313 "configure"
19313 #include "confdefs.h"
19314 #include <$ac_hdr>
19315 EOF
19316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19317 { (eval echo configure:19318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19319 if test -z "$ac_err"; then
19320   rm -rf conftest*
19321   eval "ac_cv_header_$ac_safe=yes"
19322 else
19323   echo "$ac_err" >&5
19324   echo "configure: failed program was:" >&5
19325   cat conftest.$ac_ext >&5
19326   rm -rf conftest*
19327   eval "ac_cv_header_$ac_safe=no"
19328 fi
19329 rm -f conftest*
19330 fi
19331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19332   echo "$ac_t""yes" 1>&6
19333     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19334   cat >> confdefs.h <<EOF
19335 #define $ac_tr_hdr 1
19336 EOF
19337  
19338 else
19339   echo "$ac_t""no" 1>&6
19340 fi
19341 done
19342
19343
19344 if test $ol_link_termcap = no ; then
19345         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19346 echo "configure:19347: checking for tputs in -ltermcap" >&5
19347 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19348 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19349   echo $ac_n "(cached) $ac_c" 1>&6
19350 else
19351   ac_save_LIBS="$LIBS"
19352 LIBS="-ltermcap  $LIBS"
19353 cat > conftest.$ac_ext <<EOF
19354 #line 19355 "configure"
19355 #include "confdefs.h"
19356 /* Override any gcc2 internal prototype to avoid an error.  */
19357 /* We use char because int might match the return type of a gcc2
19358     builtin and then its argument prototype would still apply.  */
19359 char tputs();
19360
19361 int main() {
19362 tputs()
19363 ; return 0; }
19364 EOF
19365 if { (eval echo configure:19366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19366   rm -rf conftest*
19367   eval "ac_cv_lib_$ac_lib_var=yes"
19368 else
19369   echo "configure: failed program was:" >&5
19370   cat conftest.$ac_ext >&5
19371   rm -rf conftest*
19372   eval "ac_cv_lib_$ac_lib_var=no"
19373 fi
19374 rm -f conftest*
19375 LIBS="$ac_save_LIBS"
19376
19377 fi
19378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19379   echo "$ac_t""yes" 1>&6
19380   have_termcap=yes
19381 else
19382   echo "$ac_t""no" 1>&6
19383 have_termcap=no
19384 fi
19385
19386         if test $have_termcap = yes ; then
19387                 cat >> confdefs.h <<\EOF
19388 #define HAVE_TERMCAP 1
19389 EOF
19390
19391                 ol_link_termcap=yes
19392                 TERMCAP_LIBS=-ltermcap
19393         fi
19394 fi
19395
19396 if test $ol_link_termcap = no ; then
19397         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19398 echo "configure:19399: checking for initscr in -lncurses" >&5
19399 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19401   echo $ac_n "(cached) $ac_c" 1>&6
19402 else
19403   ac_save_LIBS="$LIBS"
19404 LIBS="-lncurses  $LIBS"
19405 cat > conftest.$ac_ext <<EOF
19406 #line 19407 "configure"
19407 #include "confdefs.h"
19408 /* Override any gcc2 internal prototype to avoid an error.  */
19409 /* We use char because int might match the return type of a gcc2
19410     builtin and then its argument prototype would still apply.  */
19411 char initscr();
19412
19413 int main() {
19414 initscr()
19415 ; return 0; }
19416 EOF
19417 if { (eval echo configure:19418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19418   rm -rf conftest*
19419   eval "ac_cv_lib_$ac_lib_var=yes"
19420 else
19421   echo "configure: failed program was:" >&5
19422   cat conftest.$ac_ext >&5
19423   rm -rf conftest*
19424   eval "ac_cv_lib_$ac_lib_var=no"
19425 fi
19426 rm -f conftest*
19427 LIBS="$ac_save_LIBS"
19428
19429 fi
19430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19431   echo "$ac_t""yes" 1>&6
19432   have_ncurses=yes
19433 else
19434   echo "$ac_t""no" 1>&6
19435 have_ncurses=no
19436 fi
19437
19438         if test $have_ncurses = yes ; then
19439                 cat >> confdefs.h <<\EOF
19440 #define HAVE_NCURSES 1
19441 EOF
19442
19443                 ol_link_termcap=yes
19444                 TERMCAP_LIBS=-lncurses
19445         fi
19446 fi
19447
19448 if test $ol_link_termcap = no ; then
19449         cat >> confdefs.h <<\EOF
19450 #define NO_TERMCAP 1
19451 EOF
19452
19453         TERMCAP_LIBS=
19454 fi
19455
19456 ol_link_sasl=no
19457 ol_link_spasswd=no
19458 if test $ol_with_cyrus_sasl != no ; then
19459         for ac_hdr in sasl/sasl.h sasl.h
19460 do
19461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19463 echo "configure:19464: checking for $ac_hdr" >&5
19464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19465   echo $ac_n "(cached) $ac_c" 1>&6
19466 else
19467   cat > conftest.$ac_ext <<EOF
19468 #line 19469 "configure"
19469 #include "confdefs.h"
19470 #include <$ac_hdr>
19471 EOF
19472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19473 { (eval echo configure:19474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19475 if test -z "$ac_err"; then
19476   rm -rf conftest*
19477   eval "ac_cv_header_$ac_safe=yes"
19478 else
19479   echo "$ac_err" >&5
19480   echo "configure: failed program was:" >&5
19481   cat conftest.$ac_ext >&5
19482   rm -rf conftest*
19483   eval "ac_cv_header_$ac_safe=no"
19484 fi
19485 rm -f conftest*
19486 fi
19487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19488   echo "$ac_t""yes" 1>&6
19489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19490   cat >> confdefs.h <<EOF
19491 #define $ac_tr_hdr 1
19492 EOF
19493  
19494 else
19495   echo "$ac_t""no" 1>&6
19496 fi
19497 done
19498
19499
19500         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19501                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19502 echo "configure:19503: checking for sasl_client_init in -lsasl2" >&5
19503 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19505   echo $ac_n "(cached) $ac_c" 1>&6
19506 else
19507   ac_save_LIBS="$LIBS"
19508 LIBS="-lsasl2  $LIBS"
19509 cat > conftest.$ac_ext <<EOF
19510 #line 19511 "configure"
19511 #include "confdefs.h"
19512 /* Override any gcc2 internal prototype to avoid an error.  */
19513 /* We use char because int might match the return type of a gcc2
19514     builtin and then its argument prototype would still apply.  */
19515 char sasl_client_init();
19516
19517 int main() {
19518 sasl_client_init()
19519 ; return 0; }
19520 EOF
19521 if { (eval echo configure:19522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19522   rm -rf conftest*
19523   eval "ac_cv_lib_$ac_lib_var=yes"
19524 else
19525   echo "configure: failed program was:" >&5
19526   cat conftest.$ac_ext >&5
19527   rm -rf conftest*
19528   eval "ac_cv_lib_$ac_lib_var=no"
19529 fi
19530 rm -f conftest*
19531 LIBS="$ac_save_LIBS"
19532
19533 fi
19534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19535   echo "$ac_t""yes" 1>&6
19536   ol_link_sasl="-lsasl2"
19537 else
19538   echo "$ac_t""no" 1>&6
19539 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19540 echo "configure:19541: checking for sasl_client_init in -lsasl" >&5
19541 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19543   echo $ac_n "(cached) $ac_c" 1>&6
19544 else
19545   ac_save_LIBS="$LIBS"
19546 LIBS="-lsasl  $LIBS"
19547 cat > conftest.$ac_ext <<EOF
19548 #line 19549 "configure"
19549 #include "confdefs.h"
19550 /* Override any gcc2 internal prototype to avoid an error.  */
19551 /* We use char because int might match the return type of a gcc2
19552     builtin and then its argument prototype would still apply.  */
19553 char sasl_client_init();
19554
19555 int main() {
19556 sasl_client_init()
19557 ; return 0; }
19558 EOF
19559 if { (eval echo configure:19560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19560   rm -rf conftest*
19561   eval "ac_cv_lib_$ac_lib_var=yes"
19562 else
19563   echo "configure: failed program was:" >&5
19564   cat conftest.$ac_ext >&5
19565   rm -rf conftest*
19566   eval "ac_cv_lib_$ac_lib_var=no"
19567 fi
19568 rm -f conftest*
19569 LIBS="$ac_save_LIBS"
19570
19571 fi
19572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19573   echo "$ac_t""yes" 1>&6
19574   ol_link_sasl="-lsasl"
19575 else
19576   echo "$ac_t""no" 1>&6
19577 fi
19578
19579 fi
19580
19581         fi
19582
19583         if test $ol_link_sasl = no ; then
19584                 if test $ol_with_cyrus_sasl != auto ; then
19585                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19586                 else
19587                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19588                         echo "configure: warning: SASL authentication not supported!" 1>&2
19589                         if test $ol_link_tls = no ; then
19590                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19591                         fi
19592                 fi
19593         else
19594                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19595 echo "configure:19596: checking Cyrus SASL library version" >&5
19596 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19597   echo $ac_n "(cached) $ac_c" 1>&6
19598 else
19599   
19600         cat > conftest.$ac_ext <<EOF
19601 #line 19602 "configure"
19602 #include "confdefs.h"
19603
19604 #ifdef HAVE_SASL_SASL_H
19605 #include <sasl/sasl.h>
19606 #else
19607 #include <sasl.h>
19608 #endif
19609
19610 /* require 2.1.3 or later */
19611 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19612         char *__sasl_compat = "1.5.x okay";
19613 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19614         __sasl_compat "2.2+ or better okay (we guess)";
19615 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19616         && SASL_VERSION_STEP >=3
19617         __sasl_compat = "2.1.3+ or better okay";
19618 #endif
19619         
19620 EOF
19621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19622   egrep "__sasl_compat" >/dev/null 2>&1; then
19623   rm -rf conftest*
19624   ol_cv_sasl_compat=yes
19625 else
19626   rm -rf conftest*
19627   ol_cv_sasl_compat=no
19628 fi
19629 rm -f conftest*
19630
19631 fi
19632
19633 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19634
19635                 if test $ol_cv_sasl_compat = no ; then
19636                         ol_link_sasl=no
19637                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19638                 fi
19639
19640                 cat >> confdefs.h <<\EOF
19641 #define HAVE_CYRUS_SASL 1
19642 EOF
19643
19644                 SASL_LIBS="$ol_link_sasl"
19645                 if test $ol_enable_spasswd != no ; then
19646                         ol_link_spasswd=yes
19647                 fi
19648         fi
19649
19650 else
19651         echo "configure: warning: SASL authentication not supported!" 1>&2
19652         if test $ol_link_tls = no ; then
19653                 echo "configure: warning: Strong authentication not supported!" 1>&2
19654         fi
19655 fi
19656
19657 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19658         dev=no
19659         if test -r /dev/urandom ; then
19660                 dev="/dev/urandom";
19661         elif test -r /idev/urandom ; then
19662                 dev="/idev/urandom";
19663         elif test -r /dev/srandom ; then
19664                 dev="/dev/srandom";
19665         elif test -r /dev/random ; then
19666                 dev="/dev/random";
19667         elif test -r /idev/random ; then
19668                 dev="/idev/random";
19669         fi
19670
19671         if test $dev != no ; then
19672                 cat >> confdefs.h <<EOF
19673 #define URANDOM_DEVICE "$dev"
19674 EOF
19675
19676         fi
19677 fi
19678
19679 ol_link_fetch=no
19680 if test $ol_with_fetch != no ; then
19681         ol_LIBS=$LIBS
19682 LIBS="-lfetch -lcom_err $LIBS"
19683 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19684 echo "configure:19685: checking fetch(3) library" >&5
19685 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19686   echo $ac_n "(cached) $ac_c" 1>&6
19687 else
19688   
19689         cat > conftest.$ac_ext <<EOF
19690 #line 19691 "configure"
19691 #include "confdefs.h"
19692
19693 #include <sys/param.h>
19694 #include <stdio.h>
19695 #include <fetch.h>
19696 int main() {
19697 struct url *u = fetchParseURL("file:///"); 
19698 ; return 0; }
19699 EOF
19700 if { (eval echo configure:19701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19701   rm -rf conftest*
19702   ol_cv_lib_fetch=yes
19703 else
19704   echo "configure: failed program was:" >&5
19705   cat conftest.$ac_ext >&5
19706   rm -rf conftest*
19707   ol_cv_lib_fetch=no
19708 fi
19709 rm -f conftest*
19710 fi
19711
19712 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19713 LIBS=$ol_LIBS
19714 if test $ol_cv_lib_fetch != no ; then
19715         ol_link_fetch="-lfetch -lcom_err"
19716         cat >> confdefs.h <<\EOF
19717 #define HAVE_FETCH 1
19718 EOF
19719
19720 fi
19721
19722
19723         if test $ol_cv_lib_fetch != no ; then
19724                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19725                 ol_link_fetch=freebsd
19726
19727         elif test $ol_with_fetch != auto ; then
19728                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19729         fi 
19730 fi
19731
19732 ol_link_readline=no
19733 if test $ol_with_readline != no ; then
19734         for ac_hdr in readline/readline.h readline/history.h
19735 do
19736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19738 echo "configure:19739: checking for $ac_hdr" >&5
19739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19740   echo $ac_n "(cached) $ac_c" 1>&6
19741 else
19742   cat > conftest.$ac_ext <<EOF
19743 #line 19744 "configure"
19744 #include "confdefs.h"
19745 #include <$ac_hdr>
19746 EOF
19747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19748 { (eval echo configure:19749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19750 if test -z "$ac_err"; then
19751   rm -rf conftest*
19752   eval "ac_cv_header_$ac_safe=yes"
19753 else
19754   echo "$ac_err" >&5
19755   echo "configure: failed program was:" >&5
19756   cat conftest.$ac_ext >&5
19757   rm -rf conftest*
19758   eval "ac_cv_header_$ac_safe=no"
19759 fi
19760 rm -f conftest*
19761 fi
19762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19763   echo "$ac_t""yes" 1>&6
19764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19765   cat >> confdefs.h <<EOF
19766 #define $ac_tr_hdr 1
19767 EOF
19768  
19769 else
19770   echo "$ac_t""no" 1>&6
19771 fi
19772 done
19773
19774
19775         if test $ac_cv_header_readline_readline_h = yes ; then
19776                 save_LIBS="$LIBS"
19777                 LIBS="$TERMCAP_LIBS $LIBS"
19778                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19779 echo "configure:19780: checking for readline in -lreadline" >&5
19780 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19782   echo $ac_n "(cached) $ac_c" 1>&6
19783 else
19784   ac_save_LIBS="$LIBS"
19785 LIBS="-lreadline  $LIBS"
19786 cat > conftest.$ac_ext <<EOF
19787 #line 19788 "configure"
19788 #include "confdefs.h"
19789 /* Override any gcc2 internal prototype to avoid an error.  */
19790 /* We use char because int might match the return type of a gcc2
19791     builtin and then its argument prototype would still apply.  */
19792 char readline();
19793
19794 int main() {
19795 readline()
19796 ; return 0; }
19797 EOF
19798 if { (eval echo configure:19799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19799   rm -rf conftest*
19800   eval "ac_cv_lib_$ac_lib_var=yes"
19801 else
19802   echo "configure: failed program was:" >&5
19803   cat conftest.$ac_ext >&5
19804   rm -rf conftest*
19805   eval "ac_cv_lib_$ac_lib_var=no"
19806 fi
19807 rm -f conftest*
19808 LIBS="$ac_save_LIBS"
19809
19810 fi
19811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19812   echo "$ac_t""yes" 1>&6
19813   have_readline=yes
19814 else
19815   echo "$ac_t""no" 1>&6
19816 have_readline=no
19817 fi
19818
19819                 LIBS="$save_LIBS"
19820                         
19821                 if test $have_readline = yes ; then
19822                         ol_with_readline=found
19823                         ol_link_readline=yes
19824
19825                         READLINE_LIBS="-lreadline"
19826                 fi
19827         fi
19828 fi
19829
19830 if test $ol_link_readline = yes ; then
19831         cat >> confdefs.h <<\EOF
19832 #define HAVE_READLINE 1
19833 EOF
19834
19835 fi
19836
19837
19838 if test $ol_enable_crypt != no ; then
19839         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19840 echo "configure:19841: checking for crypt" >&5
19841 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19842   echo $ac_n "(cached) $ac_c" 1>&6
19843 else
19844   cat > conftest.$ac_ext <<EOF
19845 #line 19846 "configure"
19846 #include "confdefs.h"
19847 /* System header to define __stub macros and hopefully few prototypes,
19848     which can conflict with char crypt(); below.  */
19849 #include <assert.h>
19850 /* Override any gcc2 internal prototype to avoid an error.  */
19851 /* We use char because int might match the return type of a gcc2
19852     builtin and then its argument prototype would still apply.  */
19853 char crypt();
19854 char (*f)();
19855
19856 int main() {
19857
19858 /* The GNU C library defines this for functions which it implements
19859     to always fail with ENOSYS.  Some functions are actually named
19860     something starting with __ and the normal name is an alias.  */
19861 #if defined (__stub_crypt) || defined (__stub___crypt)
19862 choke me
19863 #else
19864 f = crypt;
19865 #endif
19866
19867 ; return 0; }
19868 EOF
19869 if { (eval echo configure:19870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19870   rm -rf conftest*
19871   eval "ac_cv_func_crypt=yes"
19872 else
19873   echo "configure: failed program was:" >&5
19874   cat conftest.$ac_ext >&5
19875   rm -rf conftest*
19876   eval "ac_cv_func_crypt=no"
19877 fi
19878 rm -f conftest*
19879 fi
19880
19881 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19882   echo "$ac_t""yes" 1>&6
19883   have_crypt=yes
19884 else
19885   echo "$ac_t""no" 1>&6
19886
19887                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19888 echo "configure:19889: checking for crypt in -lcrypt" >&5
19889 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19891   echo $ac_n "(cached) $ac_c" 1>&6
19892 else
19893   ac_save_LIBS="$LIBS"
19894 LIBS="-lcrypt  $LIBS"
19895 cat > conftest.$ac_ext <<EOF
19896 #line 19897 "configure"
19897 #include "confdefs.h"
19898 /* Override any gcc2 internal prototype to avoid an error.  */
19899 /* We use char because int might match the return type of a gcc2
19900     builtin and then its argument prototype would still apply.  */
19901 char crypt();
19902
19903 int main() {
19904 crypt()
19905 ; return 0; }
19906 EOF
19907 if { (eval echo configure:19908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19908   rm -rf conftest*
19909   eval "ac_cv_lib_$ac_lib_var=yes"
19910 else
19911   echo "configure: failed program was:" >&5
19912   cat conftest.$ac_ext >&5
19913   rm -rf conftest*
19914   eval "ac_cv_lib_$ac_lib_var=no"
19915 fi
19916 rm -f conftest*
19917 LIBS="$ac_save_LIBS"
19918
19919 fi
19920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19921   echo "$ac_t""yes" 1>&6
19922   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19923                         have_crypt=yes
19924 else
19925   echo "$ac_t""no" 1>&6
19926 have_crypt=no
19927 fi
19928
19929 fi
19930
19931
19932         if test $have_crypt = yes ; then
19933                 cat >> confdefs.h <<\EOF
19934 #define HAVE_CRYPT 1
19935 EOF
19936
19937         else
19938                 echo "configure: warning: could not find crypt" 1>&2
19939                 if test $ol_enable_crypt = yes ; then
19940                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19941                 fi
19942
19943                 echo "configure: warning: disabling crypt support" 1>&2
19944                 ol_enable_crypt=no
19945         fi
19946 fi
19947
19948 if test $ol_enable_proctitle != no ; then
19949         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19950 echo "configure:19951: checking for setproctitle" >&5
19951 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19952   echo $ac_n "(cached) $ac_c" 1>&6
19953 else
19954   cat > conftest.$ac_ext <<EOF
19955 #line 19956 "configure"
19956 #include "confdefs.h"
19957 /* System header to define __stub macros and hopefully few prototypes,
19958     which can conflict with char setproctitle(); below.  */
19959 #include <assert.h>
19960 /* Override any gcc2 internal prototype to avoid an error.  */
19961 /* We use char because int might match the return type of a gcc2
19962     builtin and then its argument prototype would still apply.  */
19963 char setproctitle();
19964 char (*f)();
19965
19966 int main() {
19967
19968 /* The GNU C library defines this for functions which it implements
19969     to always fail with ENOSYS.  Some functions are actually named
19970     something starting with __ and the normal name is an alias.  */
19971 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19972 choke me
19973 #else
19974 f = setproctitle;
19975 #endif
19976
19977 ; return 0; }
19978 EOF
19979 if { (eval echo configure:19980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19980   rm -rf conftest*
19981   eval "ac_cv_func_setproctitle=yes"
19982 else
19983   echo "configure: failed program was:" >&5
19984   cat conftest.$ac_ext >&5
19985   rm -rf conftest*
19986   eval "ac_cv_func_setproctitle=no"
19987 fi
19988 rm -f conftest*
19989 fi
19990
19991 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19992   echo "$ac_t""yes" 1>&6
19993   have_setproctitle=yes
19994 else
19995   echo "$ac_t""no" 1>&6
19996
19997                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19998 echo "configure:19999: checking for setproctitle in -lutil" >&5
19999 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20001   echo $ac_n "(cached) $ac_c" 1>&6
20002 else
20003   ac_save_LIBS="$LIBS"
20004 LIBS="-lutil  $LIBS"
20005 cat > conftest.$ac_ext <<EOF
20006 #line 20007 "configure"
20007 #include "confdefs.h"
20008 /* Override any gcc2 internal prototype to avoid an error.  */
20009 /* We use char because int might match the return type of a gcc2
20010     builtin and then its argument prototype would still apply.  */
20011 char setproctitle();
20012
20013 int main() {
20014 setproctitle()
20015 ; return 0; }
20016 EOF
20017 if { (eval echo configure:20018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20018   rm -rf conftest*
20019   eval "ac_cv_lib_$ac_lib_var=yes"
20020 else
20021   echo "configure: failed program was:" >&5
20022   cat conftest.$ac_ext >&5
20023   rm -rf conftest*
20024   eval "ac_cv_lib_$ac_lib_var=no"
20025 fi
20026 rm -f conftest*
20027 LIBS="$ac_save_LIBS"
20028
20029 fi
20030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20031   echo "$ac_t""yes" 1>&6
20032   have_setproctitle=yes
20033                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20034 else
20035   echo "$ac_t""no" 1>&6
20036 have_setproctitle=no
20037                         LIBOBJS="$LIBOBJS setproctitle.o"
20038                         LIBSRCS="$LIBSRCS setproctitle.c"
20039 fi
20040
20041 fi
20042
20043
20044         if test $have_setproctitle = yes ; then
20045                 cat >> confdefs.h <<\EOF
20046 #define HAVE_SETPROCTITLE 1
20047 EOF
20048
20049         fi
20050 fi
20051
20052 if test $ol_enable_slp != no ; then
20053         for ac_hdr in slp.h 
20054 do
20055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20057 echo "configure:20058: checking for $ac_hdr" >&5
20058 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20059   echo $ac_n "(cached) $ac_c" 1>&6
20060 else
20061   cat > conftest.$ac_ext <<EOF
20062 #line 20063 "configure"
20063 #include "confdefs.h"
20064 #include <$ac_hdr>
20065 EOF
20066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20067 { (eval echo configure:20068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20069 if test -z "$ac_err"; then
20070   rm -rf conftest*
20071   eval "ac_cv_header_$ac_safe=yes"
20072 else
20073   echo "$ac_err" >&5
20074   echo "configure: failed program was:" >&5
20075   cat conftest.$ac_ext >&5
20076   rm -rf conftest*
20077   eval "ac_cv_header_$ac_safe=no"
20078 fi
20079 rm -f conftest*
20080 fi
20081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20082   echo "$ac_t""yes" 1>&6
20083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20084   cat >> confdefs.h <<EOF
20085 #define $ac_tr_hdr 1
20086 EOF
20087  
20088 else
20089   echo "$ac_t""no" 1>&6
20090 fi
20091 done
20092
20093
20094         if test $ac_cv_header_slp_h = yes ; then
20095                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20096 echo "configure:20097: checking for SLPOpen in -lslp" >&5
20097 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20098 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20099   echo $ac_n "(cached) $ac_c" 1>&6
20100 else
20101   ac_save_LIBS="$LIBS"
20102 LIBS="-lslp  $LIBS"
20103 cat > conftest.$ac_ext <<EOF
20104 #line 20105 "configure"
20105 #include "confdefs.h"
20106 /* Override any gcc2 internal prototype to avoid an error.  */
20107 /* We use char because int might match the return type of a gcc2
20108     builtin and then its argument prototype would still apply.  */
20109 char SLPOpen();
20110
20111 int main() {
20112 SLPOpen()
20113 ; return 0; }
20114 EOF
20115 if { (eval echo configure:20116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20116   rm -rf conftest*
20117   eval "ac_cv_lib_$ac_lib_var=yes"
20118 else
20119   echo "configure: failed program was:" >&5
20120   cat conftest.$ac_ext >&5
20121   rm -rf conftest*
20122   eval "ac_cv_lib_$ac_lib_var=no"
20123 fi
20124 rm -f conftest*
20125 LIBS="$ac_save_LIBS"
20126
20127 fi
20128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20129   echo "$ac_t""yes" 1>&6
20130   have_slp=yes
20131 else
20132   echo "$ac_t""no" 1>&6
20133 have_slp=no
20134 fi
20135
20136                 if test $have_slp = yes ; then
20137                         cat >> confdefs.h <<\EOF
20138 #define HAVE_SLP 1
20139 EOF
20140
20141                         SLAPD_SLP_LIBS=-lslp
20142                 fi
20143
20144         elif test $ol_enable_slp = yes ; then
20145                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20146         fi
20147 fi
20148
20149 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20150 echo "configure:20151: checking for ANSI C header files" >&5
20151 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20152   echo $ac_n "(cached) $ac_c" 1>&6
20153 else
20154   cat > conftest.$ac_ext <<EOF
20155 #line 20156 "configure"
20156 #include "confdefs.h"
20157 #include <stdlib.h>
20158 #include <stdarg.h>
20159 #include <string.h>
20160 #include <float.h>
20161 EOF
20162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20163 { (eval echo configure:20164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20165 if test -z "$ac_err"; then
20166   rm -rf conftest*
20167   ac_cv_header_stdc=yes
20168 else
20169   echo "$ac_err" >&5
20170   echo "configure: failed program was:" >&5
20171   cat conftest.$ac_ext >&5
20172   rm -rf conftest*
20173   ac_cv_header_stdc=no
20174 fi
20175 rm -f conftest*
20176
20177 if test $ac_cv_header_stdc = yes; then
20178   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20179 cat > conftest.$ac_ext <<EOF
20180 #line 20181 "configure"
20181 #include "confdefs.h"
20182 #include <string.h>
20183 EOF
20184 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20185   egrep "memchr" >/dev/null 2>&1; then
20186   :
20187 else
20188   rm -rf conftest*
20189   ac_cv_header_stdc=no
20190 fi
20191 rm -f conftest*
20192
20193 fi
20194
20195 if test $ac_cv_header_stdc = yes; then
20196   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20197 cat > conftest.$ac_ext <<EOF
20198 #line 20199 "configure"
20199 #include "confdefs.h"
20200 #include <stdlib.h>
20201 EOF
20202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20203   egrep "free" >/dev/null 2>&1; then
20204   :
20205 else
20206   rm -rf conftest*
20207   ac_cv_header_stdc=no
20208 fi
20209 rm -f conftest*
20210
20211 fi
20212
20213 if test $ac_cv_header_stdc = yes; then
20214   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20215 if test "$cross_compiling" = yes; then
20216   :
20217 else
20218   cat > conftest.$ac_ext <<EOF
20219 #line 20220 "configure"
20220 #include "confdefs.h"
20221 #include <ctype.h>
20222 #if ((' ' & 0x0FF) == 0x020)
20223 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20224 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20225 #else
20226 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20227  || ('j' <= (c) && (c) <= 'r') \
20228  || ('s' <= (c) && (c) <= 'z'))
20229 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20230 #endif
20231 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20232 int main () { int i; for (i = 0; i < 256; i++)
20233 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20234 exit (0); }
20235
20236 EOF
20237 if { (eval echo configure:20238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20238 then
20239   :
20240 else
20241   echo "configure: failed program was:" >&5
20242   cat conftest.$ac_ext >&5
20243   rm -fr conftest*
20244   ac_cv_header_stdc=no
20245 fi
20246 rm -fr conftest*
20247 fi
20248
20249 fi
20250 fi
20251
20252 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20253 if test $ac_cv_header_stdc = yes; then
20254   cat >> confdefs.h <<\EOF
20255 #define STDC_HEADERS 1
20256 EOF
20257
20258 fi
20259
20260 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20261 echo "configure:20262: checking for mode_t" >&5
20262 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20263   echo $ac_n "(cached) $ac_c" 1>&6
20264 else
20265   cat > conftest.$ac_ext <<EOF
20266 #line 20267 "configure"
20267 #include "confdefs.h"
20268 #include <sys/types.h>
20269 #if STDC_HEADERS
20270 #include <stdlib.h>
20271 #include <stddef.h>
20272 #endif
20273
20274 EOF
20275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20276   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20277   rm -rf conftest*
20278   eval "ac_cv_type_mode_t=yes"
20279 else
20280   rm -rf conftest*
20281   eval "ac_cv_type_mode_t=no"
20282 fi
20283 rm -f conftest*
20284
20285 fi
20286 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20287   echo "$ac_t""yes" 1>&6
20288 else
20289   echo "$ac_t""no" 1>&6
20290   cat >> confdefs.h <<EOF
20291 #define mode_t int
20292 EOF
20293
20294 fi
20295
20296 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20297 echo "configure:20298: checking for off_t" >&5
20298 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20299   echo $ac_n "(cached) $ac_c" 1>&6
20300 else
20301   cat > conftest.$ac_ext <<EOF
20302 #line 20303 "configure"
20303 #include "confdefs.h"
20304 #include <sys/types.h>
20305 #if STDC_HEADERS
20306 #include <stdlib.h>
20307 #include <stddef.h>
20308 #endif
20309
20310 EOF
20311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20312   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20313   rm -rf conftest*
20314   eval "ac_cv_type_off_t=yes"
20315 else
20316   rm -rf conftest*
20317   eval "ac_cv_type_off_t=no"
20318 fi
20319 rm -f conftest*
20320
20321 fi
20322 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20323   echo "$ac_t""yes" 1>&6
20324 else
20325   echo "$ac_t""no" 1>&6
20326   cat >> confdefs.h <<EOF
20327 #define off_t long
20328 EOF
20329
20330 fi
20331
20332 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20333 echo "configure:20334: checking for pid_t" >&5
20334 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20335   echo $ac_n "(cached) $ac_c" 1>&6
20336 else
20337   cat > conftest.$ac_ext <<EOF
20338 #line 20339 "configure"
20339 #include "confdefs.h"
20340 #include <sys/types.h>
20341 #if STDC_HEADERS
20342 #include <stdlib.h>
20343 #include <stddef.h>
20344 #endif
20345
20346 EOF
20347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20348   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20349   rm -rf conftest*
20350   eval "ac_cv_type_pid_t=yes"
20351 else
20352   rm -rf conftest*
20353   eval "ac_cv_type_pid_t=no"
20354 fi
20355 rm -f conftest*
20356
20357 fi
20358 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20359   echo "$ac_t""yes" 1>&6
20360 else
20361   echo "$ac_t""no" 1>&6
20362   cat >> confdefs.h <<EOF
20363 #define pid_t int
20364 EOF
20365
20366 fi
20367
20368 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20369 echo "configure:20370: checking for ptrdiff_t" >&5
20370 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20371   echo $ac_n "(cached) $ac_c" 1>&6
20372 else
20373   cat > conftest.$ac_ext <<EOF
20374 #line 20375 "configure"
20375 #include "confdefs.h"
20376 #include <stddef.h>
20377 int main() {
20378 ptrdiff_t p
20379 ; return 0; }
20380 EOF
20381 if { (eval echo configure:20382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20382   rm -rf conftest*
20383   am_cv_type_ptrdiff_t=yes
20384 else
20385   echo "configure: failed program was:" >&5
20386   cat conftest.$ac_ext >&5
20387   rm -rf conftest*
20388   am_cv_type_ptrdiff_t=no
20389 fi
20390 rm -f conftest*
20391 fi
20392
20393 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20394    if test $am_cv_type_ptrdiff_t = yes; then
20395      cat >> confdefs.h <<\EOF
20396 #define HAVE_PTRDIFF_T 1
20397 EOF
20398
20399    fi
20400
20401 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20402 echo "configure:20403: checking return type of signal handlers" >&5
20403 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20404   echo $ac_n "(cached) $ac_c" 1>&6
20405 else
20406   cat > conftest.$ac_ext <<EOF
20407 #line 20408 "configure"
20408 #include "confdefs.h"
20409 #include <sys/types.h>
20410 #include <signal.h>
20411 #ifdef signal
20412 #undef signal
20413 #endif
20414 #ifdef __cplusplus
20415 extern "C" void (*signal (int, void (*)(int)))(int);
20416 #else
20417 void (*signal ()) ();
20418 #endif
20419
20420 int main() {
20421 int i;
20422 ; return 0; }
20423 EOF
20424 if { (eval echo configure:20425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20425   rm -rf conftest*
20426   ac_cv_type_signal=void
20427 else
20428   echo "configure: failed program was:" >&5
20429   cat conftest.$ac_ext >&5
20430   rm -rf conftest*
20431   ac_cv_type_signal=int
20432 fi
20433 rm -f conftest*
20434 fi
20435
20436 echo "$ac_t""$ac_cv_type_signal" 1>&6
20437 cat >> confdefs.h <<EOF
20438 #define RETSIGTYPE $ac_cv_type_signal
20439 EOF
20440
20441
20442 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20443 echo "configure:20444: checking for size_t" >&5
20444 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20445   echo $ac_n "(cached) $ac_c" 1>&6
20446 else
20447   cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450 #include <sys/types.h>
20451 #if STDC_HEADERS
20452 #include <stdlib.h>
20453 #include <stddef.h>
20454 #endif
20455
20456 EOF
20457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20458   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20459   rm -rf conftest*
20460   eval "ac_cv_type_size_t=yes"
20461 else
20462   rm -rf conftest*
20463   eval "ac_cv_type_size_t=no"
20464 fi
20465 rm -f conftest*
20466
20467 fi
20468 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20469   echo "$ac_t""yes" 1>&6
20470 else
20471   echo "$ac_t""no" 1>&6
20472   cat >> confdefs.h <<EOF
20473 #define size_t unsigned
20474 EOF
20475
20476 fi
20477
20478
20479 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20480 echo "configure:20481: checking for ssize_t" >&5
20481 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20482   echo $ac_n "(cached) $ac_c" 1>&6
20483 else
20484   cat > conftest.$ac_ext <<EOF
20485 #line 20486 "configure"
20486 #include "confdefs.h"
20487 #include <sys/types.h>
20488 #if STDC_HEADERS
20489 #include <stdlib.h>
20490 #include <stddef.h>
20491 #endif
20492
20493 EOF
20494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20495   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20496   rm -rf conftest*
20497   eval "ac_cv_type_ssize_t=yes"
20498 else
20499   rm -rf conftest*
20500   eval "ac_cv_type_ssize_t=no"
20501 fi
20502 rm -f conftest*
20503
20504 fi
20505 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20506   echo "$ac_t""yes" 1>&6
20507 else
20508   echo "$ac_t""no" 1>&6
20509   cat >> confdefs.h <<EOF
20510 #define ssize_t signed int
20511 EOF
20512
20513 fi
20514
20515 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20516 echo "configure:20517: checking for caddr_t" >&5
20517 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20518   echo $ac_n "(cached) $ac_c" 1>&6
20519 else
20520   cat > conftest.$ac_ext <<EOF
20521 #line 20522 "configure"
20522 #include "confdefs.h"
20523 #include <sys/types.h>
20524 #if STDC_HEADERS
20525 #include <stdlib.h>
20526 #include <stddef.h>
20527 #endif
20528
20529 EOF
20530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20531   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20532   rm -rf conftest*
20533   eval "ac_cv_type_caddr_t=yes"
20534 else
20535   rm -rf conftest*
20536   eval "ac_cv_type_caddr_t=no"
20537 fi
20538 rm -f conftest*
20539
20540 fi
20541 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20542   echo "$ac_t""yes" 1>&6
20543 else
20544   echo "$ac_t""no" 1>&6
20545   cat >> confdefs.h <<EOF
20546 #define caddr_t char *
20547 EOF
20548
20549 fi
20550
20551
20552 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20553 echo "configure:20554: checking for socklen_t" >&5
20554 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20555   echo $ac_n "(cached) $ac_c" 1>&6
20556 else
20557   cat > conftest.$ac_ext <<EOF
20558 #line 20559 "configure"
20559 #include "confdefs.h"
20560
20561 #ifdef HAVE_SYS_TYPES_H
20562 #include <sys/types.h>
20563 #endif
20564 #ifdef HAVE_SYS_SOCKET_H
20565 #include <sys/socket.h>
20566 #endif
20567
20568 int main() {
20569 socklen_t len;
20570 ; return 0; }
20571 EOF
20572 if { (eval echo configure:20573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20573   rm -rf conftest*
20574   ol_cv_type_socklen_t=yes
20575 else
20576   echo "configure: failed program was:" >&5
20577   cat conftest.$ac_ext >&5
20578   rm -rf conftest*
20579   ol_cv_type_socklen_t=no
20580 fi
20581 rm -f conftest*
20582 fi
20583
20584 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20585   if test $ol_cv_type_socklen_t = no; then
20586     cat >> confdefs.h <<\EOF
20587 #define socklen_t int
20588 EOF
20589
20590   fi
20591  
20592 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20593 echo "configure:20594: checking for member st_blksize in aggregate type struct stat" >&5
20594 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20595   echo $ac_n "(cached) $ac_c" 1>&6
20596 else
20597   cat > conftest.$ac_ext <<EOF
20598 #line 20599 "configure"
20599 #include "confdefs.h"
20600 #include <sys/types.h>
20601 #include <sys/stat.h>
20602 int main() {
20603 struct stat foo; foo.st_blksize;
20604 ; return 0; }
20605 EOF
20606 if { (eval echo configure:20607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20607   rm -rf conftest*
20608   ac_cv_c_struct_member_st_blksize=yes
20609 else
20610   echo "configure: failed program was:" >&5
20611   cat conftest.$ac_ext >&5
20612   rm -rf conftest*
20613   ac_cv_c_struct_member_st_blksize=no
20614 fi
20615 rm -f conftest*
20616 fi
20617
20618 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20619 st_blksize="$ac_cv_c_struct_member_st_blksize"
20620 if test $ac_cv_c_struct_member_st_blksize = yes; then
20621   cat >> confdefs.h <<\EOF
20622 #define HAVE_ST_BLKSIZE 1
20623 EOF
20624
20625 fi
20626
20627 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20628 echo "configure:20629: checking whether time.h and sys/time.h may both be included" >&5
20629 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   cat > conftest.$ac_ext <<EOF
20633 #line 20634 "configure"
20634 #include "confdefs.h"
20635 #include <sys/types.h>
20636 #include <sys/time.h>
20637 #include <time.h>
20638 int main() {
20639 struct tm *tp;
20640 ; return 0; }
20641 EOF
20642 if { (eval echo configure:20643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20643   rm -rf conftest*
20644   ac_cv_header_time=yes
20645 else
20646   echo "configure: failed program was:" >&5
20647   cat conftest.$ac_ext >&5
20648   rm -rf conftest*
20649   ac_cv_header_time=no
20650 fi
20651 rm -f conftest*
20652 fi
20653
20654 echo "$ac_t""$ac_cv_header_time" 1>&6
20655 if test $ac_cv_header_time = yes; then
20656   cat >> confdefs.h <<\EOF
20657 #define TIME_WITH_SYS_TIME 1
20658 EOF
20659
20660 fi
20661
20662 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20663 echo "configure:20664: checking whether struct tm is in sys/time.h or time.h" >&5
20664 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20665   echo $ac_n "(cached) $ac_c" 1>&6
20666 else
20667   cat > conftest.$ac_ext <<EOF
20668 #line 20669 "configure"
20669 #include "confdefs.h"
20670 #include <sys/types.h>
20671 #include <time.h>
20672 int main() {
20673 struct tm *tp; tp->tm_sec;
20674 ; return 0; }
20675 EOF
20676 if { (eval echo configure:20677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20677   rm -rf conftest*
20678   ac_cv_struct_tm=time.h
20679 else
20680   echo "configure: failed program was:" >&5
20681   cat conftest.$ac_ext >&5
20682   rm -rf conftest*
20683   ac_cv_struct_tm=sys/time.h
20684 fi
20685 rm -f conftest*
20686 fi
20687
20688 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20689 if test $ac_cv_struct_tm = sys/time.h; then
20690   cat >> confdefs.h <<\EOF
20691 #define TM_IN_SYS_TIME 1
20692 EOF
20693
20694 fi
20695
20696 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20697 echo "configure:20698: checking for uid_t in sys/types.h" >&5
20698 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20699   echo $ac_n "(cached) $ac_c" 1>&6
20700 else
20701   cat > conftest.$ac_ext <<EOF
20702 #line 20703 "configure"
20703 #include "confdefs.h"
20704 #include <sys/types.h>
20705 EOF
20706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20707   egrep "uid_t" >/dev/null 2>&1; then
20708   rm -rf conftest*
20709   ac_cv_type_uid_t=yes
20710 else
20711   rm -rf conftest*
20712   ac_cv_type_uid_t=no
20713 fi
20714 rm -f conftest*
20715
20716 fi
20717
20718 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20719 if test $ac_cv_type_uid_t = no; then
20720   cat >> confdefs.h <<\EOF
20721 #define uid_t int
20722 EOF
20723
20724   cat >> confdefs.h <<\EOF
20725 #define gid_t int
20726 EOF
20727
20728 fi
20729
20730 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20731 echo "configure:20732: checking for sig_atomic_t" >&5
20732 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20733   echo $ac_n "(cached) $ac_c" 1>&6
20734 else
20735   cat > conftest.$ac_ext <<EOF
20736 #line 20737 "configure"
20737 #include "confdefs.h"
20738 #include <signal.h>
20739 int main() {
20740 sig_atomic_t atomic;
20741 ; return 0; }
20742 EOF
20743 if { (eval echo configure:20744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20744   rm -rf conftest*
20745   ol_cv_type_sig_atomic_t=yes
20746 else
20747   echo "configure: failed program was:" >&5
20748   cat conftest.$ac_ext >&5
20749   rm -rf conftest*
20750   ol_cv_type_sig_atomic_t=no
20751 fi
20752 rm -f conftest*
20753 fi
20754
20755 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20756   if test $ol_cv_type_sig_atomic_t = no; then
20757     cat >> confdefs.h <<\EOF
20758 #define sig_atomic_t int
20759 EOF
20760
20761   fi
20762  
20763
20764
20765 # test for pw_gecos in struct passwd
20766 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20767 echo "configure:20768: checking struct passwd for pw_gecos" >&5
20768 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20769   echo $ac_n "(cached) $ac_c" 1>&6
20770 else
20771   
20772         cat > conftest.$ac_ext <<EOF
20773 #line 20774 "configure"
20774 #include "confdefs.h"
20775 #include <pwd.h>
20776 int main() {
20777
20778         struct passwd pwd;
20779         pwd.pw_gecos = pwd.pw_name;
20780
20781 ; return 0; }
20782 EOF
20783 if { (eval echo configure:20784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20784   rm -rf conftest*
20785   ol_cv_struct_passwd_pw_gecos=yes
20786 else
20787   echo "configure: failed program was:" >&5
20788   cat conftest.$ac_ext >&5
20789   rm -rf conftest*
20790   ol_cv_struct_passwd_pw_gecos=no
20791 fi
20792 rm -f conftest*
20793 fi
20794
20795 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20796 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20797         cat >> confdefs.h <<\EOF
20798 #define HAVE_PW_GECOS 1
20799 EOF
20800
20801 fi
20802
20803 # test for pw_passwd in struct passwd
20804 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20805 echo "configure:20806: checking struct passwd for pw_passwd" >&5
20806 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20807   echo $ac_n "(cached) $ac_c" 1>&6
20808 else
20809   
20810         cat > conftest.$ac_ext <<EOF
20811 #line 20812 "configure"
20812 #include "confdefs.h"
20813 #include <pwd.h>
20814 int main() {
20815
20816         struct passwd pwd;
20817         pwd.pw_passwd = pwd.pw_name;
20818
20819 ; return 0; }
20820 EOF
20821 if { (eval echo configure:20822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20822   rm -rf conftest*
20823   ol_cv_struct_passwd_pw_passwd=yes
20824 else
20825   echo "configure: failed program was:" >&5
20826   cat conftest.$ac_ext >&5
20827   rm -rf conftest*
20828   ol_cv_struct_passwd_pw_passwd=no
20829 fi
20830 rm -f conftest*
20831 fi
20832
20833 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20834 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20835         cat >> confdefs.h <<\EOF
20836 #define HAVE_PW_PASSWD 1
20837 EOF
20838
20839 fi
20840
20841
20842 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20843 echo "configure:20844: checking if toupper() requires islower()" >&5
20844 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20845   echo $ac_n "(cached) $ac_c" 1>&6
20846 else
20847   
20848         if test "$cross_compiling" = yes; then
20849   ol_cv_c_upper_lower=safe
20850 else
20851   cat > conftest.$ac_ext <<EOF
20852 #line 20853 "configure"
20853 #include "confdefs.h"
20854
20855 #include <ctype.h>
20856 main()
20857 {
20858         if ('C' == toupper('C'))
20859                 exit(0);
20860         else
20861                 exit(1);
20862 }
20863 EOF
20864 if { (eval echo configure:20865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20865 then
20866   ol_cv_c_upper_lower=no
20867 else
20868   echo "configure: failed program was:" >&5
20869   cat conftest.$ac_ext >&5
20870   rm -fr conftest*
20871   ol_cv_c_upper_lower=yes
20872 fi
20873 rm -fr conftest*
20874 fi
20875
20876 fi
20877
20878 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20879 if test $ol_cv_c_upper_lower != no ; then
20880         cat >> confdefs.h <<\EOF
20881 #define C_UPPER_LOWER 1
20882 EOF
20883
20884 fi
20885
20886 echo $ac_n "checking for working const""... $ac_c" 1>&6
20887 echo "configure:20888: checking for working const" >&5
20888 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20889   echo $ac_n "(cached) $ac_c" 1>&6
20890 else
20891   cat > conftest.$ac_ext <<EOF
20892 #line 20893 "configure"
20893 #include "confdefs.h"
20894
20895 int main() {
20896
20897 /* Ultrix mips cc rejects this.  */
20898 typedef int charset[2]; const charset x;
20899 /* SunOS 4.1.1 cc rejects this.  */
20900 char const *const *ccp;
20901 char **p;
20902 /* NEC SVR4.0.2 mips cc rejects this.  */
20903 struct point {int x, y;};
20904 static struct point const zero = {0,0};
20905 /* AIX XL C 1.02.0.0 rejects this.
20906    It does not let you subtract one const X* pointer from another in an arm
20907    of an if-expression whose if-part is not a constant expression */
20908 const char *g = "string";
20909 ccp = &g + (g ? g-g : 0);
20910 /* HPUX 7.0 cc rejects these. */
20911 ++ccp;
20912 p = (char**) ccp;
20913 ccp = (char const *const *) p;
20914 { /* SCO 3.2v4 cc rejects this.  */
20915   char *t;
20916   char const *s = 0 ? (char *) 0 : (char const *) 0;
20917
20918   *t++ = 0;
20919 }
20920 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20921   int x[] = {25, 17};
20922   const int *foo = &x[0];
20923   ++foo;
20924 }
20925 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20926   typedef const int *iptr;
20927   iptr p = 0;
20928   ++p;
20929 }
20930 { /* AIX XL C 1.02.0.0 rejects this saying
20931      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20932   struct s { int j; const int *ap[3]; };
20933   struct s *b; b->j = 5;
20934 }
20935 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20936   const int foo = 10;
20937 }
20938
20939 ; return 0; }
20940 EOF
20941 if { (eval echo configure:20942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20942   rm -rf conftest*
20943   ac_cv_c_const=yes
20944 else
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   ac_cv_c_const=no
20949 fi
20950 rm -f conftest*
20951 fi
20952
20953 echo "$ac_t""$ac_cv_c_const" 1>&6
20954 if test $ac_cv_c_const = no; then
20955   cat >> confdefs.h <<\EOF
20956 #define const 
20957 EOF
20958
20959 fi
20960
20961 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20962 echo "configure:20963: checking if compiler understands volatile" >&5
20963 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20964   echo $ac_n "(cached) $ac_c" 1>&6
20965 else
20966   cat > conftest.$ac_ext <<EOF
20967 #line 20968 "configure"
20968 #include "confdefs.h"
20969 int x, y, z;
20970 int main() {
20971 volatile int a; int * volatile b = x ? &y : &z;
20972       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20973       *b = 0;
20974 ; return 0; }
20975 EOF
20976 if { (eval echo configure:20977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20977   rm -rf conftest*
20978   ol_cv_c_volatile=yes
20979 else
20980   echo "configure: failed program was:" >&5
20981   cat conftest.$ac_ext >&5
20982   rm -rf conftest*
20983   ol_cv_c_volatile=no
20984 fi
20985 rm -f conftest*
20986 fi
20987
20988 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20989   if test $ol_cv_c_volatile = yes; then
20990     : 
20991   else
20992     cat >> confdefs.h <<\EOF
20993 #define volatile 
20994 EOF
20995
20996   fi
20997  
20998
20999 if test $cross_compiling = yes ; then
21000         cat >> confdefs.h <<\EOF
21001 #define CROSS_COMPILING 1
21002 EOF
21003
21004 else
21005         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21006 echo "configure:21007: checking whether byte ordering is bigendian" >&5
21007 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21008   echo $ac_n "(cached) $ac_c" 1>&6
21009 else
21010   ac_cv_c_bigendian=unknown
21011 # See if sys/param.h defines the BYTE_ORDER macro.
21012 cat > conftest.$ac_ext <<EOF
21013 #line 21014 "configure"
21014 #include "confdefs.h"
21015 #include <sys/types.h>
21016 #include <sys/param.h>
21017 int main() {
21018
21019 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21020  bogus endian macros
21021 #endif
21022 ; return 0; }
21023 EOF
21024 if { (eval echo configure:21025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21025   rm -rf conftest*
21026   # It does; now see whether it defined to BIG_ENDIAN or not.
21027 cat > conftest.$ac_ext <<EOF
21028 #line 21029 "configure"
21029 #include "confdefs.h"
21030 #include <sys/types.h>
21031 #include <sys/param.h>
21032 int main() {
21033
21034 #if BYTE_ORDER != BIG_ENDIAN
21035  not big endian
21036 #endif
21037 ; return 0; }
21038 EOF
21039 if { (eval echo configure:21040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21040   rm -rf conftest*
21041   ac_cv_c_bigendian=yes
21042 else
21043   echo "configure: failed program was:" >&5
21044   cat conftest.$ac_ext >&5
21045   rm -rf conftest*
21046   ac_cv_c_bigendian=no
21047 fi
21048 rm -f conftest*
21049 else
21050   echo "configure: failed program was:" >&5
21051   cat conftest.$ac_ext >&5
21052 fi
21053 rm -f conftest*
21054 if test $ac_cv_c_bigendian = unknown; then
21055 if test "$cross_compiling" = yes; then
21056     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21057 else
21058   cat > conftest.$ac_ext <<EOF
21059 #line 21060 "configure"
21060 #include "confdefs.h"
21061 main () {
21062   /* Are we little or big endian?  From Harbison&Steele.  */
21063   union
21064   {
21065     long l;
21066     char c[sizeof (long)];
21067   } u;
21068   u.l = 1;
21069   exit (u.c[sizeof (long) - 1] == 1);
21070 }
21071 EOF
21072 if { (eval echo configure:21073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21073 then
21074   ac_cv_c_bigendian=no
21075 else
21076   echo "configure: failed program was:" >&5
21077   cat conftest.$ac_ext >&5
21078   rm -fr conftest*
21079   ac_cv_c_bigendian=yes
21080 fi
21081 rm -fr conftest*
21082 fi
21083
21084 fi
21085 fi
21086
21087 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21088 if test $ac_cv_c_bigendian = yes; then
21089   cat >> confdefs.h <<\EOF
21090 #define WORDS_BIGENDIAN 1
21091 EOF
21092
21093 fi
21094
21095 fi
21096
21097 echo $ac_n "checking size of short""... $ac_c" 1>&6
21098 echo "configure:21099: checking size of short" >&5 
21099 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21100   echo $ac_n "(cached) $ac_c" 1>&6
21101 else
21102   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21103   cat > conftest.$ac_ext <<EOF
21104 #line 21105 "configure"
21105 #include "confdefs.h"
21106 #include "confdefs.h" 
21107 #include <sys/types.h> 
21108  
21109
21110 int main() {
21111 switch (0) case 0: case (sizeof (short) == $ac_size):;
21112 ; return 0; }
21113 EOF
21114 if { (eval echo configure:21115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21115   rm -rf conftest*
21116   ac_cv_sizeof_short=$ac_size
21117 else
21118   echo "configure: failed program was:" >&5
21119   cat conftest.$ac_ext >&5
21120 fi
21121 rm -f conftest* 
21122   if test x$ac_cv_sizeof_short != x ; then break; fi 
21123 done 
21124
21125 fi
21126  
21127 if test x$ac_cv_sizeof_short = x ; then 
21128   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21129 fi 
21130 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21131 cat >> confdefs.h <<EOF
21132 #define SIZEOF_SHORT $ac_cv_sizeof_short
21133 EOF
21134  
21135  
21136 echo $ac_n "checking size of int""... $ac_c" 1>&6
21137 echo "configure:21138: checking size of int" >&5 
21138 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21139   echo $ac_n "(cached) $ac_c" 1>&6
21140 else
21141   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21142   cat > conftest.$ac_ext <<EOF
21143 #line 21144 "configure"
21144 #include "confdefs.h"
21145 #include "confdefs.h" 
21146 #include <sys/types.h> 
21147  
21148
21149 int main() {
21150 switch (0) case 0: case (sizeof (int) == $ac_size):;
21151 ; return 0; }
21152 EOF
21153 if { (eval echo configure:21154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21154   rm -rf conftest*
21155   ac_cv_sizeof_int=$ac_size
21156 else
21157   echo "configure: failed program was:" >&5
21158   cat conftest.$ac_ext >&5
21159 fi
21160 rm -f conftest* 
21161   if test x$ac_cv_sizeof_int != x ; then break; fi 
21162 done 
21163
21164 fi
21165  
21166 if test x$ac_cv_sizeof_int = x ; then 
21167   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21168 fi 
21169 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21170 cat >> confdefs.h <<EOF
21171 #define SIZEOF_INT $ac_cv_sizeof_int
21172 EOF
21173  
21174  
21175 echo $ac_n "checking size of long""... $ac_c" 1>&6
21176 echo "configure:21177: checking size of long" >&5 
21177 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21178   echo $ac_n "(cached) $ac_c" 1>&6
21179 else
21180   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21181   cat > conftest.$ac_ext <<EOF
21182 #line 21183 "configure"
21183 #include "confdefs.h"
21184 #include "confdefs.h" 
21185 #include <sys/types.h> 
21186  
21187
21188 int main() {
21189 switch (0) case 0: case (sizeof (long) == $ac_size):;
21190 ; return 0; }
21191 EOF
21192 if { (eval echo configure:21193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21193   rm -rf conftest*
21194   ac_cv_sizeof_long=$ac_size
21195 else
21196   echo "configure: failed program was:" >&5
21197   cat conftest.$ac_ext >&5
21198 fi
21199 rm -f conftest* 
21200   if test x$ac_cv_sizeof_long != x ; then break; fi 
21201 done 
21202
21203 fi
21204  
21205 if test x$ac_cv_sizeof_long = x ; then 
21206   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21207 fi 
21208 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21209 cat >> confdefs.h <<EOF
21210 #define SIZEOF_LONG $ac_cv_sizeof_long
21211 EOF
21212  
21213
21214
21215 if test "$ac_cv_sizeof_int" -lt 4 ; then
21216         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21217
21218         cat >> confdefs.h <<\EOF
21219 #define LBER_INT_T long
21220 EOF
21221
21222 else
21223         cat >> confdefs.h <<\EOF
21224 #define LBER_INT_T int
21225 EOF
21226
21227 fi
21228
21229 cat >> confdefs.h <<\EOF
21230 #define LBER_LEN_T long
21231 EOF
21232
21233 cat >> confdefs.h <<\EOF
21234 #define LBER_SOCKET_T int
21235 EOF
21236
21237 cat >> confdefs.h <<\EOF
21238 #define LBER_TAG_T long
21239 EOF
21240
21241
21242 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21243 echo "configure:21244: checking for 8-bit clean memcmp" >&5
21244 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21245   echo $ac_n "(cached) $ac_c" 1>&6
21246 else
21247   if test "$cross_compiling" = yes; then
21248   ac_cv_func_memcmp_clean=no
21249 else
21250   cat > conftest.$ac_ext <<EOF
21251 #line 21252 "configure"
21252 #include "confdefs.h"
21253
21254 main()
21255 {
21256   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21257   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21258 }
21259
21260 EOF
21261 if { (eval echo configure:21262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21262 then
21263   ac_cv_func_memcmp_clean=yes
21264 else
21265   echo "configure: failed program was:" >&5
21266   cat conftest.$ac_ext >&5
21267   rm -fr conftest*
21268   ac_cv_func_memcmp_clean=no
21269 fi
21270 rm -fr conftest*
21271 fi
21272
21273 fi
21274
21275 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21276 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21277
21278 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21279 echo "configure:21280: checking for strftime" >&5
21280 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21281   echo $ac_n "(cached) $ac_c" 1>&6
21282 else
21283   cat > conftest.$ac_ext <<EOF
21284 #line 21285 "configure"
21285 #include "confdefs.h"
21286 /* System header to define __stub macros and hopefully few prototypes,
21287     which can conflict with char strftime(); below.  */
21288 #include <assert.h>
21289 /* Override any gcc2 internal prototype to avoid an error.  */
21290 /* We use char because int might match the return type of a gcc2
21291     builtin and then its argument prototype would still apply.  */
21292 char strftime();
21293 char (*f)();
21294
21295 int main() {
21296
21297 /* The GNU C library defines this for functions which it implements
21298     to always fail with ENOSYS.  Some functions are actually named
21299     something starting with __ and the normal name is an alias.  */
21300 #if defined (__stub_strftime) || defined (__stub___strftime)
21301 choke me
21302 #else
21303 f = strftime;
21304 #endif
21305
21306 ; return 0; }
21307 EOF
21308 if { (eval echo configure:21309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21309   rm -rf conftest*
21310   eval "ac_cv_func_strftime=yes"
21311 else
21312   echo "configure: failed program was:" >&5
21313   cat conftest.$ac_ext >&5
21314   rm -rf conftest*
21315   eval "ac_cv_func_strftime=no"
21316 fi
21317 rm -f conftest*
21318 fi
21319
21320 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21321   echo "$ac_t""yes" 1>&6
21322   cat >> confdefs.h <<\EOF
21323 #define HAVE_STRFTIME 1
21324 EOF
21325
21326 else
21327   echo "$ac_t""no" 1>&6
21328 # strftime is in -lintl on SCO UNIX.
21329 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21330 echo "configure:21331: checking for strftime in -lintl" >&5
21331 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21333   echo $ac_n "(cached) $ac_c" 1>&6
21334 else
21335   ac_save_LIBS="$LIBS"
21336 LIBS="-lintl  $LIBS"
21337 cat > conftest.$ac_ext <<EOF
21338 #line 21339 "configure"
21339 #include "confdefs.h"
21340 /* Override any gcc2 internal prototype to avoid an error.  */
21341 /* We use char because int might match the return type of a gcc2
21342     builtin and then its argument prototype would still apply.  */
21343 char strftime();
21344
21345 int main() {
21346 strftime()
21347 ; return 0; }
21348 EOF
21349 if { (eval echo configure:21350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21350   rm -rf conftest*
21351   eval "ac_cv_lib_$ac_lib_var=yes"
21352 else
21353   echo "configure: failed program was:" >&5
21354   cat conftest.$ac_ext >&5
21355   rm -rf conftest*
21356   eval "ac_cv_lib_$ac_lib_var=no"
21357 fi
21358 rm -f conftest*
21359 LIBS="$ac_save_LIBS"
21360
21361 fi
21362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21363   echo "$ac_t""yes" 1>&6
21364   cat >> confdefs.h <<\EOF
21365 #define HAVE_STRFTIME 1
21366 EOF
21367
21368 LIBS="-lintl $LIBS"
21369 else
21370   echo "$ac_t""no" 1>&6
21371 fi
21372
21373 fi
21374
21375
21376 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21377 echo "configure:21378: checking for inet_aton()" >&5
21378 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21379   echo $ac_n "(cached) $ac_c" 1>&6
21380 else
21381   cat > conftest.$ac_ext <<EOF
21382 #line 21383 "configure"
21383 #include "confdefs.h"
21384
21385 #ifdef HAVE_SYS_TYPES_H
21386 #       include <sys/types.h>
21387 #endif
21388 #ifdef HAVE_SYS_SOCKET_H
21389 #       include <sys/socket.h>
21390 #       ifdef HAVE_SYS_SELECT_H
21391 #               include <sys/select.h>
21392 #       endif
21393 #       include <netinet/in.h>
21394 #       ifdef HAVE_ARPA_INET_H
21395 #               include <arpa/inet.h>
21396 #       endif
21397 #endif
21398
21399 int main() {
21400 struct in_addr in;
21401 int rc = inet_aton( "255.255.255.255", &in );
21402 ; return 0; }
21403 EOF
21404 if { (eval echo configure:21405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21405   rm -rf conftest*
21406   ol_cv_func_inet_aton=yes
21407 else
21408   echo "configure: failed program was:" >&5
21409   cat conftest.$ac_ext >&5
21410   rm -rf conftest*
21411   ol_cv_func_inet_aton=no
21412 fi
21413 rm -f conftest*
21414 fi
21415
21416 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21417   if test $ol_cv_func_inet_aton != no; then
21418     cat >> confdefs.h <<\EOF
21419 #define HAVE_INET_ATON 1
21420 EOF
21421
21422   fi
21423  
21424
21425 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21426 echo "configure:21427: checking for _spawnlp" >&5
21427 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 /* System header to define __stub macros and hopefully few prototypes,
21434     which can conflict with char _spawnlp(); below.  */
21435 #include <assert.h>
21436 /* Override any gcc2 internal prototype to avoid an error.  */
21437 /* We use char because int might match the return type of a gcc2
21438     builtin and then its argument prototype would still apply.  */
21439 char _spawnlp();
21440 char (*f)();
21441
21442 int main() {
21443
21444 /* The GNU C library defines this for functions which it implements
21445     to always fail with ENOSYS.  Some functions are actually named
21446     something starting with __ and the normal name is an alias.  */
21447 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21448 choke me
21449 #else
21450 f = _spawnlp;
21451 #endif
21452
21453 ; return 0; }
21454 EOF
21455 if { (eval echo configure:21456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21456   rm -rf conftest*
21457   eval "ac_cv_func__spawnlp=yes"
21458 else
21459   echo "configure: failed program was:" >&5
21460   cat conftest.$ac_ext >&5
21461   rm -rf conftest*
21462   eval "ac_cv_func__spawnlp=no"
21463 fi
21464 rm -f conftest*
21465 fi
21466
21467 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21468   echo "$ac_t""yes" 1>&6
21469   cat >> confdefs.h <<\EOF
21470 #define HAVE_SPAWNLP 1
21471 EOF
21472
21473 else
21474   echo "$ac_t""no" 1>&6
21475 fi
21476
21477
21478 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21479 echo "configure:21480: checking for _snprintf" >&5
21480 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21481   echo $ac_n "(cached) $ac_c" 1>&6
21482 else
21483   cat > conftest.$ac_ext <<EOF
21484 #line 21485 "configure"
21485 #include "confdefs.h"
21486 /* System header to define __stub macros and hopefully few prototypes,
21487     which can conflict with char _snprintf(); below.  */
21488 #include <assert.h>
21489 /* Override any gcc2 internal prototype to avoid an error.  */
21490 /* We use char because int might match the return type of a gcc2
21491     builtin and then its argument prototype would still apply.  */
21492 char _snprintf();
21493 char (*f)();
21494
21495 int main() {
21496
21497 /* The GNU C library defines this for functions which it implements
21498     to always fail with ENOSYS.  Some functions are actually named
21499     something starting with __ and the normal name is an alias.  */
21500 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21501 choke me
21502 #else
21503 f = _snprintf;
21504 #endif
21505
21506 ; return 0; }
21507 EOF
21508 if { (eval echo configure:21509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21509   rm -rf conftest*
21510   eval "ac_cv_func__snprintf=yes"
21511 else
21512   echo "configure: failed program was:" >&5
21513   cat conftest.$ac_ext >&5
21514   rm -rf conftest*
21515   eval "ac_cv_func__snprintf=no"
21516 fi
21517 rm -f conftest*
21518 fi
21519
21520 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21521   echo "$ac_t""yes" 1>&6
21522   ac_cv_func_snprintf=yes
21523         cat >> confdefs.h <<\EOF
21524 #define snprintf _snprintf
21525 EOF
21526
21527
21528 else
21529   echo "$ac_t""no" 1>&6
21530 fi
21531
21532
21533 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21534 echo "configure:21535: checking for _vsnprintf" >&5
21535 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21536   echo $ac_n "(cached) $ac_c" 1>&6
21537 else
21538   cat > conftest.$ac_ext <<EOF
21539 #line 21540 "configure"
21540 #include "confdefs.h"
21541 /* System header to define __stub macros and hopefully few prototypes,
21542     which can conflict with char _vsnprintf(); below.  */
21543 #include <assert.h>
21544 /* Override any gcc2 internal prototype to avoid an error.  */
21545 /* We use char because int might match the return type of a gcc2
21546     builtin and then its argument prototype would still apply.  */
21547 char _vsnprintf();
21548 char (*f)();
21549
21550 int main() {
21551
21552 /* The GNU C library defines this for functions which it implements
21553     to always fail with ENOSYS.  Some functions are actually named
21554     something starting with __ and the normal name is an alias.  */
21555 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21556 choke me
21557 #else
21558 f = _vsnprintf;
21559 #endif
21560
21561 ; return 0; }
21562 EOF
21563 if { (eval echo configure:21564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21564   rm -rf conftest*
21565   eval "ac_cv_func__vsnprintf=yes"
21566 else
21567   echo "configure: failed program was:" >&5
21568   cat conftest.$ac_ext >&5
21569   rm -rf conftest*
21570   eval "ac_cv_func__vsnprintf=no"
21571 fi
21572 rm -f conftest*
21573 fi
21574
21575 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21576   echo "$ac_t""yes" 1>&6
21577   ac_cv_func_vsnprintf=yes
21578         cat >> confdefs.h <<\EOF
21579 #define vsnprintf _vsnprintf
21580 EOF
21581
21582
21583 else
21584   echo "$ac_t""no" 1>&6
21585 fi
21586
21587
21588 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21589 echo "configure:21590: checking for vprintf" >&5
21590 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   cat > conftest.$ac_ext <<EOF
21594 #line 21595 "configure"
21595 #include "confdefs.h"
21596 /* System header to define __stub macros and hopefully few prototypes,
21597     which can conflict with char vprintf(); below.  */
21598 #include <assert.h>
21599 /* Override any gcc2 internal prototype to avoid an error.  */
21600 /* We use char because int might match the return type of a gcc2
21601     builtin and then its argument prototype would still apply.  */
21602 char vprintf();
21603 char (*f)();
21604
21605 int main() {
21606
21607 /* The GNU C library defines this for functions which it implements
21608     to always fail with ENOSYS.  Some functions are actually named
21609     something starting with __ and the normal name is an alias.  */
21610 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21611 choke me
21612 #else
21613 f = vprintf;
21614 #endif
21615
21616 ; return 0; }
21617 EOF
21618 if { (eval echo configure:21619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21619   rm -rf conftest*
21620   eval "ac_cv_func_vprintf=yes"
21621 else
21622   echo "configure: failed program was:" >&5
21623   cat conftest.$ac_ext >&5
21624   rm -rf conftest*
21625   eval "ac_cv_func_vprintf=no"
21626 fi
21627 rm -f conftest*
21628 fi
21629
21630 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21631   echo "$ac_t""yes" 1>&6
21632   cat >> confdefs.h <<\EOF
21633 #define HAVE_VPRINTF 1
21634 EOF
21635
21636 else
21637   echo "$ac_t""no" 1>&6
21638 fi
21639
21640 if test "$ac_cv_func_vprintf" != yes; then
21641 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21642 echo "configure:21643: checking for _doprnt" >&5
21643 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21644   echo $ac_n "(cached) $ac_c" 1>&6
21645 else
21646   cat > conftest.$ac_ext <<EOF
21647 #line 21648 "configure"
21648 #include "confdefs.h"
21649 /* System header to define __stub macros and hopefully few prototypes,
21650     which can conflict with char _doprnt(); below.  */
21651 #include <assert.h>
21652 /* Override any gcc2 internal prototype to avoid an error.  */
21653 /* We use char because int might match the return type of a gcc2
21654     builtin and then its argument prototype would still apply.  */
21655 char _doprnt();
21656 char (*f)();
21657
21658 int main() {
21659
21660 /* The GNU C library defines this for functions which it implements
21661     to always fail with ENOSYS.  Some functions are actually named
21662     something starting with __ and the normal name is an alias.  */
21663 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21664 choke me
21665 #else
21666 f = _doprnt;
21667 #endif
21668
21669 ; return 0; }
21670 EOF
21671 if { (eval echo configure:21672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21672   rm -rf conftest*
21673   eval "ac_cv_func__doprnt=yes"
21674 else
21675   echo "configure: failed program was:" >&5
21676   cat conftest.$ac_ext >&5
21677   rm -rf conftest*
21678   eval "ac_cv_func__doprnt=no"
21679 fi
21680 rm -f conftest*
21681 fi
21682
21683 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21684   echo "$ac_t""yes" 1>&6
21685   cat >> confdefs.h <<\EOF
21686 #define HAVE_DOPRNT 1
21687 EOF
21688
21689 else
21690   echo "$ac_t""no" 1>&6
21691 fi
21692
21693 fi
21694
21695
21696 if test $ac_cv_func_vprintf = yes ; then
21697                 for ac_func in vsnprintf vsprintf
21698 do
21699 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21700 echo "configure:21701: checking for $ac_func" >&5
21701 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21702   echo $ac_n "(cached) $ac_c" 1>&6
21703 else
21704   cat > conftest.$ac_ext <<EOF
21705 #line 21706 "configure"
21706 #include "confdefs.h"
21707 /* System header to define __stub macros and hopefully few prototypes,
21708     which can conflict with char $ac_func(); below.  */
21709 #include <assert.h>
21710 /* Override any gcc2 internal prototype to avoid an error.  */
21711 /* We use char because int might match the return type of a gcc2
21712     builtin and then its argument prototype would still apply.  */
21713 char $ac_func();
21714 char (*f)();
21715
21716 int main() {
21717
21718 /* The GNU C library defines this for functions which it implements
21719     to always fail with ENOSYS.  Some functions are actually named
21720     something starting with __ and the normal name is an alias.  */
21721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21722 choke me
21723 #else
21724 f = $ac_func;
21725 #endif
21726
21727 ; return 0; }
21728 EOF
21729 if { (eval echo configure:21730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21730   rm -rf conftest*
21731   eval "ac_cv_func_$ac_func=yes"
21732 else
21733   echo "configure: failed program was:" >&5
21734   cat conftest.$ac_ext >&5
21735   rm -rf conftest*
21736   eval "ac_cv_func_$ac_func=no"
21737 fi
21738 rm -f conftest*
21739 fi
21740
21741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21742   echo "$ac_t""yes" 1>&6
21743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21744   cat >> confdefs.h <<EOF
21745 #define $ac_tr_func 1
21746 EOF
21747  
21748 else
21749   echo "$ac_t""no" 1>&6
21750 fi
21751 done
21752
21753 fi
21754
21755 for ac_func in \
21756         bcopy                   \
21757         closesocket             \
21758         chroot                  \
21759         endgrent                \
21760         endpwent                \
21761         fcntl                   \
21762         flock                   \
21763         getdtablesize   \
21764         getgrgid                \
21765         gethostname             \
21766         getpass                 \
21767         getpassphrase   \
21768         getpwuid                \
21769         getpwnam                \
21770         getspnam                \
21771         gettimeofday    \
21772         initgroups              \
21773         lockf                   \
21774         memcpy                  \
21775         memmove                 \
21776         mkstemp                 \
21777         mktemp                  \
21778         pipe                    \
21779         read                    \
21780         recv                    \
21781         recvfrom                \
21782         recvmsg                 \
21783         setpwfile               \
21784         setgid                  \
21785         setegid                 \
21786         setsid                  \
21787         setuid                  \
21788         seteuid                 \
21789         sigaction               \
21790         signal                  \
21791         sigset                  \
21792         strdup                  \
21793         strerror                \
21794         strpbrk                 \
21795         strrchr                 \
21796         strsep                  \
21797         strstr                  \
21798         strtol                  \
21799         strtoul                 \
21800         strspn                  \
21801         sysconf                 \
21802         usleep                  \
21803         waitpid                 \
21804         wait4                   \
21805         write                   \
21806         send                    \
21807         sendto                  \
21808
21809 do
21810 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21811 echo "configure:21812: checking for $ac_func" >&5
21812 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21813   echo $ac_n "(cached) $ac_c" 1>&6
21814 else
21815   cat > conftest.$ac_ext <<EOF
21816 #line 21817 "configure"
21817 #include "confdefs.h"
21818 /* System header to define __stub macros and hopefully few prototypes,
21819     which can conflict with char $ac_func(); below.  */
21820 #include <assert.h>
21821 /* Override any gcc2 internal prototype to avoid an error.  */
21822 /* We use char because int might match the return type of a gcc2
21823     builtin and then its argument prototype would still apply.  */
21824 char $ac_func();
21825 char (*f)();
21826
21827 int main() {
21828
21829 /* The GNU C library defines this for functions which it implements
21830     to always fail with ENOSYS.  Some functions are actually named
21831     something starting with __ and the normal name is an alias.  */
21832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21833 choke me
21834 #else
21835 f = $ac_func;
21836 #endif
21837
21838 ; return 0; }
21839 EOF
21840 if { (eval echo configure:21841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21841   rm -rf conftest*
21842   eval "ac_cv_func_$ac_func=yes"
21843 else
21844   echo "configure: failed program was:" >&5
21845   cat conftest.$ac_ext >&5
21846   rm -rf conftest*
21847   eval "ac_cv_func_$ac_func=no"
21848 fi
21849 rm -f conftest*
21850 fi
21851
21852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21853   echo "$ac_t""yes" 1>&6
21854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21855   cat >> confdefs.h <<EOF
21856 #define $ac_tr_func 1
21857 EOF
21858  
21859 else
21860   echo "$ac_t""no" 1>&6
21861 fi
21862 done
21863
21864
21865 for ac_func in getopt
21866 do
21867 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21868 echo "configure:21869: checking for $ac_func" >&5
21869 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21870   echo $ac_n "(cached) $ac_c" 1>&6
21871 else
21872   cat > conftest.$ac_ext <<EOF
21873 #line 21874 "configure"
21874 #include "confdefs.h"
21875 /* System header to define __stub macros and hopefully few prototypes,
21876     which can conflict with char $ac_func(); below.  */
21877 #include <assert.h>
21878 /* Override any gcc2 internal prototype to avoid an error.  */
21879 /* We use char because int might match the return type of a gcc2
21880     builtin and then its argument prototype would still apply.  */
21881 char $ac_func();
21882 char (*f)();
21883
21884 int main() {
21885
21886 /* The GNU C library defines this for functions which it implements
21887     to always fail with ENOSYS.  Some functions are actually named
21888     something starting with __ and the normal name is an alias.  */
21889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21890 choke me
21891 #else
21892 f = $ac_func;
21893 #endif
21894
21895 ; return 0; }
21896 EOF
21897 if { (eval echo configure:21898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21898   rm -rf conftest*
21899   eval "ac_cv_func_$ac_func=yes"
21900 else
21901   echo "configure: failed program was:" >&5
21902   cat conftest.$ac_ext >&5
21903   rm -rf conftest*
21904   eval "ac_cv_func_$ac_func=no"
21905 fi
21906 rm -f conftest*
21907 fi
21908
21909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21910   echo "$ac_t""yes" 1>&6
21911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21912   cat >> confdefs.h <<EOF
21913 #define $ac_tr_func 1
21914 EOF
21915  
21916 else
21917   echo "$ac_t""no" 1>&6
21918 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21919 fi
21920 done
21921
21922
21923
21924 if test "$ac_cv_func_getopt" != yes; then
21925         LIBSRCS="$LIBSRCS getopt.c"
21926 fi
21927
21928 # Check Configuration
21929 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21930 echo "configure:21931: checking declaration of sys_errlist" >&5
21931 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21932   echo $ac_n "(cached) $ac_c" 1>&6
21933 else
21934   
21935         cat > conftest.$ac_ext <<EOF
21936 #line 21937 "configure"
21937 #include "confdefs.h"
21938
21939 #include <stdio.h>
21940 #include <sys/types.h>
21941 #include <errno.h>
21942 #ifdef WINNT
21943 #include <stdlib.h>
21944 #endif 
21945 int main() {
21946 char *c = (char *) *sys_errlist
21947 ; return 0; }
21948 EOF
21949 if { (eval echo configure:21950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21950   rm -rf conftest*
21951   ol_cv_dcl_sys_errlist=yes
21952         ol_cv_have_sys_errlist=yes
21953 else
21954   echo "configure: failed program was:" >&5
21955   cat conftest.$ac_ext >&5
21956   rm -rf conftest*
21957   ol_cv_dcl_sys_errlist=no
21958 fi
21959 rm -f conftest*
21960 fi
21961
21962 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21963 #
21964 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21965 if test $ol_cv_dcl_sys_errlist = no ; then
21966         cat >> confdefs.h <<\EOF
21967 #define DECL_SYS_ERRLIST 1
21968 EOF
21969
21970
21971         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21972 echo "configure:21973: checking existence of sys_errlist" >&5
21973 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21974   echo $ac_n "(cached) $ac_c" 1>&6
21975 else
21976   
21977                 cat > conftest.$ac_ext <<EOF
21978 #line 21979 "configure"
21979 #include "confdefs.h"
21980 #include <errno.h>
21981 int main() {
21982 char *c = (char *) *sys_errlist
21983 ; return 0; }
21984 EOF
21985 if { (eval echo configure:21986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21986   rm -rf conftest*
21987   ol_cv_have_sys_errlist=yes
21988 else
21989   echo "configure: failed program was:" >&5
21990   cat conftest.$ac_ext >&5
21991   rm -rf conftest*
21992   ol_cv_have_sys_errlist=no
21993 fi
21994 rm -f conftest*
21995 fi
21996
21997 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21998 fi
21999 if test $ol_cv_have_sys_errlist = yes ; then
22000         cat >> confdefs.h <<\EOF
22001 #define HAVE_SYS_ERRLIST 1
22002 EOF
22003
22004 fi
22005
22006
22007
22008 if test "$ol_enable_debug" != no ; then
22009         cat >> confdefs.h <<\EOF
22010 #define LDAP_DEBUG 1
22011 EOF
22012
22013 fi
22014 if test "$ol_enable_syslog" = yes ; then
22015         cat >> confdefs.h <<\EOF
22016 #define LDAP_SYSLOG 1
22017 EOF
22018
22019 fi
22020 if test "$ol_enable_cache" = no ; then
22021         cat >> confdefs.h <<\EOF
22022 #define LDAP_NOCACHE 1
22023 EOF
22024
22025 fi
22026 if test "$ol_link_kbind" != no ; then
22027         cat >> confdefs.h <<\EOF
22028 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22029 EOF
22030
22031 fi
22032 if test "$ol_enable_proctitle" != no ; then
22033         cat >> confdefs.h <<\EOF
22034 #define LDAP_PROCTITLE 1
22035 EOF
22036
22037 fi
22038 if test "$ol_enable_referrals" != no ; then
22039         cat >> confdefs.h <<\EOF
22040 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22041 EOF
22042
22043 fi
22044 if test "$ol_enable_local" != no; then
22045         cat >> confdefs.h <<\EOF
22046 #define LDAP_PF_LOCAL 1
22047 EOF
22048
22049 fi
22050 if test "$ol_link_ipv6" != no; then
22051         cat >> confdefs.h <<\EOF
22052 #define LDAP_PF_INET6 1
22053 EOF
22054
22055 fi
22056 if test "$ol_enable_cleartext" != no ; then
22057         cat >> confdefs.h <<\EOF
22058 #define SLAPD_CLEARTEXT 1
22059 EOF
22060
22061 fi
22062 if test "$ol_enable_crypt" != no ; then
22063         cat >> confdefs.h <<\EOF
22064 #define SLAPD_CRYPT 1
22065 EOF
22066
22067 fi
22068 if test "$ol_link_kpasswd" != no ; then
22069         cat >> confdefs.h <<\EOF
22070 #define SLAPD_KPASSWD 1
22071 EOF
22072
22073 fi
22074 if test "$ol_link_spasswd" != no ; then
22075         cat >> confdefs.h <<\EOF
22076 #define SLAPD_SPASSWD 1
22077 EOF
22078
22079 fi
22080 if test "$ol_enable_multimaster" != no ; then
22081         cat >> confdefs.h <<\EOF
22082 #define SLAPD_MULTIMASTER 1
22083 EOF
22084
22085 fi
22086 if test "$ol_enable_phonetic" != no ; then
22087         cat >> confdefs.h <<\EOF
22088 #define SLAPD_PHONETIC 1
22089 EOF
22090
22091 fi
22092 if test "$ol_enable_rlookups" != no ; then
22093         cat >> confdefs.h <<\EOF
22094 #define SLAPD_RLOOKUPS 1
22095 EOF
22096
22097 fi
22098 if test "$ol_enable_aci" != no ; then
22099         cat >> confdefs.h <<\EOF
22100 #define SLAPD_ACI_ENABLED 1
22101 EOF
22102
22103 fi
22104
22105 if test "$ol_link_modules" != no ; then
22106         cat >> confdefs.h <<\EOF
22107 #define SLAPD_MODULES 1
22108 EOF
22109
22110         BUILD_SLAPD=yes
22111         SLAPD_MODULES_LDFLAGS="-dlopen self"
22112 fi
22113
22114 if test "$ol_enable_bdb" != no ; then
22115         cat >> confdefs.h <<\EOF
22116 #define SLAPD_BDB 1
22117 EOF
22118
22119         BUILD_SLAPD=yes
22120         BUILD_BDB=yes
22121         if test "$ol_with_bdb_module" != static ; then
22122                 cat >> confdefs.h <<\EOF
22123 #define SLAPD_BDB_DYNAMIC 1
22124 EOF
22125
22126                 BUILD_BDB=mod
22127                 BUILD_BDB_DYNAMIC=shared
22128                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22129         else
22130                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22131         fi
22132 fi
22133
22134 if test "$ol_link_dnssrv" != no ; then
22135         cat >> confdefs.h <<\EOF
22136 #define SLAPD_DNSSRV 1
22137 EOF
22138
22139         BUILD_SLAPD=yes
22140         BUILD_DNSSRV=yes
22141         if test "$ol_with_dnssrv_module" != static ; then
22142                 cat >> confdefs.h <<\EOF
22143 #define SLAPD_DNSSRV_DYNAMIC 1
22144 EOF
22145
22146                 BUILD_DNSSRV=mod
22147                 BUILD_DNSSRV_DYNAMIC=shared
22148                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22149         else
22150                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22151         fi
22152 fi
22153
22154 if test "$ol_enable_ldap" != no ; then
22155         cat >> confdefs.h <<\EOF
22156 #define SLAPD_LDAP 1
22157 EOF
22158
22159         BUILD_SLAPD=yes
22160         BUILD_LDAP=yes
22161         if test "$ol_with_ldap_module" != static ; then
22162                 cat >> confdefs.h <<\EOF
22163 #define SLAPD_LDAP_DYNAMIC 1
22164 EOF
22165
22166                 BUILD_LDAP=mod
22167                 BUILD_LDAP_DYNAMIC=shared
22168                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22169         else
22170                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22171         fi
22172 fi
22173
22174 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22175         cat >> confdefs.h <<\EOF
22176 #define SLAPD_LDBM 1
22177 EOF
22178
22179         BUILD_SLAPD=yes
22180         BUILD_LDBM=yes
22181         LDBM_LIB="-lldbm"
22182         if test "$ol_with_ldbm_module" != static ; then
22183                 cat >> confdefs.h <<\EOF
22184 #define SLAPD_LDBM_DYNAMIC 1
22185 EOF
22186
22187                 BUILD_LDBM=mod
22188                 BUILD_LDBM_DYNAMIC=shared
22189                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22190         else
22191                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22192         fi
22193 fi
22194
22195 if test "$ol_enable_meta" != no ; then
22196         if test "$ol_enable_ldap" = no ; then
22197                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22198         fi
22199         if test "$ol_enable_rewrite" = no ; then
22200                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22201         fi
22202         cat >> confdefs.h <<\EOF
22203 #define SLAPD_META 1
22204 EOF
22205
22206         BUILD_SLAPD=yes
22207         BUILD_META=yes
22208         BUILD_LDAP=yes
22209         BUILD_REWRITE=yes
22210         if test "$ol_with_meta_module" != static ; then
22211                 cat >> confdefs.h <<\EOF
22212 #define SLAPD_META_DYNAMIC 1
22213 EOF
22214
22215                 BUILD_META=mod
22216                 BUILD_META_DYNAMIC=shared
22217                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22218         else
22219                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22220         fi
22221 fi
22222
22223 if test "$ol_enable_monitor" != no ; then
22224         cat >> confdefs.h <<\EOF
22225 #define SLAPD_MONITOR 1
22226 EOF
22227
22228         BUILD_SLAPD=yes
22229         BUILD_MONITOR=yes
22230         if test "$ol_with_monitor_module" != static ; then
22231                 cat >> confdefs.h <<\EOF
22232 #define SLAPD_MONITOR_DYNAMIC 1
22233 EOF
22234
22235                 BUILD_MONITOR=mod
22236                 BUILD_MONITOR_DYNAMIC=shared
22237                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22238         else
22239                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22240         fi
22241 fi
22242
22243 if test "$ol_enable_null" != no ; then
22244         cat >> confdefs.h <<\EOF
22245 #define SLAPD_NULL 1
22246 EOF
22247
22248         BUILD_SLAPD=yes
22249         BUILD_NULL=yes
22250         if test "$ol_with_null_module" != static ; then
22251                 cat >> confdefs.h <<\EOF
22252 #define SLAPD_NULL_DYNAMIC 1
22253 EOF
22254
22255                 BUILD_NULL=mod
22256                 BUILD_NULL_DYNAMIC=shared
22257                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22258         else
22259                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22260         fi
22261 fi
22262
22263 if test "$ol_enable_passwd" != no ; then
22264         cat >> confdefs.h <<\EOF
22265 #define SLAPD_PASSWD 1
22266 EOF
22267
22268         BUILD_SLAPD=yes
22269         BUILD_PASSWD=yes
22270         if test "$ol_with_passwd_module" != static ; then
22271                 cat >> confdefs.h <<\EOF
22272 #define SLAPD_PASSWD_DYNAMIC 1
22273 EOF
22274
22275                 BUILD_PASSWD=mod
22276                 BUILD_PASSWD_DYNAMIC=shared
22277                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22278         else
22279                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22280         fi
22281 fi
22282
22283 if test "$ol_link_perl" != no ; then
22284         cat >> confdefs.h <<\EOF
22285 #define SLAPD_PERL 1
22286 EOF
22287
22288         BUILD_SLAPD=yes
22289         BUILD_PERL=yes
22290         if test "$ol_with_perl_module" != static ; then
22291                 cat >> confdefs.h <<\EOF
22292 #define SLAPD_PERL_DYNAMIC 1
22293 EOF
22294
22295                 BUILD_PERL=mod
22296                 BUILD_PERL_DYNAMIC=shared
22297                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22298         else
22299                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22300         fi
22301 fi
22302
22303 if test "$ol_enable_shell" != no ; then
22304         cat >> confdefs.h <<\EOF
22305 #define SLAPD_SHELL 1
22306 EOF
22307
22308         BUILD_SLAPD=yes
22309         BUILD_SHELL=yes
22310         if test "$ol_with_shell_module" != static ; then
22311                 cat >> confdefs.h <<\EOF
22312 #define SLAPD_SHELL_DYNAMIC 1
22313 EOF
22314
22315                 BUILD_SHELL=mod
22316                 BUILD_SHELL_DYNAMIC=shared
22317                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22318         else
22319                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22320         fi
22321 fi
22322
22323 if test "$ol_enable_tcl" != no ; then
22324         cat >> confdefs.h <<\EOF
22325 #define SLAPD_TCL 1
22326 EOF
22327
22328         BUILD_SLAPD=yes
22329         BUILD_TCL=yes
22330         if test "$ol_with_tcl_module" != static; then
22331                 cat >> confdefs.h <<\EOF
22332 #define SLAPD_TCL_DYNAMIC 1
22333 EOF
22334
22335                 BUILD_TCL=mod
22336                 BUILD_TCL_DYNAMIC=shared
22337                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22338         else
22339                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22340         fi
22341 fi
22342
22343 if test "$ol_link_sql" != no ; then
22344         cat >> confdefs.h <<\EOF
22345 #define SLAPD_SQL 1
22346 EOF
22347
22348         BUILD_SLAPD=yes
22349         BUILD_SQL=yes
22350         if test "$ol_with_sql_module" != static; then
22351                 cat >> confdefs.h <<\EOF
22352 #define SLAPD_SQL_DYNAMIC 1
22353 EOF
22354
22355                 BUILD_SQL=mod
22356                 BUILD_SQL_DYNAMIC=shared
22357                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22358         else
22359                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22360         fi
22361 fi
22362
22363 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22364         $BUILD_SLAPD = yes ; then
22365         BUILD_SLURPD=yes
22366 fi
22367
22368 if test "$ol_enable_rewrite" != no ; then
22369         cat >> confdefs.h <<\EOF
22370 #define ENABLE_REWRITE 1
22371 EOF
22372
22373         BUILD_REWRITE=yes
22374 fi
22375
22376
22377
22378 if test "$ac_cv_mingw32" = yes ; then
22379         PLAT=NT
22380         SLAPD_MODULES_LDFLAGS=
22381 else
22382         PLAT=UNIX
22383 fi
22384
22385
22386
22387
22388
22389
22390   
22391   
22392   
22393   
22394   
22395   
22396   
22397   
22398   
22399   
22400   
22401   
22402   
22403   
22404   
22405   
22406   
22407   
22408   
22409   
22410   
22411   
22412   
22413   
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453 # Check whether --with-xxinstall or --without-xxinstall was given.
22454 if test "${with_xxinstall+set}" = set; then
22455   withval="$with_xxinstall"
22456   :
22457 fi
22458
22459
22460
22461 trap '' 1 2 15
22462
22463 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22464
22465 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22466 # Let make expand exec_prefix.
22467 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22468
22469 # Any assignment to VPATH causes Sun make to only execute
22470 # the first set of double-colon rules, so remove it if not needed.
22471 # If there is a colon in the path, we need to keep it.
22472 if test "x$srcdir" = x.; then
22473   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22474 fi
22475
22476 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22477
22478 DEFS=-DHAVE_CONFIG_H
22479
22480 # Without the "./", some shells look in PATH for config.status.
22481 : ${CONFIG_STATUS=./config.status}
22482
22483 echo creating $CONFIG_STATUS
22484 rm -f $CONFIG_STATUS
22485 cat > $CONFIG_STATUS <<EOF
22486 #! /bin/sh
22487 # Generated automatically by configure.
22488 # Run this file to recreate the current configuration.
22489 # This directory was configured as follows,
22490 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22491 #
22492 # $0 $ac_configure_args
22493 #
22494 # Compiler output produced by configure, useful for debugging
22495 # configure, is in ./config.log if it exists.
22496
22497 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22498 for ac_option
22499 do
22500   case "\$ac_option" in
22501   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22502     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22503     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22504   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22505     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22506     exit 0 ;;
22507   -help | --help | --hel | --he | --h)
22508     echo "\$ac_cs_usage"; exit 0 ;;
22509   *) echo "\$ac_cs_usage"; exit 1 ;;
22510   esac
22511 done
22512
22513 ac_given_srcdir=$srcdir
22514 ac_given_INSTALL="$INSTALL"
22515
22516 trap 'rm -fr `echo "\
22517 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22518 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22519 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22520 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22521 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22522 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22523 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22524 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22525 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22526 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22527 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22528 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22529 include/Makefile:build/top.mk:include/Makefile.in \
22530 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22531 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22532 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22533 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22534 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22535 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22536 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22537 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22538 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22539 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22540 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22541 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22542 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22543 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22544 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22545 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22546 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22547 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22548 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22549 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22550 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22551 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22552 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22553 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22554 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22555 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22556 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22557 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22558 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22559  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22560 EOF
22561 cat >> $CONFIG_STATUS <<EOF
22562
22563 # Protect against being on the right side of a sed subst in config.status.
22564 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22565  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22566 $ac_vpsub
22567 $extrasub
22568 s%@SHELL@%$SHELL%g
22569 s%@CFLAGS@%$CFLAGS%g
22570 s%@CPPFLAGS@%$CPPFLAGS%g
22571 s%@CXXFLAGS@%$CXXFLAGS%g
22572 s%@FFLAGS@%$FFLAGS%g
22573 s%@DEFS@%$DEFS%g
22574 s%@LDFLAGS@%$LDFLAGS%g
22575 s%@LIBS@%$LIBS%g
22576 s%@exec_prefix@%$exec_prefix%g
22577 s%@prefix@%$prefix%g
22578 s%@program_transform_name@%$program_transform_name%g
22579 s%@bindir@%$bindir%g
22580 s%@sbindir@%$sbindir%g
22581 s%@libexecdir@%$libexecdir%g
22582 s%@datadir@%$datadir%g
22583 s%@sysconfdir@%$sysconfdir%g
22584 s%@sharedstatedir@%$sharedstatedir%g
22585 s%@localstatedir@%$localstatedir%g
22586 s%@libdir@%$libdir%g
22587 s%@includedir@%$includedir%g
22588 s%@oldincludedir@%$oldincludedir%g
22589 s%@infodir@%$infodir%g
22590 s%@mandir@%$mandir%g
22591 s%@host@%$host%g
22592 s%@host_alias@%$host_alias%g
22593 s%@host_cpu@%$host_cpu%g
22594 s%@host_vendor@%$host_vendor%g
22595 s%@host_os@%$host_os%g
22596 s%@target@%$target%g
22597 s%@target_alias@%$target_alias%g
22598 s%@target_cpu@%$target_cpu%g
22599 s%@target_vendor@%$target_vendor%g
22600 s%@target_os@%$target_os%g
22601 s%@build@%$build%g
22602 s%@build_alias@%$build_alias%g
22603 s%@build_cpu@%$build_cpu%g
22604 s%@build_vendor@%$build_vendor%g
22605 s%@build_os@%$build_os%g
22606 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22607 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22608 s%@INSTALL_DATA@%$INSTALL_DATA%g
22609 s%@PACKAGE@%$PACKAGE%g
22610 s%@VERSION@%$VERSION%g
22611 s%@ACLOCAL@%$ACLOCAL%g
22612 s%@AUTOCONF@%$AUTOCONF%g
22613 s%@AUTOMAKE@%$AUTOMAKE%g
22614 s%@AUTOHEADER@%$AUTOHEADER%g
22615 s%@MAKEINFO@%$MAKEINFO%g
22616 s%@install_sh@%$install_sh%g
22617 s%@AMTAR@%$AMTAR%g
22618 s%@AWK@%$AWK%g
22619 s%@AMTARFLAGS@%$AMTARFLAGS%g
22620 s%@SET_MAKE@%$SET_MAKE%g
22621 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22622 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22623 s%@top_builddir@%$top_builddir%g
22624 s%@ldap_subdir@%$ldap_subdir%g
22625 s%@CC@%$CC%g
22626 s%@AR@%$AR%g
22627 s%@LN_S@%$LN_S%g
22628 s%@OBJEXT@%$OBJEXT%g
22629 s%@EXEEXT@%$EXEEXT%g
22630 s%@ECHO@%$ECHO%g
22631 s%@RANLIB@%$RANLIB%g
22632 s%@STRIP@%$STRIP%g
22633 s%@DLLTOOL@%$DLLTOOL%g
22634 s%@AS@%$AS%g
22635 s%@OBJDUMP@%$OBJDUMP%g
22636 s%@CPP@%$CPP%g
22637 s%@LIBTOOL@%$LIBTOOL%g
22638 s%@LN_H@%$LN_H%g
22639 s%@SENDMAIL@%$SENDMAIL%g
22640 s%@EDITOR@%$EDITOR%g
22641 s%@PERLBIN@%$PERLBIN%g
22642 s%@OL_MKDEP@%$OL_MKDEP%g
22643 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22644 s%@LIBOBJS@%$LIBOBJS%g
22645 s%@LIBSRCS@%$LIBSRCS%g
22646 s%@PLAT@%$PLAT%g
22647 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22648 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22649 s%@BUILD_BDB@%$BUILD_BDB%g
22650 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22651 s%@BUILD_LDAP@%$BUILD_LDAP%g
22652 s%@BUILD_LDBM@%$BUILD_LDBM%g
22653 s%@BUILD_META@%$BUILD_META%g
22654 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22655 s%@BUILD_NULL@%$BUILD_NULL%g
22656 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22657 s%@BUILD_PERL@%$BUILD_PERL%g
22658 s%@BUILD_SHELL@%$BUILD_SHELL%g
22659 s%@BUILD_SQL@%$BUILD_SQL%g
22660 s%@BUILD_TCL@%$BUILD_TCL%g
22661 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22662 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22663 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22664 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22665 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22666 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22667 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22668 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22669 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22670 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22671 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22672 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22673 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22674 s%@LDBM_LIB@%$LDBM_LIB%g
22675 s%@LDAP_LIBS@%$LDAP_LIBS%g
22676 s%@LDIF_LIBS@%$LDIF_LIBS%g
22677 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22678 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22679 s%@LDBM_LIBS@%$LDBM_LIBS%g
22680 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22681 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22682 s%@WRAP_LIBS@%$WRAP_LIBS%g
22683 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22684 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22685 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22686 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22687 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22688 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22689 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22690 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22691 s%@KRB4_LIBS@%$KRB4_LIBS%g
22692 s%@KRB5_LIBS@%$KRB5_LIBS%g
22693 s%@READLINE_LIBS@%$READLINE_LIBS%g
22694 s%@SASL_LIBS@%$SASL_LIBS%g
22695 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22696 s%@TLS_LIBS@%$TLS_LIBS%g
22697 s%@MODULES_LIBS@%$MODULES_LIBS%g
22698 s%@AUTH_LIBS@%$AUTH_LIBS%g
22699 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22700 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22701 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22702 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22703
22704 CEOF
22705 EOF
22706
22707 cat >> $CONFIG_STATUS <<\EOF
22708
22709 # Split the substitutions into bite-sized pieces for seds with
22710 # small command number limits, like on Digital OSF/1 and HP-UX.
22711 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22712 ac_file=1 # Number of current file.
22713 ac_beg=1 # First line for current file.
22714 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22715 ac_more_lines=:
22716 ac_sed_cmds=""
22717 while $ac_more_lines; do
22718   if test $ac_beg -gt 1; then
22719     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22720   else
22721     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22722   fi
22723   if test ! -s conftest.s$ac_file; then
22724     ac_more_lines=false
22725     rm -f conftest.s$ac_file
22726   else
22727     if test -z "$ac_sed_cmds"; then
22728       ac_sed_cmds="sed -f conftest.s$ac_file"
22729     else
22730       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22731     fi
22732     ac_file=`expr $ac_file + 1`
22733     ac_beg=$ac_end
22734     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22735   fi
22736 done
22737 if test -z "$ac_sed_cmds"; then
22738   ac_sed_cmds=cat
22739 fi
22740 EOF
22741
22742 cat >> $CONFIG_STATUS <<EOF
22743
22744 CONFIG_FILES=\${CONFIG_FILES-"\
22745 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22746 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22747 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22748 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22749 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22750 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22751 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22752 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22753 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22754 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22755 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22756 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22757 include/Makefile:build/top.mk:include/Makefile.in \
22758 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22759 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22760 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22761 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22762 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22763 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22764 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22765 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22766 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22767 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22768 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22769 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22770 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22771 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22772 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22773 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22774 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22775 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22776 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22777 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22778 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22779 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22780 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22781 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22782 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22783 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22784 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22785 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22786 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22787 "}
22788 EOF
22789 cat >> $CONFIG_STATUS <<\EOF
22790 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22791   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22792   case "$ac_file" in
22793   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22794        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22795   *) ac_file_in="${ac_file}.in" ;;
22796   esac
22797
22798   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22799
22800   # Remove last slash and all that follows it.  Not all systems have dirname.
22801   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22802   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22803     # The file is in a subdirectory.
22804     test ! -d "$ac_dir" && mkdir "$ac_dir"
22805     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22806     # A "../" for each directory in $ac_dir_suffix.
22807     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22808   else
22809     ac_dir_suffix= ac_dots=
22810   fi
22811
22812   case "$ac_given_srcdir" in
22813   .)  srcdir=.
22814       if test -z "$ac_dots"; then top_srcdir=.
22815       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22816   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22817   *) # Relative path.
22818     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22819     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22820   esac
22821
22822   case "$ac_given_INSTALL" in
22823   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22824   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22825   esac
22826
22827   echo creating "$ac_file"
22828   rm -f "$ac_file"
22829   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22830   case "$ac_file" in
22831   *[Mm]akefile*) ac_comsub="1i\\
22832 # $configure_input" ;;
22833   *) ac_comsub= ;;
22834   esac
22835
22836   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22837   sed -e "$ac_comsub
22838 s%@configure_input@%$configure_input%g
22839 s%@srcdir@%$srcdir%g
22840 s%@top_srcdir@%$top_srcdir%g
22841 s%@INSTALL@%$INSTALL%g
22842 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22843 fi; done
22844 rm -f conftest.s*
22845
22846 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22847 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22848 #
22849 # ac_d sets the value in "#define NAME VALUE" lines.
22850 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22851 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22852 ac_dC='\3'
22853 ac_dD='%g'
22854 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22855 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22856 ac_uB='\([      ]\)%\1#\2define\3'
22857 ac_uC=' '
22858 ac_uD='\4%g'
22859 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22860 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22861 ac_eB='$%\1#\2define\3'
22862 ac_eC=' '
22863 ac_eD='%g'
22864
22865 if test "${CONFIG_HEADERS+set}" != set; then
22866 EOF
22867 cat >> $CONFIG_STATUS <<EOF
22868   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22869 EOF
22870 cat >> $CONFIG_STATUS <<\EOF
22871 fi
22872 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22873   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22874   case "$ac_file" in
22875   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22876        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22877   *) ac_file_in="${ac_file}.in" ;;
22878   esac
22879
22880   echo creating $ac_file
22881
22882   rm -f conftest.frag conftest.in conftest.out
22883   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22884   cat $ac_file_inputs > conftest.in
22885
22886 EOF
22887
22888 # Transform confdefs.h into a sed script conftest.vals that substitutes
22889 # the proper values into config.h.in to produce config.h.  And first:
22890 # Protect against being on the right side of a sed subst in config.status.
22891 # Protect against being in an unquoted here document in config.status.
22892 rm -f conftest.vals
22893 cat > conftest.hdr <<\EOF
22894 s/[\\&%]/\\&/g
22895 s%[\\$`]%\\&%g
22896 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22897 s%ac_d%ac_u%gp
22898 s%ac_u%ac_e%gp
22899 EOF
22900 sed -n -f conftest.hdr confdefs.h > conftest.vals
22901 rm -f conftest.hdr
22902
22903 # This sed command replaces #undef with comments.  This is necessary, for
22904 # example, in the case of _POSIX_SOURCE, which is predefined and required
22905 # on some systems where configure will not decide to define it.
22906 cat >> conftest.vals <<\EOF
22907 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22908 EOF
22909
22910 # Break up conftest.vals because some shells have a limit on
22911 # the size of here documents, and old seds have small limits too.
22912
22913 rm -f conftest.tail
22914 while :
22915 do
22916   ac_lines=`grep -c . conftest.vals`
22917   # grep -c gives empty output for an empty file on some AIX systems.
22918   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22919   # Write a limited-size here document to conftest.frag.
22920   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22921   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22922   echo 'CEOF
22923   sed -f conftest.frag conftest.in > conftest.out
22924   rm -f conftest.in
22925   mv conftest.out conftest.in
22926 ' >> $CONFIG_STATUS
22927   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22928   rm -f conftest.vals
22929   mv conftest.tail conftest.vals
22930 done
22931 rm -f conftest.vals
22932
22933 cat >> $CONFIG_STATUS <<\EOF
22934   rm -f conftest.frag conftest.h
22935   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22936   cat conftest.in >> conftest.h
22937   rm -f conftest.in
22938   if cmp -s $ac_file conftest.h 2>/dev/null; then
22939     echo "$ac_file is unchanged"
22940     rm -f conftest.h
22941   else
22942     # Remove last slash and all that follows it.  Not all systems have dirname.
22943       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22944       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22945       # The file is in a subdirectory.
22946       test ! -d "$ac_dir" && mkdir "$ac_dir"
22947     fi
22948     rm -f $ac_file
22949     mv conftest.h $ac_file
22950   fi
22951 fi; done
22952
22953 EOF
22954 cat >> $CONFIG_STATUS <<EOF
22955
22956 EOF
22957 cat >> $CONFIG_STATUS <<\EOF
22958
22959 date > stamp-h
22960 echo Please run \"make depend\" to build dependencies
22961
22962 exit 0
22963 EOF
22964 chmod +x $CONFIG_STATUS
22965 rm -fr confdefs* $ac_clean_files
22966 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22967