]> git.sur5r.net Git - openldap/blob - configure
Fix prev commit - require passed descriptor to be a pipe (FIFO) and
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.446 2002/12/04 03:51:59 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' 2>/dev/null`"
874 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
875
876 OPENLDAP_CVS=""
877 if test -d $ac_aux_dir/CVS; then
878         OPENLDAP_CVS="(from CVS sources) "
879 fi
880
881 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
882
883
884 echo $ac_n "checking host system type""... $ac_c" 1>&6
885 echo "configure:886: checking host system type" >&5
886 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
887
888 # Make sure we can run config.sub.
889   if $ac_config_sub sun4 >/dev/null 2>&1; then :
890     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
891   fi
892
893   ac_cv_host_alias=$host
894   case "$ac_cv_host_alias" in
895   NONE)
896     case $nonopt in
897     NONE)
898       if ac_cv_host_alias=`$ac_config_guess`; then :
899       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
900       fi ;;
901     *) ac_cv_host_alias=$nonopt ;;
902     esac ;;
903   esac
904
905   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
906   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
907   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
908   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
909 else
910   echo $ac_n "(cached) $ac_c" 1>&6
911 fi
912
913 echo "$ac_t""$ac_cv_host" 1>&6
914
915 host=$ac_cv_host
916 host_alias=$ac_cv_host_alias
917 host_cpu=$ac_cv_host_cpu
918 host_vendor=$ac_cv_host_vendor
919 host_os=$ac_cv_host_os
920
921
922
923
924
925 echo $ac_n "checking target system type""... $ac_c" 1>&6
926 echo "configure:927: checking target system type" >&5
927 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
928
929 # Make sure we can run config.sub.
930   if $ac_config_sub sun4 >/dev/null 2>&1; then :
931     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
932   fi
933
934   ac_cv_target_alias=$target
935   case "$ac_cv_target_alias" in
936   NONE)
937     case $nonopt in
938     NONE)
939       ac_cv_target_alias=$host_alias ;;
940
941     *) ac_cv_target_alias=$nonopt ;;
942     esac ;;
943   esac
944
945   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
946   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949 else
950   echo $ac_n "(cached) $ac_c" 1>&6
951 fi
952
953 echo "$ac_t""$ac_cv_target" 1>&6
954
955 target=$ac_cv_target
956 target_alias=$ac_cv_target_alias
957 target_cpu=$ac_cv_target_cpu
958 target_vendor=$ac_cv_target_vendor
959 target_os=$ac_cv_target_os
960
961
962
963
964
965 echo $ac_n "checking build system type""... $ac_c" 1>&6
966 echo "configure:967: checking build system type" >&5
967 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
968
969 # Make sure we can run config.sub.
970   if $ac_config_sub sun4 >/dev/null 2>&1; then :
971     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
972   fi
973
974   ac_cv_build_alias=$build
975   case "$ac_cv_build_alias" in
976   NONE)
977     case $nonopt in
978     NONE)
979       ac_cv_build_alias=$host_alias ;;
980
981     *) ac_cv_build_alias=$nonopt ;;
982     esac ;;
983   esac
984
985   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
986   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
987   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
988   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
989 else
990   echo $ac_n "(cached) $ac_c" 1>&6
991 fi
992
993 echo "$ac_t""$ac_cv_build" 1>&6
994
995 build=$ac_cv_build
996 build_alias=$ac_cv_build_alias
997 build_cpu=$ac_cv_build_cpu
998 build_vendor=$ac_cv_build_vendor
999 build_os=$ac_cv_build_os
1000
1001
1002
1003
1004
1005 # Do some error checking and defaulting for the host and target type.
1006 # The inputs are:
1007 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1008 #
1009 # The rules are:
1010 # 1. You are not allowed to specify --host, --target, and nonopt at the
1011 #    same time.
1012 # 2. Host defaults to nonopt.
1013 # 3. If nonopt is not specified, then host defaults to the current host,
1014 #    as determined by config.guess.
1015 # 4. Target and build default to nonopt.
1016 # 5. If nonopt is not specified, then target and build default to host.
1017
1018 # The aliases save the names the user supplied, while $host etc.
1019 # will get canonicalized.
1020 case $host---$target---$nonopt in
1021 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1022 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1023 esac
1024
1025 test "$host_alias" != "$target_alias" &&
1026   test "$program_prefix$program_suffix$program_transform_name" = \
1027     NONENONEs,x,x, &&
1028   program_prefix=${target_alias}-
1029
1030
1031 # Find a good install program.  We prefer a C program (faster),
1032 # so one script is as good as another.  But avoid the broken or
1033 # incompatible versions:
1034 # SysV /etc/install, /usr/sbin/install
1035 # SunOS /usr/etc/install
1036 # IRIX /sbin/install
1037 # AIX /bin/install
1038 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1039 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1040 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1041 # ./install, which can be erroneously created by make from ./install.sh.
1042 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1043 echo "configure:1044: checking for a BSD compatible install" >&5
1044 if test -z "$INSTALL"; then
1045 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1049   for ac_dir in $PATH; do
1050     # Account for people who put trailing slashes in PATH elements.
1051     case "$ac_dir/" in
1052     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1053     *)
1054       # OSF1 and SCO ODT 3.0 have their own names for install.
1055       # Don't use installbsd from OSF since it installs stuff as root
1056       # by default.
1057       for ac_prog in ginstall scoinst install; do
1058         if test -f $ac_dir/$ac_prog; then
1059           if test $ac_prog = install &&
1060             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1061             # AIX install.  It has an incompatible calling convention.
1062             :
1063           elif test $ac_prog = install &&
1064             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # program-specific install script used by HP pwplus--don't use.
1066             :
1067           else
1068             ac_cv_path_install="$ac_dir/$ac_prog -c"
1069             break 2
1070           fi
1071         fi
1072       done
1073       ;;
1074     esac
1075   done
1076   IFS="$ac_save_IFS"
1077
1078 fi
1079   if test "${ac_cv_path_install+set}" = set; then
1080     INSTALL="$ac_cv_path_install"
1081   else
1082     # As a last resort, use the slow shell script.  We don't cache a
1083     # path for INSTALL within a source directory, because that will
1084     # break other packages using the cache if that directory is
1085     # removed, or if the path is relative.
1086     INSTALL="$ac_install_sh"
1087   fi
1088 fi
1089 echo "$ac_t""$INSTALL" 1>&6
1090
1091 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1092 # It thinks the first close brace ends the variable substitution.
1093 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1094
1095 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1096
1097 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1098
1099 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether build environment is sane" >&5
1101 # Just in case
1102 sleep 1
1103 echo timestamp > conftestfile
1104 # Do `set' in a subshell so we don't clobber the current shell's
1105 # arguments.  Must try -L first in case configure is actually a
1106 # symlink; some systems play weird games with the mod time of symlinks
1107 # (eg FreeBSD returns the mod time of the symlink's containing
1108 # directory).
1109 if (
1110    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1111    if test "$*" = "X"; then
1112       # -L didn't work.
1113       set X `ls -t $srcdir/configure conftestfile`
1114    fi
1115    if test "$*" != "X $srcdir/configure conftestfile" \
1116       && test "$*" != "X conftestfile $srcdir/configure"; then
1117
1118       # If neither matched, then we have a broken ls.  This can happen
1119       # if, for instance, CONFIG_SHELL is bash and it inherits a
1120       # broken ls alias from the environment.  This has actually
1121       # happened.  Such a system could not be considered "sane".
1122       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1123 alias in your environment" 1>&2; exit 1; }
1124    fi
1125
1126    test "$2" = conftestfile
1127    )
1128 then
1129    # Ok.
1130    :
1131 else
1132    { echo "configure: error: newly created file is older than distributed files!
1133 Check your system clock" 1>&2; exit 1; }
1134 fi
1135 rm -f conftest*
1136 echo "$ac_t""yes" 1>&6
1137 if test "$program_transform_name" = s,x,x,; then
1138   program_transform_name=
1139 else
1140   # Double any \ or $.  echo might interpret backslashes.
1141   cat <<\EOF_SED > conftestsed
1142 s,\\,\\\\,g; s,\$,$$,g
1143 EOF_SED
1144   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1145   rm -f conftestsed
1146 fi
1147 test "$program_prefix" != NONE &&
1148   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1149 # Use a double $ so make ignores it.
1150 test "$program_suffix" != NONE &&
1151   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1152
1153 # sed with no file args requires a program.
1154 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1155
1156 for ac_prog in mawk gawk nawk awk
1157 do
1158 # Extract the first word of "$ac_prog", so it can be a program name with args.
1159 set dummy $ac_prog; ac_word=$2
1160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1161 echo "configure:1162: checking for $ac_word" >&5
1162 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   if test -n "$AWK"; then
1166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1167 else
1168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1169   ac_dummy="$PATH"
1170   for ac_dir in $ac_dummy; do
1171     test -z "$ac_dir" && ac_dir=.
1172     if test -f $ac_dir/$ac_word; then
1173       ac_cv_prog_AWK="$ac_prog"
1174       break
1175     fi
1176   done
1177   IFS="$ac_save_ifs"
1178 fi
1179 fi
1180 AWK="$ac_cv_prog_AWK"
1181 if test -n "$AWK"; then
1182   echo "$ac_t""$AWK" 1>&6
1183 else
1184   echo "$ac_t""no" 1>&6
1185 fi
1186
1187 test -n "$AWK" && break
1188 done
1189
1190 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1191 echo "configure:1192: checking whether ${MAKE-make} sets \${MAKE}" >&5
1192 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1193 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   cat > conftestmake <<\EOF
1197 all:
1198         @echo 'ac_maketemp="${MAKE}"'
1199 EOF
1200 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1201 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1202 if test -n "$ac_maketemp"; then
1203   eval ac_cv_prog_make_${ac_make}_set=yes
1204 else
1205   eval ac_cv_prog_make_${ac_make}_set=no
1206 fi
1207 rm -f conftestmake
1208 fi
1209 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1210   echo "$ac_t""yes" 1>&6
1211   SET_MAKE=
1212 else
1213   echo "$ac_t""no" 1>&6
1214   SET_MAKE="MAKE=${MAKE-make}"
1215 fi
1216
1217
1218
1219 PACKAGE=$OL_PACKAGE
1220
1221 VERSION=$OL_VERSION
1222
1223 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1224   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1225 fi
1226
1227
1228
1229 missing_dir=`cd $ac_aux_dir && pwd`
1230 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1231 echo "configure:1232: checking for working aclocal" >&5
1232 # Run test in a subshell; some versions of sh will print an error if
1233 # an executable is not found, even if stderr is redirected.
1234 # Redirect stdin to placate older versions of autoconf.  Sigh.
1235 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1236    ACLOCAL=aclocal
1237    echo "$ac_t""found" 1>&6
1238 else
1239    ACLOCAL="$missing_dir/missing aclocal"
1240    echo "$ac_t""missing" 1>&6
1241 fi
1242
1243 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working autoconf" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1249    AUTOCONF=autoconf
1250    echo "$ac_t""found" 1>&6
1251 else
1252    AUTOCONF="$missing_dir/missing autoconf"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working automake" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (automake --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOMAKE=automake
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOMAKE="$missing_dir/missing automake"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working autoheader" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOHEADER=autoheader
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOHEADER="$missing_dir/missing autoheader"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working makeinfo" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1288    MAKEINFO=makeinfo
1289    echo "$ac_t""found" 1>&6
1290 else
1291    MAKEINFO="$missing_dir/missing makeinfo"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 install_sh="$missing_dir/install-sh"
1296 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1297
1298 for ac_prog in gnutar gtar tar
1299 do
1300 # Extract the first word of "$ac_prog", so it can be a program name with args.
1301 set dummy $ac_prog; ac_word=$2
1302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1303 echo "configure:1304: checking for $ac_word" >&5
1304 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307   if test -n "$AMTAR"; then
1308   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1309 else
1310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1311   ac_dummy="$PATH"
1312   for ac_dir in $ac_dummy; do
1313     test -z "$ac_dir" && ac_dir=.
1314     if test -f $ac_dir/$ac_word; then
1315       ac_cv_prog_AMTAR="$ac_prog"
1316       break
1317     fi
1318   done
1319   IFS="$ac_save_ifs"
1320 fi
1321 fi
1322 AMTAR="$ac_cv_prog_AMTAR"
1323 if test -n "$AMTAR"; then
1324   echo "$ac_t""$AMTAR" 1>&6
1325 else
1326   echo "$ac_t""no" 1>&6
1327 fi
1328
1329 test -n "$AMTAR" && break
1330 done
1331
1332
1333 AMTARFLAGS=
1334 if test -n "$AMTAR"; then
1335   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1336         AMTARFLAGS=o
1337   fi
1338 fi
1339
1340 cat >> confdefs.h <<EOF
1341 #define OPENLDAP_PACKAGE "$PACKAGE"
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_VERSION "$VERSION"
1346 EOF
1347
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION $OL_API_INC
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1363 EOF
1364
1365
1366 OPENLDAP_LIBVERSION=$OL_API_LIB
1367
1368 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1369
1370
1371
1372 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1373 echo "configure:1374: checking configure arguments" >&5
1374
1375
1376 top_builddir=`pwd`
1377
1378 ldap_subdir="/openldap"
1379
1380 # Check whether --with-subdir or --without-subdir was given.
1381 if test "${with_subdir+set}" = set; then
1382   withval="$with_subdir"
1383   case "$withval" in
1384         no) ldap_subdir=""
1385                 ;;
1386         yes)
1387                 ;;
1388         /*|\\*)
1389                 ldap_subdir="$withval"
1390                 ;;
1391         *)
1392                 ldap_subdir="/$withval"
1393                 ;;
1394 esac
1395
1396 fi
1397
1398
1399 # OpenLDAP --enable-debug
1400         # Check whether --enable-debug or --disable-debug was given.
1401 if test "${enable_debug+set}" = set; then
1402   enableval="$enable_debug"
1403   
1404         ol_arg=invalid
1405         for ol_val in auto yes no ; do
1406                 if test "$enableval" = "$ol_val" ; then
1407                         ol_arg="$ol_val"
1408                 fi
1409         done
1410         if test "$ol_arg" = "invalid" ; then
1411                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1412         fi
1413         ol_enable_debug="$ol_arg"
1414
1415 else
1416         ol_enable_debug="yes"
1417 fi
1418 # end --enable-debug
1419 # OpenLDAP --enable-syslog
1420         # Check whether --enable-syslog or --disable-syslog was given.
1421 if test "${enable_syslog+set}" = set; then
1422   enableval="$enable_syslog"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no ; do
1426                 if test "$enableval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1432         fi
1433         ol_enable_syslog="$ol_arg"
1434
1435 else
1436         ol_enable_syslog="auto"
1437 fi
1438 # end --enable-syslog
1439 # OpenLDAP --enable-proctitle
1440         # Check whether --enable-proctitle or --disable-proctitle was given.
1441 if test "${enable_proctitle+set}" = set; then
1442   enableval="$enable_proctitle"
1443   
1444         ol_arg=invalid
1445         for ol_val in auto yes no ; do
1446                 if test "$enableval" = "$ol_val" ; then
1447                         ol_arg="$ol_val"
1448                 fi
1449         done
1450         if test "$ol_arg" = "invalid" ; then
1451                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1452         fi
1453         ol_enable_proctitle="$ol_arg"
1454
1455 else
1456         ol_enable_proctitle="yes"
1457 fi
1458 # end --enable-proctitle
1459 # OpenLDAP --enable-cache
1460         # Check whether --enable-cache or --disable-cache was given.
1461 if test "${enable_cache+set}" = set; then
1462   enableval="$enable_cache"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no ; do
1466                 if test "$enableval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1472         fi
1473         ol_enable_cache="$ol_arg"
1474
1475 else
1476         ol_enable_cache="no"
1477 fi
1478 # end --enable-cache
1479 # OpenLDAP --enable-referrals
1480         # Check whether --enable-referrals or --disable-referrals was given.
1481 if test "${enable_referrals+set}" = set; then
1482   enableval="$enable_referrals"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1492         fi
1493         ol_enable_referrals="$ol_arg"
1494
1495 else
1496         ol_enable_referrals="no"
1497 fi
1498 # end --enable-referrals
1499 ol_enable_kbind=${ol_enable_kbind-no}
1500 # OpenLDAP --enable-ipv6
1501         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1502 if test "${enable_ipv6+set}" = set; then
1503   enableval="$enable_ipv6"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ipv6="$ol_arg"
1515
1516 else
1517         ol_enable_ipv6="auto"
1518 fi
1519 # end --enable-ipv6
1520 # OpenLDAP --enable-local
1521         # Check whether --enable-local or --disable-local was given.
1522 if test "${enable_local+set}" = set; then
1523   enableval="$enable_local"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1533         fi
1534         ol_enable_local="$ol_arg"
1535
1536 else
1537         ol_enable_local="auto"
1538 fi
1539 # end --enable-local
1540 # OpenLDAP --enable-x_compile
1541         # Check whether --enable-x_compile or --disable-x_compile was given.
1542 if test "${enable_x_compile+set}" = set; then
1543   enableval="$enable_x_compile"
1544   
1545         ol_arg=invalid
1546         for ol_val in yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1553         fi
1554         ol_enable_x_compile="$ol_arg"
1555
1556 else
1557         ol_enable_x_compile="no"
1558 fi
1559 # end --enable-x_compile
1560
1561
1562 # OpenLDAP --with-cyrus_sasl
1563         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1564 if test "${with_cyrus_sasl+set}" = set; then
1565   withval="$with_cyrus_sasl"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no  ; do
1569                 if test "$withval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1575         fi
1576         ol_with_cyrus_sasl="$ol_arg"
1577
1578 else
1579         ol_with_cyrus_sasl="auto"
1580 fi
1581 # end --with-cyrus_sasl
1582
1583 # OpenLDAP --with-fetch
1584         # Check whether --with-fetch or --without-fetch was given.
1585 if test "${with_fetch+set}" = set; then
1586   withval="$with_fetch"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no  ; do
1590                 if test "$withval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1596         fi
1597         ol_with_fetch="$ol_arg"
1598
1599 else
1600         ol_with_fetch="auto"
1601 fi
1602 # end --with-fetch
1603
1604 # OpenLDAP --with-kerberos
1605         # Check whether --with-kerberos or --without-kerberos was given.
1606 if test "${with_kerberos+set}" = set; then
1607   withval="$with_kerberos"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1611                 if test "$withval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1617         fi
1618         ol_with_kerberos="$ol_arg"
1619
1620 else
1621         ol_with_kerberos="auto"
1622 fi
1623 # end --with-kerberos
1624
1625 # OpenLDAP --with-readline
1626         # Check whether --with-readline or --without-readline was given.
1627 if test "${with_readline+set}" = set; then
1628   withval="$with_readline"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no  ; do
1632                 if test "$withval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1638         fi
1639         ol_with_readline="$ol_arg"
1640
1641 else
1642         ol_with_readline="auto"
1643 fi
1644 # end --with-readline
1645
1646 # OpenLDAP --with-threads
1647         # Check whether --with-threads or --without-threads was given.
1648 if test "${with_threads+set}" = set; then
1649   withval="$with_threads"
1650   
1651         ol_arg=invalid
1652         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1653                 if test "$withval" = "$ol_val" ; then
1654                         ol_arg="$ol_val"
1655                 fi
1656         done
1657         if test "$ol_arg" = "invalid" ; then
1658                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1659         fi
1660         ol_with_threads="$ol_arg"
1661
1662 else
1663         ol_with_threads="auto"
1664 fi
1665 # end --with-threads
1666
1667 # OpenLDAP --with-tls
1668         # Check whether --with-tls or --without-tls was given.
1669 if test "${with_tls+set}" = set; then
1670   withval="$with_tls"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto ssleay openssl yes no  ; do
1674                 if test "$withval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1680         fi
1681         ol_with_tls="$ol_arg"
1682
1683 else
1684         ol_with_tls="auto"
1685 fi
1686 # end --with-tls
1687
1688 # OpenLDAP --with-yielding_select
1689         # Check whether --with-yielding_select or --without-yielding_select was given.
1690 if test "${with_yielding_select+set}" = set; then
1691   withval="$with_yielding_select"
1692   
1693         ol_arg=invalid
1694         for ol_val in auto yes no manual  ; do
1695                 if test "$withval" = "$ol_val" ; then
1696                         ol_arg="$ol_val"
1697                 fi
1698         done
1699         if test "$ol_arg" = "invalid" ; then
1700                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1701         fi
1702         ol_with_yielding_select="$ol_arg"
1703
1704 else
1705         ol_with_yielding_select="auto"
1706 fi
1707 # end --with-yielding_select
1708
1709
1710
1711 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1712 if test "${with_xxslapdoptions+set}" = set; then
1713   withval="$with_xxslapdoptions"
1714   :
1715 fi
1716
1717 # OpenLDAP --enable-slapd
1718         # Check whether --enable-slapd or --disable-slapd was given.
1719 if test "${enable_slapd+set}" = set; then
1720   enableval="$enable_slapd"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1730         fi
1731         ol_enable_slapd="$ol_arg"
1732
1733 else
1734         ol_enable_slapd="yes"
1735 fi
1736 # end --enable-slapd
1737 # OpenLDAP --enable-aci
1738         # Check whether --enable-aci or --disable-aci was given.
1739 if test "${enable_aci+set}" = set; then
1740   enableval="$enable_aci"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1750         fi
1751         ol_enable_aci="$ol_arg"
1752
1753 else
1754         ol_enable_aci="no"
1755 fi
1756 # end --enable-aci
1757 # OpenLDAP --enable-cleartext
1758         # Check whether --enable-cleartext or --disable-cleartext was given.
1759 if test "${enable_cleartext+set}" = set; then
1760   enableval="$enable_cleartext"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1770         fi
1771         ol_enable_cleartext="$ol_arg"
1772
1773 else
1774         ol_enable_cleartext="yes"
1775 fi
1776 # end --enable-cleartext
1777 # OpenLDAP --enable-crypt
1778         # Check whether --enable-crypt or --disable-crypt was given.
1779 if test "${enable_crypt+set}" = set; then
1780   enableval="$enable_crypt"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1790         fi
1791         ol_enable_crypt="$ol_arg"
1792
1793 else
1794         ol_enable_crypt="no"
1795 fi
1796 # end --enable-crypt
1797 # OpenLDAP --enable-dynamic
1798         # Check whether --enable-dynamic or --disable-dynamic was given.
1799 if test "${enable_dynamic+set}" = set; then
1800   enableval="$enable_dynamic"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1810         fi
1811         ol_enable_dynamic="$ol_arg"
1812
1813 else
1814         ol_enable_dynamic="no"
1815 fi
1816 # end --enable-dynamic
1817 # OpenLDAP --enable-kpasswd
1818         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1819 if test "${enable_kpasswd+set}" = set; then
1820   enableval="$enable_kpasswd"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1830         fi
1831         ol_enable_kpasswd="$ol_arg"
1832
1833 else
1834         ol_enable_kpasswd="no"
1835 fi
1836 # end --enable-kpasswd
1837 # OpenLDAP --enable-lmpasswd
1838         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1839 if test "${enable_lmpasswd+set}" = set; then
1840   enableval="$enable_lmpasswd"
1841   
1842         ol_arg=invalid
1843         for ol_val in auto yes no ; do
1844                 if test "$enableval" = "$ol_val" ; then
1845                         ol_arg="$ol_val"
1846                 fi
1847         done
1848         if test "$ol_arg" = "invalid" ; then
1849                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1850         fi
1851         ol_enable_lmpasswd="$ol_arg"
1852
1853 else
1854         ol_enable_lmpasswd="no"
1855 fi
1856 # end --enable-lmpasswd
1857 # OpenLDAP --enable-spasswd
1858         # Check whether --enable-spasswd or --disable-spasswd was given.
1859 if test "${enable_spasswd+set}" = set; then
1860   enableval="$enable_spasswd"
1861   
1862         ol_arg=invalid
1863         for ol_val in auto yes no ; do
1864                 if test "$enableval" = "$ol_val" ; then
1865                         ol_arg="$ol_val"
1866                 fi
1867         done
1868         if test "$ol_arg" = "invalid" ; then
1869                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1870         fi
1871         ol_enable_spasswd="$ol_arg"
1872
1873 else
1874         ol_enable_spasswd="no"
1875 fi
1876 # end --enable-spasswd
1877 # OpenLDAP --enable-modules
1878         # Check whether --enable-modules or --disable-modules was given.
1879 if test "${enable_modules+set}" = set; then
1880   enableval="$enable_modules"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto yes no ; do
1884                 if test "$enableval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1890         fi
1891         ol_enable_modules="$ol_arg"
1892
1893 else
1894         ol_enable_modules="no"
1895 fi
1896 # end --enable-modules
1897 ol_enable_multimaster=${ol_enable_multimaster-no}
1898 # OpenLDAP --enable-phonetic
1899         # Check whether --enable-phonetic or --disable-phonetic was given.
1900 if test "${enable_phonetic+set}" = set; then
1901   enableval="$enable_phonetic"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto yes no ; do
1905                 if test "$enableval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1911         fi
1912         ol_enable_phonetic="$ol_arg"
1913
1914 else
1915         ol_enable_phonetic="no"
1916 fi
1917 # end --enable-phonetic
1918 # OpenLDAP --enable-rewrite
1919         # Check whether --enable-rewrite or --disable-rewrite was given.
1920 if test "${enable_rewrite+set}" = set; then
1921   enableval="$enable_rewrite"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto yes no ; do
1925                 if test "$enableval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1931         fi
1932         ol_enable_rewrite="$ol_arg"
1933
1934 else
1935         ol_enable_rewrite="no"
1936 fi
1937 # end --enable-rewrite
1938 # OpenLDAP --enable-rlookups
1939         # Check whether --enable-rlookups or --disable-rlookups was given.
1940 if test "${enable_rlookups+set}" = set; then
1941   enableval="$enable_rlookups"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1951         fi
1952         ol_enable_rlookups="$ol_arg"
1953
1954 else
1955         ol_enable_rlookups="no"
1956 fi
1957 # end --enable-rlookups
1958 # OpenLDAP --enable-slp
1959         # Check whether --enable-slp or --disable-slp was given.
1960 if test "${enable_slp+set}" = set; then
1961   enableval="$enable_slp"
1962   
1963         ol_arg=invalid
1964         for ol_val in auto yes no ; do
1965                 if test "$enableval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1971         fi
1972         ol_enable_slp="$ol_arg"
1973
1974 else
1975         ol_enable_slp="no"
1976 fi
1977 # end --enable-slp
1978 # OpenLDAP --enable-wrappers
1979         # Check whether --enable-wrappers or --disable-wrappers was given.
1980 if test "${enable_wrappers+set}" = set; then
1981   enableval="$enable_wrappers"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1991         fi
1992         ol_enable_wrappers="$ol_arg"
1993
1994 else
1995         ol_enable_wrappers="no"
1996 fi
1997 # end --enable-wrappers
1998
1999 # OpenLDAP --enable-bdb
2000         # Check whether --enable-bdb or --disable-bdb was given.
2001 if test "${enable_bdb+set}" = set; then
2002   enableval="$enable_bdb"
2003   
2004         ol_arg=invalid
2005         for ol_val in auto yes no ; do
2006                 if test "$enableval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2012         fi
2013         ol_enable_bdb="$ol_arg"
2014
2015 else
2016         ol_enable_bdb="yes"
2017 fi
2018 # end --enable-bdb
2019 # OpenLDAP --with-bdb_module
2020         # Check whether --with-bdb_module or --without-bdb_module was given.
2021 if test "${with_bdb_module+set}" = set; then
2022   withval="$with_bdb_module"
2023   
2024         ol_arg=invalid
2025         for ol_val in static dynamic ; do
2026                 if test "$withval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2032         fi
2033         ol_with_bdb_module="$ol_arg"
2034
2035 else
2036         ol_with_bdb_module="static"
2037 fi
2038 # end --with-bdb_module
2039
2040 # OpenLDAP --enable-dnssrv
2041         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2042 if test "${enable_dnssrv+set}" = set; then
2043   enableval="$enable_dnssrv"
2044   
2045         ol_arg=invalid
2046         for ol_val in auto yes no ; do
2047                 if test "$enableval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2053         fi
2054         ol_enable_dnssrv="$ol_arg"
2055
2056 else
2057         ol_enable_dnssrv="no"
2058 fi
2059 # end --enable-dnssrv
2060 # OpenLDAP --with-dnssrv_module
2061         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2062 if test "${with_dnssrv_module+set}" = set; then
2063   withval="$with_dnssrv_module"
2064   
2065         ol_arg=invalid
2066         for ol_val in static dynamic ; do
2067                 if test "$withval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2073         fi
2074         ol_with_dnssrv_module="$ol_arg"
2075
2076 else
2077         ol_with_dnssrv_module="static"
2078 fi
2079 # end --with-dnssrv_module
2080
2081 # OpenLDAP --enable-ldap
2082         # Check whether --enable-ldap or --disable-ldap was given.
2083 if test "${enable_ldap+set}" = set; then
2084   enableval="$enable_ldap"
2085   
2086         ol_arg=invalid
2087         for ol_val in auto yes no ; do
2088                 if test "$enableval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2094         fi
2095         ol_enable_ldap="$ol_arg"
2096
2097 else
2098         ol_enable_ldap="no"
2099 fi
2100 # end --enable-ldap
2101 # OpenLDAP --with-ldap_module
2102         # Check whether --with-ldap_module or --without-ldap_module was given.
2103 if test "${with_ldap_module+set}" = set; then
2104   withval="$with_ldap_module"
2105   
2106         ol_arg=invalid
2107         for ol_val in static dynamic ; do
2108                 if test "$withval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2114         fi
2115         ol_with_ldap_module="$ol_arg"
2116
2117 else
2118         ol_with_ldap_module="static"
2119 fi
2120 # end --with-ldap_module
2121
2122 # OpenLDAP --enable-ldbm
2123         # Check whether --enable-ldbm or --disable-ldbm was given.
2124 if test "${enable_ldbm+set}" = set; then
2125   enableval="$enable_ldbm"
2126   
2127         ol_arg=invalid
2128         for ol_val in auto yes no ; do
2129                 if test "$enableval" = "$ol_val" ; then
2130                         ol_arg="$ol_val"
2131                 fi
2132         done
2133         if test "$ol_arg" = "invalid" ; then
2134                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2135         fi
2136         ol_enable_ldbm="$ol_arg"
2137
2138 else
2139         ol_enable_ldbm="no"
2140 fi
2141 # end --enable-ldbm
2142 # OpenLDAP --with-ldbm_api
2143         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2144 if test "${with_ldbm_api+set}" = set; then
2145   withval="$with_ldbm_api"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2149                 if test "$withval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2155         fi
2156         ol_with_ldbm_api="$ol_arg"
2157
2158 else
2159         ol_with_ldbm_api="auto"
2160 fi
2161 # end --with-ldbm_api
2162
2163 # OpenLDAP --with-ldbm_module
2164         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2165 if test "${with_ldbm_module+set}" = set; then
2166   withval="$with_ldbm_module"
2167   
2168         ol_arg=invalid
2169         for ol_val in static dynamic ; do
2170                 if test "$withval" = "$ol_val" ; then
2171                         ol_arg="$ol_val"
2172                 fi
2173         done
2174         if test "$ol_arg" = "invalid" ; then
2175                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2176         fi
2177         ol_with_ldbm_module="$ol_arg"
2178
2179 else
2180         ol_with_ldbm_module="static"
2181 fi
2182 # end --with-ldbm_module
2183
2184 # OpenLDAP --with-ldbm_type
2185         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2186 if test "${with_ldbm_type+set}" = set; then
2187   withval="$with_ldbm_type"
2188   
2189         ol_arg=invalid
2190         for ol_val in auto btree hash ; do
2191                 if test "$withval" = "$ol_val" ; then
2192                         ol_arg="$ol_val"
2193                 fi
2194         done
2195         if test "$ol_arg" = "invalid" ; then
2196                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2197         fi
2198         ol_with_ldbm_type="$ol_arg"
2199
2200 else
2201         ol_with_ldbm_type="auto"
2202 fi
2203 # end --with-ldbm_type
2204
2205 # OpenLDAP --enable-meta
2206         # Check whether --enable-meta or --disable-meta was given.
2207 if test "${enable_meta+set}" = set; then
2208   enableval="$enable_meta"
2209   
2210         ol_arg=invalid
2211         for ol_val in auto yes no ; do
2212                 if test "$enableval" = "$ol_val" ; then
2213                         ol_arg="$ol_val"
2214                 fi
2215         done
2216         if test "$ol_arg" = "invalid" ; then
2217                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2218         fi
2219         ol_enable_meta="$ol_arg"
2220
2221 else
2222         ol_enable_meta="no"
2223 fi
2224 # end --enable-meta
2225 # OpenLDAP --with-meta_module
2226         # Check whether --with-meta_module or --without-meta_module was given.
2227 if test "${with_meta_module+set}" = set; then
2228   withval="$with_meta_module"
2229   
2230         ol_arg=invalid
2231         for ol_val in static dynamic ; do
2232                 if test "$withval" = "$ol_val" ; then
2233                         ol_arg="$ol_val"
2234                 fi
2235         done
2236         if test "$ol_arg" = "invalid" ; then
2237                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2238         fi
2239         ol_with_meta_module="$ol_arg"
2240
2241 else
2242         ol_with_meta_module="static"
2243 fi
2244 # end --with-meta_module
2245
2246 # OpenLDAP --enable-monitor
2247         # Check whether --enable-monitor or --disable-monitor was given.
2248 if test "${enable_monitor+set}" = set; then
2249   enableval="$enable_monitor"
2250   
2251         ol_arg=invalid
2252         for ol_val in auto yes no ; do
2253                 if test "$enableval" = "$ol_val" ; then
2254                         ol_arg="$ol_val"
2255                 fi
2256         done
2257         if test "$ol_arg" = "invalid" ; then
2258                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2259         fi
2260         ol_enable_monitor="$ol_arg"
2261
2262 else
2263         ol_enable_monitor="no"
2264 fi
2265 # end --enable-monitor
2266 # OpenLDAP --with-monitor_module
2267         # Check whether --with-monitor_module or --without-monitor_module was given.
2268 if test "${with_monitor_module+set}" = set; then
2269   withval="$with_monitor_module"
2270   
2271         ol_arg=invalid
2272         for ol_val in static dynamic ; do
2273                 if test "$withval" = "$ol_val" ; then
2274                         ol_arg="$ol_val"
2275                 fi
2276         done
2277         if test "$ol_arg" = "invalid" ; then
2278                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2279         fi
2280         ol_with_monitor_module="$ol_arg"
2281
2282 else
2283         ol_with_monitor_module="static"
2284 fi
2285 # end --with-monitor_module
2286
2287 # OpenLDAP --enable-null
2288         # Check whether --enable-null or --disable-null was given.
2289 if test "${enable_null+set}" = set; then
2290   enableval="$enable_null"
2291   
2292         ol_arg=invalid
2293         for ol_val in auto yes no ; do
2294                 if test "$enableval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2300         fi
2301         ol_enable_null="$ol_arg"
2302
2303 else
2304         ol_enable_null="no"
2305 fi
2306 # end --enable-null
2307 # OpenLDAP --with-null_module
2308         # Check whether --with-null_module or --without-null_module was given.
2309 if test "${with_null_module+set}" = set; then
2310   withval="$with_null_module"
2311   
2312         ol_arg=invalid
2313         for ol_val in static dynamic ; do
2314                 if test "$withval" = "$ol_val" ; then
2315                         ol_arg="$ol_val"
2316                 fi
2317         done
2318         if test "$ol_arg" = "invalid" ; then
2319                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2320         fi
2321         ol_with_null_module="$ol_arg"
2322
2323 else
2324         ol_with_null_module="static"
2325 fi
2326 # end --with-null_module
2327
2328 # OpenLDAP --enable-passwd
2329         # Check whether --enable-passwd or --disable-passwd was given.
2330 if test "${enable_passwd+set}" = set; then
2331   enableval="$enable_passwd"
2332   
2333         ol_arg=invalid
2334         for ol_val in auto yes no ; do
2335                 if test "$enableval" = "$ol_val" ; then
2336                         ol_arg="$ol_val"
2337                 fi
2338         done
2339         if test "$ol_arg" = "invalid" ; then
2340                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2341         fi
2342         ol_enable_passwd="$ol_arg"
2343
2344 else
2345         ol_enable_passwd="no"
2346 fi
2347 # end --enable-passwd
2348 # OpenLDAP --with-passwd_module
2349         # Check whether --with-passwd_module or --without-passwd_module was given.
2350 if test "${with_passwd_module+set}" = set; then
2351   withval="$with_passwd_module"
2352   
2353         ol_arg=invalid
2354         for ol_val in static dynamic ; do
2355                 if test "$withval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2361         fi
2362         ol_with_passwd_module="$ol_arg"
2363
2364 else
2365         ol_with_passwd_module="static"
2366 fi
2367 # end --with-passwd_module
2368
2369 # OpenLDAP --enable-perl
2370         # Check whether --enable-perl or --disable-perl was given.
2371 if test "${enable_perl+set}" = set; then
2372   enableval="$enable_perl"
2373   
2374         ol_arg=invalid
2375         for ol_val in auto yes no ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2382         fi
2383         ol_enable_perl="$ol_arg"
2384
2385 else
2386         ol_enable_perl="no"
2387 fi
2388 # end --enable-perl
2389 # OpenLDAP --with-perl_module
2390         # Check whether --with-perl_module or --without-perl_module was given.
2391 if test "${with_perl_module+set}" = set; then
2392   withval="$with_perl_module"
2393   
2394         ol_arg=invalid
2395         for ol_val in static dynamic ; do
2396                 if test "$withval" = "$ol_val" ; then
2397                         ol_arg="$ol_val"
2398                 fi
2399         done
2400         if test "$ol_arg" = "invalid" ; then
2401                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2402         fi
2403         ol_with_perl_module="$ol_arg"
2404
2405 else
2406         ol_with_perl_module="static"
2407 fi
2408 # end --with-perl_module
2409
2410 # OpenLDAP --enable-shell
2411         # Check whether --enable-shell or --disable-shell was given.
2412 if test "${enable_shell+set}" = set; then
2413   enableval="$enable_shell"
2414   
2415         ol_arg=invalid
2416         for ol_val in auto yes no ; do
2417                 if test "$enableval" = "$ol_val" ; then
2418                         ol_arg="$ol_val"
2419                 fi
2420         done
2421         if test "$ol_arg" = "invalid" ; then
2422                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2423         fi
2424         ol_enable_shell="$ol_arg"
2425
2426 else
2427         ol_enable_shell="no"
2428 fi
2429 # end --enable-shell
2430 # OpenLDAP --with-shell_module
2431         # Check whether --with-shell_module or --without-shell_module was given.
2432 if test "${with_shell_module+set}" = set; then
2433   withval="$with_shell_module"
2434   
2435         ol_arg=invalid
2436         for ol_val in static dynamic ; do
2437                 if test "$withval" = "$ol_val" ; then
2438                         ol_arg="$ol_val"
2439                 fi
2440         done
2441         if test "$ol_arg" = "invalid" ; then
2442                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2443         fi
2444         ol_with_shell_module="$ol_arg"
2445
2446 else
2447         ol_with_shell_module="static"
2448 fi
2449 # end --with-shell_module
2450
2451 # OpenLDAP --enable-sql
2452         # Check whether --enable-sql or --disable-sql was given.
2453 if test "${enable_sql+set}" = set; then
2454   enableval="$enable_sql"
2455   
2456         ol_arg=invalid
2457         for ol_val in auto yes no ; do
2458                 if test "$enableval" = "$ol_val" ; then
2459                         ol_arg="$ol_val"
2460                 fi
2461         done
2462         if test "$ol_arg" = "invalid" ; then
2463                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2464         fi
2465         ol_enable_sql="$ol_arg"
2466
2467 else
2468         ol_enable_sql="no"
2469 fi
2470 # end --enable-sql
2471 # OpenLDAP --with-sql_module
2472         # Check whether --with-sql_module or --without-sql_module was given.
2473 if test "${with_sql_module+set}" = set; then
2474   withval="$with_sql_module"
2475   
2476         ol_arg=invalid
2477         for ol_val in static dynamic ; do
2478                 if test "$withval" = "$ol_val" ; then
2479                         ol_arg="$ol_val"
2480                 fi
2481         done
2482         if test "$ol_arg" = "invalid" ; then
2483                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2484         fi
2485         ol_with_sql_module="$ol_arg"
2486
2487 else
2488         ol_with_sql_module="static"
2489 fi
2490 # end --with-sql_module
2491
2492 # OpenLDAP --enable-tcl
2493         # Check whether --enable-tcl or --disable-tcl was given.
2494 if test "${enable_tcl+set}" = set; then
2495   enableval="$enable_tcl"
2496   
2497         ol_arg=invalid
2498         for ol_val in auto yes no ; do
2499                 if test "$enableval" = "$ol_val" ; then
2500                         ol_arg="$ol_val"
2501                 fi
2502         done
2503         if test "$ol_arg" = "invalid" ; then
2504                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2505         fi
2506         ol_enable_tcl="$ol_arg"
2507
2508 else
2509         ol_enable_tcl="no"
2510 fi
2511 # end --enable-tcl
2512 # OpenLDAP --with-tcl_module
2513         # Check whether --with-tcl_module or --without-tcl_module was given.
2514 if test "${with_tcl_module+set}" = set; then
2515   withval="$with_tcl_module"
2516   
2517         ol_arg=invalid
2518         for ol_val in static dynamic ; do
2519                 if test "$withval" = "$ol_val" ; then
2520                         ol_arg="$ol_val"
2521                 fi
2522         done
2523         if test "$ol_arg" = "invalid" ; then
2524                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2525         fi
2526         ol_with_tcl_module="$ol_arg"
2527
2528 else
2529         ol_with_tcl_module="static"
2530 fi
2531 # end --with-tcl_module
2532
2533
2534 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2535 if test "${with_xxslurpdoptions+set}" = set; then
2536   withval="$with_xxslurpdoptions"
2537   :
2538 fi
2539
2540 # OpenLDAP --enable-slurpd
2541         # Check whether --enable-slurpd or --disable-slurpd was given.
2542 if test "${enable_slurpd+set}" = set; then
2543   enableval="$enable_slurpd"
2544   
2545         ol_arg=invalid
2546         for ol_val in auto yes no ; do
2547                 if test "$enableval" = "$ol_val" ; then
2548                         ol_arg="$ol_val"
2549                 fi
2550         done
2551         if test "$ol_arg" = "invalid" ; then
2552                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2553         fi
2554         ol_enable_slurpd="$ol_arg"
2555
2556 else
2557         ol_enable_slurpd="auto"
2558 fi
2559 # end --enable-slurpd
2560
2561 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2562 if test "${with_xxliboptions+set}" = set; then
2563   withval="$with_xxliboptions"
2564   :
2565 fi
2566
2567 # Check whether --enable-static or --disable-static was given.
2568 if test "${enable_static+set}" = set; then
2569   enableval="$enable_static"
2570   p=${PACKAGE-default}
2571 case $enableval in
2572 yes) enable_static=yes ;;
2573 no) enable_static=no ;;
2574 *)
2575   enable_static=no
2576   # Look at the argument we got.  We use all the common list separators.
2577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2578   for pkg in $enableval; do
2579     if test "X$pkg" = "X$p"; then
2580       enable_static=yes
2581     fi
2582   done
2583   IFS="$ac_save_ifs"
2584   ;;
2585 esac
2586 else
2587   enable_static=yes
2588 fi
2589
2590 # Check whether --enable-shared or --disable-shared was given.
2591 if test "${enable_shared+set}" = set; then
2592   enableval="$enable_shared"
2593   p=${PACKAGE-default}
2594 case $enableval in
2595 yes) enable_shared=yes ;;
2596 no) enable_shared=no ;;
2597 *)
2598   enable_shared=no
2599   # Look at the argument we got.  We use all the common list separators.
2600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2601   for pkg in $enableval; do
2602     if test "X$pkg" = "X$p"; then
2603       enable_shared=yes
2604     fi
2605   done
2606   IFS="$ac_save_ifs"
2607   ;;
2608 esac
2609 else
2610   enable_shared=yes
2611 fi
2612
2613
2614
2615 # validate options
2616 if test $ol_enable_slapd = no ; then
2617                 if test $ol_enable_bdb = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2619         fi
2620         if test $ol_enable_dnssrv = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2622         fi
2623         if test $ol_enable_ldap = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2625         fi
2626         if test $ol_enable_ldbm = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2628         fi
2629         if test $ol_enable_meta = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2631         fi
2632         if test $ol_enable_monitor = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2634         fi
2635         if test $ol_enable_null = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2637         fi
2638         if test $ol_enable_passwd = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2640         fi
2641         if test $ol_enable_perl = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2643         fi
2644         if test $ol_enable_shell = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2646         fi
2647         if test $ol_enable_tcl = yes ; then
2648                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2649         fi
2650         if test $ol_enable_sql = yes ; then
2651                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2652         fi
2653         if test $ol_enable_modules = yes ; then
2654                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2655         fi
2656         if test $ol_enable_multimaster = yes ; then
2657                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2658         fi
2659         if test $ol_enable_wrappers = yes ; then
2660                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2661         fi
2662         if test $ol_enable_phonetic = yes ; then
2663                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2664         fi
2665         if test $ol_enable_rlookups = yes ; then
2666                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2667         fi
2668         if test $ol_enable_aci = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2670         fi
2671         if test $ol_with_ldbm_api != auto ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2673         fi
2674         if test $ol_with_ldbm_type != auto ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2676         fi
2677         if test $ol_with_bdb_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2679         fi
2680         if test $ol_with_dnssrv_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2682         fi
2683         if test $ol_with_ldap_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2685         fi
2686         if test $ol_with_ldbm_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2688         fi
2689         if test $ol_with_meta_module != static ; then
2690                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2691         fi
2692         if test $ol_with_monitor_module != static ; then
2693                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2694         fi
2695         if test $ol_with_null_module != static ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2697         fi
2698         if test $ol_with_passwd_module != static ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2700         fi
2701         if test $ol_with_perl_module != static ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2703         fi
2704         if test $ol_with_shell_module != static ; then
2705                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2706         fi
2707         if test $ol_with_tcl_module != static ; then
2708                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2709         fi
2710         if test $ol_with_sql_module != static ; then
2711                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2712         fi
2713         if test $ol_enable_slurpd = yes ; then
2714                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2715         fi
2716         if test $ol_enable_rewrite = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2718         fi
2719
2720         # force settings to no
2721         ol_enable_bdb=no
2722         ol_enable_dnssrv=no
2723         ol_enable_ldap=no
2724         ol_enable_ldbm=no
2725         ol_enable_meta=no
2726         ol_enable_monitor=no
2727         ol_enable_null=no
2728         ol_enable_passwd=no
2729         ol_enable_perl=no
2730         ol_enable_shell=no
2731         ol_enable_tcl=no
2732         ol_enable_sql=no
2733
2734         ol_enable_modules=no
2735         ol_enable_multimaster=no
2736         ol_enable_phonetic=no
2737         ol_enable_rlookups=no
2738         ol_enable_aci=no
2739         ol_enable_wrappers=no
2740         ol_enable_dynamic=no
2741
2742         ol_with_ldbm_api=no
2743         ol_with_ldbm_type=no
2744
2745         ol_with_bdb_module=static
2746         ol_with_dnssrv_module=static
2747         ol_with_ldap_module=static
2748         ol_with_ldbm_module=static
2749         ol_with_meta_module=static
2750         ol_with_monitor_module=static
2751         ol_with_null_module=static
2752         ol_with_passwd_module=static
2753         ol_with_perl_module=static
2754         ol_with_shell_module=static
2755         ol_with_tcl_module=static
2756         ol_with_sql_module=static
2757
2758         ol_enable_slurpd=no
2759
2760         ol_enable_rewrite=no
2761
2762 elif test $ol_enable_ldbm = no ; then
2763         
2764         if test $ol_with_ldbm_api != auto ; then
2765                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2766         fi
2767
2768         if test $ol_with_ldbm_type != auto ; then
2769                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2770         fi
2771
2772         if test $ol_with_ldbm_module != static ; then
2773                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2774         fi
2775
2776         if test $ol_enable_modules != yes -a \
2777                 $ol_enable_bdb = no -a \
2778                 $ol_enable_dnssrv = no -a \
2779                 $ol_enable_ldap = no -a \
2780                 $ol_enable_meta = no -a \
2781                 $ol_enable_monitor = no -a \
2782                 $ol_enable_null = no -a \
2783                 $ol_enable_passwd = no -a \
2784                 $ol_enable_perl = no -a \
2785                 $ol_enable_shell = no -a \
2786                 $ol_enable_sql = no -a \
2787                 $ol_enable_tcl = no ; then
2788
2789                 if test $ol_enable_slapd = yes ; then
2790                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2791                 else
2792                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2793                         ol_enable_slapd=no
2794                 fi
2795         fi
2796
2797         ol_with_ldbm_api=no
2798         ol_with_ldbm_type=no
2799         ol_with_ldbm_module=static
2800
2801         if test $ol_enable_bdb != no ; then
2802                 ol_with_ldbm_api=berkeley
2803         fi
2804
2805 else
2806                 if test $ol_with_ldbm_api = gdbm -a \
2807                 $ol_with_ldbm_type = btree ; then
2808                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2809         fi
2810         if test $ol_with_ldbm_api = mdbm -a \
2811                 $ol_with_ldbm_type = btree ; then
2812                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2813         fi
2814         if test $ol_with_ldbm_api = ndbm -a \
2815                 $ol_with_ldbm_type = btree ; then
2816                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2817         fi
2818
2819         if test $ol_enable_bdb = yes ; then
2820                 if test $ol_with_ldbm_api = auto ; then
2821                         ol_with_ldbm_api=berkeley
2822                 elif test $ol_with_ldbm_api != berkeley ; then
2823                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2824                 fi
2825
2826         elif test $ol_enable_bdb = auto ; then
2827                 if test $ol_with_ldbm_api != berkeley \
2828                         -o $ol_with_ldbm_api != auto ; then
2829                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2830                         ol_enable_bdb=no
2831                 fi
2832         fi
2833 fi
2834
2835 if test $ol_enable_slurpd = yes ; then
2836                 if test $ol_with_threads = no ; then
2837                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2838         fi
2839 fi
2840
2841 if test $ol_enable_lmpasswd = yes ; then
2842         if test $ol_with_tls = no ; then
2843                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2844         fi
2845 fi
2846
2847 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2848         if test $ol_with_kerberos = no ; then
2849                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2850         elif test $ol_with_kerberos = auto ; then
2851                 ol_with_kerberos=yes
2852         fi
2853
2854 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2855         if test $ol_with_kerberos = auto ; then
2856                 ol_with_kerberos=no
2857         elif test $ol_with_kerberos != no ; then
2858                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2859                 ol_with_kerberos=no
2860         fi
2861 fi
2862
2863 if test $ol_enable_spasswd = yes ; then
2864         if test $ol_with_cyrus_sasl = no ; then
2865                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2866         fi
2867         ol_with_cyrus_sasl=yes
2868 fi
2869
2870 echo "$ac_t""done" 1>&6
2871
2872 LDAP_LIBS=
2873 LDIF_LIBS=
2874 LDBM_LIBS=
2875 LTHREAD_LIBS=
2876 LUTIL_LIBS=
2877
2878 SLAPD_LIBS=
2879 SLURPD_LIBS=
2880
2881 BUILD_SLAPD=no
2882 BUILD_SLURPD=no
2883
2884 BUILD_THREAD=no
2885
2886 BUILD_BDB=no
2887 BUILD_DNSSRV=no
2888 BUILD_LDAP=no
2889 BUILD_LDBM=no
2890 BUILD_META=no
2891 BUILD_MONITOR=no
2892 BUILD_NULL=no
2893 BUILD_PASSWD=no
2894 BUILD_PERL=no
2895 BUILD_SHELL=no
2896 BUILD_SQL=no
2897 BUILD_TCL=no
2898
2899 BUILD_BDB_DYNAMIC=static
2900 BUILD_DNSSRV_DYNAMIC=static
2901 BUILD_LDAP_DYNAMIC=static
2902 BUILD_LDBM_DYNAMIC=static
2903 BUILD_META_DYNAMIC=static
2904 BUILD_MONITOR_DYNAMIC=static
2905 BUILD_NULL_DYNAMIC=static
2906 BUILD_PASSWD_DYNAMIC=static
2907 BUILD_PERL_DYNAMIC=static
2908 BUILD_SHELL_DYNAMIC=static
2909 BUILD_TCL_DYNAMIC=static
2910 BUILD_SQL_DYNAMIC=static
2911
2912 SLAPD_MODULES_LDFLAGS=
2913 SLAPD_MODULES_CPPFLAGS=
2914
2915 SLAPD_STATIC_BACKENDS=
2916 SLAPD_DYNAMIC_BACKENDS=
2917
2918 SLAPD_PERL_LDFLAGS=
2919 MOD_PERL_LDFLAGS=
2920 PERL_CPPFLAGS=
2921
2922 SLAPD_SQL_LDFLAGS=
2923 SLAPD_SQL_LIBS=
2924 SLAPD_SQL_INCLUDES=
2925
2926 MOD_TCL_LIB=
2927 KRB4_LIBS=
2928 KRB5_LIBS=
2929 READLINE_LIBS=
2930 SASL_LIBS=
2931 TERMCAP_LIBS=
2932 TLS_LIBS=
2933 MODULES_LIBS=
2934 AUTH_LIBS=
2935
2936 SLAPD_SLP_LIBS=
2937
2938
2939 # Find a good install program.  We prefer a C program (faster),
2940 # so one script is as good as another.  But avoid the broken or
2941 # incompatible versions:
2942 # SysV /etc/install, /usr/sbin/install
2943 # SunOS /usr/etc/install
2944 # IRIX /sbin/install
2945 # AIX /bin/install
2946 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2947 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2948 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2949 # ./install, which can be erroneously created by make from ./install.sh.
2950 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2951 echo "configure:2952: checking for a BSD compatible install" >&5
2952 if test -z "$INSTALL"; then
2953 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2957   for ac_dir in $PATH; do
2958     # Account for people who put trailing slashes in PATH elements.
2959     case "$ac_dir/" in
2960     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2961     *)
2962       # OSF1 and SCO ODT 3.0 have their own names for install.
2963       # Don't use installbsd from OSF since it installs stuff as root
2964       # by default.
2965       for ac_prog in ginstall scoinst install; do
2966         if test -f $ac_dir/$ac_prog; then
2967           if test $ac_prog = install &&
2968             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # AIX install.  It has an incompatible calling convention.
2970             :
2971           elif test $ac_prog = install &&
2972             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2973             # program-specific install script used by HP pwplus--don't use.
2974             :
2975           else
2976             ac_cv_path_install="$ac_dir/$ac_prog -c"
2977             break 2
2978           fi
2979         fi
2980       done
2981       ;;
2982     esac
2983   done
2984   IFS="$ac_save_IFS"
2985
2986 fi
2987   if test "${ac_cv_path_install+set}" = set; then
2988     INSTALL="$ac_cv_path_install"
2989   else
2990     # As a last resort, use the slow shell script.  We don't cache a
2991     # path for INSTALL within a source directory, because that will
2992     # break other packages using the cache if that directory is
2993     # removed, or if the path is relative.
2994     INSTALL="$ac_install_sh"
2995   fi
2996 fi
2997 echo "$ac_t""$INSTALL" 1>&6
2998
2999 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3000 # It thinks the first close brace ends the variable substitution.
3001 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3002
3003 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3004
3005 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3006
3007
3008 cat >> confdefs.h <<\EOF
3009 #define HAVE_MKVERSION 1
3010 EOF
3011
3012
3013
3014
3015 ol_aix_threads=no
3016 case "$target" in
3017 *-*-aix*)       if test -z "$CC" ; then
3018                 case "$ol_with_threads" in
3019                 auto | yes |  posix) ol_aix_threads=yes ;;
3020                 esac
3021         fi
3022 ;;
3023 esac
3024
3025 if test $ol_aix_threads = yes ; then
3026         if test -z "${CC}" ; then
3027                 for ac_prog in cc_r xlc_r cc
3028 do
3029 # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   if test -n "$CC"; then
3037   ac_cv_prog_CC="$CC" # Let the user override the test.
3038 else
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_prog_CC="$ac_prog"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049 fi
3050 fi
3051 CC="$ac_cv_prog_CC"
3052 if test -n "$CC"; then
3053   echo "$ac_t""$CC" 1>&6
3054 else
3055   echo "$ac_t""no" 1>&6
3056 fi
3057
3058 test -n "$CC" && break
3059 done
3060
3061
3062                 if test "$CC" = cc ; then
3063                                                 if test $ol_with_threads != auto ; then
3064                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3065                         else
3066                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3067                         fi
3068                         ol_with_threads=no
3069                 fi
3070         fi
3071
3072         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3073                 ol_with_threads=posix
3074                 ol_cv_pthread_create=yes
3075         fi
3076 fi
3077
3078 if test -z "${CC}"; then
3079         for ac_prog in cc gcc
3080 do
3081 # Extract the first word of "$ac_prog", so it can be a program name with args.
3082 set dummy $ac_prog; ac_word=$2
3083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3084 echo "configure:3085: checking for $ac_word" >&5
3085 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   if test -n "$CC"; then
3089   ac_cv_prog_CC="$CC" # Let the user override the test.
3090 else
3091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3092   ac_dummy="$PATH"
3093   for ac_dir in $ac_dummy; do
3094     test -z "$ac_dir" && ac_dir=.
3095     if test -f $ac_dir/$ac_word; then
3096       ac_cv_prog_CC="$ac_prog"
3097       break
3098     fi
3099   done
3100   IFS="$ac_save_ifs"
3101 fi
3102 fi
3103 CC="$ac_cv_prog_CC"
3104 if test -n "$CC"; then
3105   echo "$ac_t""$CC" 1>&6
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110 test -n "$CC" && break
3111 done
3112 test -n "$CC" || CC="missing"
3113
3114
3115         if test "${CC}" = "missing" ; then
3116                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3117         fi
3118 fi
3119
3120 if test -z "${AR}"; then
3121         for ac_prog in ar gar
3122 do
3123 # Extract the first word of "$ac_prog", so it can be a program name with args.
3124 set dummy $ac_prog; ac_word=$2
3125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3126 echo "configure:3127: checking for $ac_word" >&5
3127 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130   if test -n "$AR"; then
3131   ac_cv_prog_AR="$AR" # Let the user override the test.
3132 else
3133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3134   ac_dummy="$PATH"
3135   for ac_dir in $ac_dummy; do
3136     test -z "$ac_dir" && ac_dir=.
3137     if test -f $ac_dir/$ac_word; then
3138       ac_cv_prog_AR="$ac_prog"
3139       break
3140     fi
3141   done
3142   IFS="$ac_save_ifs"
3143 fi
3144 fi
3145 AR="$ac_cv_prog_AR"
3146 if test -n "$AR"; then
3147   echo "$ac_t""$AR" 1>&6
3148 else
3149   echo "$ac_t""no" 1>&6
3150 fi
3151
3152 test -n "$AR" && break
3153 done
3154 test -n "$AR" || AR="missing"
3155
3156
3157         if test "${AR}" = "missing" ; then
3158                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3159         fi
3160 fi
3161
3162
3163
3164 # Find the correct PATH separator.  Usually this is `:', but
3165 # DJGPP uses `;' like DOS.
3166 if test "X${PATH_SEPARATOR+set}" != Xset; then
3167   UNAME=${UNAME-`uname 2>/dev/null`}
3168   case X$UNAME in
3169     *-DOS) lt_cv_sys_path_separator=';' ;;
3170     *)     lt_cv_sys_path_separator=':' ;;
3171   esac
3172   PATH_SEPARATOR=$lt_cv_sys_path_separator
3173 fi
3174
3175 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for Cygwin environment" >&5
3177 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185
3186 #ifndef __CYGWIN__
3187 #define __CYGWIN__ __CYGWIN32__
3188 #endif
3189 return __CYGWIN__;
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_cygwin=yes
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198   rm -rf conftest*
3199   ac_cv_cygwin=no
3200 fi
3201 rm -f conftest*
3202 fi
3203
3204 echo "$ac_t""$ac_cv_cygwin" 1>&6
3205 CYGWIN=
3206 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3207 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3208 echo "configure:3209: checking for mingw32 environment" >&5
3209 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215
3216 int main() {
3217 return __MINGW32__;
3218 ; return 0; }
3219 EOF
3220 if { (eval echo configure:3221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3221   rm -rf conftest*
3222   ac_cv_mingw32=yes
3223 else
3224   echo "configure: failed program was:" >&5
3225   cat conftest.$ac_ext >&5
3226   rm -rf conftest*
3227   ac_cv_mingw32=no
3228 fi
3229 rm -f conftest*
3230 fi
3231
3232 echo "$ac_t""$ac_cv_mingw32" 1>&6
3233 MINGW32=
3234 test "$ac_cv_mingw32" = yes && MINGW32=yes
3235 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3236 echo "configure:3237: checking for EMX OS/2 environment" >&5
3237 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3238   echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240   cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243
3244 int main() {
3245 return __EMX__;
3246 ; return 0; }
3247 EOF
3248 if { (eval echo configure:3249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3249   rm -rf conftest*
3250   ac_cv_emxos2=yes
3251 else
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   ac_cv_emxos2=no
3256 fi
3257 rm -f conftest*
3258 fi
3259
3260 echo "$ac_t""$ac_cv_emxos2" 1>&6
3261 EMXOS2=
3262 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3263 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3264 echo "configure:3265: checking how to run the C preprocessor" >&5
3265 # On Suns, sometimes $CPP names a directory.
3266 if test -n "$CPP" && test -d "$CPP"; then
3267   CPP=
3268 fi
3269 if test -z "$CPP"; then
3270 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273     # This must be in double quotes, not single quotes, because CPP may get
3274   # substituted into the Makefile and "${CC-cc}" will confuse make.
3275   CPP="${CC-cc} -E"
3276   # On the NeXT, cc -E runs the code through the compiler's parser,
3277   # not just through cpp.
3278   cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 #include <assert.h>
3282 Syntax Error
3283 EOF
3284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3285 { (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3287 if test -z "$ac_err"; then
3288   :
3289 else
3290   echo "$ac_err" >&5
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   CPP="${CC-cc} -E -traditional-cpp"
3295   cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298 #include <assert.h>
3299 Syntax Error
3300 EOF
3301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3302 { (eval echo configure:3303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3304 if test -z "$ac_err"; then
3305   :
3306 else
3307   echo "$ac_err" >&5
3308   echo "configure: failed program was:" >&5
3309   cat conftest.$ac_ext >&5
3310   rm -rf conftest*
3311   CPP="${CC-cc} -nologo -E"
3312   cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #include <assert.h>
3316 Syntax Error
3317 EOF
3318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3319 { (eval echo configure:3320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3321 if test -z "$ac_err"; then
3322   :
3323 else
3324   echo "$ac_err" >&5
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   CPP=/lib/cpp
3329 fi
3330 rm -f conftest*
3331 fi
3332 rm -f conftest*
3333 fi
3334 rm -f conftest*
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337   CPP="$ac_cv_prog_CPP"
3338 else
3339   ac_cv_prog_CPP="$CPP"
3340 fi
3341 echo "$ac_t""$CPP" 1>&6
3342
3343 # Check whether --enable-fast-install or --disable-fast-install was given.
3344 if test "${enable_fast_install+set}" = set; then
3345   enableval="$enable_fast_install"
3346   p=${PACKAGE-default}
3347 case $enableval in
3348 yes) enable_fast_install=yes ;;
3349 no) enable_fast_install=no ;;
3350 *)
3351   enable_fast_install=no
3352   # Look at the argument we got.  We use all the common list separators.
3353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3354   for pkg in $enableval; do
3355     if test "X$pkg" = "X$p"; then
3356       enable_fast_install=yes
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360   ;;
3361 esac
3362 else
3363   enable_fast_install=yes
3364 fi
3365
3366 # Extract the first word of "gcc", so it can be a program name with args.
3367 set dummy gcc; ac_word=$2
3368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3369 echo "configure:3370: checking for $ac_word" >&5
3370 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   if test -n "$CC"; then
3374   ac_cv_prog_CC="$CC" # Let the user override the test.
3375 else
3376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3377   ac_dummy="$PATH"
3378   for ac_dir in $ac_dummy; do
3379     test -z "$ac_dir" && ac_dir=.
3380     if test -f $ac_dir/$ac_word; then
3381       ac_cv_prog_CC="gcc"
3382       break
3383     fi
3384   done
3385   IFS="$ac_save_ifs"
3386 fi
3387 fi
3388 CC="$ac_cv_prog_CC"
3389 if test -n "$CC"; then
3390   echo "$ac_t""$CC" 1>&6
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395 if test -z "$CC"; then
3396   # Extract the first word of "cc", so it can be a program name with args.
3397 set dummy cc; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   if test -n "$CC"; then
3404   ac_cv_prog_CC="$CC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_prog_rejected=no
3408   ac_dummy="$PATH"
3409   for ac_dir in $ac_dummy; do
3410     test -z "$ac_dir" && ac_dir=.
3411     if test -f $ac_dir/$ac_word; then
3412       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3413         ac_prog_rejected=yes
3414         continue
3415       fi
3416       ac_cv_prog_CC="cc"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 if test $ac_prog_rejected = yes; then
3422   # We found a bogon in the path, so make sure we never use it.
3423   set dummy $ac_cv_prog_CC
3424   shift
3425   if test $# -gt 0; then
3426     # We chose a different compiler from the bogus one.
3427     # However, it has the same basename, so the bogon will be chosen
3428     # first if we set CC to just the basename; use the full file name.
3429     shift
3430     set dummy "$ac_dir/$ac_word" "$@"
3431     shift
3432     ac_cv_prog_CC="$@"
3433   fi
3434 fi
3435 fi
3436 fi
3437 CC="$ac_cv_prog_CC"
3438 if test -n "$CC"; then
3439   echo "$ac_t""$CC" 1>&6
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443
3444   if test -z "$CC"; then
3445     case "`uname -s`" in
3446     *win32* | *WIN32* | *CYGWIN*)
3447       # Extract the first word of "cl", so it can be a program name with args.
3448 set dummy cl; ac_word=$2
3449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3450 echo "configure:3451: checking for $ac_word" >&5
3451 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   if test -n "$CC"; then
3455   ac_cv_prog_CC="$CC" # Let the user override the test.
3456 else
3457   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3458   ac_dummy="$PATH"
3459   for ac_dir in $ac_dummy; do
3460     test -z "$ac_dir" && ac_dir=.
3461     if test -f $ac_dir/$ac_word; then
3462       ac_cv_prog_CC="cl"
3463       break
3464     fi
3465   done
3466   IFS="$ac_save_ifs"
3467 fi
3468 fi
3469 CC="$ac_cv_prog_CC"
3470 if test -n "$CC"; then
3471   echo "$ac_t""$CC" 1>&6
3472 else
3473   echo "$ac_t""no" 1>&6
3474 fi
3475  ;;
3476     esac
3477   fi
3478   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3479 fi
3480
3481 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3482 echo "configure:3483: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3483
3484 ac_ext=c
3485 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3486 ac_cpp='$CPP $CPPFLAGS'
3487 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3488 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3489 cross_compiling=$ac_cv_prog_cc_cross
3490
3491 cat > conftest.$ac_ext << EOF
3492
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495
3496 main(){return(0);}
3497 EOF
3498 if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3499   ac_cv_prog_cc_works=yes
3500   # If we can't run a trivial program, we are probably using a cross compiler.
3501   if (./conftest; exit) 2>/dev/null; then
3502     ac_cv_prog_cc_cross=no
3503   else
3504     ac_cv_prog_cc_cross=yes
3505   fi
3506 else
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   ac_cv_prog_cc_works=no
3510 fi
3511 rm -fr conftest*
3512 ac_ext=c
3513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3514 ac_cpp='$CPP $CPPFLAGS'
3515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3517 cross_compiling=$ac_cv_prog_cc_cross
3518
3519 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3520 if test $ac_cv_prog_cc_works = no; then
3521   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3522 fi
3523 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3524 echo "configure:3525: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3525 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3526 cross_compiling=$ac_cv_prog_cc_cross
3527
3528 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3529 echo "configure:3530: checking whether we are using GNU C" >&5
3530 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   cat > conftest.c <<EOF
3534 #ifdef __GNUC__
3535   yes;
3536 #endif
3537 EOF
3538 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3539   ac_cv_prog_gcc=yes
3540 else
3541   ac_cv_prog_gcc=no
3542 fi
3543 fi
3544
3545 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3546
3547 if test $ac_cv_prog_gcc = yes; then
3548   GCC=yes
3549 else
3550   GCC=
3551 fi
3552
3553 ac_test_CFLAGS="${CFLAGS+set}"
3554 ac_save_CFLAGS="$CFLAGS"
3555 CFLAGS=
3556 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3557 echo "configure:3558: checking whether ${CC-cc} accepts -g" >&5
3558 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3559   echo $ac_n "(cached) $ac_c" 1>&6
3560 else
3561   echo 'void f(){}' > conftest.c
3562 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3563   ac_cv_prog_cc_g=yes
3564 else
3565   ac_cv_prog_cc_g=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570
3571 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3572 if test "$ac_test_CFLAGS" = set; then
3573   CFLAGS="$ac_save_CFLAGS"
3574 elif test $ac_cv_prog_cc_g = yes; then
3575   if test "$GCC" = yes; then
3576     CFLAGS="-g -O2"
3577   else
3578     CFLAGS="-g"
3579   fi
3580 else
3581   if test "$GCC" = yes; then
3582     CFLAGS="-O2"
3583   else
3584     CFLAGS=
3585   fi
3586 fi
3587
3588 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3589 if test "${with_gnu_ld+set}" = set; then
3590   withval="$with_gnu_ld"
3591   test "$withval" = no || with_gnu_ld=yes
3592 else
3593   with_gnu_ld=no
3594 fi
3595
3596 ac_prog=ld
3597 if test "$GCC" = yes; then
3598   # Check if gcc -print-prog-name=ld gives a path.
3599   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3600 echo "configure:3601: checking for ld used by GCC" >&5
3601   case $host in
3602   *-*-mingw*)
3603     # gcc leaves a trailing carriage return which upsets mingw
3604     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3605   *)
3606     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3607   esac
3608   case $ac_prog in
3609     # Accept absolute paths.
3610     [\\/]* | [A-Za-z]:[\\/]*)
3611       re_direlt='/[^/][^/]*/\.\./'
3612       # Canonicalize the path of ld
3613       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3614       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3615         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3616       done
3617       test -z "$LD" && LD="$ac_prog"
3618       ;;
3619   "")
3620     # If it fails, then pretend we aren't using GCC.
3621     ac_prog=ld
3622     ;;
3623   *)
3624     # If it is relative, then search for the first ld in PATH.
3625     with_gnu_ld=unknown
3626     ;;
3627   esac
3628 elif test "$with_gnu_ld" = yes; then
3629   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3630 echo "configure:3631: checking for GNU ld" >&5
3631 else
3632   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3633 echo "configure:3634: checking for non-GNU ld" >&5
3634 fi
3635 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   if test -z "$LD"; then
3639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3640   for ac_dir in $PATH; do
3641     test -z "$ac_dir" && ac_dir=.
3642     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3643       lt_cv_path_LD="$ac_dir/$ac_prog"
3644       # Check to see if the program is GNU ld.  I'd rather use --version,
3645       # but apparently some GNU ld's only accept -v.
3646       # Break only if it was the GNU/non-GNU ld that we prefer.
3647       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3648         test "$with_gnu_ld" != no && break
3649       else
3650         test "$with_gnu_ld" != yes && break
3651       fi
3652     fi
3653   done
3654   IFS="$ac_save_ifs"
3655 else
3656   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3657 fi
3658 fi
3659
3660 LD="$lt_cv_path_LD"
3661 if test -n "$LD"; then
3662   echo "$ac_t""$LD" 1>&6
3663 else
3664   echo "$ac_t""no" 1>&6
3665 fi
3666 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3667 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3668 echo "configure:3669: checking if the linker ($LD) is GNU ld" >&5
3669 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3673 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3674   lt_cv_prog_gnu_ld=yes
3675 else
3676   lt_cv_prog_gnu_ld=no
3677 fi
3678 fi
3679
3680 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3681 with_gnu_ld=$lt_cv_prog_gnu_ld
3682
3683
3684 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3685 echo "configure:3686: checking for $LD option to reload object files" >&5
3686 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   lt_cv_ld_reload_flag='-r'
3690 fi
3691
3692 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3693 reload_flag=$lt_cv_ld_reload_flag
3694 test -n "$reload_flag" && reload_flag=" $reload_flag"
3695
3696 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3697 echo "configure:3698: checking for BSD-compatible nm" >&5
3698 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   if test -n "$NM"; then
3702   # Let the user override the test.
3703   lt_cv_path_NM="$NM"
3704 else
3705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3706   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3707     test -z "$ac_dir" && ac_dir=.
3708     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3709     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3710       # Check to see if the nm accepts a BSD-compat flag.
3711       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3712       #   nm: unknown option "B" ignored
3713       # Tru64's nm complains that /dev/null is an invalid object file
3714       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3715         lt_cv_path_NM="$tmp_nm -B"
3716         break
3717       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3718         lt_cv_path_NM="$tmp_nm -p"
3719         break
3720       else
3721         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3722         continue # so that we can try to find one that supports BSD flags
3723       fi
3724     fi
3725   done
3726   IFS="$ac_save_ifs"
3727   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3728 fi
3729 fi
3730
3731 NM="$lt_cv_path_NM"
3732 echo "$ac_t""$NM" 1>&6
3733
3734 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3735 echo "configure:3736: checking whether ln -s works" >&5
3736 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   rm -f conftestdata
3740 if ln -s X conftestdata 2>/dev/null
3741 then
3742   rm -f conftestdata
3743   ac_cv_prog_LN_S="ln -s"
3744 else
3745   ac_cv_prog_LN_S=ln
3746 fi
3747 fi
3748 LN_S="$ac_cv_prog_LN_S"
3749 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3750   echo "$ac_t""yes" 1>&6
3751 else
3752   echo "$ac_t""no" 1>&6
3753 fi
3754
3755 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3756 echo "configure:3757: checking how to recognise dependant libraries" >&5
3757 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   lt_cv_file_magic_cmd='$MAGIC_CMD'
3761 lt_cv_file_magic_test_file=
3762 lt_cv_deplibs_check_method='unknown'
3763 # Need to set the preceding variable on all platforms that support
3764 # interlibrary dependencies.
3765 # 'none' -- dependencies not supported.
3766 # `unknown' -- same as none, but documents that we really don't know.
3767 # 'pass_all' -- all dependencies passed with no checks.
3768 # 'test_compile' -- check by making test program.
3769 # 'file_magic [[regex]]' -- check by looking for files in library path
3770 # which responds to the $file_magic_cmd with a given egrep regex.
3771 # If you have `file' or equivalent on your system and you're not sure
3772 # whether `pass_all' will *always* work, you probably want this one.
3773
3774 case $host_os in
3775 aix4* | aix5*)
3776   lt_cv_deplibs_check_method=pass_all
3777   ;;
3778
3779 beos*)
3780   lt_cv_deplibs_check_method=pass_all
3781   ;;
3782
3783 bsdi4*)
3784   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3785   lt_cv_file_magic_cmd='/usr/bin/file -L'
3786   lt_cv_file_magic_test_file=/shlib/libc.so
3787   ;;
3788
3789 cygwin* | mingw* | pw32*)
3790   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3791   lt_cv_file_magic_cmd='$OBJDUMP -f'
3792   ;;
3793
3794 darwin* | rhapsody*)
3795   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3796   lt_cv_file_magic_cmd='/usr/bin/file -L'
3797   case "$host_os" in
3798   rhapsody* | darwin1.[012])
3799     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3800     ;;
3801   *) # Darwin 1.3 on
3802     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3803     ;;
3804   esac
3805   ;;
3806
3807 freebsd*)
3808   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3809     case $host_cpu in
3810     i*86 )
3811       # Not sure whether the presence of OpenBSD here was a mistake.
3812       # Let's accept both of them until this is cleared up.
3813       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3814       lt_cv_file_magic_cmd=/usr/bin/file
3815       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3816       ;;
3817     esac
3818   else
3819     lt_cv_deplibs_check_method=pass_all
3820   fi
3821   ;;
3822
3823 gnu*)
3824   lt_cv_deplibs_check_method=pass_all
3825   ;;
3826
3827 hpux10.20*|hpux11*)
3828   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3829   lt_cv_file_magic_cmd=/usr/bin/file
3830   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3831   ;;
3832
3833 irix5* | irix6*)
3834   case $host_os in
3835   irix5*)
3836     # this will be overridden with pass_all, but let us keep it just in case
3837     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3838     ;;
3839   *)
3840     case $LD in
3841     *-32|*"-32 ") libmagic=32-bit;;
3842     *-n32|*"-n32 ") libmagic=N32;;
3843     *-64|*"-64 ") libmagic=64-bit;;
3844     *) libmagic=never-match;;
3845     esac
3846     # this will be overridden with pass_all, but let us keep it just in case
3847     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3848     ;;
3849   esac
3850   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3851   lt_cv_deplibs_check_method=pass_all
3852   ;;
3853
3854 # This must be Linux ELF.
3855 linux-gnu*)
3856   case $host_cpu in
3857   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3858     lt_cv_deplibs_check_method=pass_all ;;
3859   *)
3860     # glibc up to 2.1.1 does not perform some relocations on ARM
3861     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3862   esac
3863   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3864   ;;
3865
3866 netbsd*)
3867   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3868     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3869   else
3870     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3871   fi
3872   ;;
3873
3874 newos6*)
3875   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3876   lt_cv_file_magic_cmd=/usr/bin/file
3877   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3878   ;;
3879
3880 openbsd*)
3881   lt_cv_file_magic_cmd=/usr/bin/file
3882   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3883   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3884     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3885   else
3886     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3887   fi
3888   ;;
3889
3890 osf3* | osf4* | osf5*)
3891   # this will be overridden with pass_all, but let us keep it just in case
3892   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3893   lt_cv_file_magic_test_file=/shlib/libc.so
3894   lt_cv_deplibs_check_method=pass_all
3895   ;;
3896
3897 sco3.2v5*)
3898   lt_cv_deplibs_check_method=pass_all
3899   ;;
3900
3901 solaris*)
3902   lt_cv_deplibs_check_method=pass_all
3903   lt_cv_file_magic_test_file=/lib/libc.so
3904   ;;
3905
3906 sysv5uw[78]* | sysv4*uw2*)
3907   lt_cv_deplibs_check_method=pass_all
3908   ;;
3909
3910 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3911   case $host_vendor in
3912   motorola)
3913     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]'
3914     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3915     ;;
3916   ncr)
3917     lt_cv_deplibs_check_method=pass_all
3918     ;;
3919   sequent)
3920     lt_cv_file_magic_cmd='/bin/file'
3921     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3922     ;;
3923   sni)
3924     lt_cv_file_magic_cmd='/bin/file'
3925     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3926     lt_cv_file_magic_test_file=/lib/libc.so
3927     ;;
3928   esac
3929   ;;
3930 esac
3931
3932 fi
3933
3934 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3935 file_magic_cmd=$lt_cv_file_magic_cmd
3936 deplibs_check_method=$lt_cv_deplibs_check_method
3937
3938 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3939 echo "configure:3940: checking for object suffix" >&5
3940 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3941   echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943   rm -f conftest*
3944 echo 'int i = 1;' > conftest.$ac_ext
3945 if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3946   for ac_file in conftest.*; do
3947     case $ac_file in
3948     *.c) ;;
3949     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3950     esac
3951   done
3952 else
3953   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3954 fi
3955 rm -f conftest*
3956 fi
3957
3958 echo "$ac_t""$ac_cv_objext" 1>&6
3959 OBJEXT=$ac_cv_objext
3960 ac_objext=$ac_cv_objext
3961
3962
3963
3964
3965 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3966 echo "configure:3967: checking for executable suffix" >&5
3967 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3968   echo $ac_n "(cached) $ac_c" 1>&6
3969 else
3970   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3971   ac_cv_exeext=.exe
3972 else
3973   rm -f conftest*
3974   echo 'int main () { return 0; }' > conftest.$ac_ext
3975   ac_cv_exeext=
3976   if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3977     for file in conftest.*; do
3978       case $file in
3979       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3980       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3981       esac
3982     done
3983   else
3984     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3985   fi
3986   rm -f conftest*
3987   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3988 fi
3989 fi
3990
3991 EXEEXT=""
3992 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3993 echo "$ac_t""${ac_cv_exeext}" 1>&6
3994 ac_exeext=$EXEEXT
3995
3996 if test $host != $build; then
3997   ac_tool_prefix=${host_alias}-
3998 else
3999   ac_tool_prefix=
4000 fi
4001
4002
4003
4004
4005 # Check for command to grab the raw symbol name followed by C symbol from nm.
4006 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4007 echo "configure:4008: checking command to parse $NM output" >&5
4008 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   
4012 # These are sane defaults that work on at least a few old systems.
4013 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4014
4015 # Character class describing NM global symbol codes.
4016 symcode='[BCDEGRST]'
4017
4018 # Regexp to match symbols that can be accessed directly from C.
4019 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4020
4021 # Transform the above into a raw symbol and a C symbol.
4022 symxfrm='\1 \2\3 \3'
4023
4024 # Transform an extracted symbol line into a proper C declaration
4025 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4026
4027 # Transform an extracted symbol line into symbol name and symbol address
4028 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'"
4029
4030 # Define system-specific variables.
4031 case $host_os in
4032 aix*)
4033   symcode='[BCDT]'
4034   ;;
4035 cygwin* | mingw* | pw32*)
4036   symcode='[ABCDGISTW]'
4037   ;;
4038 hpux*) # Its linker distinguishes data from code symbols
4039   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4040   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'"
4041   ;;
4042 irix*)
4043   symcode='[BCDEGRST]'
4044   ;;
4045 solaris* | sysv5*)
4046   symcode='[BDT]'
4047   ;;
4048 sysv4)
4049   symcode='[DFNSTU]'
4050   ;;
4051 esac
4052
4053 # Handle CRLF in mingw tool chain
4054 opt_cr=
4055 case $host_os in
4056 mingw*)
4057   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4058   ;;
4059 esac
4060
4061 # If we're using GNU nm, then use its standard symbol codes.
4062 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4063   symcode='[ABCDGISTW]'
4064 fi
4065
4066 # Try without a prefix undercore, then with it.
4067 for ac_symprfx in "" "_"; do
4068
4069   # Write the raw and C identifiers.
4070 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4071
4072   # Check to see that the pipe works correctly.
4073   pipe_works=no
4074   rm -f conftest*
4075   cat > conftest.$ac_ext <<EOF
4076 #ifdef __cplusplus
4077 extern "C" {
4078 #endif
4079 char nm_test_var;
4080 void nm_test_func(){}
4081 #ifdef __cplusplus
4082 }
4083 #endif
4084 int main(){nm_test_var='a';nm_test_func();return(0);}
4085 EOF
4086
4087   if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4088     # Now try to grab the symbols.
4089     nlist=conftest.nm
4090     if { (eval echo configure:4091: \"$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
4091       # Try sorting and uniquifying the output.
4092       if sort "$nlist" | uniq > "$nlist"T; then
4093         mv -f "$nlist"T "$nlist"
4094       else
4095         rm -f "$nlist"T
4096       fi
4097
4098       # Make sure that we snagged all the symbols we need.
4099       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4100         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4101           cat <<EOF > conftest.$ac_ext
4102 #ifdef __cplusplus
4103 extern "C" {
4104 #endif
4105
4106 EOF
4107           # Now generate the symbol file.
4108           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4109
4110           cat <<EOF >> conftest.$ac_ext
4111 #if defined (__STDC__) && __STDC__
4112 # define lt_ptr void *
4113 #else
4114 # define lt_ptr char *
4115 # define const
4116 #endif
4117
4118 /* The mapping between symbol names and symbols. */
4119 const struct {
4120   const char *name;
4121   lt_ptr address;
4122 }
4123 lt_preloaded_symbols[] =
4124 {
4125 EOF
4126           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4127           cat <<\EOF >> conftest.$ac_ext
4128   {0, (lt_ptr) 0}
4129 };
4130
4131 #ifdef __cplusplus
4132 }
4133 #endif
4134 EOF
4135           # Now try linking the two files.
4136           mv conftest.$ac_objext conftstm.$ac_objext
4137           save_LIBS="$LIBS"
4138           save_CFLAGS="$CFLAGS"
4139           LIBS="conftstm.$ac_objext"
4140           CFLAGS="$CFLAGS$no_builtin_flag"
4141           if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4142             pipe_works=yes
4143           fi
4144           LIBS="$save_LIBS"
4145           CFLAGS="$save_CFLAGS"
4146         else
4147           echo "cannot find nm_test_func in $nlist" >&5
4148         fi
4149       else
4150         echo "cannot find nm_test_var in $nlist" >&5
4151       fi
4152     else
4153       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4154     fi
4155   else
4156     echo "$progname: failed program was:" >&5
4157     cat conftest.$ac_ext >&5
4158   fi
4159   rm -f conftest* conftst*
4160
4161   # Do not use the global_symbol_pipe unless it works.
4162   if test "$pipe_works" = yes; then
4163     break
4164   else
4165     lt_cv_sys_global_symbol_pipe=
4166   fi
4167 done
4168
4169 fi
4170
4171 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4172 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4173   global_symbol_to_cdecl=
4174   global_symbol_to_c_name_address=
4175 else
4176   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4177   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4178 fi
4179 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4180 then
4181   echo "$ac_t""failed" 1>&6
4182 else
4183   echo "$ac_t""ok" 1>&6
4184 fi
4185
4186 for ac_hdr in dlfcn.h
4187 do
4188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_hdr" >&5
4191 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <$ac_hdr>
4198 EOF
4199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4200 { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202 if test -z "$ac_err"; then
4203   rm -rf conftest*
4204   eval "ac_cv_header_$ac_safe=yes"
4205 else
4206   echo "$ac_err" >&5
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=no"
4211 fi
4212 rm -f conftest*
4213 fi
4214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4215   echo "$ac_t""yes" 1>&6
4216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4217   cat >> confdefs.h <<EOF
4218 #define $ac_tr_hdr 1
4219 EOF
4220  
4221 else
4222   echo "$ac_t""no" 1>&6
4223 fi
4224 done
4225
4226
4227
4228
4229
4230 # Only perform the check for file, if the check method requires it
4231 case $deplibs_check_method in
4232 file_magic*)
4233   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4234     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for ${ac_tool_prefix}file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/${ac_tool_prefix}file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294 if test -z "$lt_cv_path_MAGIC_CMD"; then
4295   if test -n "$ac_tool_prefix"; then
4296     echo $ac_n "checking for file""... $ac_c" 1>&6
4297 echo "configure:4298: checking for file" >&5
4298 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   case $MAGIC_CMD in
4302   /*)
4303   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4304   ;;
4305   ?:/*)
4306   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4307   ;;
4308   *)
4309   ac_save_MAGIC_CMD="$MAGIC_CMD"
4310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4311   ac_dummy="/usr/bin:$PATH"
4312   for ac_dir in $ac_dummy; do
4313     test -z "$ac_dir" && ac_dir=.
4314     if test -f $ac_dir/file; then
4315       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4316       if test -n "$file_magic_test_file"; then
4317         case $deplibs_check_method in
4318         "file_magic "*)
4319           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4320           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4321           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4322             egrep "$file_magic_regex" > /dev/null; then
4323             :
4324           else
4325             cat <<EOF 1>&2
4326
4327 *** Warning: the command libtool uses to detect shared libraries,
4328 *** $file_magic_cmd, produces output that libtool cannot recognize.
4329 *** The result is that libtool may fail to recognize shared libraries
4330 *** as such.  This will affect the creation of libtool libraries that
4331 *** depend on shared libraries, but programs linked with such libtool
4332 *** libraries will work regardless of this problem.  Nevertheless, you
4333 *** may want to report the problem to your system manager and/or to
4334 *** bug-libtool@gnu.org
4335
4336 EOF
4337           fi ;;
4338         esac
4339       fi
4340       break
4341     fi
4342   done
4343   IFS="$ac_save_ifs"
4344   MAGIC_CMD="$ac_save_MAGIC_CMD"
4345   ;;
4346 esac
4347 fi
4348
4349 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4350 if test -n "$MAGIC_CMD"; then
4351   echo "$ac_t""$MAGIC_CMD" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356   else
4357     MAGIC_CMD=:
4358   fi
4359 fi
4360
4361   fi
4362   ;;
4363 esac
4364
4365 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4366 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4368 echo "configure:4369: checking for $ac_word" >&5
4369 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   if test -n "$RANLIB"; then
4373   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4374 else
4375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4376   ac_dummy="$PATH"
4377   for ac_dir in $ac_dummy; do
4378     test -z "$ac_dir" && ac_dir=.
4379     if test -f $ac_dir/$ac_word; then
4380       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4381       break
4382     fi
4383   done
4384   IFS="$ac_save_ifs"
4385 fi
4386 fi
4387 RANLIB="$ac_cv_prog_RANLIB"
4388 if test -n "$RANLIB"; then
4389   echo "$ac_t""$RANLIB" 1>&6
4390 else
4391   echo "$ac_t""no" 1>&6
4392 fi
4393
4394
4395 if test -z "$ac_cv_prog_RANLIB"; then
4396 if test -n "$ac_tool_prefix"; then
4397   # Extract the first word of "ranlib", so it can be a program name with args.
4398 set dummy ranlib; ac_word=$2
4399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4400 echo "configure:4401: checking for $ac_word" >&5
4401 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   if test -n "$RANLIB"; then
4405   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4406 else
4407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4408   ac_dummy="$PATH"
4409   for ac_dir in $ac_dummy; do
4410     test -z "$ac_dir" && ac_dir=.
4411     if test -f $ac_dir/$ac_word; then
4412       ac_cv_prog_RANLIB="ranlib"
4413       break
4414     fi
4415   done
4416   IFS="$ac_save_ifs"
4417   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4418 fi
4419 fi
4420 RANLIB="$ac_cv_prog_RANLIB"
4421 if test -n "$RANLIB"; then
4422   echo "$ac_t""$RANLIB" 1>&6
4423 else
4424   echo "$ac_t""no" 1>&6
4425 fi
4426
4427 else
4428   RANLIB=":"
4429 fi
4430 fi
4431
4432 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4433 set dummy ${ac_tool_prefix}strip; ac_word=$2
4434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4435 echo "configure:4436: checking for $ac_word" >&5
4436 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   if test -n "$STRIP"; then
4440   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4441 else
4442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4443   ac_dummy="$PATH"
4444   for ac_dir in $ac_dummy; do
4445     test -z "$ac_dir" && ac_dir=.
4446     if test -f $ac_dir/$ac_word; then
4447       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4448       break
4449     fi
4450   done
4451   IFS="$ac_save_ifs"
4452 fi
4453 fi
4454 STRIP="$ac_cv_prog_STRIP"
4455 if test -n "$STRIP"; then
4456   echo "$ac_t""$STRIP" 1>&6
4457 else
4458   echo "$ac_t""no" 1>&6
4459 fi
4460
4461
4462 if test -z "$ac_cv_prog_STRIP"; then
4463 if test -n "$ac_tool_prefix"; then
4464   # Extract the first word of "strip", so it can be a program name with args.
4465 set dummy strip; ac_word=$2
4466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4467 echo "configure:4468: checking for $ac_word" >&5
4468 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4469   echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471   if test -n "$STRIP"; then
4472   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4473 else
4474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4475   ac_dummy="$PATH"
4476   for ac_dir in $ac_dummy; do
4477     test -z "$ac_dir" && ac_dir=.
4478     if test -f $ac_dir/$ac_word; then
4479       ac_cv_prog_STRIP="strip"
4480       break
4481     fi
4482   done
4483   IFS="$ac_save_ifs"
4484   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4485 fi
4486 fi
4487 STRIP="$ac_cv_prog_STRIP"
4488 if test -n "$STRIP"; then
4489   echo "$ac_t""$STRIP" 1>&6
4490 else
4491   echo "$ac_t""no" 1>&6
4492 fi
4493
4494 else
4495   STRIP=":"
4496 fi
4497 fi
4498
4499
4500 enable_dlopen=yes
4501 enable_win32_dll=yes
4502
4503 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4504 if test "${enable_libtool_lock+set}" = set; then
4505   enableval="$enable_libtool_lock"
4506   :
4507 fi
4508
4509 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4510
4511 # Some flags need to be propagated to the compiler or linker for good
4512 # libtool support.
4513 case $host in
4514 *-*-irix6*)
4515   # Find out which ABI we are using.
4516   echo '#line 4517 "configure"' > conftest.$ac_ext
4517   if { (eval echo configure:4518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4518     case `/usr/bin/file conftest.$ac_objext` in
4519     *32-bit*)
4520       LD="${LD-ld} -32"
4521       ;;
4522     *N32*)
4523       LD="${LD-ld} -n32"
4524       ;;
4525     *64-bit*)
4526       LD="${LD-ld} -64"
4527       ;;
4528     esac
4529   fi
4530   rm -rf conftest*
4531   ;;
4532
4533 *-*-sco3.2v5*)
4534   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4535   SAVE_CFLAGS="$CFLAGS"
4536   CFLAGS="$CFLAGS -belf"
4537   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4538 echo "configure:4539: checking whether the C compiler needs -belf" >&5
4539 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   
4543      ac_ext=c
4544 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4545 ac_cpp='$CPP $CPPFLAGS'
4546 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4547 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4548 cross_compiling=$ac_cv_prog_cc_cross
4549
4550      cat > conftest.$ac_ext <<EOF
4551 #line 4552 "configure"
4552 #include "confdefs.h"
4553
4554 int main() {
4555
4556 ; return 0; }
4557 EOF
4558 if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4559   rm -rf conftest*
4560   lt_cv_cc_needs_belf=yes
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -rf conftest*
4565   lt_cv_cc_needs_belf=no
4566 fi
4567 rm -f conftest*
4568      ac_ext=c
4569 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4570 ac_cpp='$CPP $CPPFLAGS'
4571 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4572 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4573 cross_compiling=$ac_cv_prog_cc_cross
4574
4575 fi
4576
4577 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4578   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4579     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4580     CFLAGS="$SAVE_CFLAGS"
4581   fi
4582   ;;
4583
4584 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4585   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4586 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4588 echo "configure:4589: checking for $ac_word" >&5
4589 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4590   echo $ac_n "(cached) $ac_c" 1>&6
4591 else
4592   if test -n "$DLLTOOL"; then
4593   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4594 else
4595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4596   ac_dummy="$PATH"
4597   for ac_dir in $ac_dummy; do
4598     test -z "$ac_dir" && ac_dir=.
4599     if test -f $ac_dir/$ac_word; then
4600       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4601       break
4602     fi
4603   done
4604   IFS="$ac_save_ifs"
4605 fi
4606 fi
4607 DLLTOOL="$ac_cv_prog_DLLTOOL"
4608 if test -n "$DLLTOOL"; then
4609   echo "$ac_t""$DLLTOOL" 1>&6
4610 else
4611   echo "$ac_t""no" 1>&6
4612 fi
4613
4614
4615 if test -z "$ac_cv_prog_DLLTOOL"; then
4616 if test -n "$ac_tool_prefix"; then
4617   # Extract the first word of "dlltool", so it can be a program name with args.
4618 set dummy dlltool; ac_word=$2
4619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_word" >&5
4621 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   if test -n "$DLLTOOL"; then
4625   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4626 else
4627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4628   ac_dummy="$PATH"
4629   for ac_dir in $ac_dummy; do
4630     test -z "$ac_dir" && ac_dir=.
4631     if test -f $ac_dir/$ac_word; then
4632       ac_cv_prog_DLLTOOL="dlltool"
4633       break
4634     fi
4635   done
4636   IFS="$ac_save_ifs"
4637   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4638 fi
4639 fi
4640 DLLTOOL="$ac_cv_prog_DLLTOOL"
4641 if test -n "$DLLTOOL"; then
4642   echo "$ac_t""$DLLTOOL" 1>&6
4643 else
4644   echo "$ac_t""no" 1>&6
4645 fi
4646
4647 else
4648   DLLTOOL="false"
4649 fi
4650 fi
4651
4652   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4653 set dummy ${ac_tool_prefix}as; ac_word=$2
4654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4655 echo "configure:4656: checking for $ac_word" >&5
4656 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4657   echo $ac_n "(cached) $ac_c" 1>&6
4658 else
4659   if test -n "$AS"; then
4660   ac_cv_prog_AS="$AS" # Let the user override the test.
4661 else
4662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4663   ac_dummy="$PATH"
4664   for ac_dir in $ac_dummy; do
4665     test -z "$ac_dir" && ac_dir=.
4666     if test -f $ac_dir/$ac_word; then
4667       ac_cv_prog_AS="${ac_tool_prefix}as"
4668       break
4669     fi
4670   done
4671   IFS="$ac_save_ifs"
4672 fi
4673 fi
4674 AS="$ac_cv_prog_AS"
4675 if test -n "$AS"; then
4676   echo "$ac_t""$AS" 1>&6
4677 else
4678   echo "$ac_t""no" 1>&6
4679 fi
4680
4681
4682 if test -z "$ac_cv_prog_AS"; then
4683 if test -n "$ac_tool_prefix"; then
4684   # Extract the first word of "as", so it can be a program name with args.
4685 set dummy as; ac_word=$2
4686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_word" >&5
4688 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   if test -n "$AS"; then
4692   ac_cv_prog_AS="$AS" # Let the user override the test.
4693 else
4694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4695   ac_dummy="$PATH"
4696   for ac_dir in $ac_dummy; do
4697     test -z "$ac_dir" && ac_dir=.
4698     if test -f $ac_dir/$ac_word; then
4699       ac_cv_prog_AS="as"
4700       break
4701     fi
4702   done
4703   IFS="$ac_save_ifs"
4704   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4705 fi
4706 fi
4707 AS="$ac_cv_prog_AS"
4708 if test -n "$AS"; then
4709   echo "$ac_t""$AS" 1>&6
4710 else
4711   echo "$ac_t""no" 1>&6
4712 fi
4713
4714 else
4715   AS="false"
4716 fi
4717 fi
4718
4719   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4720 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4722 echo "configure:4723: checking for $ac_word" >&5
4723 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4724   echo $ac_n "(cached) $ac_c" 1>&6
4725 else
4726   if test -n "$OBJDUMP"; then
4727   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4728 else
4729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4730   ac_dummy="$PATH"
4731   for ac_dir in $ac_dummy; do
4732     test -z "$ac_dir" && ac_dir=.
4733     if test -f $ac_dir/$ac_word; then
4734       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4735       break
4736     fi
4737   done
4738   IFS="$ac_save_ifs"
4739 fi
4740 fi
4741 OBJDUMP="$ac_cv_prog_OBJDUMP"
4742 if test -n "$OBJDUMP"; then
4743   echo "$ac_t""$OBJDUMP" 1>&6
4744 else
4745   echo "$ac_t""no" 1>&6
4746 fi
4747
4748
4749 if test -z "$ac_cv_prog_OBJDUMP"; then
4750 if test -n "$ac_tool_prefix"; then
4751   # Extract the first word of "objdump", so it can be a program name with args.
4752 set dummy objdump; ac_word=$2
4753 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4754 echo "configure:4755: checking for $ac_word" >&5
4755 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   if test -n "$OBJDUMP"; then
4759   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4760 else
4761   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4762   ac_dummy="$PATH"
4763   for ac_dir in $ac_dummy; do
4764     test -z "$ac_dir" && ac_dir=.
4765     if test -f $ac_dir/$ac_word; then
4766       ac_cv_prog_OBJDUMP="objdump"
4767       break
4768     fi
4769   done
4770   IFS="$ac_save_ifs"
4771   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4772 fi
4773 fi
4774 OBJDUMP="$ac_cv_prog_OBJDUMP"
4775 if test -n "$OBJDUMP"; then
4776   echo "$ac_t""$OBJDUMP" 1>&6
4777 else
4778   echo "$ac_t""no" 1>&6
4779 fi
4780
4781 else
4782   OBJDUMP="false"
4783 fi
4784 fi
4785
4786
4787   # recent cygwin and mingw systems supply a stub DllMain which the user
4788   # can override, but on older systems we have to supply one
4789   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4790 echo "configure:4791: checking if libtool should supply DllMain function" >&5
4791 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4792   echo $ac_n "(cached) $ac_c" 1>&6
4793 else
4794   cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797
4798 int main() {
4799 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4800       DllMain (0, 0, 0);
4801 ; return 0; }
4802 EOF
4803 if { (eval echo configure:4804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4804   rm -rf conftest*
4805   lt_cv_need_dllmain=no
4806 else
4807   echo "configure: failed program was:" >&5
4808   cat conftest.$ac_ext >&5
4809   rm -rf conftest*
4810   lt_cv_need_dllmain=yes
4811 fi
4812 rm -f conftest*
4813 fi
4814
4815 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4816
4817   case $host/$CC in
4818   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4819     # old mingw systems require "-dll" to link a DLL, while more recent ones
4820     # require "-mdll"
4821     SAVE_CFLAGS="$CFLAGS"
4822     CFLAGS="$CFLAGS -mdll"
4823     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4824 echo "configure:4825: checking how to link DLLs" >&5
4825 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831
4832 int main() {
4833
4834 ; return 0; }
4835 EOF
4836 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837   rm -rf conftest*
4838   lt_cv_cc_dll_switch=-mdll
4839 else
4840   echo "configure: failed program was:" >&5
4841   cat conftest.$ac_ext >&5
4842   rm -rf conftest*
4843   lt_cv_cc_dll_switch=-dll
4844 fi
4845 rm -f conftest*
4846 fi
4847
4848 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4849     CFLAGS="$SAVE_CFLAGS" ;;
4850   *-*-cygwin* | *-*-pw32*)
4851     # cygwin systems need to pass --dll to the linker, and not link
4852     # crt.o which will require a WinMain@16 definition.
4853     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4854   esac
4855   ;;
4856   
4857 esac
4858
4859 # Sed substitution that helps us do robust quoting.  It backslashifies
4860 # metacharacters that are still active within double-quoted strings.
4861 Xsed='sed -e s/^X//'
4862 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4863
4864 # Same as above, but do not quote variable references.
4865 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4866
4867 # Sed substitution to delay expansion of an escaped shell variable in a
4868 # double_quote_subst'ed string.
4869 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4870
4871 # Constants:
4872 rm="rm -f"
4873
4874 # Global variables:
4875 default_ofile=libtool
4876 can_build_shared=yes
4877
4878 # All known linkers require a `.a' archive for static linking (except M$VC,
4879 # which needs '.lib').
4880 libext=a
4881 ltmain="$ac_aux_dir/ltmain.sh"
4882 ofile="$default_ofile"
4883 with_gnu_ld="$lt_cv_prog_gnu_ld"
4884 need_locks="$enable_libtool_lock"
4885
4886 old_CC="$CC"
4887 old_CFLAGS="$CFLAGS"
4888
4889 # Set sane defaults for various variables
4890 test -z "$AR" && AR=ar
4891 test -z "$AR_FLAGS" && AR_FLAGS=cru
4892 test -z "$AS" && AS=as
4893 test -z "$CC" && CC=cc
4894 test -z "$DLLTOOL" && DLLTOOL=dlltool
4895 test -z "$LD" && LD=ld
4896 test -z "$LN_S" && LN_S="ln -s"
4897 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4898 test -z "$NM" && NM=nm
4899 test -z "$OBJDUMP" && OBJDUMP=objdump
4900 test -z "$RANLIB" && RANLIB=:
4901 test -z "$STRIP" && STRIP=:
4902 test -z "$ac_objext" && ac_objext=o
4903
4904 if test x"$host" != x"$build"; then
4905   ac_tool_prefix=${host_alias}-
4906 else
4907   ac_tool_prefix=
4908 fi
4909
4910 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4911 case $host_os in
4912 linux-gnu*) ;;
4913 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4914 esac
4915
4916 case $host_os in
4917 aix3*)
4918   # AIX sometimes has problems with the GCC collect2 program.  For some
4919   # reason, if we set the COLLECT_NAMES environment variable, the problems
4920   # vanish in a puff of smoke.
4921   if test "X${COLLECT_NAMES+set}" != Xset; then
4922     COLLECT_NAMES=
4923     export COLLECT_NAMES
4924   fi
4925   ;;
4926 esac
4927
4928 # Determine commands to create old-style static archives.
4929 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4930 old_postinstall_cmds='chmod 644 $oldlib'
4931 old_postuninstall_cmds=
4932
4933 if test -n "$RANLIB"; then
4934   case $host_os in
4935   openbsd*)
4936     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4937     ;;
4938   *)
4939     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4940     ;;
4941   esac
4942   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4943 fi
4944
4945 # Allow CC to be a program name with arguments.
4946 set dummy $CC
4947 compiler="$2"
4948
4949 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4950 echo "configure:4951: checking for objdir" >&5
4951 rm -f .libs 2>/dev/null
4952 mkdir .libs 2>/dev/null
4953 if test -d .libs; then
4954   objdir=.libs
4955 else
4956   # MS-DOS does not allow filenames that begin with a dot.
4957   objdir=_libs
4958 fi
4959 rmdir .libs 2>/dev/null
4960 echo "$ac_t""$objdir" 1>&6
4961
4962
4963 # Check whether --with-pic or --without-pic was given.
4964 if test "${with_pic+set}" = set; then
4965   withval="$with_pic"
4966   pic_mode="$withval"
4967 else
4968   pic_mode=default
4969 fi
4970
4971 test -z "$pic_mode" && pic_mode=default
4972
4973 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4974 # in isolation, and that seeing it set (from the cache) indicates that
4975 # the associated values are set (in the cache) correctly too.
4976 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4977 echo "configure:4978: checking for $compiler option to produce PIC" >&5
4978 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4979   echo $ac_n "(cached) $ac_c" 1>&6
4980 else
4981    lt_cv_prog_cc_pic=
4982   lt_cv_prog_cc_shlib=
4983   lt_cv_prog_cc_wl=
4984   lt_cv_prog_cc_static=
4985   lt_cv_prog_cc_no_builtin=
4986   lt_cv_prog_cc_can_build_shared=$can_build_shared
4987
4988   if test "$GCC" = yes; then
4989     lt_cv_prog_cc_wl='-Wl,'
4990     lt_cv_prog_cc_static='-static'
4991
4992     case $host_os in
4993     aix*)
4994       # Below there is a dirty hack to force normal static linking with -ldl
4995       # The problem is because libdl dynamically linked with both libc and
4996       # libC (AIX C++ library), which obviously doesn't included in libraries
4997       # list by gcc. This cause undefined symbols with -static flags.
4998       # This hack allows C programs to be linked with "-static -ldl", but
4999       # not sure about C++ programs.
5000       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5001       ;;
5002     amigaos*)
5003       # FIXME: we need at least 68020 code to build shared libraries, but
5004       # adding the `-m68020' flag to GCC prevents building anything better,
5005       # like `-m68040'.
5006       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5007       ;;
5008     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5009       # PIC is the default for these OSes.
5010       ;;
5011     darwin* | rhapsody*)
5012       # PIC is the default on this platform
5013       # Common symbols not allowed in MH_DYLIB files
5014       lt_cv_prog_cc_pic='-fno-common'
5015       ;;
5016     cygwin* | mingw* | pw32* | os2*)
5017       # This hack is so that the source file can tell whether it is being
5018       # built for inclusion in a dll (and should export symbols for example).
5019       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5020       ;;
5021     sysv4*MP*)
5022       if test -d /usr/nec; then
5023          lt_cv_prog_cc_pic=-Kconform_pic
5024       fi
5025       ;;
5026     *)
5027       lt_cv_prog_cc_pic='-fPIC'
5028       ;;
5029     esac
5030   else
5031     # PORTME Check for PIC flags for the system compiler.
5032     case $host_os in
5033     aix3* | aix4* | aix5*)
5034       lt_cv_prog_cc_wl='-Wl,'
5035       # All AIX code is PIC.
5036       if test "$host_cpu" = ia64; then
5037         # AIX 5 now supports IA64 processor
5038         lt_cv_prog_cc_static='-Bstatic'
5039       else
5040         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5041       fi
5042       ;;
5043
5044     hpux9* | hpux10* | hpux11*)
5045       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5046       lt_cv_prog_cc_wl='-Wl,'
5047       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5048       lt_cv_prog_cc_pic='+Z'
5049       ;;
5050
5051     irix5* | irix6*)
5052       lt_cv_prog_cc_wl='-Wl,'
5053       lt_cv_prog_cc_static='-non_shared'
5054       # PIC (with -KPIC) is the default.
5055       ;;
5056
5057     cygwin* | mingw* | pw32* | os2*)
5058       # This hack is so that the source file can tell whether it is being
5059       # built for inclusion in a dll (and should export symbols for example).
5060       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5061       ;;
5062
5063     newsos6)
5064       lt_cv_prog_cc_pic='-KPIC'
5065       lt_cv_prog_cc_static='-Bstatic'
5066       ;;
5067
5068     osf3* | osf4* | osf5*)
5069       # All OSF/1 code is PIC.
5070       lt_cv_prog_cc_wl='-Wl,'
5071       lt_cv_prog_cc_static='-non_shared'
5072       ;;
5073
5074     sco3.2v5*)
5075       lt_cv_prog_cc_pic='-Kpic'
5076       lt_cv_prog_cc_static='-dn'
5077       lt_cv_prog_cc_shlib='-belf'
5078       ;;
5079
5080     solaris*)
5081       lt_cv_prog_cc_pic='-KPIC'
5082       lt_cv_prog_cc_static='-Bstatic'
5083       lt_cv_prog_cc_wl='-Wl,'
5084       ;;
5085
5086     sunos4*)
5087       lt_cv_prog_cc_pic='-PIC'
5088       lt_cv_prog_cc_static='-Bstatic'
5089       lt_cv_prog_cc_wl='-Qoption ld '
5090       ;;
5091
5092     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5093       lt_cv_prog_cc_pic='-KPIC'
5094       lt_cv_prog_cc_static='-Bstatic'
5095       if test "x$host_vendor" = xsni; then
5096         lt_cv_prog_cc_wl='-LD'
5097       else
5098         lt_cv_prog_cc_wl='-Wl,'
5099       fi
5100       ;;
5101
5102     uts4*)
5103       lt_cv_prog_cc_pic='-pic'
5104       lt_cv_prog_cc_static='-Bstatic'
5105       ;;
5106
5107     sysv4*MP*)
5108       if test -d /usr/nec ;then
5109         lt_cv_prog_cc_pic='-Kconform_pic'
5110         lt_cv_prog_cc_static='-Bstatic'
5111       fi
5112       ;;
5113
5114     *)
5115       lt_cv_prog_cc_can_build_shared=no
5116       ;;
5117     esac
5118   fi
5119
5120 fi
5121
5122 if test -z "$lt_cv_prog_cc_pic"; then
5123   echo "$ac_t""none" 1>&6
5124 else
5125   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5126
5127   # Check to make sure the pic_flag actually works.
5128   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5129 echo "configure:5130: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5130   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5131   echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133       save_CFLAGS="$CFLAGS"
5134     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5135     cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138
5139 int main() {
5140
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5144   rm -rf conftest*
5145         case $host_os in
5146       hpux9* | hpux10* | hpux11*)
5147         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5148         # they create non-PIC objects.  So, if there were any warnings, we
5149         # assume that PIC is not supported.
5150         if test -s conftest.err; then
5151           lt_cv_prog_cc_pic_works=no
5152         else
5153           lt_cv_prog_cc_pic_works=yes
5154         fi
5155         ;;
5156       *)
5157         lt_cv_prog_cc_pic_works=yes
5158         ;;
5159       esac
5160     
5161 else
5162   echo "configure: failed program was:" >&5
5163   cat conftest.$ac_ext >&5
5164   rm -rf conftest*
5165         lt_cv_prog_cc_pic_works=no
5166     
5167 fi
5168 rm -f conftest*
5169     CFLAGS="$save_CFLAGS"
5170   
5171 fi
5172
5173
5174   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5175     lt_cv_prog_cc_pic=
5176     lt_cv_prog_cc_can_build_shared=no
5177   else
5178     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5179   fi
5180
5181   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5182 fi
5183
5184 # Check for any special shared library compilation flags.
5185 if test -n "$lt_cv_prog_cc_shlib"; then
5186   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5187   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5188   else
5189    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5190     lt_cv_prog_cc_can_build_shared=no
5191   fi
5192 fi
5193
5194 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5195 echo "configure:5196: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5196 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199     lt_cv_prog_cc_static_works=no
5200   save_LDFLAGS="$LDFLAGS"
5201   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5202   cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205
5206 int main() {
5207
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   lt_cv_prog_cc_static_works=yes
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216 fi
5217 rm -f conftest*
5218   LDFLAGS="$save_LDFLAGS"
5219
5220 fi
5221
5222
5223 # Belt *and* braces to stop my trousers falling down:
5224 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5225 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5226
5227 pic_flag="$lt_cv_prog_cc_pic"
5228 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5229 wl="$lt_cv_prog_cc_wl"
5230 link_static_flag="$lt_cv_prog_cc_static"
5231 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5232 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5233
5234
5235 # Check to see if options -o and -c are simultaneously supported by compiler
5236 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5237 echo "configure:5238: checking if $compiler supports -c -o file.$ac_objext" >&5
5238 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5239   echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241   
5242 $rm -r conftest 2>/dev/null
5243 mkdir conftest
5244 cd conftest
5245 echo "int some_variable = 0;" > conftest.$ac_ext
5246 mkdir out
5247 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5248 # that will create temporary files in the current directory regardless of
5249 # the output directory.  Thus, making CWD read-only will cause this test
5250 # to fail, enabling locking or at least warning the user not to do parallel
5251 # builds.
5252 chmod -w .
5253 save_CFLAGS="$CFLAGS"
5254 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5255 compiler_c_o=no
5256 if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5257   # The compiler can only warn and ignore the option if not recognized
5258   # So say no if there are warnings
5259   if test -s out/conftest.err; then
5260     lt_cv_compiler_c_o=no
5261   else
5262     lt_cv_compiler_c_o=yes
5263   fi
5264 else
5265   # Append any errors to the config.log.
5266   cat out/conftest.err 1>&5
5267   lt_cv_compiler_c_o=no
5268 fi
5269 CFLAGS="$save_CFLAGS"
5270 chmod u+w .
5271 $rm conftest* out/*
5272 rmdir out
5273 cd ..
5274 rmdir conftest
5275 $rm -r conftest 2>/dev/null
5276
5277 fi
5278
5279 compiler_c_o=$lt_cv_compiler_c_o
5280 echo "$ac_t""$compiler_c_o" 1>&6
5281
5282 if test x"$compiler_c_o" = x"yes"; then
5283   # Check to see if we can write to a .lo
5284   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5285 echo "configure:5286: checking if $compiler supports -c -o file.lo" >&5
5286   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5287   echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289   
5290   lt_cv_compiler_o_lo=no
5291   save_CFLAGS="$CFLAGS"
5292   CFLAGS="$CFLAGS -c -o conftest.lo"
5293   save_objext="$ac_objext"
5294   ac_objext=lo
5295   cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298
5299 int main() {
5300 int some_variable = 0;
5301 ; return 0; }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5304   rm -rf conftest*
5305       # The compiler can only warn and ignore the option if not recognized
5306     # So say no if there are warnings
5307     if test -s conftest.err; then
5308       lt_cv_compiler_o_lo=no
5309     else
5310       lt_cv_compiler_o_lo=yes
5311     fi
5312   
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316 fi
5317 rm -f conftest*
5318   ac_objext="$save_objext"
5319   CFLAGS="$save_CFLAGS"
5320   
5321 fi
5322
5323   compiler_o_lo=$lt_cv_compiler_o_lo
5324   echo "$ac_t""$compiler_o_lo" 1>&6
5325 else
5326   compiler_o_lo=no
5327 fi
5328
5329 # Check to see if we can do hard links to lock some files if needed
5330 hard_links="nottested"
5331 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5332   # do not overwrite the value of need_locks provided by the user
5333   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5334 echo "configure:5335: checking if we can lock with hard links" >&5
5335   hard_links=yes
5336   $rm conftest*
5337   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5338   touch conftest.a
5339   ln conftest.a conftest.b 2>&5 || hard_links=no
5340   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5341   echo "$ac_t""$hard_links" 1>&6
5342   if test "$hard_links" = no; then
5343     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5344     need_locks=warn
5345   fi
5346 else
5347   need_locks=no
5348 fi
5349
5350 if test "$GCC" = yes; then
5351   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5352   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5353 echo "configure:5354: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5354   echo "int some_variable = 0;" > conftest.$ac_ext
5355   save_CFLAGS="$CFLAGS"
5356   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5357   compiler_rtti_exceptions=no
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361
5362 int main() {
5363 int some_variable = 0;
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5367   rm -rf conftest*
5368       # The compiler can only warn and ignore the option if not recognized
5369     # So say no if there are warnings
5370     if test -s conftest.err; then
5371       compiler_rtti_exceptions=no
5372     else
5373       compiler_rtti_exceptions=yes
5374     fi
5375   
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379 fi
5380 rm -f conftest*
5381   CFLAGS="$save_CFLAGS"
5382   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5383
5384   if test "$compiler_rtti_exceptions" = "yes"; then
5385     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5386   else
5387     no_builtin_flag=' -fno-builtin'
5388   fi
5389 fi
5390
5391 # See if the linker supports building shared libraries.
5392 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5393 echo "configure:5394: checking whether the linker ($LD) supports shared libraries" >&5
5394
5395 allow_undefined_flag=
5396 no_undefined_flag=
5397 need_lib_prefix=unknown
5398 need_version=unknown
5399 # when you set need_version to no, make sure it does not cause -set_version
5400 # flags to be left without arguments
5401 archive_cmds=
5402 archive_expsym_cmds=
5403 old_archive_from_new_cmds=
5404 old_archive_from_expsyms_cmds=
5405 export_dynamic_flag_spec=
5406 whole_archive_flag_spec=
5407 thread_safe_flag_spec=
5408 hardcode_into_libs=no
5409 hardcode_libdir_flag_spec=
5410 hardcode_libdir_separator=
5411 hardcode_direct=no
5412 hardcode_minus_L=no
5413 hardcode_shlibpath_var=unsupported
5414 runpath_var=
5415 link_all_deplibs=unknown
5416 always_export_symbols=no
5417 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5418 # include_expsyms should be a list of space-separated symbols to be *always*
5419 # included in the symbol list
5420 include_expsyms=
5421 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5422 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5423 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5424 # as well as any symbol that contains `d'.
5425 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5426 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5427 # platforms (ab)use it in PIC code, but their linkers get confused if
5428 # the symbol is explicitly referenced.  Since portable code cannot
5429 # rely on this symbol name, it's probably fine to never include it in
5430 # preloaded symbol tables.
5431 extract_expsyms_cmds=
5432
5433 case $host_os in
5434 cygwin* | mingw* | pw32*)
5435   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5436   # When not using gcc, we currently assume that we are using
5437   # Microsoft Visual C++.
5438   if test "$GCC" != yes; then
5439     with_gnu_ld=no
5440   fi
5441   ;;
5442 openbsd*)
5443   with_gnu_ld=no
5444   ;;
5445 esac
5446
5447 ld_shlibs=yes
5448 if test "$with_gnu_ld" = yes; then
5449   # If archive_cmds runs LD, not CC, wlarc should be empty
5450   wlarc='${wl}'
5451
5452   # See if GNU ld supports shared libraries.
5453   case $host_os in
5454   aix3* | aix4* | aix5*)
5455     # On AIX, the GNU linker is very broken
5456     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5457     ld_shlibs=no
5458     cat <<EOF 1>&2
5459
5460 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5461 *** to be unable to reliably create shared libraries on AIX.
5462 *** Therefore, libtool is disabling shared libraries support.  If you
5463 *** really care for shared libraries, you may want to modify your PATH
5464 *** so that a non-GNU linker is found, and then restart.
5465
5466 EOF
5467     ;;
5468
5469   amigaos*)
5470     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)'
5471     hardcode_libdir_flag_spec='-L$libdir'
5472     hardcode_minus_L=yes
5473
5474     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5475     # that the semantics of dynamic libraries on AmigaOS, at least up
5476     # to version 4, is to share data among multiple programs linked
5477     # with the same dynamic library.  Since this doesn't match the
5478     # behavior of shared libraries on other platforms, we can use
5479     # them.
5480     ld_shlibs=no
5481     ;;
5482
5483   beos*)
5484     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5485       allow_undefined_flag=unsupported
5486       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5487       # support --undefined.  This deserves some investigation.  FIXME
5488       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5489     else
5490       ld_shlibs=no
5491     fi
5492     ;;
5493
5494   cygwin* | mingw* | pw32*)
5495     # hardcode_libdir_flag_spec is actually meaningless, as there is
5496     # no search path for DLLs.
5497     hardcode_libdir_flag_spec='-L$libdir'
5498     allow_undefined_flag=unsupported
5499     always_export_symbols=yes
5500
5501     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5502       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5503       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5504       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5505       else $CC -o impgen impgen.c ; fi)~
5506       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5507
5508     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5509
5510     # cygwin and mingw dlls have different entry points and sets of symbols
5511     # to exclude.
5512     # FIXME: what about values for MSVC?
5513     dll_entry=__cygwin_dll_entry@12
5514     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5515     case $host_os in
5516     mingw*)
5517       # mingw values
5518       dll_entry=_DllMainCRTStartup@12
5519       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5520       ;;
5521     esac
5522
5523     # mingw and cygwin differ, and it's simplest to just exclude the union
5524     # of the two symbol sets.
5525     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5526
5527     # recent cygwin and mingw systems supply a stub DllMain which the user
5528     # can override, but on older systems we have to supply one (in ltdll.c)
5529     if test "x$lt_cv_need_dllmain" = "xyes"; then
5530       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5531       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~
5532         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5533     else
5534       ltdll_obj=
5535       ltdll_cmds=
5536     fi
5537
5538     # Extract the symbol export list from an `--export-all' def file,
5539     # then regenerate the def file from the symbol export list, so that
5540     # the compiled dll only exports the symbol export list.
5541     # Be careful not to strip the DATA tag left be newer dlltools.
5542     export_symbols_cmds="$ltdll_cmds"'
5543       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5544       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5545
5546     # If the export-symbols file already is a .def file (1st line
5547     # is EXPORTS), use it as is.
5548     # If DATA tags from a recent dlltool are present, honour them!
5549     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5550         cp $export_symbols $output_objdir/$soname-def;
5551       else
5552         echo EXPORTS > $output_objdir/$soname-def;
5553         _lt_hint=1;
5554         cat $export_symbols | while read symbol; do
5555          set dummy \$symbol;
5556          case \$# in
5557            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5558            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5559          esac;
5560          _lt_hint=`expr 1 + \$_lt_hint`;
5561         done;
5562       fi~
5563       '"$ltdll_cmds"'
5564       $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~
5565       $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~
5566       $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~
5567       $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~
5568       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5569     ;;
5570
5571   netbsd*)
5572     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5573       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5574       wlarc=
5575     else
5576       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5577       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5578     fi
5579     ;;
5580
5581   solaris* | sysv5*)
5582     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5583       ld_shlibs=no
5584       cat <<EOF 1>&2
5585
5586 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5587 *** create shared libraries on Solaris systems.  Therefore, libtool
5588 *** is disabling shared libraries support.  We urge you to upgrade GNU
5589 *** binutils to release 2.9.1 or newer.  Another option is to modify
5590 *** your PATH or compiler configuration so that the native linker is
5591 *** used, and then restart.
5592
5593 EOF
5594     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5595       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5596       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5597     else
5598       ld_shlibs=no
5599     fi
5600     ;;
5601
5602   sunos4*)
5603     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5604     wlarc=
5605     hardcode_direct=yes
5606     hardcode_shlibpath_var=no
5607     ;;
5608
5609   *)
5610     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5611       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5612       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5613     else
5614       ld_shlibs=no
5615     fi
5616     ;;
5617   esac
5618
5619   if test "$ld_shlibs" = yes; then
5620     runpath_var=LD_RUN_PATH
5621     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5622     export_dynamic_flag_spec='${wl}--export-dynamic'
5623     case $host_os in
5624     cygwin* | mingw* | pw32*)
5625       # dlltool doesn't understand --whole-archive et. al.
5626       whole_archive_flag_spec=
5627       ;;
5628     *)
5629       # ancient GNU ld didn't support --whole-archive et. al.
5630       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5631         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5632       else
5633         whole_archive_flag_spec=
5634       fi
5635       ;;
5636     esac
5637   fi
5638 else
5639   # PORTME fill in a description of your system's linker (not GNU ld)
5640   case $host_os in
5641   aix3*)
5642     allow_undefined_flag=unsupported
5643     always_export_symbols=yes
5644     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'
5645     # Note: this linker hardcodes the directories in LIBPATH if there
5646     # are no directories specified by -L.
5647     hardcode_minus_L=yes
5648     if test "$GCC" = yes && test -z "$link_static_flag"; then
5649       # Neither direct hardcoding nor static linking is supported with a
5650       # broken collect2.
5651       hardcode_direct=unsupported
5652     fi
5653     ;;
5654
5655   aix4* | aix5*)
5656     if test "$host_cpu" = ia64; then
5657       # On IA64, the linker does run time linking by default, so we don't
5658       # have to do anything special.
5659       aix_use_runtimelinking=no
5660       exp_sym_flag='-Bexport'
5661       no_entry_flag=""
5662     else
5663       aix_use_runtimelinking=no
5664
5665       # Test if we are trying to use run time linking or normal
5666       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5667       # need to do runtime linking.
5668       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5669         for ld_flag in $LDFLAGS; do
5670           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5671             aix_use_runtimelinking=yes
5672             break
5673           fi
5674         done
5675       esac
5676
5677       exp_sym_flag='-bexport'
5678       no_entry_flag='-bnoentry'
5679     fi
5680
5681     # When large executables or shared objects are built, AIX ld can
5682     # have problems creating the table of contents.  If linking a library
5683     # or program results in "error TOC overflow" add -mminimal-toc to
5684     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5685     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5686
5687     hardcode_direct=yes
5688     archive_cmds=''
5689     hardcode_libdir_separator=':'
5690     if test "$GCC" = yes; then
5691       case $host_os in aix4.[012]|aix4.[012].*)
5692         collect2name=`${CC} -print-prog-name=collect2`
5693         if test -f "$collect2name" && \
5694           strings "$collect2name" | grep resolve_lib_name >/dev/null
5695         then
5696           # We have reworked collect2
5697           hardcode_direct=yes
5698         else
5699           # We have old collect2
5700           hardcode_direct=unsupported
5701           # It fails to find uninstalled libraries when the uninstalled
5702           # path is not listed in the libpath.  Setting hardcode_minus_L
5703           # to unsupported forces relinking
5704           hardcode_minus_L=yes
5705           hardcode_libdir_flag_spec='-L$libdir'
5706           hardcode_libdir_separator=
5707         fi
5708       esac
5709
5710       shared_flag='-shared'
5711     else
5712       # not using gcc
5713       if test "$host_cpu" = ia64; then
5714         shared_flag='${wl}-G'
5715       else
5716         if test "$aix_use_runtimelinking" = yes; then
5717           shared_flag='${wl}-G'
5718         else
5719           shared_flag='${wl}-bM:SRE'
5720         fi
5721       fi
5722     fi
5723
5724     # It seems that -bexpall can do strange things, so it is better to
5725     # generate a list of symbols to export.
5726     always_export_symbols=yes
5727     if test "$aix_use_runtimelinking" = yes; then
5728       # Warning - without using the other runtime loading flags (-brtl),
5729       # -berok will link without error, but may produce a broken library.
5730       allow_undefined_flag='-berok'
5731       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5732       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"
5733     else
5734       if test "$host_cpu" = ia64; then
5735         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5736         allow_undefined_flag="-z nodefs"
5737         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"
5738       else
5739         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5740         # Warning - without using the other run time loading flags,
5741         # -berok will link without error, but may produce a broken library.
5742         allow_undefined_flag='${wl}-berok'
5743         # This is a bit strange, but is similar to how AIX traditionally builds
5744         # it's shared libraries.
5745         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'
5746       fi
5747     fi
5748     ;;
5749
5750   amigaos*)
5751     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)'
5752     hardcode_libdir_flag_spec='-L$libdir'
5753     hardcode_minus_L=yes
5754     # see comment about different semantics on the GNU ld section
5755     ld_shlibs=no
5756     ;;
5757
5758   cygwin* | mingw* | pw32*)
5759     # When not using gcc, we currently assume that we are using
5760     # Microsoft Visual C++.
5761     # hardcode_libdir_flag_spec is actually meaningless, as there is
5762     # no search path for DLLs.
5763     hardcode_libdir_flag_spec=' '
5764     allow_undefined_flag=unsupported
5765     # Tell ltmain to make .lib files, not .a files.
5766     libext=lib
5767     # FIXME: Setting linknames here is a bad hack.
5768     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5769     # The linker will automatically build a .lib file if we build a DLL.
5770     old_archive_from_new_cmds='true'
5771     # FIXME: Should let the user specify the lib program.
5772     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5773     fix_srcfile_path='`cygpath -w "$srcfile"`'
5774     ;;
5775
5776   darwin* | rhapsody*)
5777     case "$host_os" in
5778     rhapsody* | darwin1.[012])
5779       allow_undefined_flag='-undefined suppress'
5780       ;;
5781     *) # Darwin 1.3 on
5782       allow_undefined_flag='-flat_namespace -undefined suppress'
5783       ;;
5784     esac
5785     # FIXME: Relying on posixy $() will cause problems for
5786     #        cross-compilation, but unfortunately the echo tests do not
5787     #        yet detect zsh echo's removal of \ escapes.
5788     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'
5789     # We need to add '_' to the symbols in $export_symbols first
5790     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5791     hardcode_direct=yes
5792     hardcode_shlibpath_var=no
5793     whole_archive_flag_spec='-all_load $convenience'
5794     ;;
5795
5796   freebsd1*)
5797     ld_shlibs=no
5798     ;;
5799
5800   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5801   # support.  Future versions do this automatically, but an explicit c++rt0.o
5802   # does not break anything, and helps significantly (at the cost of a little
5803   # extra space).
5804   freebsd2.2*)
5805     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5806     hardcode_libdir_flag_spec='-R$libdir'
5807     hardcode_direct=yes
5808     hardcode_shlibpath_var=no
5809     ;;
5810
5811   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5812   freebsd2*)
5813     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5814     hardcode_direct=yes
5815     hardcode_minus_L=yes
5816     hardcode_shlibpath_var=no
5817     ;;
5818
5819   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5820   freebsd*)
5821     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5822     hardcode_libdir_flag_spec='-R$libdir'
5823     hardcode_direct=yes
5824     hardcode_shlibpath_var=no
5825     ;;
5826
5827   hpux9* | hpux10* | hpux11*)
5828     case $host_os in
5829     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' ;;
5830     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5831     esac
5832     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5833     hardcode_libdir_separator=:
5834     hardcode_direct=yes
5835     hardcode_minus_L=yes # Not in the search PATH, but as the default
5836                          # location of the library.
5837     export_dynamic_flag_spec='${wl}-E'
5838     ;;
5839
5840   irix5* | irix6*)
5841     if test "$GCC" = yes; then
5842       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'
5843     else
5844       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'
5845     fi
5846     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5847     hardcode_libdir_separator=:
5848     link_all_deplibs=yes
5849     ;;
5850
5851   netbsd*)
5852     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5853       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5854     else
5855       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5856     fi
5857     hardcode_libdir_flag_spec='-R$libdir'
5858     hardcode_direct=yes
5859     hardcode_shlibpath_var=no
5860     ;;
5861
5862   newsos6)
5863     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5864     hardcode_direct=yes
5865     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5866     hardcode_libdir_separator=:
5867     hardcode_shlibpath_var=no
5868     ;;
5869
5870   openbsd*)
5871     hardcode_direct=yes
5872     hardcode_shlibpath_var=no
5873     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5874       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5875       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5876       export_dynamic_flag_spec='${wl}-E'
5877     else
5878       case "$host_os" in
5879       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5880         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5881         hardcode_libdir_flag_spec='-R$libdir'
5882         ;;
5883       *)
5884         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5885         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5886         ;;
5887       esac
5888     fi
5889     ;;
5890
5891   os2*)
5892     hardcode_libdir_flag_spec='-L$libdir'
5893     hardcode_minus_L=yes
5894     allow_undefined_flag=unsupported
5895     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'
5896     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5897     ;;
5898
5899   osf3*)
5900     if test "$GCC" = yes; then
5901       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5902       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'
5903     else
5904       allow_undefined_flag=' -expect_unresolved \*'
5905       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'
5906     fi
5907     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5908     hardcode_libdir_separator=:
5909     ;;
5910
5911   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5912     if test "$GCC" = yes; then
5913       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5914       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'
5915       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5916     else
5917       allow_undefined_flag=' -expect_unresolved \*'
5918       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'
5919       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5920       $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'
5921
5922       #Both c and cxx compiler support -rpath directly
5923       hardcode_libdir_flag_spec='-rpath $libdir'
5924     fi
5925     hardcode_libdir_separator=:
5926     ;;
5927
5928   sco3.2v5*)
5929     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5930     hardcode_shlibpath_var=no
5931     runpath_var=LD_RUN_PATH
5932     hardcode_runpath_var=yes
5933     export_dynamic_flag_spec='${wl}-Bexport'
5934     ;;
5935
5936   solaris*)
5937     # gcc --version < 3.0 without binutils cannot create self contained
5938     # shared libraries reliably, requiring libgcc.a to resolve some of
5939     # the object symbols generated in some cases.  Libraries that use
5940     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5941     # a copy of libgcc.a into every shared library to guarantee resolving
5942     # such symbols causes other problems:  According to Tim Van Holder
5943     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5944     # (to the application) exception stack for one thing.
5945     no_undefined_flag=' -z defs'
5946     if test "$GCC" = yes; then
5947       case `$CC --version 2>/dev/null` in
5948       [12].*)
5949         cat <<EOF 1>&2
5950
5951 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5952 *** create self contained shared libraries on Solaris systems, without
5953 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5954 *** -no-undefined support, which will at least allow you to build shared
5955 *** libraries.  However, you may find that when you link such libraries
5956 *** into an application without using GCC, you have to manually add
5957 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5958 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5959 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5960
5961 EOF
5962         no_undefined_flag=
5963         ;;
5964       esac
5965     fi
5966     # $CC -shared without GNU ld will not create a library from C++
5967     # object files and a static libstdc++, better avoid it by now
5968     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5969     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5970                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5971     hardcode_libdir_flag_spec='-R$libdir'
5972     hardcode_shlibpath_var=no
5973     case $host_os in
5974     solaris2.[0-5] | solaris2.[0-5].*) ;;
5975     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5976       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5977     esac
5978     link_all_deplibs=yes
5979     ;;
5980
5981   sunos4*)
5982     if test "x$host_vendor" = xsequent; then
5983       # Use $CC to link under sequent, because it throws in some extra .o
5984       # files that make .init and .fini sections work.
5985       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5986     else
5987       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5988     fi
5989     hardcode_libdir_flag_spec='-L$libdir'
5990     hardcode_direct=yes
5991     hardcode_minus_L=yes
5992     hardcode_shlibpath_var=no
5993     ;;
5994
5995   sysv4)
5996     if test "x$host_vendor" = xsno; then
5997       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5998       hardcode_direct=yes # is this really true???
5999     else
6000       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6002     fi
6003     runpath_var='LD_RUN_PATH'
6004     hardcode_shlibpath_var=no
6005     ;;
6006
6007   sysv4.3*)
6008     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6009     hardcode_shlibpath_var=no
6010     export_dynamic_flag_spec='-Bexport'
6011     ;;
6012
6013   sysv5*)
6014     no_undefined_flag=' -z text'
6015     # $CC -shared without GNU ld will not create a library from C++
6016     # object files and a static libstdc++, better avoid it by now
6017     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6019                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6020     hardcode_libdir_flag_spec=
6021     hardcode_shlibpath_var=no
6022     runpath_var='LD_RUN_PATH'
6023     ;;
6024
6025   uts4*)
6026     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6027     hardcode_libdir_flag_spec='-L$libdir'
6028     hardcode_shlibpath_var=no
6029     ;;
6030
6031   dgux*)
6032     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6033     hardcode_libdir_flag_spec='-L$libdir'
6034     hardcode_shlibpath_var=no
6035     ;;
6036
6037   sysv4*MP*)
6038     if test -d /usr/nec; then
6039       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6040       hardcode_shlibpath_var=no
6041       runpath_var=LD_RUN_PATH
6042       hardcode_runpath_var=yes
6043       ld_shlibs=yes
6044     fi
6045     ;;
6046
6047   sysv4.2uw2*)
6048     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6049     hardcode_direct=yes
6050     hardcode_minus_L=no
6051     hardcode_shlibpath_var=no
6052     hardcode_runpath_var=yes
6053     runpath_var=LD_RUN_PATH
6054     ;;
6055
6056   sysv5uw7* | unixware7*)
6057     no_undefined_flag='${wl}-z ${wl}text'
6058     if test "$GCC" = yes; then
6059       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6060     else
6061       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6062     fi
6063     runpath_var='LD_RUN_PATH'
6064     hardcode_shlibpath_var=no
6065     ;;
6066
6067   *)
6068     ld_shlibs=no
6069     ;;
6070   esac
6071 fi
6072 echo "$ac_t""$ld_shlibs" 1>&6
6073 test "$ld_shlibs" = no && can_build_shared=no
6074
6075 # Check hardcoding attributes.
6076 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6077 echo "configure:6078: checking how to hardcode library paths into programs" >&5
6078 hardcode_action=
6079 if test -n "$hardcode_libdir_flag_spec" || \
6080    test -n "$runpath_var"; then
6081
6082   # We can hardcode non-existant directories.
6083   if test "$hardcode_direct" != no &&
6084      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6085      # have to relink, otherwise we might link with an installed library
6086      # when we should be linking with a yet-to-be-installed one
6087      ## test "$hardcode_shlibpath_var" != no &&
6088      test "$hardcode_minus_L" != no; then
6089     # Linking always hardcodes the temporary library directory.
6090     hardcode_action=relink
6091   else
6092     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6093     hardcode_action=immediate
6094   fi
6095 else
6096   # We cannot hardcode anything, or else we can only hardcode existing
6097   # directories.
6098   hardcode_action=unsupported
6099 fi
6100 echo "$ac_t""$hardcode_action" 1>&6
6101
6102 striplib=
6103 old_striplib=
6104 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6105 echo "configure:6106: checking whether stripping libraries is possible" >&5
6106 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6107   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6108   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6109   echo "$ac_t""yes" 1>&6
6110 else
6111   echo "$ac_t""no" 1>&6
6112 fi
6113
6114 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6115 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6116
6117 # PORTME Fill in your ld.so characteristics
6118 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6119 echo "configure:6120: checking dynamic linker characteristics" >&5
6120 library_names_spec=
6121 libname_spec='lib$name'
6122 soname_spec=
6123 postinstall_cmds=
6124 postuninstall_cmds=
6125 finish_cmds=
6126 finish_eval=
6127 shlibpath_var=
6128 shlibpath_overrides_runpath=unknown
6129 version_type=none
6130 dynamic_linker="$host_os ld.so"
6131 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6132 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6133
6134 case $host_os in
6135 aix3*)
6136   version_type=linux
6137   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6138   shlibpath_var=LIBPATH
6139
6140   # AIX has no versioning support, so we append a major version to the name.
6141   soname_spec='${libname}${release}.so$major'
6142   ;;
6143
6144 aix4* | aix5*)
6145   version_type=linux
6146   if test "$host_cpu" = ia64; then
6147     # AIX 5 supports IA64
6148     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6149     shlibpath_var=LD_LIBRARY_PATH
6150   else
6151     # With GCC up to 2.95.x, collect2 would create an import file
6152     # for dependence libraries.  The import file would start with
6153     # the line `#! .'.  This would cause the generated library to
6154     # depend on `.', always an invalid library.  This was fixed in
6155     # development snapshots of GCC prior to 3.0.
6156     case $host_os in
6157       aix4 | aix4.[01] | aix4.[01].*)
6158         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6159              echo ' yes '
6160              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6161           :
6162         else
6163           can_build_shared=no
6164         fi
6165         ;;
6166     esac
6167     # AIX (on Power*) has no versioning support, so currently we can
6168     # not hardcode correct soname into executable. Probably we can
6169     # add versioning support to collect2, so additional links can
6170     # be useful in future.
6171     if test "$aix_use_runtimelinking" = yes; then
6172       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6173       # instead of lib<name>.a to let people know that these are not
6174       # typical AIX shared libraries.
6175       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6176     else
6177       # We preserve .a as extension for shared libraries through AIX4.2
6178       # and later when we are not doing run time linking.
6179       library_names_spec='${libname}${release}.a $libname.a'
6180       soname_spec='${libname}${release}.so$major'
6181     fi
6182     shlibpath_var=LIBPATH
6183   fi
6184   ;;
6185
6186 amigaos*)
6187   library_names_spec='$libname.ixlibrary $libname.a'
6188   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6189   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'
6190   ;;
6191
6192 beos*)
6193   library_names_spec='${libname}.so'
6194   dynamic_linker="$host_os ld.so"
6195   shlibpath_var=LIBRARY_PATH
6196   ;;
6197
6198 bsdi4*)
6199   version_type=linux
6200   need_version=no
6201   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6202   soname_spec='${libname}${release}.so$major'
6203   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6204   shlibpath_var=LD_LIBRARY_PATH
6205   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6206   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6207   export_dynamic_flag_spec=-rdynamic
6208   # the default ld.so.conf also contains /usr/contrib/lib and
6209   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6210   # libtool to hard-code these into programs
6211   ;;
6212
6213 cygwin* | mingw* | pw32*)
6214   version_type=windows
6215   need_version=no
6216   need_lib_prefix=no
6217   case $GCC,$host_os in
6218   yes,cygwin*)
6219     library_names_spec='$libname.dll.a'
6220     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6221     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6222       dldir=$destdir/`dirname \$dlpath`~
6223       test -d \$dldir || mkdir -p \$dldir~
6224       $install_prog .libs/$dlname \$dldir/$dlname'
6225     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6226       dlpath=$dir/\$dldll~
6227        $rm \$dlpath'
6228     ;;
6229   yes,mingw*)
6230     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6231     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6232     ;;
6233   yes,pw32*)
6234     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6235     ;;
6236   *)
6237     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6238     ;;
6239   esac
6240   dynamic_linker='Win32 ld.exe'
6241   # FIXME: first we should search . and the directory the executable is in
6242   shlibpath_var=PATH
6243   ;;
6244
6245 darwin* | rhapsody*)
6246   dynamic_linker="$host_os dyld"
6247   version_type=darwin
6248   need_lib_prefix=no
6249   need_version=no
6250   # FIXME: Relying on posixy $() will cause problems for
6251   #        cross-compilation, but unfortunately the echo tests do not
6252   #        yet detect zsh echo's removal of \ escapes.
6253   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)'
6254   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6255   shlibpath_overrides_runpath=yes
6256   shlibpath_var=DYLD_LIBRARY_PATH
6257   ;;
6258
6259 freebsd1*)
6260   dynamic_linker=no
6261   ;;
6262
6263 freebsd*)
6264   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6265   version_type=freebsd-$objformat
6266   case $version_type in
6267     freebsd-elf*)
6268       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6269       need_version=no
6270       need_lib_prefix=no
6271       ;;
6272     freebsd-*)
6273       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6274       need_version=yes
6275       ;;
6276   esac
6277   shlibpath_var=LD_LIBRARY_PATH
6278   case $host_os in
6279   freebsd2*)
6280     shlibpath_overrides_runpath=yes
6281     ;;
6282   *)
6283     shlibpath_overrides_runpath=no
6284     hardcode_into_libs=yes
6285     ;;
6286   esac
6287   ;;
6288
6289 gnu*)
6290   version_type=linux
6291   need_lib_prefix=no
6292   need_version=no
6293   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6294   soname_spec='${libname}${release}.so$major'
6295   shlibpath_var=LD_LIBRARY_PATH
6296   hardcode_into_libs=yes
6297   ;;
6298
6299 hpux9* | hpux10* | hpux11*)
6300   # Give a soname corresponding to the major version so that dld.sl refuses to
6301   # link against other versions.
6302   dynamic_linker="$host_os dld.sl"
6303   version_type=sunos
6304   need_lib_prefix=no
6305   need_version=no
6306   shlibpath_var=SHLIB_PATH
6307   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6308   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6309   soname_spec='${libname}${release}.sl$major'
6310   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6311   postinstall_cmds='chmod 555 $lib'
6312   ;;
6313
6314 irix5* | irix6*)
6315   version_type=irix
6316   need_lib_prefix=no
6317   need_version=no
6318   soname_spec='${libname}${release}.so$major'
6319   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6320   case $host_os in
6321   irix5*)
6322     libsuff= shlibsuff=
6323     ;;
6324   *)
6325     case $LD in # libtool.m4 will add one of these switches to LD
6326     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6327     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6328     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6329     *) libsuff= shlibsuff= libmagic=never-match;;
6330     esac
6331     ;;
6332   esac
6333   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6334   shlibpath_overrides_runpath=no
6335   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6336   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6337   ;;
6338
6339 # No shared lib support for Linux oldld, aout, or coff.
6340 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6341   dynamic_linker=no
6342   ;;
6343
6344 # This must be Linux ELF.
6345 linux-gnu*)
6346   version_type=linux
6347   need_lib_prefix=no
6348   need_version=no
6349   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6350   soname_spec='${libname}${release}.so$major'
6351   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6352   shlibpath_var=LD_LIBRARY_PATH
6353   shlibpath_overrides_runpath=no
6354   # This implies no fast_install, which is unacceptable.
6355   # Some rework will be needed to allow for fast_install
6356   # before this can be enabled.
6357   hardcode_into_libs=yes
6358
6359   # We used to test for /lib/ld.so.1 and disable shared libraries on
6360   # powerpc, because MkLinux only supported shared libraries with the
6361   # GNU dynamic linker.  Since this was broken with cross compilers,
6362   # most powerpc-linux boxes support dynamic linking these days and
6363   # people can always --disable-shared, the test was removed, and we
6364   # assume the GNU/Linux dynamic linker is in use.
6365   dynamic_linker='GNU/Linux ld.so'
6366   ;;
6367
6368 netbsd*)
6369   version_type=sunos
6370   need_lib_prefix=no
6371   need_version=no
6372   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6373     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6374     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6375     dynamic_linker='NetBSD (a.out) ld.so'
6376   else
6377     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6378     soname_spec='${libname}${release}.so$major'
6379     dynamic_linker='NetBSD ld.elf_so'
6380   fi
6381   shlibpath_var=LD_LIBRARY_PATH
6382   shlibpath_overrides_runpath=yes
6383   hardcode_into_libs=yes
6384   ;;
6385
6386 newsos6)
6387   version_type=linux
6388   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6389   shlibpath_var=LD_LIBRARY_PATH
6390   shlibpath_overrides_runpath=yes
6391   ;;
6392
6393 openbsd*)
6394   version_type=sunos
6395   need_lib_prefix=no
6396   need_version=no
6397   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6398     case "$host_os" in
6399     openbsd2.[89] | openbsd2.[89].*)
6400       shlibpath_overrides_runpath=no
6401       ;;
6402     *)
6403       shlibpath_overrides_runpath=yes
6404       ;;
6405     esac
6406   else
6407     shlibpath_overrides_runpath=yes
6408   fi
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6410   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   ;;
6413
6414 os2*)
6415   libname_spec='$name'
6416   need_lib_prefix=no
6417   library_names_spec='$libname.dll $libname.a'
6418   dynamic_linker='OS/2 ld.exe'
6419   shlibpath_var=LIBPATH
6420   ;;
6421
6422 osf3* | osf4* | osf5*)
6423   version_type=osf
6424   need_version=no
6425   soname_spec='${libname}${release}.so'
6426   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6427   shlibpath_var=LD_LIBRARY_PATH
6428   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6429   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6430   ;;
6431
6432 sco3.2v5*)
6433   version_type=osf
6434   soname_spec='${libname}${release}.so$major'
6435   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   ;;
6438
6439 solaris*)
6440   version_type=linux
6441   need_lib_prefix=no
6442   need_version=no
6443   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6444   soname_spec='${libname}${release}.so$major'
6445   shlibpath_var=LD_LIBRARY_PATH
6446   shlibpath_overrides_runpath=yes
6447   hardcode_into_libs=yes
6448   # ldd complains unless libraries are executable
6449   postinstall_cmds='chmod +x $lib'
6450   ;;
6451
6452 sunos4*)
6453   version_type=sunos
6454   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6455   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6456   shlibpath_var=LD_LIBRARY_PATH
6457   shlibpath_overrides_runpath=yes
6458   if test "$with_gnu_ld" = yes; then
6459     need_lib_prefix=no
6460   fi
6461   need_version=yes
6462   ;;
6463
6464 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6465   version_type=linux
6466   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6467   soname_spec='${libname}${release}.so$major'
6468   shlibpath_var=LD_LIBRARY_PATH
6469   case $host_vendor in
6470     sni)
6471       shlibpath_overrides_runpath=no
6472       ;;
6473     motorola)
6474       need_lib_prefix=no
6475       need_version=no
6476       shlibpath_overrides_runpath=no
6477       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6478       ;;
6479   esac
6480   ;;
6481
6482 uts4*)
6483   version_type=linux
6484   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6485   soname_spec='${libname}${release}.so$major'
6486   shlibpath_var=LD_LIBRARY_PATH
6487   ;;
6488
6489 dgux*)
6490   version_type=linux
6491   need_lib_prefix=no
6492   need_version=no
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   soname_spec='${libname}${release}.so$major'
6495   shlibpath_var=LD_LIBRARY_PATH
6496   ;;
6497
6498 sysv4*MP*)
6499   if test -d /usr/nec ;then
6500     version_type=linux
6501     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6502     soname_spec='$libname.so.$major'
6503     shlibpath_var=LD_LIBRARY_PATH
6504   fi
6505   ;;
6506
6507 *)
6508   dynamic_linker=no
6509   ;;
6510 esac
6511 echo "$ac_t""$dynamic_linker" 1>&6
6512 test "$dynamic_linker" = no && can_build_shared=no
6513
6514 # Report the final consequences.
6515 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6516 echo "configure:6517: checking if libtool supports shared libraries" >&5
6517 echo "$ac_t""$can_build_shared" 1>&6
6518
6519 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6520 echo "configure:6521: checking whether to build shared libraries" >&5
6521 test "$can_build_shared" = "no" && enable_shared=no
6522
6523 # On AIX, shared libraries and static libraries use the same namespace, and
6524 # are all built from PIC.
6525 case "$host_os" in
6526 aix3*)
6527   test "$enable_shared" = yes && enable_static=no
6528   if test -n "$RANLIB"; then
6529     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6530     postinstall_cmds='$RANLIB $lib'
6531   fi
6532   ;;
6533
6534 aix4*)
6535   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6536     test "$enable_shared" = yes && enable_static=no
6537   fi
6538   ;;
6539 esac
6540 echo "$ac_t""$enable_shared" 1>&6
6541
6542 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6543 echo "configure:6544: checking whether to build static libraries" >&5
6544 # Make sure either enable_shared or enable_static is yes.
6545 test "$enable_shared" = yes || enable_static=yes
6546 echo "$ac_t""$enable_static" 1>&6
6547
6548 if test "$hardcode_action" = relink; then
6549   # Fast installation is not supported
6550   enable_fast_install=no
6551 elif test "$shlibpath_overrides_runpath" = yes ||
6552      test "$enable_shared" = no; then
6553   # Fast installation is not necessary
6554   enable_fast_install=needless
6555 fi
6556
6557 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6558 if test "$GCC" = yes; then
6559   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6560 fi
6561
6562 if test "x$enable_dlopen" != xyes; then
6563   enable_dlopen=unknown
6564   enable_dlopen_self=unknown
6565   enable_dlopen_self_static=unknown
6566 else
6567   lt_cv_dlopen=no
6568   lt_cv_dlopen_libs=
6569
6570   case $host_os in
6571   beos*)
6572     lt_cv_dlopen="load_add_on"
6573     lt_cv_dlopen_libs=
6574     lt_cv_dlopen_self=yes
6575     ;;
6576
6577   cygwin* | mingw* | pw32*)
6578     lt_cv_dlopen="LoadLibrary"
6579     lt_cv_dlopen_libs=
6580    ;;
6581
6582   *)
6583     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6584 echo "configure:6585: checking for shl_load" >&5
6585 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6586   echo $ac_n "(cached) $ac_c" 1>&6
6587 else
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 /* System header to define __stub macros and hopefully few prototypes,
6592     which can conflict with char shl_load(); below.  */
6593 #include <assert.h>
6594 /* Override any gcc2 internal prototype to avoid an error.  */
6595 /* We use char because int might match the return type of a gcc2
6596     builtin and then its argument prototype would still apply.  */
6597 char shl_load();
6598 char (*f)();
6599
6600 int main() {
6601
6602 /* The GNU C library defines this for functions which it implements
6603     to always fail with ENOSYS.  Some functions are actually named
6604     something starting with __ and the normal name is an alias.  */
6605 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6606 choke me
6607 #else
6608 f = shl_load;
6609 #endif
6610
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_func_shl_load=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_func_shl_load=no"
6621 fi
6622 rm -f conftest*
6623 fi
6624
6625 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6626   echo "$ac_t""yes" 1>&6
6627   lt_cv_dlopen="shl_load"
6628 else
6629   echo "$ac_t""no" 1>&6
6630 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6631 echo "configure:6632: checking for shl_load in -ldld" >&5
6632 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   ac_save_LIBS="$LIBS"
6637 LIBS="-ldld  $LIBS"
6638 cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char shl_load();
6645
6646 int main() {
6647 shl_load()
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=yes"
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   eval "ac_cv_lib_$ac_lib_var=no"
6658 fi
6659 rm -f conftest*
6660 LIBS="$ac_save_LIBS"
6661
6662 fi
6663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6664   echo "$ac_t""yes" 1>&6
6665   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6666 else
6667   echo "$ac_t""no" 1>&6
6668 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6669 echo "configure:6670: checking for dlopen" >&5
6670 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6671   echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673   cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 /* System header to define __stub macros and hopefully few prototypes,
6677     which can conflict with char dlopen(); below.  */
6678 #include <assert.h>
6679 /* Override any gcc2 internal prototype to avoid an error.  */
6680 /* We use char because int might match the return type of a gcc2
6681     builtin and then its argument prototype would still apply.  */
6682 char dlopen();
6683 char (*f)();
6684
6685 int main() {
6686
6687 /* The GNU C library defines this for functions which it implements
6688     to always fail with ENOSYS.  Some functions are actually named
6689     something starting with __ and the normal name is an alias.  */
6690 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6691 choke me
6692 #else
6693 f = dlopen;
6694 #endif
6695
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_func_dlopen=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_func_dlopen=no"
6706 fi
6707 rm -f conftest*
6708 fi
6709
6710 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712   lt_cv_dlopen="dlopen"
6713 else
6714   echo "$ac_t""no" 1>&6
6715 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6716 echo "configure:6717: checking for dlopen in -ldl" >&5
6717 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   ac_save_LIBS="$LIBS"
6722 LIBS="-ldl  $LIBS"
6723 cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* Override any gcc2 internal prototype to avoid an error.  */
6727 /* We use char because int might match the return type of a gcc2
6728     builtin and then its argument prototype would still apply.  */
6729 char dlopen();
6730
6731 int main() {
6732 dlopen()
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_lib_$ac_lib_var=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_lib_$ac_lib_var=no"
6743 fi
6744 rm -f conftest*
6745 LIBS="$ac_save_LIBS"
6746
6747 fi
6748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6749   echo "$ac_t""yes" 1>&6
6750   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6751 else
6752   echo "$ac_t""no" 1>&6
6753 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6754 echo "configure:6755: checking for dlopen in -lsvld" >&5
6755 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   ac_save_LIBS="$LIBS"
6760 LIBS="-lsvld  $LIBS"
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char dlopen();
6768
6769 int main() {
6770 dlopen()
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=no"
6781 fi
6782 rm -f conftest*
6783 LIBS="$ac_save_LIBS"
6784
6785 fi
6786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6787   echo "$ac_t""yes" 1>&6
6788   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6789 else
6790   echo "$ac_t""no" 1>&6
6791 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6792 echo "configure:6793: checking for dld_link in -ldld" >&5
6793 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6795   echo $ac_n "(cached) $ac_c" 1>&6
6796 else
6797   ac_save_LIBS="$LIBS"
6798 LIBS="-ldld  $LIBS"
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 /* Override any gcc2 internal prototype to avoid an error.  */
6803 /* We use char because int might match the return type of a gcc2
6804     builtin and then its argument prototype would still apply.  */
6805 char dld_link();
6806
6807 int main() {
6808 dld_link()
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_lib_$ac_lib_var=no"
6819 fi
6820 rm -f conftest*
6821 LIBS="$ac_save_LIBS"
6822
6823 fi
6824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6825   echo "$ac_t""yes" 1>&6
6826   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6827 else
6828   echo "$ac_t""no" 1>&6
6829 fi
6830
6831               
6832 fi
6833
6834             
6835 fi
6836
6837           
6838 fi
6839
6840         
6841 fi
6842
6843       
6844 fi
6845
6846     ;;
6847   esac
6848
6849   if test "x$lt_cv_dlopen" != xno; then
6850     enable_dlopen=yes
6851   else
6852     enable_dlopen=no
6853   fi
6854
6855   case $lt_cv_dlopen in
6856   dlopen)
6857     save_CPPFLAGS="$CPPFLAGS"
6858         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6859
6860     save_LDFLAGS="$LDFLAGS"
6861     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6862
6863     save_LIBS="$LIBS"
6864     LIBS="$lt_cv_dlopen_libs $LIBS"
6865
6866     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6867 echo "configure:6868: checking whether a program can dlopen itself" >&5
6868 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871           if test "$cross_compiling" = yes; then :
6872   lt_cv_dlopen_self=cross
6873 else
6874     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6875   lt_status=$lt_dlunknown
6876   cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879
6880 #if HAVE_DLFCN_H
6881 #include <dlfcn.h>
6882 #endif
6883
6884 #include <stdio.h>
6885
6886 #ifdef RTLD_GLOBAL
6887 #  define LT_DLGLOBAL           RTLD_GLOBAL
6888 #else
6889 #  ifdef DL_GLOBAL
6890 #    define LT_DLGLOBAL         DL_GLOBAL
6891 #  else
6892 #    define LT_DLGLOBAL         0
6893 #  endif
6894 #endif
6895
6896 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6897    find out it does not work in some platform. */
6898 #ifndef LT_DLLAZY_OR_NOW
6899 #  ifdef RTLD_LAZY
6900 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6901 #  else
6902 #    ifdef DL_LAZY
6903 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6904 #    else
6905 #      ifdef RTLD_NOW
6906 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6907 #      else
6908 #        ifdef DL_NOW
6909 #          define LT_DLLAZY_OR_NOW      DL_NOW
6910 #        else
6911 #          define LT_DLLAZY_OR_NOW      0
6912 #        endif
6913 #      endif
6914 #    endif
6915 #  endif
6916 #endif
6917
6918 #ifdef __cplusplus
6919 extern "C" void exit (int);
6920 #endif
6921
6922 void fnord() { int i=42;}
6923 int main ()
6924 {
6925   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6926   int status = $lt_dlunknown;
6927
6928   if (self)
6929     {
6930       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6931       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6932       /* dlclose (self); */
6933     }
6934
6935     exit (status);
6936 }
6937 EOF
6938   if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6939     (./conftest; exit; ) 2>/dev/null
6940     lt_status=$?
6941     case x$lt_status in
6942       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6943       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6944       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6945     esac
6946   else :
6947     # compilation failed
6948     lt_cv_dlopen_self=no
6949   fi
6950 fi
6951 rm -fr conftest*
6952
6953     
6954 fi
6955
6956 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6957
6958     if test "x$lt_cv_dlopen_self" = xyes; then
6959       LDFLAGS="$LDFLAGS $link_static_flag"
6960       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6961 echo "configure:6962: checking whether a statically linked program can dlopen itself" >&5
6962 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6963   echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6965           if test "$cross_compiling" = yes; then :
6966   lt_cv_dlopen_self_static=cross
6967 else
6968     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6969   lt_status=$lt_dlunknown
6970   cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973
6974 #if HAVE_DLFCN_H
6975 #include <dlfcn.h>
6976 #endif
6977
6978 #include <stdio.h>
6979
6980 #ifdef RTLD_GLOBAL
6981 #  define LT_DLGLOBAL           RTLD_GLOBAL
6982 #else
6983 #  ifdef DL_GLOBAL
6984 #    define LT_DLGLOBAL         DL_GLOBAL
6985 #  else
6986 #    define LT_DLGLOBAL         0
6987 #  endif
6988 #endif
6989
6990 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6991    find out it does not work in some platform. */
6992 #ifndef LT_DLLAZY_OR_NOW
6993 #  ifdef RTLD_LAZY
6994 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6995 #  else
6996 #    ifdef DL_LAZY
6997 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6998 #    else
6999 #      ifdef RTLD_NOW
7000 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7001 #      else
7002 #        ifdef DL_NOW
7003 #          define LT_DLLAZY_OR_NOW      DL_NOW
7004 #        else
7005 #          define LT_DLLAZY_OR_NOW      0
7006 #        endif
7007 #      endif
7008 #    endif
7009 #  endif
7010 #endif
7011
7012 #ifdef __cplusplus
7013 extern "C" void exit (int);
7014 #endif
7015
7016 void fnord() { int i=42;}
7017 int main ()
7018 {
7019   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7020   int status = $lt_dlunknown;
7021
7022   if (self)
7023     {
7024       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7025       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7026       /* dlclose (self); */
7027     }
7028
7029     exit (status);
7030 }
7031 EOF
7032   if { (eval echo configure:7033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7033     (./conftest; exit; ) 2>/dev/null
7034     lt_status=$?
7035     case x$lt_status in
7036       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7037       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7038       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7039     esac
7040   else :
7041     # compilation failed
7042     lt_cv_dlopen_self_static=no
7043   fi
7044 fi
7045 rm -fr conftest*
7046
7047       
7048 fi
7049
7050 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7051     fi
7052
7053     CPPFLAGS="$save_CPPFLAGS"
7054     LDFLAGS="$save_LDFLAGS"
7055     LIBS="$save_LIBS"
7056     ;;
7057   esac
7058
7059   case $lt_cv_dlopen_self in
7060   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7061   *) enable_dlopen_self=unknown ;;
7062   esac
7063
7064   case $lt_cv_dlopen_self_static in
7065   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7066   *) enable_dlopen_self_static=unknown ;;
7067   esac
7068 fi
7069
7070
7071 if test "$enable_shared" = yes && test "$GCC" = yes; then
7072   case $archive_cmds in
7073   *'~'*)
7074     # FIXME: we may have to deal with multi-command sequences.
7075     ;;
7076   '$CC '*)
7077     # Test whether the compiler implicitly links with -lc since on some
7078     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7079     # to ld, don't add -lc before -lgcc.
7080     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7081 echo "configure:7082: checking whether -lc should be explicitly linked in" >&5
7082     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7083   echo $ac_n "(cached) $ac_c" 1>&6
7084 else
7085   $rm conftest*
7086     echo 'static int dummy;' > conftest.$ac_ext
7087
7088     if { (eval echo configure:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7089       soname=conftest
7090       lib=conftest
7091       libobjs=conftest.$ac_objext
7092       deplibs=
7093       wl=$lt_cv_prog_cc_wl
7094       compiler_flags=-v
7095       linker_flags=-v
7096       verstring=
7097       output_objdir=.
7098       libname=conftest
7099       save_allow_undefined_flag=$allow_undefined_flag
7100       allow_undefined_flag=
7101       if { (eval echo configure:7102: \"$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; }
7102       then
7103         lt_cv_archive_cmds_need_lc=no
7104       else
7105         lt_cv_archive_cmds_need_lc=yes
7106       fi
7107       allow_undefined_flag=$save_allow_undefined_flag
7108     else
7109       cat conftest.err 1>&5
7110     fi
7111 fi
7112
7113     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7114     ;;
7115   esac
7116 fi
7117 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7118
7119 # The second clause should only fire when bootstrapping the
7120 # libtool distribution, otherwise you forgot to ship ltmain.sh
7121 # with your package, and you will get complaints that there are
7122 # no rules to generate ltmain.sh.
7123 if test -f "$ltmain"; then
7124   :
7125 else
7126   # If there is no Makefile yet, we rely on a make rule to execute
7127   # `config.status --recheck' to rerun these tests and create the
7128   # libtool script then.
7129   test -f Makefile && make "$ltmain"
7130 fi
7131
7132 if test -f "$ltmain"; then
7133   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7134   $rm -f "${ofile}T"
7135
7136   echo creating $ofile
7137
7138   # Now quote all the things that may contain metacharacters while being
7139   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7140   # variables and quote the copies for generation of the libtool script.
7141   for var in echo old_CC old_CFLAGS \
7142     AR AR_FLAGS CC LD LN_S NM SHELL \
7143     reload_flag reload_cmds wl \
7144     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7145     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7146     library_names_spec soname_spec \
7147     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7148     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7149     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7150     old_striplib striplib file_magic_cmd export_symbols_cmds \
7151     deplibs_check_method allow_undefined_flag no_undefined_flag \
7152     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7153     global_symbol_to_c_name_address \
7154     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7155     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7156     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7157
7158     case $var in
7159     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7160     old_postinstall_cmds | old_postuninstall_cmds | \
7161     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7162     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7163     postinstall_cmds | postuninstall_cmds | \
7164     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7165       # Double-quote double-evaled strings.
7166       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7167       ;;
7168     *)
7169       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7170       ;;
7171     esac
7172   done
7173
7174   cat <<__EOF__ > "${ofile}T"
7175 #! $SHELL
7176
7177 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7178 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7179 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7180 #
7181 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7182 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7183 #
7184 # This program is free software; you can redistribute it and/or modify
7185 # it under the terms of the GNU General Public License as published by
7186 # the Free Software Foundation; either version 2 of the License, or
7187 # (at your option) any later version.
7188 #
7189 # This program is distributed in the hope that it will be useful, but
7190 # WITHOUT ANY WARRANTY; without even the implied warranty of
7191 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7192 # General Public License for more details.
7193 #
7194 # You should have received a copy of the GNU General Public License
7195 # along with this program; if not, write to the Free Software
7196 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7197 #
7198 # As a special exception to the GNU General Public License, if you
7199 # distribute this file as part of a program that contains a
7200 # configuration script generated by Autoconf, you may include it under
7201 # the same distribution terms that you use for the rest of that program.
7202
7203 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7204 Xsed="sed -e s/^X//"
7205
7206 # The HP-UX ksh and POSIX shell print the target directory to stdout
7207 # if CDPATH is set.
7208 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7209
7210 # ### BEGIN LIBTOOL CONFIG
7211
7212 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7213
7214 # Shell to use when invoking shell scripts.
7215 SHELL=$lt_SHELL
7216
7217 # Whether or not to build shared libraries.
7218 build_libtool_libs=$enable_shared
7219
7220 # Whether or not to build static libraries.
7221 build_old_libs=$enable_static
7222
7223 # Whether or not to add -lc for building shared libraries.
7224 build_libtool_need_lc=$need_lc
7225
7226 # Whether or not to optimize for fast installation.
7227 fast_install=$enable_fast_install
7228
7229 # The host system.
7230 host_alias=$host_alias
7231 host=$host
7232
7233 # An echo program that does not interpret backslashes.
7234 echo=$lt_echo
7235
7236 # The archiver.
7237 AR=$lt_AR
7238 AR_FLAGS=$lt_AR_FLAGS
7239
7240 # The default C compiler.
7241 CC=$lt_CC
7242
7243 # Is the compiler the GNU C compiler?
7244 with_gcc=$GCC
7245
7246 # The linker used to build libraries.
7247 LD=$lt_LD
7248
7249 # Whether we need hard or soft links.
7250 LN_S=$lt_LN_S
7251
7252 # A BSD-compatible nm program.
7253 NM=$lt_NM
7254
7255 # A symbol stripping program
7256 STRIP=$STRIP
7257
7258 # Used to examine libraries when file_magic_cmd begins "file"
7259 MAGIC_CMD=$MAGIC_CMD
7260
7261 # Used on cygwin: DLL creation program.
7262 DLLTOOL="$DLLTOOL"
7263
7264 # Used on cygwin: object dumper.
7265 OBJDUMP="$OBJDUMP"
7266
7267 # Used on cygwin: assembler.
7268 AS="$AS"
7269
7270 # The name of the directory that contains temporary libtool files.
7271 objdir=$objdir
7272
7273 # How to create reloadable object files.
7274 reload_flag=$lt_reload_flag
7275 reload_cmds=$lt_reload_cmds
7276
7277 # How to pass a linker flag through the compiler.
7278 wl=$lt_wl
7279
7280 # Object file suffix (normally "o").
7281 objext="$ac_objext"
7282
7283 # Old archive suffix (normally "a").
7284 libext="$libext"
7285
7286 # Executable file suffix (normally "").
7287 exeext="$exeext"
7288
7289 # Additional compiler flags for building library objects.
7290 pic_flag=$lt_pic_flag
7291 pic_mode=$pic_mode
7292
7293 # Does compiler simultaneously support -c and -o options?
7294 compiler_c_o=$lt_compiler_c_o
7295
7296 # Can we write directly to a .lo ?
7297 compiler_o_lo=$lt_compiler_o_lo
7298
7299 # Must we lock files when doing compilation ?
7300 need_locks=$lt_need_locks
7301
7302 # Do we need the lib prefix for modules?
7303 need_lib_prefix=$need_lib_prefix
7304
7305 # Do we need a version for libraries?
7306 need_version=$need_version
7307
7308 # Whether dlopen is supported.
7309 dlopen_support=$enable_dlopen
7310
7311 # Whether dlopen of programs is supported.
7312 dlopen_self=$enable_dlopen_self
7313
7314 # Whether dlopen of statically linked programs is supported.
7315 dlopen_self_static=$enable_dlopen_self_static
7316
7317 # Compiler flag to prevent dynamic linking.
7318 link_static_flag=$lt_link_static_flag
7319
7320 # Compiler flag to turn off builtin functions.
7321 no_builtin_flag=$lt_no_builtin_flag
7322
7323 # Compiler flag to allow reflexive dlopens.
7324 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7325
7326 # Compiler flag to generate shared objects directly from archives.
7327 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7328
7329 # Compiler flag to generate thread-safe objects.
7330 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7331
7332 # Library versioning type.
7333 version_type=$version_type
7334
7335 # Format of library name prefix.
7336 libname_spec=$lt_libname_spec
7337
7338 # List of archive names.  First name is the real one, the rest are links.
7339 # The last name is the one that the linker finds with -lNAME.
7340 library_names_spec=$lt_library_names_spec
7341
7342 # The coded name of the library, if different from the real name.
7343 soname_spec=$lt_soname_spec
7344
7345 # Commands used to build and install an old-style archive.
7346 RANLIB=$lt_RANLIB
7347 old_archive_cmds=$lt_old_archive_cmds
7348 old_postinstall_cmds=$lt_old_postinstall_cmds
7349 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7350
7351 # Create an old-style archive from a shared archive.
7352 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7353
7354 # Create a temporary old-style archive to link instead of a shared archive.
7355 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7356
7357 # Commands used to build and install a shared archive.
7358 archive_cmds=$lt_archive_cmds
7359 archive_expsym_cmds=$lt_archive_expsym_cmds
7360 postinstall_cmds=$lt_postinstall_cmds
7361 postuninstall_cmds=$lt_postuninstall_cmds
7362
7363 # Commands to strip libraries.
7364 old_striplib=$lt_old_striplib
7365 striplib=$lt_striplib
7366
7367 # Method to check whether dependent libraries are shared objects.
7368 deplibs_check_method=$lt_deplibs_check_method
7369
7370 # Command to use when deplibs_check_method == file_magic.
7371 file_magic_cmd=$lt_file_magic_cmd
7372
7373 # Flag that allows shared libraries with undefined symbols to be built.
7374 allow_undefined_flag=$lt_allow_undefined_flag
7375
7376 # Flag that forces no undefined symbols.
7377 no_undefined_flag=$lt_no_undefined_flag
7378
7379 # Commands used to finish a libtool library installation in a directory.
7380 finish_cmds=$lt_finish_cmds
7381
7382 # Same as above, but a single script fragment to be evaled but not shown.
7383 finish_eval=$lt_finish_eval
7384
7385 # Take the output of nm and produce a listing of raw symbols and C names.
7386 global_symbol_pipe=$lt_global_symbol_pipe
7387
7388 # Transform the output of nm in a proper C declaration
7389 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7390
7391 # Transform the output of nm in a C name address pair
7392 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7393
7394 # This is the shared library runtime path variable.
7395 runpath_var=$runpath_var
7396
7397 # This is the shared library path variable.
7398 shlibpath_var=$shlibpath_var
7399
7400 # Is shlibpath searched before the hard-coded library search path?
7401 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7402
7403 # How to hardcode a shared library path into an executable.
7404 hardcode_action=$hardcode_action
7405
7406 # Whether we should hardcode library paths into libraries.
7407 hardcode_into_libs=$hardcode_into_libs
7408
7409 # Flag to hardcode \$libdir into a binary during linking.
7410 # This must work even if \$libdir does not exist.
7411 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7412
7413 # Whether we need a single -rpath flag with a separated argument.
7414 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7415
7416 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7417 # resulting binary.
7418 hardcode_direct=$hardcode_direct
7419
7420 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7421 # resulting binary.
7422 hardcode_minus_L=$hardcode_minus_L
7423
7424 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7425 # the resulting binary.
7426 hardcode_shlibpath_var=$hardcode_shlibpath_var
7427
7428 # Variables whose values should be saved in libtool wrapper scripts and
7429 # restored at relink time.
7430 variables_saved_for_relink="$variables_saved_for_relink"
7431
7432 # Whether libtool must link a program against all its dependency libraries.
7433 link_all_deplibs=$link_all_deplibs
7434
7435 # Compile-time system search path for libraries
7436 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7437
7438 # Run-time system search path for libraries
7439 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7440
7441 # Fix the shell variable \$srcfile for the compiler.
7442 fix_srcfile_path="$fix_srcfile_path"
7443
7444 # Set to yes if exported symbols are required.
7445 always_export_symbols=$always_export_symbols
7446
7447 # The commands to list exported symbols.
7448 export_symbols_cmds=$lt_export_symbols_cmds
7449
7450 # The commands to extract the exported symbol list from a shared archive.
7451 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7452
7453 # Symbols that should not be listed in the preloaded symbols.
7454 exclude_expsyms=$lt_exclude_expsyms
7455
7456 # Symbols that must always be exported.
7457 include_expsyms=$lt_include_expsyms
7458
7459 # ### END LIBTOOL CONFIG
7460
7461 __EOF__
7462
7463   case $host_os in
7464   aix3*)
7465     cat <<\EOF >> "${ofile}T"
7466
7467 # AIX sometimes has problems with the GCC collect2 program.  For some
7468 # reason, if we set the COLLECT_NAMES environment variable, the problems
7469 # vanish in a puff of smoke.
7470 if test "X${COLLECT_NAMES+set}" != Xset; then
7471   COLLECT_NAMES=
7472   export COLLECT_NAMES
7473 fi
7474 EOF
7475     ;;
7476   esac
7477
7478   case $host_os in
7479   cygwin* | mingw* | pw32* | os2*)
7480     cat <<'EOF' >> "${ofile}T"
7481       # This is a source program that is used to create dlls on Windows
7482       # Don't remove nor modify the starting and closing comments
7483 # /* ltdll.c starts here */
7484 # #define WIN32_LEAN_AND_MEAN
7485 # #include <windows.h>
7486 # #undef WIN32_LEAN_AND_MEAN
7487 # #include <stdio.h>
7488 #
7489 # #ifndef __CYGWIN__
7490 # #  ifdef __CYGWIN32__
7491 # #    define __CYGWIN__ __CYGWIN32__
7492 # #  endif
7493 # #endif
7494 #
7495 # #ifdef __cplusplus
7496 # extern "C" {
7497 # #endif
7498 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7499 # #ifdef __cplusplus
7500 # }
7501 # #endif
7502 #
7503 # #ifdef __CYGWIN__
7504 # #include <cygwin/cygwin_dll.h>
7505 # DECLARE_CYGWIN_DLL( DllMain );
7506 # #endif
7507 # HINSTANCE __hDllInstance_base;
7508 #
7509 # BOOL APIENTRY
7510 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7511 # {
7512 #   __hDllInstance_base = hInst;
7513 #   return TRUE;
7514 # }
7515 # /* ltdll.c ends here */
7516         # This is a source program that is used to create import libraries
7517         # on Windows for dlls which lack them. Don't remove nor modify the
7518         # starting and closing comments
7519 # /* impgen.c starts here */
7520 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7521 #
7522 #  This file is part of GNU libtool.
7523 #
7524 #  This program is free software; you can redistribute it and/or modify
7525 #  it under the terms of the GNU General Public License as published by
7526 #  the Free Software Foundation; either version 2 of the License, or
7527 #  (at your option) any later version.
7528 #
7529 #  This program is distributed in the hope that it will be useful,
7530 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7531 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7532 #  GNU General Public License for more details.
7533 #
7534 #  You should have received a copy of the GNU General Public License
7535 #  along with this program; if not, write to the Free Software
7536 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7537 #  */
7538 #
7539 # #include <stdio.h>            /* for printf() */
7540 # #include <unistd.h>           /* for open(), lseek(), read() */
7541 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7542 # #include <string.h>           /* for strdup() */
7543 #
7544 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7545 # #ifndef O_BINARY
7546 # #define O_BINARY 0
7547 # #endif
7548 #
7549 # static unsigned int
7550 # pe_get16 (fd, offset)
7551 #      int fd;
7552 #      int offset;
7553 # {
7554 #   unsigned char b[2];
7555 #   lseek (fd, offset, SEEK_SET);
7556 #   read (fd, b, 2);
7557 #   return b[0] + (b[1]<<8);
7558 # }
7559 #
7560 # static unsigned int
7561 # pe_get32 (fd, offset)
7562 #     int fd;
7563 #     int offset;
7564 # {
7565 #   unsigned char b[4];
7566 #   lseek (fd, offset, SEEK_SET);
7567 #   read (fd, b, 4);
7568 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7569 # }
7570 #
7571 # static unsigned int
7572 # pe_as32 (ptr)
7573 #      void *ptr;
7574 # {
7575 #   unsigned char *b = ptr;
7576 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7577 # }
7578 #
7579 # int
7580 # main (argc, argv)
7581 #     int argc;
7582 #     char *argv[];
7583 # {
7584 #     int dll;
7585 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7586 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7587 #     unsigned long name_rvas, nexp;
7588 #     unsigned char *expdata, *erva;
7589 #     char *filename, *dll_name;
7590 #
7591 #     filename = argv[1];
7592 #
7593 #     dll = open(filename, O_RDONLY|O_BINARY);
7594 #     if (dll < 1)
7595 #       return 1;
7596 #
7597 #     dll_name = filename;
7598 #
7599 #     for (i=0; filename[i]; i++)
7600 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7601 #           dll_name = filename + i +1;
7602 #
7603 #     pe_header_offset = pe_get32 (dll, 0x3c);
7604 #     opthdr_ofs = pe_header_offset + 4 + 20;
7605 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7606 #
7607 #     if (num_entries < 1) /* no exports */
7608 #       return 1;
7609 #
7610 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7611 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7612 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7613 #     secptr = (pe_header_offset + 4 + 20 +
7614 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7615 #
7616 #     expptr = 0;
7617 #     for (i = 0; i < nsections; i++)
7618 #     {
7619 #       char sname[8];
7620 #       unsigned long secptr1 = secptr + 40 * i;
7621 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7622 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7623 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7624 #       lseek(dll, secptr1, SEEK_SET);
7625 #       read(dll, sname, 8);
7626 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7627 #       {
7628 #           expptr = fptr + (export_rva - vaddr);
7629 #           if (export_rva + export_size > vaddr + vsize)
7630 #               export_size = vsize - (export_rva - vaddr);
7631 #           break;
7632 #       }
7633 #     }
7634 #
7635 #     expdata = (unsigned char*)malloc(export_size);
7636 #     lseek (dll, expptr, SEEK_SET);
7637 #     read (dll, expdata, export_size);
7638 #     erva = expdata - export_rva;
7639 #
7640 #     nexp = pe_as32 (expdata+24);
7641 #     name_rvas = pe_as32 (expdata+32);
7642 #
7643 #     printf ("EXPORTS\n");
7644 #     for (i = 0; i<nexp; i++)
7645 #     {
7646 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7647 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7648 #     }
7649 #
7650 #     return 0;
7651 # }
7652 # /* impgen.c ends here */
7653
7654 EOF
7655     ;;
7656   esac
7657
7658   # We use sed instead of cat because bash on DJGPP gets confused if
7659   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7660   # text mode, it properly converts lines to CR/LF.  This bash problem
7661   # is reportedly fixed, but why not run on old versions too?
7662   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7663
7664   mv -f "${ofile}T" "$ofile" || \
7665     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7666   chmod +x "$ofile"
7667 fi
7668
7669
7670
7671
7672
7673 # This can be used to rebuild libtool when needed
7674 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7675
7676 # Always use our own libtool.
7677 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7678
7679 # Prevent multiple expansion
7680
7681
7682
7683 LTSTATIC=""
7684 if test "${OPENLDAP_CVS}"; then
7685         LTSTATIC="-static"
7686 fi
7687
7688 # test for ln hardlink support
7689 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7690 echo "configure:7691: checking whether ln works" >&5
7691 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7692   echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694   rm -f conftest.src conftest.dst
7695 echo "conftest" > conftest.src
7696 if ln conftest.src conftest.dst 2>/dev/null
7697 then
7698   ol_cv_prog_LN_H="ln"
7699 else
7700   ol_cv_prog_LN_H="cp"
7701 fi
7702 rm -f conftest.src conftest.dst
7703
7704 fi
7705 LN_H="$ol_cv_prog_LN_H"
7706 if test "$ol_cv_prog_LN_H" = "ln"; then
7707         echo "$ac_t""yes" 1>&6
7708 else
7709         echo "$ac_t""no" 1>&6
7710 fi
7711
7712 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7713 echo "configure:7714: checking whether ln -s works" >&5
7714 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7715   echo $ac_n "(cached) $ac_c" 1>&6
7716 else
7717   rm -f conftestdata
7718 if ln -s X conftestdata 2>/dev/null
7719 then
7720   rm -f conftestdata
7721   ac_cv_prog_LN_S="ln -s"
7722 else
7723   ac_cv_prog_LN_S=ln
7724 fi
7725 fi
7726 LN_S="$ac_cv_prog_LN_S"
7727 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7728   echo "$ac_t""yes" 1>&6
7729 else
7730   echo "$ac_t""no" 1>&6
7731 fi
7732
7733
7734 ol_link_perl=no
7735 if test $ol_enable_perl != no ; then
7736         # Extract the first word of "perl", so it can be a program name with args.
7737 set dummy perl; ac_word=$2
7738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_word" >&5
7740 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   case "$PERLBIN" in
7744   /*)
7745   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7746   ;;
7747   ?:/*)
7748   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7749   ;;
7750   *)
7751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7752   ac_dummy="$PATH"
7753   for ac_dir in $ac_dummy; do 
7754     test -z "$ac_dir" && ac_dir=.
7755     if test -f $ac_dir/$ac_word; then
7756       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7757       break
7758     fi
7759   done
7760   IFS="$ac_save_ifs"
7761   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7762   ;;
7763 esac
7764 fi
7765 PERLBIN="$ac_cv_path_PERLBIN"
7766 if test -n "$PERLBIN"; then
7767   echo "$ac_t""$PERLBIN" 1>&6
7768 else
7769   echo "$ac_t""no" 1>&6
7770 fi
7771
7772
7773         if test "no$PERLBIN" = "no" ; then
7774                 if test $ol_enable_perl = yes ; then
7775                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7776                 fi
7777
7778         else
7779                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7780                 if test x"$ol_with_perl_module" = "xstatic" ; then
7781                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7782                 else
7783                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7784                 fi
7785                                 ol_link_perl=yes
7786         fi
7787 fi
7788
7789 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7790 echo "configure:7791: checking how to run the C preprocessor" >&5
7791 # On Suns, sometimes $CPP names a directory.
7792 if test -n "$CPP" && test -d "$CPP"; then
7793   CPP=
7794 fi
7795 if test -z "$CPP"; then
7796 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799     # This must be in double quotes, not single quotes, because CPP may get
7800   # substituted into the Makefile and "${CC-cc}" will confuse make.
7801   CPP="${CC-cc} -E"
7802   # On the NeXT, cc -E runs the code through the compiler's parser,
7803   # not just through cpp.
7804   cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 #include <assert.h>
7808 Syntax Error
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   :
7815 else
7816   echo "$ac_err" >&5
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   CPP="${CC-cc} -E -traditional-cpp"
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824 #include <assert.h>
7825 Syntax Error
7826 EOF
7827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7828 { (eval echo configure:7829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7830 if test -z "$ac_err"; then
7831   :
7832 else
7833   echo "$ac_err" >&5
7834   echo "configure: failed program was:" >&5
7835   cat conftest.$ac_ext >&5
7836   rm -rf conftest*
7837   CPP="${CC-cc} -nologo -E"
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <assert.h>
7842 Syntax Error
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   :
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   CPP=/lib/cpp
7855 fi
7856 rm -f conftest*
7857 fi
7858 rm -f conftest*
7859 fi
7860 rm -f conftest*
7861   ac_cv_prog_CPP="$CPP"
7862 fi
7863   CPP="$ac_cv_prog_CPP"
7864 else
7865   ac_cv_prog_CPP="$CPP"
7866 fi
7867 echo "$ac_t""$CPP" 1>&6
7868
7869
7870 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7871         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7872
7873 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7874         echo "configure: warning: programs compiled here do run here..." 1>&2
7875         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7876
7877 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7878         echo "configure: warning: programs compiled here do not run here..." 1>&2
7879         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7880 fi
7881
7882
7883 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7884 echo "configure:7885: checking for Cygwin environment" >&5
7885 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7886   echo $ac_n "(cached) $ac_c" 1>&6
7887 else
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891
7892 int main() {
7893
7894 #ifndef __CYGWIN__
7895 #define __CYGWIN__ __CYGWIN32__
7896 #endif
7897 return __CYGWIN__;
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7901   rm -rf conftest*
7902   ac_cv_cygwin=yes
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   ac_cv_cygwin=no
7908 fi
7909 rm -f conftest*
7910 fi
7911
7912 echo "$ac_t""$ac_cv_cygwin" 1>&6
7913 CYGWIN=
7914 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7915 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7916 echo "configure:7917: checking for mingw32 environment" >&5
7917 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923
7924 int main() {
7925 return __MINGW32__;
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7929   rm -rf conftest*
7930   ac_cv_mingw32=yes
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   ac_cv_mingw32=no
7936 fi
7937 rm -f conftest*
7938 fi
7939
7940 echo "$ac_t""$ac_cv_mingw32" 1>&6
7941 MINGW32=
7942 test "$ac_cv_mingw32" = yes && MINGW32=yes
7943
7944
7945
7946 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7947 echo "configure:7948: checking for executable suffix" >&5
7948 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7952   ac_cv_exeext=.exe
7953 else
7954   rm -f conftest*
7955   echo 'int main () { return 0; }' > conftest.$ac_ext
7956   ac_cv_exeext=
7957   if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7958     for file in conftest.*; do
7959       case $file in
7960       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7961       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7962       esac
7963     done
7964   else
7965     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7966   fi
7967   rm -f conftest*
7968   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7969 fi
7970 fi
7971
7972 EXEEXT=""
7973 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7974 echo "$ac_t""${ac_cv_exeext}" 1>&6
7975 ac_exeext=$EXEEXT
7976
7977 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7978 echo "configure:7979: checking for object suffix" >&5
7979 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7980   echo $ac_n "(cached) $ac_c" 1>&6
7981 else
7982   rm -f conftest*
7983 echo 'int i = 1;' > conftest.$ac_ext
7984 if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7985   for ac_file in conftest.*; do
7986     case $ac_file in
7987     *.c) ;;
7988     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7989     esac
7990   done
7991 else
7992   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7993 fi
7994 rm -f conftest*
7995 fi
7996
7997 echo "$ac_t""$ac_cv_objext" 1>&6
7998 OBJEXT=$ac_cv_objext
7999 ac_objext=$ac_cv_objext
8000
8001
8002 cat >> confdefs.h <<EOF
8003 #define EXEEXT "${EXEEXT}"
8004 EOF
8005
8006
8007 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8008 echo "configure:8009: checking for be_app in -lbe" >&5
8009 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   ac_save_LIBS="$LIBS"
8014 LIBS="-lbe -lroot -lnet $LIBS"
8015 cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char be_app();
8022
8023 int main() {
8024 be_app()
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=yes"
8030 else
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_lib_$ac_lib_var=no"
8035 fi
8036 rm -f conftest*
8037 LIBS="$ac_save_LIBS"
8038
8039 fi
8040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8041   echo "$ac_t""yes" 1>&6
8042   LIBS="$LIBS -lbe -lroot -lnet"
8043 else
8044   echo "$ac_t""no" 1>&6
8045 :
8046 fi
8047
8048
8049
8050
8051
8052 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8053 echo "configure:8054: checking for ${CC-cc} option to accept ANSI C" >&5
8054 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   am_cv_prog_cc_stdc=no
8058 ac_save_CC="$CC"
8059 # Don't try gcc -ansi; that turns off useful extensions and
8060 # breaks some systems' header files.
8061 # AIX                   -qlanglvl=ansi
8062 # Ultrix and OSF/1      -std1
8063 # HP-UX 10.20 and later -Ae
8064 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8065 # SVR4                  -Xc -D__EXTENSIONS__
8066 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8067 do
8068   CC="$ac_save_CC $ac_arg"
8069   cat > conftest.$ac_ext <<EOF
8070 #line 8071 "configure"
8071 #include "confdefs.h"
8072 #include <stdarg.h>
8073 #include <stdio.h>
8074 #include <sys/types.h>
8075 #include <sys/stat.h>
8076 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8077 struct buf { int x; };
8078 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8079 static char *e (p, i)
8080      char **p;
8081      int i;
8082 {
8083   return p[i];
8084 }
8085 static char *f (char * (*g) (char **, int), char **p, ...)
8086 {
8087   char *s;
8088   va_list v;
8089   va_start (v,p);
8090   s = g (p, va_arg (v,int));
8091   va_end (v);
8092   return s;
8093 }
8094 int test (int i, double x);
8095 struct s1 {int (*f) (int a);};
8096 struct s2 {int (*f) (double a);};
8097 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8098 int argc;
8099 char **argv;
8100
8101 int main() {
8102
8103 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8104
8105 ; return 0; }
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8108   rm -rf conftest*
8109   am_cv_prog_cc_stdc="$ac_arg"; break
8110 else
8111   echo "configure: failed program was:" >&5
8112   cat conftest.$ac_ext >&5
8113 fi
8114 rm -f conftest*
8115 done
8116 CC="$ac_save_CC"
8117
8118 fi
8119
8120 if test -z "$am_cv_prog_cc_stdc"; then
8121   echo "$ac_t""none needed" 1>&6
8122 else
8123   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8124 fi
8125 case "x$am_cv_prog_cc_stdc" in
8126   x|xno) ;;
8127   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8128 esac
8129
8130 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8131         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8132 fi
8133
8134 # test for make depend flag
8135 OL_MKDEP=
8136 OL_MKDEP_FLAGS=
8137 if test -z "${MKDEP}"; then
8138         OL_MKDEP="${CC-cc}"
8139         if test -z "${MKDEP_FLAGS}"; then
8140                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8141 echo "configure:8142: checking for ${OL_MKDEP} depend flag" >&5
8142 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   
8146                         ol_cv_mkdep=no
8147                         for flag in "-M" "-xM"; do
8148                                 cat > conftest.c <<EOF
8149  noCode;
8150 EOF
8151                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8152                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8153                                 then
8154                                         if test ! -f conftest."${ac_object}" ; then
8155                                                 ol_cv_mkdep=$flag
8156                                                 OL_MKDEP_FLAGS="$flag"
8157                                                 break
8158                                         fi
8159                                 fi
8160                         done
8161                         rm -f conftest*
8162                 
8163 fi
8164
8165 echo "$ac_t""$ol_cv_mkdep" 1>&6
8166         else
8167                 cc_cv_mkdep=yes
8168                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8169         fi
8170 else
8171         cc_cv_mkdep=yes
8172         OL_MKDEP="${MKDEP}"
8173         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8174 fi
8175
8176
8177
8178 if test "${ol_cv_mkdep}" = no ; then
8179         # this will soon become an error
8180         echo "configure: warning: do not know how to generate dependencies" 1>&2
8181 fi
8182
8183 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8184 echo "configure:8185: checking for afopen in -ls" >&5
8185 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8187   echo $ac_n "(cached) $ac_c" 1>&6
8188 else
8189   ac_save_LIBS="$LIBS"
8190 LIBS="-ls  $LIBS"
8191 cat > conftest.$ac_ext <<EOF
8192 #line 8193 "configure"
8193 #include "confdefs.h"
8194 /* Override any gcc2 internal prototype to avoid an error.  */
8195 /* We use char because int might match the return type of a gcc2
8196     builtin and then its argument prototype would still apply.  */
8197 char afopen();
8198
8199 int main() {
8200 afopen()
8201 ; return 0; }
8202 EOF
8203 if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8204   rm -rf conftest*
8205   eval "ac_cv_lib_$ac_lib_var=yes"
8206 else
8207   echo "configure: failed program was:" >&5
8208   cat conftest.$ac_ext >&5
8209   rm -rf conftest*
8210   eval "ac_cv_lib_$ac_lib_var=no"
8211 fi
8212 rm -f conftest*
8213 LIBS="$ac_save_LIBS"
8214
8215 fi
8216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8217   echo "$ac_t""yes" 1>&6
8218   
8219         AUTH_LIBS=-ls
8220         cat >> confdefs.h <<\EOF
8221 #define HAVE_AIX_SECURITY 1
8222 EOF
8223
8224
8225 else
8226   echo "$ac_t""no" 1>&6
8227 fi
8228
8229
8230 case "$target" in
8231 *-ibm-openedition)
8232         ac_cv_func_getopt=no
8233         cat >> confdefs.h <<\EOF
8234 #define BOTH_STRINGS_H 1
8235 EOF
8236
8237         ;;
8238 esac
8239
8240 ol_link_modules=no
8241 if test $ol_enable_modules != no ; then
8242         for ac_hdr in ltdl.h
8243 do
8244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8246 echo "configure:8247: checking for $ac_hdr" >&5
8247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8248   echo $ac_n "(cached) $ac_c" 1>&6
8249 else
8250   cat > conftest.$ac_ext <<EOF
8251 #line 8252 "configure"
8252 #include "confdefs.h"
8253 #include <$ac_hdr>
8254 EOF
8255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8256 { (eval echo configure:8257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8258 if test -z "$ac_err"; then
8259   rm -rf conftest*
8260   eval "ac_cv_header_$ac_safe=yes"
8261 else
8262   echo "$ac_err" >&5
8263   echo "configure: failed program was:" >&5
8264   cat conftest.$ac_ext >&5
8265   rm -rf conftest*
8266   eval "ac_cv_header_$ac_safe=no"
8267 fi
8268 rm -f conftest*
8269 fi
8270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8271   echo "$ac_t""yes" 1>&6
8272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8273   cat >> confdefs.h <<EOF
8274 #define $ac_tr_hdr 1
8275 EOF
8276  
8277 else
8278   echo "$ac_t""no" 1>&6
8279 fi
8280 done
8281
8282
8283         if test $ac_cv_header_ltdl_h = no ; then
8284                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8285         fi
8286
8287         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8288 echo "configure:8289: checking for lt_dlinit in -lltdl" >&5
8289 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8291   echo $ac_n "(cached) $ac_c" 1>&6
8292 else
8293   ac_save_LIBS="$LIBS"
8294 LIBS="-lltdl  $LIBS"
8295 cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 /* Override any gcc2 internal prototype to avoid an error.  */
8299 /* We use char because int might match the return type of a gcc2
8300     builtin and then its argument prototype would still apply.  */
8301 char lt_dlinit();
8302
8303 int main() {
8304 lt_dlinit()
8305 ; return 0; }
8306 EOF
8307 if { (eval echo configure:8308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=yes"
8310 else
8311   echo "configure: failed program was:" >&5
8312   cat conftest.$ac_ext >&5
8313   rm -rf conftest*
8314   eval "ac_cv_lib_$ac_lib_var=no"
8315 fi
8316 rm -f conftest*
8317 LIBS="$ac_save_LIBS"
8318
8319 fi
8320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8321   echo "$ac_t""yes" 1>&6
8322   
8323                 MODULES_LIBS=-lltdl
8324                 cat >> confdefs.h <<\EOF
8325 #define HAVE_LIBLTDL 1
8326 EOF
8327
8328         
8329 else
8330   echo "$ac_t""no" 1>&6
8331 fi
8332
8333
8334         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8335                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8336         fi
8337         ol_link_modules=yes
8338 else
8339         ol_with_bdb_module=static
8340         ol_with_dnssrv_module=static
8341         ol_with_ldap_module=static
8342         ol_with_ldbm_module=static
8343         ol_with_meta_module=static
8344         ol_with_monitor_module=static
8345         ol_with_null_module=static
8346         ol_with_passwd_module=static
8347         ol_with_perl_module=static
8348         ol_with_shell_module=static
8349         ol_with_tcl_module=static
8350         ol_with_sql_module=static
8351 fi
8352
8353 # test for EBCDIC
8354 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8355 echo "configure:8356: checking for EBCDIC" >&5
8356 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   
8360         cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363
8364 #if !('M' == 0xd4)
8365 #include <__ASCII__/generate_error.h>
8366 #endif
8367
8368 EOF
8369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8370 { (eval echo configure:8371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8372 if test -z "$ac_err"; then
8373   rm -rf conftest*
8374   ol_cv_cpp_ebcdic=yes
8375 else
8376   echo "$ac_err" >&5
8377   echo "configure: failed program was:" >&5
8378   cat conftest.$ac_ext >&5
8379   rm -rf conftest*
8380   ol_cv_cpp_ebcdic=no
8381 fi
8382 rm -f conftest*
8383 fi
8384
8385 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8386 if test $ol_cv_cpp_ebcdic = yes ; then
8387         cat >> confdefs.h <<\EOF
8388 #define HAVE_EBCDIC 1
8389 EOF
8390
8391 fi
8392
8393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8394 echo "configure:8395: checking for ANSI C header files" >&5
8395 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8396   echo $ac_n "(cached) $ac_c" 1>&6
8397 else
8398   cat > conftest.$ac_ext <<EOF
8399 #line 8400 "configure"
8400 #include "confdefs.h"
8401 #include <stdlib.h>
8402 #include <stdarg.h>
8403 #include <string.h>
8404 #include <float.h>
8405 EOF
8406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8407 { (eval echo configure:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8409 if test -z "$ac_err"; then
8410   rm -rf conftest*
8411   ol_cv_header_stdc=yes
8412 else
8413   echo "$ac_err" >&5
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   ol_cv_header_stdc=no
8418 fi
8419 rm -f conftest*
8420
8421 if test $ol_cv_header_stdc = yes; then
8422   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8423 cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <string.h>
8427 EOF
8428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8429   egrep "memchr" >/dev/null 2>&1; then
8430   :
8431 else
8432   rm -rf conftest*
8433   ol_cv_header_stdc=no
8434 fi
8435 rm -f conftest*
8436
8437 fi
8438
8439 if test $ol_cv_header_stdc = yes; then
8440   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8441 cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 #include <stdlib.h>
8445 EOF
8446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8447   egrep "free" >/dev/null 2>&1; then
8448   :
8449 else
8450   rm -rf conftest*
8451   ol_cv_header_stdc=no
8452 fi
8453 rm -f conftest*
8454
8455 fi
8456
8457 if test $ol_cv_header_stdc = yes; then
8458   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8459 if test "$cross_compiling" = yes; then
8460   :
8461 else
8462   cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <ctype.h>
8466 #ifndef HAVE_EBCDIC
8467 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8468 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8469 #else
8470 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8471                 || ('j' <= (c) && (c) <= 'r') \
8472                 || ('s' <= (c) && (c) <= 'z'))
8473 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8474 #endif
8475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8476 int main () { int i; for (i = 0; i < 256; i++)
8477 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8478 exit (0); }
8479
8480 EOF
8481 if { (eval echo configure:8482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8482 then
8483   :
8484 else
8485   echo "configure: failed program was:" >&5
8486   cat conftest.$ac_ext >&5
8487   rm -fr conftest*
8488   ol_cv_header_stdc=no
8489 fi
8490 rm -fr conftest*
8491 fi
8492
8493 fi
8494 fi
8495
8496 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8497 if test $ol_cv_header_stdc = yes; then
8498   cat >> confdefs.h <<\EOF
8499 #define STDC_HEADERS 1
8500 EOF
8501
8502 fi
8503 ac_cv_header_stdc=disable
8504
8505
8506 if test $ol_cv_header_stdc != yes; then
8507         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8508 fi
8509
8510 ac_header_dirent=no
8511 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8512 do
8513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8514 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8515 echo "configure:8516: checking for $ac_hdr that defines DIR" >&5
8516 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8517   echo $ac_n "(cached) $ac_c" 1>&6
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 #include <sys/types.h>
8523 #include <$ac_hdr>
8524 int main() {
8525 DIR *dirp = 0;
8526 ; return 0; }
8527 EOF
8528 if { (eval echo configure:8529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8529   rm -rf conftest*
8530   eval "ac_cv_header_dirent_$ac_safe=yes"
8531 else
8532   echo "configure: failed program was:" >&5
8533   cat conftest.$ac_ext >&5
8534   rm -rf conftest*
8535   eval "ac_cv_header_dirent_$ac_safe=no"
8536 fi
8537 rm -f conftest*
8538 fi
8539 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8540   echo "$ac_t""yes" 1>&6
8541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8542   cat >> confdefs.h <<EOF
8543 #define $ac_tr_hdr 1
8544 EOF
8545  ac_header_dirent=$ac_hdr; break
8546 else
8547   echo "$ac_t""no" 1>&6
8548 fi
8549 done
8550 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8551 if test $ac_header_dirent = dirent.h; then
8552 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8553 echo "configure:8554: checking for opendir in -ldir" >&5
8554 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   ac_save_LIBS="$LIBS"
8559 LIBS="-ldir  $LIBS"
8560 cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 /* Override any gcc2 internal prototype to avoid an error.  */
8564 /* We use char because int might match the return type of a gcc2
8565     builtin and then its argument prototype would still apply.  */
8566 char opendir();
8567
8568 int main() {
8569 opendir()
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=yes"
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   eval "ac_cv_lib_$ac_lib_var=no"
8580 fi
8581 rm -f conftest*
8582 LIBS="$ac_save_LIBS"
8583
8584 fi
8585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587   LIBS="$LIBS -ldir"
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591
8592 else
8593 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8594 echo "configure:8595: checking for opendir in -lx" >&5
8595 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   ac_save_LIBS="$LIBS"
8600 LIBS="-lx  $LIBS"
8601 cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 /* Override any gcc2 internal prototype to avoid an error.  */
8605 /* We use char because int might match the return type of a gcc2
8606     builtin and then its argument prototype would still apply.  */
8607 char opendir();
8608
8609 int main() {
8610 opendir()
8611 ; return 0; }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=yes"
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   eval "ac_cv_lib_$ac_lib_var=no"
8621 fi
8622 rm -f conftest*
8623 LIBS="$ac_save_LIBS"
8624
8625 fi
8626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8627   echo "$ac_t""yes" 1>&6
8628   LIBS="$LIBS -lx"
8629 else
8630   echo "$ac_t""no" 1>&6
8631 fi
8632
8633 fi
8634
8635 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8636 echo "configure:8637: checking for sys/wait.h that is POSIX.1 compatible" >&5
8637 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <sys/types.h>
8644 #include <sys/wait.h>
8645 #ifndef WEXITSTATUS
8646 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8647 #endif
8648 #ifndef WIFEXITED
8649 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8650 #endif
8651 int main() {
8652 int s;
8653 wait (&s);
8654 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8655 ; return 0; }
8656 EOF
8657 if { (eval echo configure:8658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8658   rm -rf conftest*
8659   ac_cv_header_sys_wait_h=yes
8660 else
8661   echo "configure: failed program was:" >&5
8662   cat conftest.$ac_ext >&5
8663   rm -rf conftest*
8664   ac_cv_header_sys_wait_h=no
8665 fi
8666 rm -f conftest*
8667 fi
8668
8669 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8670 if test $ac_cv_header_sys_wait_h = yes; then
8671   cat >> confdefs.h <<\EOF
8672 #define HAVE_SYS_WAIT_H 1
8673 EOF
8674
8675 fi
8676
8677 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8678 echo "configure:8679: checking POSIX termios" >&5
8679 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 #include <sys/types.h>
8686 #include <unistd.h>
8687 #include <termios.h>
8688 int main() {
8689 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8690    tcgetattr(0, 0);
8691 ; return 0; }
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8694   rm -rf conftest*
8695   am_cv_sys_posix_termios=yes
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   am_cv_sys_posix_termios=no
8701 fi
8702 rm -f conftest*
8703 fi
8704
8705 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8706
8707
8708  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8709 echo "configure:8710: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8710 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8714
8715   gwinsz_in_termios_h=no
8716   if test $am_cv_sys_posix_termios = yes; then
8717     cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 #include <sys/types.h>
8721 #     include <termios.h>
8722 #     ifdef TIOCGWINSZ
8723         yes
8724 #     endif
8725     
8726 EOF
8727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8728   egrep "yes" >/dev/null 2>&1; then
8729   rm -rf conftest*
8730   gwinsz_in_termios_h=yes
8731 fi
8732 rm -f conftest*
8733
8734   fi
8735
8736   if test $gwinsz_in_termios_h = no; then
8737     cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 #include <sys/types.h>
8741 #     include <sys/ioctl.h>
8742 #     ifdef TIOCGWINSZ
8743         yes
8744 #     endif
8745     
8746 EOF
8747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8748   egrep "yes" >/dev/null 2>&1; then
8749   rm -rf conftest*
8750   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8751 fi
8752 rm -f conftest*
8753
8754   fi
8755   
8756 fi
8757
8758 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8759   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8760     cat >> confdefs.h <<\EOF
8761 #define GWINSZ_IN_SYS_IOCTL 1
8762 EOF
8763
8764   fi
8765
8766 if test $am_cv_sys_posix_termios = yes ; then
8767         cat >> confdefs.h <<\EOF
8768 #define HAVE_POSIX_TERMIOS 1
8769 EOF
8770
8771 fi
8772
8773 for ac_hdr in \
8774         arpa/inet.h             \
8775         arpa/nameser.h  \
8776         assert.h                \
8777         conio.h                 \
8778         crypt.h                 \
8779         direct.h                \
8780         errno.h                 \
8781         fcntl.h                 \
8782         filio.h                 \
8783         getopt.h                \
8784         grp.h                   \
8785         io.h                    \
8786         libutil.h               \
8787         limits.h                \
8788         locale.h                \
8789         netinet/tcp.h   \
8790         malloc.h                \
8791         memory.h                \
8792         psap.h                  \
8793         pwd.h                   \
8794         process.h               \
8795         resolv.h                \
8796         sgtty.h                 \
8797         shadow.h                \
8798         stddef.h                \
8799         string.h                \
8800         strings.h               \
8801         sysexits.h              \
8802         sys/file.h              \
8803         sys/filio.h             \
8804         sys/errno.h             \
8805         sys/ioctl.h             \
8806         sys/param.h             \
8807         sys/resource.h  \
8808         sys/select.h    \
8809         sys/socket.h    \
8810         sys/syslog.h    \
8811         sys/time.h              \
8812         sys/types.h             \
8813         sys/ucred.h             \
8814         syslog.h                \
8815         termios.h               \
8816         unistd.h                \
8817         winsock.h               \
8818         winsock2.h              \
8819
8820 do
8821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8823 echo "configure:8824: checking for $ac_hdr" >&5
8824 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8825   echo $ac_n "(cached) $ac_c" 1>&6
8826 else
8827   cat > conftest.$ac_ext <<EOF
8828 #line 8829 "configure"
8829 #include "confdefs.h"
8830 #include <$ac_hdr>
8831 EOF
8832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8833 { (eval echo configure:8834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8835 if test -z "$ac_err"; then
8836   rm -rf conftest*
8837   eval "ac_cv_header_$ac_safe=yes"
8838 else
8839   echo "$ac_err" >&5
8840   echo "configure: failed program was:" >&5
8841   cat conftest.$ac_ext >&5
8842   rm -rf conftest*
8843   eval "ac_cv_header_$ac_safe=no"
8844 fi
8845 rm -f conftest*
8846 fi
8847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8848   echo "$ac_t""yes" 1>&6
8849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8850   cat >> confdefs.h <<EOF
8851 #define $ac_tr_hdr 1
8852 EOF
8853  
8854 else
8855   echo "$ac_t""no" 1>&6
8856 fi
8857 done
8858
8859
8860
8861
8862 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8863 echo "configure:8864: checking for dlopen" >&5
8864 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* System header to define __stub macros and hopefully few prototypes,
8871     which can conflict with char dlopen(); below.  */
8872 #include <assert.h>
8873 /* Override any gcc2 internal prototype to avoid an error.  */
8874 /* We use char because int might match the return type of a gcc2
8875     builtin and then its argument prototype would still apply.  */
8876 char dlopen();
8877 char (*f)();
8878
8879 int main() {
8880
8881 /* The GNU C library defines this for functions which it implements
8882     to always fail with ENOSYS.  Some functions are actually named
8883     something starting with __ and the normal name is an alias.  */
8884 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8885 choke me
8886 #else
8887 f = dlopen;
8888 #endif
8889
8890 ; return 0; }
8891 EOF
8892 if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8893   rm -rf conftest*
8894   eval "ac_cv_func_dlopen=yes"
8895 else
8896   echo "configure: failed program was:" >&5
8897   cat conftest.$ac_ext >&5
8898   rm -rf conftest*
8899   eval "ac_cv_func_dlopen=no"
8900 fi
8901 rm -f conftest*
8902 fi
8903
8904 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8905   echo "$ac_t""yes" 1>&6
8906   :
8907 else
8908   echo "$ac_t""no" 1>&6
8909 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8910 echo "configure:8911: checking for dlopen in -ldl" >&5
8911 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8913   echo $ac_n "(cached) $ac_c" 1>&6
8914 else
8915   ac_save_LIBS="$LIBS"
8916 LIBS="-ldl  $LIBS"
8917 cat > conftest.$ac_ext <<EOF
8918 #line 8919 "configure"
8919 #include "confdefs.h"
8920 /* Override any gcc2 internal prototype to avoid an error.  */
8921 /* We use char because int might match the return type of a gcc2
8922     builtin and then its argument prototype would still apply.  */
8923 char dlopen();
8924
8925 int main() {
8926 dlopen()
8927 ; return 0; }
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8930   rm -rf conftest*
8931   eval "ac_cv_lib_$ac_lib_var=yes"
8932 else
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -rf conftest*
8936   eval "ac_cv_lib_$ac_lib_var=no"
8937 fi
8938 rm -f conftest*
8939 LIBS="$ac_save_LIBS"
8940
8941 fi
8942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8943   echo "$ac_t""yes" 1>&6
8944     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8946   cat >> confdefs.h <<EOF
8947 #define $ac_tr_lib 1
8948 EOF
8949
8950   LIBS="-ldl $LIBS"
8951
8952 else
8953   echo "$ac_t""no" 1>&6
8954 fi
8955
8956 fi
8957
8958
8959 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8960 echo "configure:8961: checking for sigset in -lV3" >&5
8961 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8963   echo $ac_n "(cached) $ac_c" 1>&6
8964 else
8965   ac_save_LIBS="$LIBS"
8966 LIBS="-lV3  $LIBS"
8967 cat > conftest.$ac_ext <<EOF
8968 #line 8969 "configure"
8969 #include "confdefs.h"
8970 /* Override any gcc2 internal prototype to avoid an error.  */
8971 /* We use char because int might match the return type of a gcc2
8972     builtin and then its argument prototype would still apply.  */
8973 char sigset();
8974
8975 int main() {
8976 sigset()
8977 ; return 0; }
8978 EOF
8979 if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8980   rm -rf conftest*
8981   eval "ac_cv_lib_$ac_lib_var=yes"
8982 else
8983   echo "configure: failed program was:" >&5
8984   cat conftest.$ac_ext >&5
8985   rm -rf conftest*
8986   eval "ac_cv_lib_$ac_lib_var=no"
8987 fi
8988 rm -f conftest*
8989 LIBS="$ac_save_LIBS"
8990
8991 fi
8992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8993   echo "$ac_t""yes" 1>&6
8994     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8995     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8996   cat >> confdefs.h <<EOF
8997 #define $ac_tr_lib 1
8998 EOF
8999
9000   LIBS="-lV3 $LIBS"
9001
9002 else
9003   echo "$ac_t""no" 1>&6
9004 fi
9005
9006
9007 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9008 echo "configure:9009: checking for winsock" >&5
9009 save_LIBS="$LIBS"
9010 for curlib in ws2_32 wsock32; do
9011         LIBS="$LIBS -l$curlib"
9012         cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015
9016                         char socket@12();
9017                         char select@20();
9018                         char closesocket@4();
9019                         char gethostname@8();
9020                         
9021 int main() {
9022
9023                         socket@12();
9024                         select@20();
9025                         closesocket@4();
9026                         gethostname@8();
9027                         
9028 ; return 0; }
9029 EOF
9030 if { (eval echo configure:9031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9031   rm -rf conftest*
9032   have_winsock=yes
9033 else
9034   echo "configure: failed program was:" >&5
9035   cat conftest.$ac_ext >&5
9036   rm -rf conftest*
9037   have_winsock=no
9038 fi
9039 rm -f conftest*
9040
9041         if test $have_winsock = yes; then
9042                 cat >> confdefs.h <<\EOF
9043 #define HAVE_WINSOCK 1
9044 EOF
9045
9046                 ac_cv_func_socket=yes
9047                 ac_cv_func_select=yes
9048                 ac_cv_func_closesocket=yes
9049                 ac_cv_func_gethostname=yes
9050                 if test $curlib = ws2_32; then
9051                         have_winsock=winsock2
9052                         cat >> confdefs.h <<\EOF
9053 #define HAVE_WINSOCK2 1
9054 EOF
9055
9056                 fi
9057                 break
9058         fi
9059         LIBS="$save_LIBS"
9060 done
9061 echo "$ac_t""$have_winsock" 1>&6
9062
9063
9064 echo $ac_n "checking for socket""... $ac_c" 1>&6
9065 echo "configure:9066: checking for socket" >&5
9066 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9067   echo $ac_n "(cached) $ac_c" 1>&6
9068 else
9069   cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072 /* System header to define __stub macros and hopefully few prototypes,
9073     which can conflict with char socket(); below.  */
9074 #include <assert.h>
9075 /* Override any gcc2 internal prototype to avoid an error.  */
9076 /* We use char because int might match the return type of a gcc2
9077     builtin and then its argument prototype would still apply.  */
9078 char socket();
9079 char (*f)();
9080
9081 int main() {
9082
9083 /* The GNU C library defines this for functions which it implements
9084     to always fail with ENOSYS.  Some functions are actually named
9085     something starting with __ and the normal name is an alias.  */
9086 #if defined (__stub_socket) || defined (__stub___socket)
9087 choke me
9088 #else
9089 f = socket;
9090 #endif
9091
9092 ; return 0; }
9093 EOF
9094 if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9095   rm -rf conftest*
9096   eval "ac_cv_func_socket=yes"
9097 else
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   eval "ac_cv_func_socket=no"
9102 fi
9103 rm -f conftest*
9104 fi
9105
9106 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9107   echo "$ac_t""yes" 1>&6
9108   :
9109 else
9110   echo "$ac_t""no" 1>&6
9111         
9112         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9113 echo "configure:9114: checking for main in -lsocket" >&5
9114 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9116   echo $ac_n "(cached) $ac_c" 1>&6
9117 else
9118   ac_save_LIBS="$LIBS"
9119 LIBS="-lsocket  $LIBS"
9120 cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123
9124 int main() {
9125 main()
9126 ; return 0; }
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=yes"
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_lib_$ac_lib_var=no"
9136 fi
9137 rm -f conftest*
9138 LIBS="$ac_save_LIBS"
9139
9140 fi
9141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9145   cat >> confdefs.h <<EOF
9146 #define $ac_tr_lib 1
9147 EOF
9148
9149   LIBS="-lsocket $LIBS"
9150
9151 else
9152   echo "$ac_t""no" 1>&6
9153 fi
9154
9155         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9156 echo "configure:9157: checking for main in -lnet" >&5
9157 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9159   echo $ac_n "(cached) $ac_c" 1>&6
9160 else
9161   ac_save_LIBS="$LIBS"
9162 LIBS="-lnet  $LIBS"
9163 cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166
9167 int main() {
9168 main()
9169 ; return 0; }
9170 EOF
9171 if { (eval echo configure:9172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9172   rm -rf conftest*
9173   eval "ac_cv_lib_$ac_lib_var=yes"
9174 else
9175   echo "configure: failed program was:" >&5
9176   cat conftest.$ac_ext >&5
9177   rm -rf conftest*
9178   eval "ac_cv_lib_$ac_lib_var=no"
9179 fi
9180 rm -f conftest*
9181 LIBS="$ac_save_LIBS"
9182
9183 fi
9184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9185   echo "$ac_t""yes" 1>&6
9186     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9187     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9188   cat >> confdefs.h <<EOF
9189 #define $ac_tr_lib 1
9190 EOF
9191
9192   LIBS="-lnet $LIBS"
9193
9194 else
9195   echo "$ac_t""no" 1>&6
9196 fi
9197
9198         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9199 echo "configure:9200: checking for main in -lnsl_s" >&5
9200 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9202   echo $ac_n "(cached) $ac_c" 1>&6
9203 else
9204   ac_save_LIBS="$LIBS"
9205 LIBS="-lnsl_s  $LIBS"
9206 cat > conftest.$ac_ext <<EOF
9207 #line 9208 "configure"
9208 #include "confdefs.h"
9209
9210 int main() {
9211 main()
9212 ; return 0; }
9213 EOF
9214 if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=yes"
9217 else
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -rf conftest*
9221   eval "ac_cv_lib_$ac_lib_var=no"
9222 fi
9223 rm -f conftest*
9224 LIBS="$ac_save_LIBS"
9225
9226 fi
9227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9228   echo "$ac_t""yes" 1>&6
9229     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9230     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9231   cat >> confdefs.h <<EOF
9232 #define $ac_tr_lib 1
9233 EOF
9234
9235   LIBS="-lnsl_s $LIBS"
9236
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9242 echo "configure:9243: checking for main in -lnsl" >&5
9243 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   ac_save_LIBS="$LIBS"
9248 LIBS="-lnsl  $LIBS"
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252
9253 int main() {
9254 main()
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_lib_$ac_lib_var=no"
9265 fi
9266 rm -f conftest*
9267 LIBS="$ac_save_LIBS"
9268
9269 fi
9270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9271   echo "$ac_t""yes" 1>&6
9272     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9274   cat >> confdefs.h <<EOF
9275 #define $ac_tr_lib 1
9276 EOF
9277
9278   LIBS="-lnsl $LIBS"
9279
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283
9284         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9285 echo "configure:9286: checking for socket in -linet" >&5
9286 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   ac_save_LIBS="$LIBS"
9291 LIBS="-linet  $LIBS"
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 /* Override any gcc2 internal prototype to avoid an error.  */
9296 /* We use char because int might match the return type of a gcc2
9297     builtin and then its argument prototype would still apply.  */
9298 char socket();
9299
9300 int main() {
9301 socket()
9302 ; return 0; }
9303 EOF
9304 if { (eval echo configure:9305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9305   rm -rf conftest*
9306   eval "ac_cv_lib_$ac_lib_var=yes"
9307 else
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -rf conftest*
9311   eval "ac_cv_lib_$ac_lib_var=no"
9312 fi
9313 rm -f conftest*
9314 LIBS="$ac_save_LIBS"
9315
9316 fi
9317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9318   echo "$ac_t""yes" 1>&6
9319     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9320     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9321   cat >> confdefs.h <<EOF
9322 #define $ac_tr_lib 1
9323 EOF
9324
9325   LIBS="-linet $LIBS"
9326
9327 else
9328   echo "$ac_t""no" 1>&6
9329 fi
9330
9331         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9332 echo "configure:9333: checking for main in -lgen" >&5
9333 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9335   echo $ac_n "(cached) $ac_c" 1>&6
9336 else
9337   ac_save_LIBS="$LIBS"
9338 LIBS="-lgen  $LIBS"
9339 cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342
9343 int main() {
9344 main()
9345 ; return 0; }
9346 EOF
9347 if { (eval echo configure:9348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=yes"
9350 else
9351   echo "configure: failed program was:" >&5
9352   cat conftest.$ac_ext >&5
9353   rm -rf conftest*
9354   eval "ac_cv_lib_$ac_lib_var=no"
9355 fi
9356 rm -f conftest*
9357 LIBS="$ac_save_LIBS"
9358
9359 fi
9360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9361   echo "$ac_t""yes" 1>&6
9362     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9363     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9364   cat >> confdefs.h <<EOF
9365 #define $ac_tr_lib 1
9366 EOF
9367
9368   LIBS="-lgen $LIBS"
9369
9370 else
9371   echo "$ac_t""no" 1>&6
9372 fi
9373
9374
9375 fi
9376
9377
9378 echo $ac_n "checking for select""... $ac_c" 1>&6
9379 echo "configure:9380: checking for select" >&5
9380 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   cat > conftest.$ac_ext <<EOF
9384 #line 9385 "configure"
9385 #include "confdefs.h"
9386 /* System header to define __stub macros and hopefully few prototypes,
9387     which can conflict with char select(); below.  */
9388 #include <assert.h>
9389 /* Override any gcc2 internal prototype to avoid an error.  */
9390 /* We use char because int might match the return type of a gcc2
9391     builtin and then its argument prototype would still apply.  */
9392 char select();
9393 char (*f)();
9394
9395 int main() {
9396
9397 /* The GNU C library defines this for functions which it implements
9398     to always fail with ENOSYS.  Some functions are actually named
9399     something starting with __ and the normal name is an alias.  */
9400 #if defined (__stub_select) || defined (__stub___select)
9401 choke me
9402 #else
9403 f = select;
9404 #endif
9405
9406 ; return 0; }
9407 EOF
9408 if { (eval echo configure:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9409   rm -rf conftest*
9410   eval "ac_cv_func_select=yes"
9411 else
9412   echo "configure: failed program was:" >&5
9413   cat conftest.$ac_ext >&5
9414   rm -rf conftest*
9415   eval "ac_cv_func_select=no"
9416 fi
9417 rm -f conftest*
9418 fi
9419
9420 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9421   echo "$ac_t""yes" 1>&6
9422   :
9423 else
9424   echo "$ac_t""no" 1>&6
9425 { echo "configure: error: select() required." 1>&2; exit 1; }
9426 fi
9427
9428
9429 if test "${ac_cv_header_winsock_h}" != yes; then
9430                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9431 echo "configure:9432: checking types of arguments for select()" >&5
9432  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9433   echo $ac_n "(cached) $ac_c" 1>&6
9434 else
9435    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9436   echo $ac_n "(cached) $ac_c" 1>&6
9437 else
9438     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9439   echo $ac_n "(cached) $ac_c" 1>&6
9440 else
9441      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9442      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9443       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9444        cat > conftest.$ac_ext <<EOF
9445 #line 9446 "configure"
9446 #include "confdefs.h"
9447 #ifdef HAVE_SYS_TYPES_H
9448 #include <sys/types.h>
9449 #endif
9450 #ifdef HAVE_SYS_TIME_H
9451 #include <sys/time.h>
9452 #endif
9453 #ifdef HAVE_SYS_SELECT_H
9454 #include <sys/select.h>
9455 #endif
9456 #ifdef HAVE_SYS_SOCKET_H
9457 #include <sys/socket.h>
9458 #endif
9459 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);
9460 int main() {
9461
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9465   rm -rf conftest*
9466           ac_not_found=no ; break 3
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   ac_not_found=yes
9472 fi
9473 rm -f conftest*
9474       done
9475      done
9476     done
9477    
9478 fi
9479   
9480 fi
9481  
9482 fi
9483  if test "$ac_not_found" = yes; then
9484   ac_cv_func_select_arg1=int 
9485   ac_cv_func_select_arg234='int *' 
9486   ac_cv_func_select_arg5='struct timeval *'
9487  fi
9488  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9489  cat >> confdefs.h <<EOF
9490 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9491 EOF
9492
9493  cat >> confdefs.h <<EOF
9494 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9495 EOF
9496
9497  cat >> confdefs.h <<EOF
9498 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9499 EOF
9500
9501
9502 fi
9503
9504
9505 for ac_hdr in regex.h 
9506 do
9507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9509 echo "configure:9510: checking for $ac_hdr" >&5
9510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513   cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9516 #include <$ac_hdr>
9517 EOF
9518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9519 { (eval echo configure:9520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9521 if test -z "$ac_err"; then
9522   rm -rf conftest*
9523   eval "ac_cv_header_$ac_safe=yes"
9524 else
9525   echo "$ac_err" >&5
9526   echo "configure: failed program was:" >&5
9527   cat conftest.$ac_ext >&5
9528   rm -rf conftest*
9529   eval "ac_cv_header_$ac_safe=no"
9530 fi
9531 rm -f conftest*
9532 fi
9533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9534   echo "$ac_t""yes" 1>&6
9535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9536   cat >> confdefs.h <<EOF
9537 #define $ac_tr_hdr 1
9538 EOF
9539  
9540 else
9541   echo "$ac_t""no" 1>&6
9542 fi
9543 done
9544
9545 if test "$ac_cv_header_regex_h" != yes ; then
9546         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9547 fi
9548
9549 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9550 echo "configure:9551: checking for library containing regfree" >&5
9551 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9552   echo $ac_n "(cached) $ac_c" 1>&6
9553 else
9554   ac_func_search_save_LIBS="$LIBS"
9555 ac_cv_search_regfree="no"
9556 cat > conftest.$ac_ext <<EOF
9557 #line 9558 "configure"
9558 #include "confdefs.h"
9559 /* Override any gcc2 internal prototype to avoid an error.  */
9560 /* We use char because int might match the return type of a gcc2
9561     builtin and then its argument prototype would still apply.  */
9562 char regfree();
9563
9564 int main() {
9565 regfree()
9566 ; return 0; }
9567 EOF
9568 if { (eval echo configure:9569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9569   rm -rf conftest*
9570   ac_cv_search_regfree="none required"
9571 else
9572   echo "configure: failed program was:" >&5
9573   cat conftest.$ac_ext >&5
9574 fi
9575 rm -f conftest*
9576 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9577 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9578 cat > conftest.$ac_ext <<EOF
9579 #line 9580 "configure"
9580 #include "confdefs.h"
9581 /* Override any gcc2 internal prototype to avoid an error.  */
9582 /* We use char because int might match the return type of a gcc2
9583     builtin and then its argument prototype would still apply.  */
9584 char regfree();
9585
9586 int main() {
9587 regfree()
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   ac_cv_search_regfree="-l$ac_lib"
9593 break
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597 fi
9598 rm -f conftest*
9599 done
9600 LIBS="$ac_func_search_save_LIBS"
9601 fi
9602
9603 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9604 if test "$ac_cv_search_regfree" != "no"; then
9605   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9606   :
9607 else :
9608   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9609 fi
9610
9611
9612 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9613 echo "configure:9614: checking for compatible POSIX regex" >&5
9614 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9615   echo $ac_n "(cached) $ac_c" 1>&6
9616 else
9617   
9618         if test "$cross_compiling" = yes; then
9619   ol_cv_c_posix_regex=cross
9620 else
9621   cat > conftest.$ac_ext <<EOF
9622 #line 9623 "configure"
9623 #include "confdefs.h"
9624
9625 #include <sys/types.h>
9626 #include <regex.h>
9627 static char *pattern, *string;
9628 main()
9629 {
9630         int rc;
9631         regex_t re;
9632
9633         pattern = "^A";
9634
9635         if(regcomp(&re, pattern, 0)) {
9636                 return -1;
9637         }
9638         
9639         string = "ALL MATCH";
9640         
9641         rc = regexec(&re, string, 0, (void*)0, 0);
9642
9643         regfree(&re);
9644
9645         return rc;
9646 }
9647 EOF
9648 if { (eval echo configure:9649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9649 then
9650   ol_cv_c_posix_regex=yes
9651 else
9652   echo "configure: failed program was:" >&5
9653   cat conftest.$ac_ext >&5
9654   rm -fr conftest*
9655   ol_cv_c_posix_regex=no
9656 fi
9657 rm -fr conftest*
9658 fi
9659
9660 fi
9661
9662 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9663
9664 if test "$ol_cv_c_posix_regex" = no ; then
9665         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9666 fi
9667
9668
9669 have_uuid=no
9670 for ac_hdr in sys/uuid.h
9671 do
9672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9674 echo "configure:9675: checking for $ac_hdr" >&5
9675 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9676   echo $ac_n "(cached) $ac_c" 1>&6
9677 else
9678   cat > conftest.$ac_ext <<EOF
9679 #line 9680 "configure"
9680 #include "confdefs.h"
9681 #include <$ac_hdr>
9682 EOF
9683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9684 { (eval echo configure:9685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9686 if test -z "$ac_err"; then
9687   rm -rf conftest*
9688   eval "ac_cv_header_$ac_safe=yes"
9689 else
9690   echo "$ac_err" >&5
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693   rm -rf conftest*
9694   eval "ac_cv_header_$ac_safe=no"
9695 fi
9696 rm -f conftest*
9697 fi
9698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9699   echo "$ac_t""yes" 1>&6
9700     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9701   cat >> confdefs.h <<EOF
9702 #define $ac_tr_hdr 1
9703 EOF
9704  
9705 else
9706   echo "$ac_t""no" 1>&6
9707 fi
9708 done
9709
9710 if test $ac_cv_header_sys_uuid_h = yes ; then
9711         save_LIBS="$LIBS"
9712         
9713 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9714 echo "configure:9715: checking for library containing uuid_to_str" >&5
9715 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   ac_func_search_save_LIBS="$LIBS"
9719 ac_cv_search_uuid_to_str="no"
9720 cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* Override any gcc2 internal prototype to avoid an error.  */
9724 /* We use char because int might match the return type of a gcc2
9725     builtin and then its argument prototype would still apply.  */
9726 char uuid_to_str();
9727
9728 int main() {
9729 uuid_to_str()
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9733   rm -rf conftest*
9734   ac_cv_search_uuid_to_str="none required"
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738 fi
9739 rm -f conftest*
9740 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9741 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9742 cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 /* Override any gcc2 internal prototype to avoid an error.  */
9746 /* We use char because int might match the return type of a gcc2
9747     builtin and then its argument prototype would still apply.  */
9748 char uuid_to_str();
9749
9750 int main() {
9751 uuid_to_str()
9752 ; return 0; }
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755   rm -rf conftest*
9756   ac_cv_search_uuid_to_str="-l$ac_lib"
9757 break
9758 else
9759   echo "configure: failed program was:" >&5
9760   cat conftest.$ac_ext >&5
9761 fi
9762 rm -f conftest*
9763 done
9764 LIBS="$ac_func_search_save_LIBS"
9765 fi
9766
9767 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9768 if test "$ac_cv_search_uuid_to_str" != "no"; then
9769   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9770   have_uuid=yes
9771 else :
9772   :
9773 fi
9774         LIBS="$save_LIBS"
9775
9776         if test have_uuid = yes ; then
9777                 cat >> confdefs.h <<\EOF
9778 #define HAVE_UUID_TO_STR 1
9779 EOF
9780
9781
9782                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9783                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9784         fi
9785 fi
9786
9787 if test $have_uuid = no ; then
9788         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9789 echo "configure:9790: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9790         save_LIBS="$LIBS"
9791         LIBS="$LIBS -lrpcrt4"
9792         cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795
9796                 char UuidCreate@4();
9797                 char UuidToStringA@8();
9798                 
9799 int main() {
9800
9801                 UuidCreate@4();
9802                 UuidToStringA@8();
9803                 
9804 ; return 0; }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9807   rm -rf conftest*
9808   need_rpcrt=yes
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   need_rpcrt=no
9814 fi
9815 rm -f conftest*
9816         if test $need_rpcrt = yes; then
9817                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9818         fi
9819         LIBS="$save_LIBS"
9820         echo "$ac_t""$need_rpcrt" 1>&6
9821 fi
9822
9823 ol_link_dnssrv=no
9824 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9825 echo "configure:9826: checking for res_query" >&5
9826 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9827   echo $ac_n "(cached) $ac_c" 1>&6
9828 else
9829   cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 /* System header to define __stub macros and hopefully few prototypes,
9833     which can conflict with char res_query(); below.  */
9834 #include <assert.h>
9835 /* Override any gcc2 internal prototype to avoid an error.  */
9836 /* We use char because int might match the return type of a gcc2
9837     builtin and then its argument prototype would still apply.  */
9838 char res_query();
9839 char (*f)();
9840
9841 int main() {
9842
9843 /* The GNU C library defines this for functions which it implements
9844     to always fail with ENOSYS.  Some functions are actually named
9845     something starting with __ and the normal name is an alias.  */
9846 #if defined (__stub_res_query) || defined (__stub___res_query)
9847 choke me
9848 #else
9849 f = res_query;
9850 #endif
9851
9852 ; return 0; }
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9855   rm -rf conftest*
9856   eval "ac_cv_func_res_query=yes"
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -rf conftest*
9861   eval "ac_cv_func_res_query=no"
9862 fi
9863 rm -f conftest*
9864 fi
9865
9866 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9867   echo "$ac_t""yes" 1>&6
9868   :
9869 else
9870   echo "$ac_t""no" 1>&6
9871 fi
9872
9873 if test $ac_cv_func_res_query = no ; then 
9874         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9875 echo "configure:9876: checking for __res_query" >&5
9876 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9877   echo $ac_n "(cached) $ac_c" 1>&6
9878 else
9879   cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882 /* System header to define __stub macros and hopefully few prototypes,
9883     which can conflict with char __res_query(); below.  */
9884 #include <assert.h>
9885 /* Override any gcc2 internal prototype to avoid an error.  */
9886 /* We use char because int might match the return type of a gcc2
9887     builtin and then its argument prototype would still apply.  */
9888 char __res_query();
9889 char (*f)();
9890
9891 int main() {
9892
9893 /* The GNU C library defines this for functions which it implements
9894     to always fail with ENOSYS.  Some functions are actually named
9895     something starting with __ and the normal name is an alias.  */
9896 #if defined (__stub___res_query) || defined (__stub_____res_query)
9897 choke me
9898 #else
9899 f = __res_query;
9900 #endif
9901
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9905   rm -rf conftest*
9906   eval "ac_cv_func___res_query=yes"
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   eval "ac_cv_func___res_query=no"
9912 fi
9913 rm -f conftest*
9914 fi
9915
9916 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9917   echo "$ac_t""yes" 1>&6
9918   :
9919 else
9920   echo "$ac_t""no" 1>&6
9921 fi
9922
9923         ac_cv_func_res_query=$ac_cv_func___res_query
9924 fi
9925
9926 if test $ac_cv_func_res_query = no ; then 
9927         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9928 echo "configure:9929: checking for res_query in -lbind" >&5
9929 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9931   echo $ac_n "(cached) $ac_c" 1>&6
9932 else
9933   ac_save_LIBS="$LIBS"
9934 LIBS="-lbind  $LIBS"
9935 cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 /* Override any gcc2 internal prototype to avoid an error.  */
9939 /* We use char because int might match the return type of a gcc2
9940     builtin and then its argument prototype would still apply.  */
9941 char res_query();
9942
9943 int main() {
9944 res_query()
9945 ; return 0; }
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9948   rm -rf conftest*
9949   eval "ac_cv_lib_$ac_lib_var=yes"
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   eval "ac_cv_lib_$ac_lib_var=no"
9955 fi
9956 rm -f conftest*
9957 LIBS="$ac_save_LIBS"
9958
9959 fi
9960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9961   echo "$ac_t""yes" 1>&6
9962     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9964   cat >> confdefs.h <<EOF
9965 #define $ac_tr_lib 1
9966 EOF
9967
9968   LIBS="-lbind $LIBS"
9969
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973
9974         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9975 fi
9976
9977 if test $ac_cv_func_res_query = no ; then 
9978         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9979 echo "configure:9980: checking for __res_query in -lbind" >&5
9980 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9982   echo $ac_n "(cached) $ac_c" 1>&6
9983 else
9984   ac_save_LIBS="$LIBS"
9985 LIBS="-lbind  $LIBS"
9986 cat > conftest.$ac_ext <<EOF
9987 #line 9988 "configure"
9988 #include "confdefs.h"
9989 /* Override any gcc2 internal prototype to avoid an error.  */
9990 /* We use char because int might match the return type of a gcc2
9991     builtin and then its argument prototype would still apply.  */
9992 char __res_query();
9993
9994 int main() {
9995 __res_query()
9996 ; return 0; }
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9999   rm -rf conftest*
10000   eval "ac_cv_lib_$ac_lib_var=yes"
10001 else
10002   echo "configure: failed program was:" >&5
10003   cat conftest.$ac_ext >&5
10004   rm -rf conftest*
10005   eval "ac_cv_lib_$ac_lib_var=no"
10006 fi
10007 rm -f conftest*
10008 LIBS="$ac_save_LIBS"
10009
10010 fi
10011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10012   echo "$ac_t""yes" 1>&6
10013     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10014     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10015   cat >> confdefs.h <<EOF
10016 #define $ac_tr_lib 1
10017 EOF
10018
10019   LIBS="-lbind $LIBS"
10020
10021 else
10022   echo "$ac_t""no" 1>&6
10023 fi
10024
10025         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10026 fi
10027
10028 if test $ac_cv_func_res_query = no ; then 
10029         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10030 echo "configure:10031: checking for res_query in -lresolv" >&5
10031 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10033   echo $ac_n "(cached) $ac_c" 1>&6
10034 else
10035   ac_save_LIBS="$LIBS"
10036 LIBS="-lresolv  $LIBS"
10037 cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 /* Override any gcc2 internal prototype to avoid an error.  */
10041 /* We use char because int might match the return type of a gcc2
10042     builtin and then its argument prototype would still apply.  */
10043 char res_query();
10044
10045 int main() {
10046 res_query()
10047 ; return 0; }
10048 EOF
10049 if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10050   rm -rf conftest*
10051   eval "ac_cv_lib_$ac_lib_var=yes"
10052 else
10053   echo "configure: failed program was:" >&5
10054   cat conftest.$ac_ext >&5
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=no"
10057 fi
10058 rm -f conftest*
10059 LIBS="$ac_save_LIBS"
10060
10061 fi
10062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10063   echo "$ac_t""yes" 1>&6
10064     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10065     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10066   cat >> confdefs.h <<EOF
10067 #define $ac_tr_lib 1
10068 EOF
10069
10070   LIBS="-lresolv $LIBS"
10071
10072 else
10073   echo "$ac_t""no" 1>&6
10074 fi
10075
10076         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10077 fi
10078
10079 if test $ac_cv_func_res_query = no ; then 
10080         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10081 echo "configure:10082: checking for __res_query in -lresolv" >&5
10082 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10084   echo $ac_n "(cached) $ac_c" 1>&6
10085 else
10086   ac_save_LIBS="$LIBS"
10087 LIBS="-lresolv  $LIBS"
10088 cat > conftest.$ac_ext <<EOF
10089 #line 10090 "configure"
10090 #include "confdefs.h"
10091 /* Override any gcc2 internal prototype to avoid an error.  */
10092 /* We use char because int might match the return type of a gcc2
10093     builtin and then its argument prototype would still apply.  */
10094 char __res_query();
10095
10096 int main() {
10097 __res_query()
10098 ; return 0; }
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10101   rm -rf conftest*
10102   eval "ac_cv_lib_$ac_lib_var=yes"
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   eval "ac_cv_lib_$ac_lib_var=no"
10108 fi
10109 rm -f conftest*
10110 LIBS="$ac_save_LIBS"
10111
10112 fi
10113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10114   echo "$ac_t""yes" 1>&6
10115     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10116     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10117   cat >> confdefs.h <<EOF
10118 #define $ac_tr_lib 1
10119 EOF
10120
10121   LIBS="-lresolv $LIBS"
10122
10123 else
10124   echo "$ac_t""no" 1>&6
10125 fi
10126
10127         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10128 fi
10129
10130 if test "$ac_cv_func_res_query" = yes ; then
10131         cat >> confdefs.h <<\EOF
10132 #define HAVE_RES_QUERY 1
10133 EOF
10134
10135
10136         if test $ol_enable_dnssrv != no ; then
10137                 ol_link_dnssrv=yes
10138         fi
10139 fi
10140
10141 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10142         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10143 fi
10144
10145 for ac_func in getaddrinfo gai_strerror inet_ntop 
10146 do
10147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10148 echo "configure:10149: checking for $ac_func" >&5
10149 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10150   echo $ac_n "(cached) $ac_c" 1>&6
10151 else
10152   cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155 /* System header to define __stub macros and hopefully few prototypes,
10156     which can conflict with char $ac_func(); below.  */
10157 #include <assert.h>
10158 /* Override any gcc2 internal prototype to avoid an error.  */
10159 /* We use char because int might match the return type of a gcc2
10160     builtin and then its argument prototype would still apply.  */
10161 char $ac_func();
10162 char (*f)();
10163
10164 int main() {
10165
10166 /* The GNU C library defines this for functions which it implements
10167     to always fail with ENOSYS.  Some functions are actually named
10168     something starting with __ and the normal name is an alias.  */
10169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10170 choke me
10171 #else
10172 f = $ac_func;
10173 #endif
10174
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   eval "ac_cv_func_$ac_func=yes"
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   eval "ac_cv_func_$ac_func=no"
10185 fi
10186 rm -f conftest*
10187 fi
10188
10189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_func 1
10194 EOF
10195  
10196 else
10197   echo "$ac_t""no" 1>&6
10198 fi
10199 done
10200
10201
10202 ol_link_ipv6=no
10203 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10204         if test $ol_enable_ipv6 = yes ; then
10205                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10206         fi
10207 elif test $ol_enable_ipv6 != no ; then
10208         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10209 echo "configure:10210: checking INET6_ADDRSTRLEN" >&5
10210 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10211   echo $ac_n "(cached) $ac_c" 1>&6
10212 else
10213   
10214                 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217
10218 #                       include <netinet/in.h>
10219 #                       ifdef INET6_ADDRSTRLEN
10220                                 __has_inet6_addrstrlen__;
10221 #                       endif
10222                 
10223 EOF
10224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10225   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10226   rm -rf conftest*
10227   ol_cv_inet6_addrstrlen=yes
10228 else
10229   rm -rf conftest*
10230   ol_cv_inet6_addrstrlen=no
10231 fi
10232 rm -f conftest*
10233
10234 fi
10235
10236 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10237
10238
10239         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10240 echo "configure:10241: checking struct sockaddr_storage" >&5
10241 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10242   echo $ac_n "(cached) $ac_c" 1>&6
10243 else
10244   
10245                 cat > conftest.$ac_ext <<EOF
10246 #line 10247 "configure"
10247 #include "confdefs.h"
10248
10249 #include <sys/types.h>
10250 #include <sys/socket.h>
10251
10252 int main() {
10253
10254                         struct sockaddr_storage ss;
10255
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10259   rm -rf conftest*
10260   ol_cv_struct_sockaddr_storage=yes
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   ol_cv_struct_sockaddr_storage=no
10266 fi
10267 rm -f conftest*
10268 fi
10269
10270 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10271
10272         if test $ol_cv_inet6_addrstrlen = yes \
10273                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10274                 ol_link_ipv6=yes
10275         elif test $ol_enable_ipv6 = yes \
10276                         -a $ol_cv_inet6_addrstrlen = no ; then
10277                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10278         elif test $ol_enable_ipv6 = yes \
10279                         -a $ol_cv_struct_sockaddr_storage = no ; then
10280                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10281         fi
10282 fi
10283
10284 if test $ol_enable_local != no ; then
10285         for ac_hdr in sys/un.h 
10286 do
10287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10289 echo "configure:10290: checking for $ac_hdr" >&5
10290 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10291   echo $ac_n "(cached) $ac_c" 1>&6
10292 else
10293   cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 #include <$ac_hdr>
10297 EOF
10298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10299 { (eval echo configure:10300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10301 if test -z "$ac_err"; then
10302   rm -rf conftest*
10303   eval "ac_cv_header_$ac_safe=yes"
10304 else
10305   echo "$ac_err" >&5
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_header_$ac_safe=no"
10310 fi
10311 rm -f conftest*
10312 fi
10313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10314   echo "$ac_t""yes" 1>&6
10315     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10316   cat >> confdefs.h <<EOF
10317 #define $ac_tr_hdr 1
10318 EOF
10319  
10320 else
10321   echo "$ac_t""no" 1>&6
10322 fi
10323 done
10324
10325
10326         if test $ol_enable_local = auto ; then
10327                 ol_enable_local=$ac_cv_header_sys_un_h
10328         elif test $ac_cv_header_sys_un_h = no ; then
10329                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10330         fi
10331 fi
10332
10333 ol_link_kbind=no
10334 ol_link_kpasswd=no
10335 ol_link_krb5=no
10336 ol_link_krb4=no
10337
10338 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10339         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10340         -o $ol_with_kerberos = k425 ; then
10341
10342         for ac_hdr in krb5.h
10343 do
10344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10346 echo "configure:10347: checking for $ac_hdr" >&5
10347 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   cat > conftest.$ac_ext <<EOF
10351 #line 10352 "configure"
10352 #include "confdefs.h"
10353 #include <$ac_hdr>
10354 EOF
10355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10356 { (eval echo configure:10357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10358 if test -z "$ac_err"; then
10359   rm -rf conftest*
10360   eval "ac_cv_header_$ac_safe=yes"
10361 else
10362   echo "$ac_err" >&5
10363   echo "configure: failed program was:" >&5
10364   cat conftest.$ac_ext >&5
10365   rm -rf conftest*
10366   eval "ac_cv_header_$ac_safe=no"
10367 fi
10368 rm -f conftest*
10369 fi
10370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10371   echo "$ac_t""yes" 1>&6
10372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10373   cat >> confdefs.h <<EOF
10374 #define $ac_tr_hdr 1
10375 EOF
10376  
10377 else
10378   echo "$ac_t""no" 1>&6
10379 fi
10380 done
10381
10382
10383         if test $ac_cv_header_krb5_h = yes ; then
10384                                 for ac_hdr in heim_err.h
10385 do
10386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10388 echo "configure:10389: checking for $ac_hdr" >&5
10389 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10390   echo $ac_n "(cached) $ac_c" 1>&6
10391 else
10392   cat > conftest.$ac_ext <<EOF
10393 #line 10394 "configure"
10394 #include "confdefs.h"
10395 #include <$ac_hdr>
10396 EOF
10397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10398 { (eval echo configure:10399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10400 if test -z "$ac_err"; then
10401   rm -rf conftest*
10402   eval "ac_cv_header_$ac_safe=yes"
10403 else
10404   echo "$ac_err" >&5
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   eval "ac_cv_header_$ac_safe=no"
10409 fi
10410 rm -f conftest*
10411 fi
10412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10413   echo "$ac_t""yes" 1>&6
10414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10415   cat >> confdefs.h <<EOF
10416 #define $ac_tr_hdr 1
10417 EOF
10418  
10419 else
10420   echo "$ac_t""no" 1>&6
10421 fi
10422 done
10423
10424                 if test $ac_cv_header_heim_err_h = yes ; then
10425                         krb5_impl=heimdal
10426                 else
10427                         krb5_impl=mit
10428                 fi
10429
10430                 if test $krb5_impl = mit; then
10431                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10432 echo "configure:10433: checking for main in -lk5crypto" >&5
10433 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10434 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   ac_save_LIBS="$LIBS"
10438 LIBS="-lk5crypto  $LIBS"
10439 cat > conftest.$ac_ext <<EOF
10440 #line 10441 "configure"
10441 #include "confdefs.h"
10442
10443 int main() {
10444 main()
10445 ; return 0; }
10446 EOF
10447 if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10448   rm -rf conftest*
10449   eval "ac_cv_lib_$ac_lib_var=yes"
10450 else
10451   echo "configure: failed program was:" >&5
10452   cat conftest.$ac_ext >&5
10453   rm -rf conftest*
10454   eval "ac_cv_lib_$ac_lib_var=no"
10455 fi
10456 rm -f conftest*
10457 LIBS="$ac_save_LIBS"
10458
10459 fi
10460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10461   echo "$ac_t""yes" 1>&6
10462   krb5crypto=k5crypto
10463 else
10464   echo "$ac_t""no" 1>&6
10465 krb5crypto=crypto
10466 fi
10467
10468
10469                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10470 echo "configure:10471: checking for main in -lkrb5" >&5
10471 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   ac_save_LIBS="$LIBS"
10476 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10477 cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480
10481 int main() {
10482 main()
10483 ; return 0; }
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10486   rm -rf conftest*
10487   eval "ac_cv_lib_$ac_lib_var=yes"
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -rf conftest*
10492   eval "ac_cv_lib_$ac_lib_var=no"
10493 fi
10494 rm -f conftest*
10495 LIBS="$ac_save_LIBS"
10496
10497 fi
10498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10499   echo "$ac_t""yes" 1>&6
10500   have_krb5=yes
10501                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10502 else
10503   echo "$ac_t""no" 1>&6
10504 have_krb5=no
10505 fi
10506
10507
10508                 elif test $krb5_impl = heimdal; then
10509                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10510 echo "configure:10511: checking for main in -ldes" >&5
10511 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10513   echo $ac_n "(cached) $ac_c" 1>&6
10514 else
10515   ac_save_LIBS="$LIBS"
10516 LIBS="-ldes  $LIBS"
10517 cat > conftest.$ac_ext <<EOF
10518 #line 10519 "configure"
10519 #include "confdefs.h"
10520
10521 int main() {
10522 main()
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=yes"
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_lib_$ac_lib_var=no"
10533 fi
10534 rm -f conftest*
10535 LIBS="$ac_save_LIBS"
10536
10537 fi
10538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10539   echo "$ac_t""yes" 1>&6
10540   krb5crypto=des
10541 else
10542   echo "$ac_t""no" 1>&6
10543 krb5crypto=crypto
10544 fi
10545
10546
10547                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10548 echo "configure:10549: checking for main in -lkrb5" >&5
10549 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   ac_save_LIBS="$LIBS"
10554 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10555 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558
10559 int main() {
10560 main()
10561 ; return 0; }
10562 EOF
10563 if { (eval echo configure:10564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=yes"
10566 else
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -rf conftest*
10570   eval "ac_cv_lib_$ac_lib_var=no"
10571 fi
10572 rm -f conftest*
10573 LIBS="$ac_save_LIBS"
10574
10575 fi
10576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10577   echo "$ac_t""yes" 1>&6
10578   have_krb5=yes
10579                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10580 else
10581   echo "$ac_t""no" 1>&6
10582 have_krb5=no
10583 fi
10584
10585
10586                         cat >> confdefs.h <<\EOF
10587 #define HAVE_HEIMDAL_KERBEROS 1
10588 EOF
10589
10590
10591                 else
10592                         have_krb5=no
10593                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10594                 fi
10595
10596                 if test $have_krb5 = yes ; then
10597                         ol_link_krb5=yes
10598
10599                         cat >> confdefs.h <<\EOF
10600 #define HAVE_KRB5 1
10601 EOF
10602
10603
10604                         if test $ol_enable_kpasswd != no ; then
10605                                 ol_link_kpasswd=yes;
10606                         fi
10607
10608                         if test $ol_with_kerberos = k5only ; then
10609                                 ol_with_kerberos=found
10610                         fi
10611
10612                 elif test $ol_with_kerberos != auto ; then
10613                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10614                 fi
10615
10616         fi
10617 fi
10618
10619 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10620         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10621
10622         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10623 do
10624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10626 echo "configure:10627: checking for $ac_hdr" >&5
10627 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10628   echo $ac_n "(cached) $ac_c" 1>&6
10629 else
10630   cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633 #include <$ac_hdr>
10634 EOF
10635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10636 { (eval echo configure:10637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10638 if test -z "$ac_err"; then
10639   rm -rf conftest*
10640   eval "ac_cv_header_$ac_safe=yes"
10641 else
10642   echo "$ac_err" >&5
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -rf conftest*
10646   eval "ac_cv_header_$ac_safe=no"
10647 fi
10648 rm -f conftest*
10649 fi
10650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10651   echo "$ac_t""yes" 1>&6
10652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10653   cat >> confdefs.h <<EOF
10654 #define $ac_tr_hdr 1
10655 EOF
10656  
10657 else
10658   echo "$ac_t""no" 1>&6
10659 fi
10660 done
10661
10662
10663         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10664                 if test $krb5_impl = mit; then
10665                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10666 echo "configure:10667: checking for main in -lkrb4" >&5
10667 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10669   echo $ac_n "(cached) $ac_c" 1>&6
10670 else
10671   ac_save_LIBS="$LIBS"
10672 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10673 cat > conftest.$ac_ext <<EOF
10674 #line 10675 "configure"
10675 #include "confdefs.h"
10676
10677 int main() {
10678 main()
10679 ; return 0; }
10680 EOF
10681 if { (eval echo configure:10682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10682   rm -rf conftest*
10683   eval "ac_cv_lib_$ac_lib_var=yes"
10684 else
10685   echo "configure: failed program was:" >&5
10686   cat conftest.$ac_ext >&5
10687   rm -rf conftest*
10688   eval "ac_cv_lib_$ac_lib_var=no"
10689 fi
10690 rm -f conftest*
10691 LIBS="$ac_save_LIBS"
10692
10693 fi
10694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10695   echo "$ac_t""yes" 1>&6
10696   have_k425=yes
10697                                 KRB4_LIBS="-lkrb4 -ldes425"
10698 else
10699   echo "$ac_t""no" 1>&6
10700 have_k425=no
10701 fi
10702
10703
10704                 elif test $krb5_impl = heimdal; then
10705                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10706 echo "configure:10707: checking for main in -lkrb4" >&5
10707 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   ac_save_LIBS="$LIBS"
10712 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10713 cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716
10717 int main() {
10718 main()
10719 ; return 0; }
10720 EOF
10721 if { (eval echo configure:10722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10722   rm -rf conftest*
10723   eval "ac_cv_lib_$ac_lib_var=yes"
10724 else
10725   echo "configure: failed program was:" >&5
10726   cat conftest.$ac_ext >&5
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=no"
10729 fi
10730 rm -f conftest*
10731 LIBS="$ac_save_LIBS"
10732
10733 fi
10734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10735   echo "$ac_t""yes" 1>&6
10736   have_k425=yes
10737                                 KRB4_LIBS="-lkrb4"
10738 else
10739   echo "$ac_t""no" 1>&6
10740 have_k425=no
10741 fi
10742
10743
10744                 else
10745                         have_425=no
10746                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10747                 fi
10748
10749                 if test $have_k425 = yes ; then
10750                         ol_with_kerberos=found
10751                         ol_link_krb4=yes
10752
10753                         cat >> confdefs.h <<\EOF
10754 #define HAVE_KRB425 1
10755 EOF
10756
10757                         cat >> confdefs.h <<\EOF
10758 #define HAVE_KRB4 1
10759 EOF
10760
10761
10762                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10763 echo "configure:10764: checking for des_debug in Kerberos libraries" >&5
10764 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   
10768                                                                 save_LIBS="$LIBS"
10769                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10770                                 cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10773
10774 #include <kerberosIV/krb.h>
10775 #include <kerberosIV/des.h>
10776 extern int des_debug;
10777
10778 int main() {
10779
10780 des_debug = 1;
10781
10782 ; return 0; }
10783 EOF
10784 if { (eval echo configure:10785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10785   rm -rf conftest*
10786   ol_cv_var_des_debug=yes
10787 else
10788   echo "configure: failed program was:" >&5
10789   cat conftest.$ac_ext >&5
10790   rm -rf conftest*
10791   ol_cv_var_des_debug=no
10792 fi
10793 rm -f conftest*
10794                                                                 LIBS="$save_LIBS"
10795                         
10796 fi
10797
10798 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10799
10800                         if test $ol_cv_var_des_debug = yes ; then
10801                                 cat >> confdefs.h <<\EOF
10802 #define HAVE_DES_DEBUG 1
10803 EOF
10804
10805                         fi
10806
10807                         LIBS="$save_LIBS"
10808                 fi
10809         fi
10810 fi
10811
10812 if test $ol_link_krb5 = yes ; then
10813         ol_with_kerberos=found
10814 fi
10815
10816 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10817         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10818
10819         for ac_hdr in krb.h des.h krb-archaeology.h 
10820 do
10821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10823 echo "configure:10824: checking for $ac_hdr" >&5
10824 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10825   echo $ac_n "(cached) $ac_c" 1>&6
10826 else
10827   cat > conftest.$ac_ext <<EOF
10828 #line 10829 "configure"
10829 #include "confdefs.h"
10830 #include <$ac_hdr>
10831 EOF
10832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10833 { (eval echo configure:10834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10835 if test -z "$ac_err"; then
10836   rm -rf conftest*
10837   eval "ac_cv_header_$ac_safe=yes"
10838 else
10839   echo "$ac_err" >&5
10840   echo "configure: failed program was:" >&5
10841   cat conftest.$ac_ext >&5
10842   rm -rf conftest*
10843   eval "ac_cv_header_$ac_safe=no"
10844 fi
10845 rm -f conftest*
10846 fi
10847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10848   echo "$ac_t""yes" 1>&6
10849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10850   cat >> confdefs.h <<EOF
10851 #define $ac_tr_hdr 1
10852 EOF
10853  
10854 else
10855   echo "$ac_t""no" 1>&6
10856 fi
10857 done
10858
10859
10860         if test $ac_cv_header_krb_h = yes ; then
10861                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10862 echo "configure:10863: checking for main in -lkrb" >&5
10863 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10865   echo $ac_n "(cached) $ac_c" 1>&6
10866 else
10867   ac_save_LIBS="$LIBS"
10868 LIBS="-lkrb -ldes $LIBS"
10869 cat > conftest.$ac_ext <<EOF
10870 #line 10871 "configure"
10871 #include "confdefs.h"
10872
10873 int main() {
10874 main()
10875 ; return 0; }
10876 EOF
10877 if { (eval echo configure:10878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10878   rm -rf conftest*
10879   eval "ac_cv_lib_$ac_lib_var=yes"
10880 else
10881   echo "configure: failed program was:" >&5
10882   cat conftest.$ac_ext >&5
10883   rm -rf conftest*
10884   eval "ac_cv_lib_$ac_lib_var=no"
10885 fi
10886 rm -f conftest*
10887 LIBS="$ac_save_LIBS"
10888
10889 fi
10890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10891   echo "$ac_t""yes" 1>&6
10892   have_k4=yes
10893 else
10894   echo "$ac_t""no" 1>&6
10895 have_k4=no
10896 fi
10897
10898
10899                 if test $have_k4 = yes ; then
10900                         ol_with_kerberos=found
10901                         ol_link_krb4=yes
10902
10903                         cat >> confdefs.h <<\EOF
10904 #define HAVE_KRB4 1
10905 EOF
10906
10907
10908                         KRB4_LIBS="-lkrb -ldes"
10909
10910                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10911                                 cat >> confdefs.h <<\EOF
10912 #define HAVE_KTH_KERBEROS 1
10913 EOF
10914
10915                         fi
10916                 fi
10917         fi
10918 fi
10919
10920 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10921         ol_link_kpasswd=yes
10922 fi
10923
10924 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10925         ol_link_kbind=yes
10926
10927 elif test $ol_enable_kbind = yes ; then
10928         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10929 fi
10930
10931 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10932         cat >> confdefs.h <<\EOF
10933 #define HAVE_KERBEROS 1
10934 EOF
10935
10936
10937 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10938         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10939 fi
10940
10941 ol_link_tls=no
10942 if test $ol_with_tls != no ; then
10943         for ac_hdr in openssl/ssl.h ssl.h
10944 do
10945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10947 echo "configure:10948: checking for $ac_hdr" >&5
10948 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10949   echo $ac_n "(cached) $ac_c" 1>&6
10950 else
10951   cat > conftest.$ac_ext <<EOF
10952 #line 10953 "configure"
10953 #include "confdefs.h"
10954 #include <$ac_hdr>
10955 EOF
10956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10957 { (eval echo configure:10958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10959 if test -z "$ac_err"; then
10960   rm -rf conftest*
10961   eval "ac_cv_header_$ac_safe=yes"
10962 else
10963   echo "$ac_err" >&5
10964   echo "configure: failed program was:" >&5
10965   cat conftest.$ac_ext >&5
10966   rm -rf conftest*
10967   eval "ac_cv_header_$ac_safe=no"
10968 fi
10969 rm -f conftest*
10970 fi
10971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10972   echo "$ac_t""yes" 1>&6
10973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10974   cat >> confdefs.h <<EOF
10975 #define $ac_tr_hdr 1
10976 EOF
10977  
10978 else
10979   echo "$ac_t""no" 1>&6
10980 fi
10981 done
10982
10983         
10984         if test $ac_cv_header_openssl_ssl_h = yes \
10985                 -o $ac_cv_header_ssl_h = yes ; then
10986                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10987 echo "configure:10988: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10988 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10990   echo $ac_n "(cached) $ac_c" 1>&6
10991 else
10992   ac_save_LIBS="$LIBS"
10993 LIBS="-lssl -lcrypto $LIBS"
10994 cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997 /* Override any gcc2 internal prototype to avoid an error.  */
10998 /* We use char because int might match the return type of a gcc2
10999     builtin and then its argument prototype would still apply.  */
11000 char SSLeay_add_ssl_algorithms();
11001
11002 int main() {
11003 SSLeay_add_ssl_algorithms()
11004 ; return 0; }
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11007   rm -rf conftest*
11008   eval "ac_cv_lib_$ac_lib_var=yes"
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   eval "ac_cv_lib_$ac_lib_var=no"
11014 fi
11015 rm -f conftest*
11016 LIBS="$ac_save_LIBS"
11017
11018 fi
11019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11020   echo "$ac_t""yes" 1>&6
11021   have_ssleay=yes
11022                         need_rsaref=no
11023 else
11024   echo "$ac_t""no" 1>&6
11025 have_ssleay=no
11026 fi
11027
11028                         
11029                 if test $have_ssleay = no ; then
11030                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11031 echo "configure:11032: checking for SSL_library_init in -lssl" >&5
11032 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   ac_save_LIBS="$LIBS"
11037 LIBS="-lssl -lcrypto $LIBS"
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 /* Override any gcc2 internal prototype to avoid an error.  */
11042 /* We use char because int might match the return type of a gcc2
11043     builtin and then its argument prototype would still apply.  */
11044 char SSL_library_init();
11045
11046 int main() {
11047 SSL_library_init()
11048 ; return 0; }
11049 EOF
11050 if { (eval echo configure:11051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11051   rm -rf conftest*
11052   eval "ac_cv_lib_$ac_lib_var=yes"
11053 else
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_lib_$ac_lib_var=no"
11058 fi
11059 rm -f conftest*
11060 LIBS="$ac_save_LIBS"
11061
11062 fi
11063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11064   echo "$ac_t""yes" 1>&6
11065   have_ssleay=yes
11066                                 need_rsaref=no
11067 else
11068   echo "$ac_t""no" 1>&6
11069 have_ssleay=no
11070 fi
11071
11072                 fi
11073
11074                 if test $have_ssleay = no ; then
11075                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11076 echo "configure:11077: checking for ssl3_accept in -lssl" >&5
11077 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   ac_save_LIBS="$LIBS"
11082 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char ssl3_accept();
11090
11091 int main() {
11092 ssl3_accept()
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=yes"
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=no"
11103 fi
11104 rm -f conftest*
11105 LIBS="$ac_save_LIBS"
11106
11107 fi
11108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110   have_ssleay=yes
11111                                 need_rsaref=yes
11112 else
11113   echo "$ac_t""no" 1>&6
11114 have_ssleay=no
11115 fi
11116
11117                 fi
11118
11119                 if test $have_ssleay = yes ; then
11120                         ol_with_tls=found
11121                         ol_link_tls=yes
11122
11123                         cat >> confdefs.h <<\EOF
11124 #define HAVE_SSLEAY 1
11125 EOF
11126
11127
11128                         if test $need_rsaref = yes; then
11129                                 cat >> confdefs.h <<\EOF
11130 #define HAVE_RSAREF 1
11131 EOF
11132
11133
11134                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11135                         else
11136                                 TLS_LIBS="-lssl -lcrypto"
11137                         fi
11138                 fi
11139         fi
11140
11141 else
11142         echo "configure: warning: TLS data protection not supported!" 1>&2
11143 fi
11144
11145 if test $ol_link_tls = yes ; then
11146         cat >> confdefs.h <<\EOF
11147 #define HAVE_TLS 1
11148 EOF
11149
11150
11151 elif test $ol_with_tls = auto ; then
11152         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11153         echo "configure: warning: TLS data protection not supported!" 1>&2
11154
11155 elif test $ol_with_tls != no ; then
11156         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11157 fi
11158
11159 if test $ol_enable_lmpasswd != no; then
11160         if test $ol_link_tls != yes ; then
11161                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11162         fi
11163
11164         cat >> confdefs.h <<\EOF
11165 #define SLAPD_LMHASH 1
11166 EOF
11167
11168 fi
11169
11170 ol_link_threads=no
11171
11172 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11173         -o $ol_with_threads = nt ; then
11174
11175         
11176         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11177 echo "configure:11178: checking for _beginthread" >&5
11178 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11179   echo $ac_n "(cached) $ac_c" 1>&6
11180 else
11181   cat > conftest.$ac_ext <<EOF
11182 #line 11183 "configure"
11183 #include "confdefs.h"
11184 /* System header to define __stub macros and hopefully few prototypes,
11185     which can conflict with char _beginthread(); below.  */
11186 #include <assert.h>
11187 /* Override any gcc2 internal prototype to avoid an error.  */
11188 /* We use char because int might match the return type of a gcc2
11189     builtin and then its argument prototype would still apply.  */
11190 char _beginthread();
11191 char (*f)();
11192
11193 int main() {
11194
11195 /* The GNU C library defines this for functions which it implements
11196     to always fail with ENOSYS.  Some functions are actually named
11197     something starting with __ and the normal name is an alias.  */
11198 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11199 choke me
11200 #else
11201 f = _beginthread;
11202 #endif
11203
11204 ; return 0; }
11205 EOF
11206 if { (eval echo configure:11207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11207   rm -rf conftest*
11208   eval "ac_cv_func__beginthread=yes"
11209 else
11210   echo "configure: failed program was:" >&5
11211   cat conftest.$ac_ext >&5
11212   rm -rf conftest*
11213   eval "ac_cv_func__beginthread=no"
11214 fi
11215 rm -f conftest*
11216 fi
11217
11218 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220   :
11221 else
11222   echo "$ac_t""no" 1>&6
11223 fi
11224
11225
11226         if test $ac_cv_func__beginthread = yes ; then
11227                 cat >> confdefs.h <<\EOF
11228 #define HAVE_NT_THREADS 1
11229 EOF
11230
11231                 ol_cv_nt_threads=yes
11232         fi
11233
11234
11235         if test "$ol_cv_nt_threads" = yes ; then
11236                 ol_link_threads=nt
11237                 ol_with_threads=found
11238                 ol_with_yielding_select=yes
11239
11240                 cat >> confdefs.h <<\EOF
11241 #define HAVE_NT_SERVICE_MANAGER 1
11242 EOF
11243
11244                 cat >> confdefs.h <<\EOF
11245 #define HAVE_NT_EVENT_LOG 1
11246 EOF
11247
11248         fi
11249
11250         if test $ol_with_threads = nt ; then
11251                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11252         fi
11253 fi
11254
11255 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11256         -o $ol_with_threads = posix ; then
11257
11258         for ac_hdr in pthread.h
11259 do
11260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11262 echo "configure:11263: checking for $ac_hdr" >&5
11263 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 #include <$ac_hdr>
11270 EOF
11271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11272 { (eval echo configure:11273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11274 if test -z "$ac_err"; then
11275   rm -rf conftest*
11276   eval "ac_cv_header_$ac_safe=yes"
11277 else
11278   echo "$ac_err" >&5
11279   echo "configure: failed program was:" >&5
11280   cat conftest.$ac_ext >&5
11281   rm -rf conftest*
11282   eval "ac_cv_header_$ac_safe=no"
11283 fi
11284 rm -f conftest*
11285 fi
11286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11289   cat >> confdefs.h <<EOF
11290 #define $ac_tr_hdr 1
11291 EOF
11292  
11293 else
11294   echo "$ac_t""no" 1>&6
11295 fi
11296 done
11297
11298
11299         if test $ac_cv_header_pthread_h = yes ; then
11300                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11301 echo "configure:11302: checking POSIX thread version" >&5
11302 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11303   echo $ac_n "(cached) $ac_c" 1>&6
11304 else
11305   
11306         cat > conftest.$ac_ext <<EOF
11307 #line 11308 "configure"
11308 #include "confdefs.h"
11309
11310 #               include <pthread.h>
11311         
11312 int main() {
11313
11314                 int i = PTHREAD_CREATE_JOINABLE;
11315         
11316 ; return 0; }
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11319   rm -rf conftest*
11320   
11321         cat > conftest.$ac_ext <<EOF
11322 #line 11323 "configure"
11323 #include "confdefs.h"
11324 #include <pthread.h>
11325 EOF
11326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11327   egrep "pthread_detach" >/dev/null 2>&1; then
11328   rm -rf conftest*
11329   ol_cv_pthread_version=10
11330 else
11331   rm -rf conftest*
11332   ol_cv_pthread_version=8
11333 fi
11334 rm -f conftest*
11335
11336 else
11337   echo "configure: failed program was:" >&5
11338   cat conftest.$ac_ext >&5
11339   rm -rf conftest*
11340   
11341         cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344
11345 #               include <pthread.h>
11346 #               ifdef PTHREAD_CREATE_UNDETACHED
11347                 draft7
11348 #               endif
11349         
11350 EOF
11351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11352   egrep "draft7" >/dev/null 2>&1; then
11353   rm -rf conftest*
11354   ol_cv_pthread_version=7
11355 else
11356   rm -rf conftest*
11357   
11358         cat > conftest.$ac_ext <<EOF
11359 #line 11360 "configure"
11360 #include "confdefs.h"
11361 #include <pthread.h>
11362 EOF
11363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11364   egrep "pthread_attr_init" >/dev/null 2>&1; then
11365   rm -rf conftest*
11366   ol_cv_pthread_version=6
11367 else
11368   rm -rf conftest*
11369   
11370         cat > conftest.$ac_ext <<EOF
11371 #line 11372 "configure"
11372 #include "confdefs.h"
11373
11374 #               include <pthread.h>
11375 #ifdef          PTHREAD_MUTEX_INITIALIZER
11376                 draft5
11377 #endif
11378         
11379 EOF
11380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11381   egrep "draft5" >/dev/null 2>&1; then
11382   rm -rf conftest*
11383   ol_cv_pthread_version=5
11384 else
11385   rm -rf conftest*
11386   ol_cv_pthread_version=4
11387 fi
11388 rm -f conftest*
11389  
11390 fi
11391 rm -f conftest*
11392  
11393 fi
11394 rm -f conftest*
11395  
11396 fi
11397 rm -f conftest*
11398
11399 fi
11400
11401 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11402
11403
11404                 if test $ol_cv_pthread_version != 0 ; then
11405                         cat >> confdefs.h <<EOF
11406 #define HAVE_PTHREADS $ol_cv_pthread_version
11407 EOF
11408
11409                 else
11410                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11411                 fi
11412
11413                 # consider threads found
11414                 ol_with_threads=found
11415
11416                 
11417         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11418 echo "configure:11419: checking for LinuxThreads pthread.h" >&5
11419 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11420   echo $ac_n "(cached) $ac_c" 1>&6
11421 else
11422   cat > conftest.$ac_ext <<EOF
11423 #line 11424 "configure"
11424 #include "confdefs.h"
11425 #include <pthread.h>
11426 EOF
11427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11428   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11429   rm -rf conftest*
11430   ol_cv_header_linux_threads=yes
11431 else
11432   rm -rf conftest*
11433   ol_cv_header_linux_threads=no
11434 fi
11435 rm -f conftest*
11436
11437                 
11438 fi
11439
11440 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11441         if test $ol_cv_header_linux_threads = yes; then
11442                 cat >> confdefs.h <<\EOF
11443 #define HAVE_LINUX_THREADS 1
11444 EOF
11445
11446         fi
11447
11448                 
11449         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11450 echo "configure:11451: checking for GNU Pth pthread.h" >&5
11451 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 #include <pthread.h>
11458 #ifdef _POSIX_THREAD_IS_GNU_PTH
11459         __gnu_pth__;
11460 #endif
11461
11462 EOF
11463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11464   egrep "__gnu_pth__" >/dev/null 2>&1; then
11465   rm -rf conftest*
11466   ol_cv_header_gnu_pth_pthread_h=yes
11467 else
11468   rm -rf conftest*
11469   ol_cv_header_gnu_pth_pthread_h=no
11470 fi
11471 rm -f conftest*
11472
11473                 
11474 fi
11475
11476 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11477
11478
11479                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11480                         for ac_hdr in sched.h
11481 do
11482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11484 echo "configure:11485: checking for $ac_hdr" >&5
11485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11486   echo $ac_n "(cached) $ac_c" 1>&6
11487 else
11488   cat > conftest.$ac_ext <<EOF
11489 #line 11490 "configure"
11490 #include "confdefs.h"
11491 #include <$ac_hdr>
11492 EOF
11493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11494 { (eval echo configure:11495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11496 if test -z "$ac_err"; then
11497   rm -rf conftest*
11498   eval "ac_cv_header_$ac_safe=yes"
11499 else
11500   echo "$ac_err" >&5
11501   echo "configure: failed program was:" >&5
11502   cat conftest.$ac_ext >&5
11503   rm -rf conftest*
11504   eval "ac_cv_header_$ac_safe=no"
11505 fi
11506 rm -f conftest*
11507 fi
11508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11509   echo "$ac_t""yes" 1>&6
11510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11511   cat >> confdefs.h <<EOF
11512 #define $ac_tr_hdr 1
11513 EOF
11514  
11515 else
11516   echo "$ac_t""no" 1>&6
11517 fi
11518 done
11519
11520                 fi
11521
11522                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11523                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11524 echo "configure:11525: checking for pthread_create in default libraries" >&5
11525 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11526   echo $ac_n "(cached) $ac_c" 1>&6
11527 else
11528   
11529                 if test "$cross_compiling" = yes; then
11530   cat > conftest.$ac_ext <<EOF
11531 #line 11532 "configure"
11532 #include "confdefs.h"
11533 /* pthread test headers */
11534 #include <pthread.h>
11535 #if HAVE_PTHREADS < 7
11536 #include <errno.h>
11537 #endif
11538 #ifndef NULL
11539 #define NULL (void*)0
11540 #endif
11541
11542 static void *task(p)
11543         void *p;
11544 {
11545         return (void *) (p == NULL);
11546 }
11547
11548 int main() {
11549
11550         /* pthread test function */
11551 #ifndef PTHREAD_CREATE_DETACHED
11552 #define PTHREAD_CREATE_DETACHED 1
11553 #endif
11554         pthread_t t;
11555         int status;
11556         int detach = PTHREAD_CREATE_DETACHED;
11557
11558 #if HAVE_PTHREADS > 4
11559         /* Final pthreads */
11560         pthread_attr_t attr;
11561
11562         status = pthread_attr_init(&attr);
11563         if( status ) return status;
11564
11565 #if HAVE_PTHREADS < 7
11566         status = pthread_attr_setdetachstate(&attr, &detach);
11567         if( status < 0 ) status = errno;
11568 #else
11569         status = pthread_attr_setdetachstate(&attr, detach);
11570 #endif
11571         if( status ) return status;
11572         status = pthread_create( &t, &attr, task, NULL );
11573 #if HAVE_PTHREADS < 7
11574         if( status < 0 ) status = errno;
11575 #endif
11576         if( status ) return status;
11577 #else
11578         /* Draft 4 pthreads */
11579         status = pthread_create( &t, pthread_attr_default, task, NULL );
11580         if( status ) return errno;
11581
11582         /* give thread a chance to complete */
11583         /* it should remain joinable and hence detachable */
11584         sleep( 1 );
11585
11586         status = pthread_detach( &t );
11587         if( status ) return errno;
11588 #endif
11589
11590 #ifdef HAVE_LINUX_THREADS
11591         pthread_kill_other_threads_np();
11592 #endif
11593
11594         return 0;
11595
11596 ; return 0; }
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11599   rm -rf conftest*
11600   ol_cv_pthread_create=yes
11601 else
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604   rm -rf conftest*
11605   ol_cv_pthread_create=no
11606 fi
11607 rm -f conftest*
11608 else
11609   cat > conftest.$ac_ext <<EOF
11610 #line 11611 "configure"
11611 #include "confdefs.h"
11612 /* pthread test headers */
11613 #include <pthread.h>
11614 #if HAVE_PTHREADS < 7
11615 #include <errno.h>
11616 #endif
11617 #ifndef NULL
11618 #define NULL (void*)0
11619 #endif
11620
11621 static void *task(p)
11622         void *p;
11623 {
11624         return (void *) (p == NULL);
11625 }
11626
11627
11628 int main(argc, argv)
11629         int argc;
11630         char **argv;
11631 {
11632
11633         /* pthread test function */
11634 #ifndef PTHREAD_CREATE_DETACHED
11635 #define PTHREAD_CREATE_DETACHED 1
11636 #endif
11637         pthread_t t;
11638         int status;
11639         int detach = PTHREAD_CREATE_DETACHED;
11640
11641 #if HAVE_PTHREADS > 4
11642         /* Final pthreads */
11643         pthread_attr_t attr;
11644
11645         status = pthread_attr_init(&attr);
11646         if( status ) return status;
11647
11648 #if HAVE_PTHREADS < 7
11649         status = pthread_attr_setdetachstate(&attr, &detach);
11650         if( status < 0 ) status = errno;
11651 #else
11652         status = pthread_attr_setdetachstate(&attr, detach);
11653 #endif
11654         if( status ) return status;
11655         status = pthread_create( &t, &attr, task, NULL );
11656 #if HAVE_PTHREADS < 7
11657         if( status < 0 ) status = errno;
11658 #endif
11659         if( status ) return status;
11660 #else
11661         /* Draft 4 pthreads */
11662         status = pthread_create( &t, pthread_attr_default, task, NULL );
11663         if( status ) return errno;
11664
11665         /* give thread a chance to complete */
11666         /* it should remain joinable and hence detachable */
11667         sleep( 1 );
11668
11669         status = pthread_detach( &t );
11670         if( status ) return errno;
11671 #endif
11672
11673 #ifdef HAVE_LINUX_THREADS
11674         pthread_kill_other_threads_np();
11675 #endif
11676
11677         return 0;
11678
11679 }
11680
11681 EOF
11682 if { (eval echo configure:11683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11683 then
11684   ol_cv_pthread_create=yes
11685 else
11686   echo "configure: failed program was:" >&5
11687   cat conftest.$ac_ext >&5
11688   rm -fr conftest*
11689   ol_cv_pthread_create=no
11690 fi
11691 rm -fr conftest*
11692 fi
11693
11694 fi
11695
11696 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11697
11698                 if test $ol_cv_pthread_create != no ; then
11699                         ol_link_threads=posix
11700                         ol_link_pthreads=""
11701                 fi
11702                 
11703                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11704 if test "$ol_link_threads" = no ; then
11705         # try -kthread
11706         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11707 echo "configure:11708: checking for pthread link with -kthread" >&5
11708 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11709   echo $ac_n "(cached) $ac_c" 1>&6
11710 else
11711   
11712                 # save the flags
11713                 ol_LIBS="$LIBS"
11714                 LIBS="-kthread $LIBS"
11715
11716                 if test "$cross_compiling" = yes; then
11717   cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720 /* pthread test headers */
11721 #include <pthread.h>
11722 #if HAVE_PTHREADS < 7
11723 #include <errno.h>
11724 #endif
11725 #ifndef NULL
11726 #define NULL (void*)0
11727 #endif
11728
11729 static void *task(p)
11730         void *p;
11731 {
11732         return (void *) (p == NULL);
11733 }
11734
11735 int main() {
11736
11737         /* pthread test function */
11738 #ifndef PTHREAD_CREATE_DETACHED
11739 #define PTHREAD_CREATE_DETACHED 1
11740 #endif
11741         pthread_t t;
11742         int status;
11743         int detach = PTHREAD_CREATE_DETACHED;
11744
11745 #if HAVE_PTHREADS > 4
11746         /* Final pthreads */
11747         pthread_attr_t attr;
11748
11749         status = pthread_attr_init(&attr);
11750         if( status ) return status;
11751
11752 #if HAVE_PTHREADS < 7
11753         status = pthread_attr_setdetachstate(&attr, &detach);
11754         if( status < 0 ) status = errno;
11755 #else
11756         status = pthread_attr_setdetachstate(&attr, detach);
11757 #endif
11758         if( status ) return status;
11759         status = pthread_create( &t, &attr, task, NULL );
11760 #if HAVE_PTHREADS < 7
11761         if( status < 0 ) status = errno;
11762 #endif
11763         if( status ) return status;
11764 #else
11765         /* Draft 4 pthreads */
11766         status = pthread_create( &t, pthread_attr_default, task, NULL );
11767         if( status ) return errno;
11768
11769         /* give thread a chance to complete */
11770         /* it should remain joinable and hence detachable */
11771         sleep( 1 );
11772
11773         status = pthread_detach( &t );
11774         if( status ) return errno;
11775 #endif
11776
11777 #ifdef HAVE_LINUX_THREADS
11778         pthread_kill_other_threads_np();
11779 #endif
11780
11781         return 0;
11782
11783 ; return 0; }
11784 EOF
11785 if { (eval echo configure:11786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11786   rm -rf conftest*
11787   ol_cv_pthread_kthread=yes
11788 else
11789   echo "configure: failed program was:" >&5
11790   cat conftest.$ac_ext >&5
11791   rm -rf conftest*
11792   ol_cv_pthread_kthread=no
11793 fi
11794 rm -f conftest*
11795 else
11796   cat > conftest.$ac_ext <<EOF
11797 #line 11798 "configure"
11798 #include "confdefs.h"
11799 /* pthread test headers */
11800 #include <pthread.h>
11801 #if HAVE_PTHREADS < 7
11802 #include <errno.h>
11803 #endif
11804 #ifndef NULL
11805 #define NULL (void*)0
11806 #endif
11807
11808 static void *task(p)
11809         void *p;
11810 {
11811         return (void *) (p == NULL);
11812 }
11813
11814
11815 int main(argc, argv)
11816         int argc;
11817         char **argv;
11818 {
11819
11820         /* pthread test function */
11821 #ifndef PTHREAD_CREATE_DETACHED
11822 #define PTHREAD_CREATE_DETACHED 1
11823 #endif
11824         pthread_t t;
11825         int status;
11826         int detach = PTHREAD_CREATE_DETACHED;
11827
11828 #if HAVE_PTHREADS > 4
11829         /* Final pthreads */
11830         pthread_attr_t attr;
11831
11832         status = pthread_attr_init(&attr);
11833         if( status ) return status;
11834
11835 #if HAVE_PTHREADS < 7
11836         status = pthread_attr_setdetachstate(&attr, &detach);
11837         if( status < 0 ) status = errno;
11838 #else
11839         status = pthread_attr_setdetachstate(&attr, detach);
11840 #endif
11841         if( status ) return status;
11842         status = pthread_create( &t, &attr, task, NULL );
11843 #if HAVE_PTHREADS < 7
11844         if( status < 0 ) status = errno;
11845 #endif
11846         if( status ) return status;
11847 #else
11848         /* Draft 4 pthreads */
11849         status = pthread_create( &t, pthread_attr_default, task, NULL );
11850         if( status ) return errno;
11851
11852         /* give thread a chance to complete */
11853         /* it should remain joinable and hence detachable */
11854         sleep( 1 );
11855
11856         status = pthread_detach( &t );
11857         if( status ) return errno;
11858 #endif
11859
11860 #ifdef HAVE_LINUX_THREADS
11861         pthread_kill_other_threads_np();
11862 #endif
11863
11864         return 0;
11865
11866 }
11867
11868 EOF
11869 if { (eval echo configure:11870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11870 then
11871   ol_cv_pthread_kthread=yes
11872 else
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -fr conftest*
11876   ol_cv_pthread_kthread=no
11877 fi
11878 rm -fr conftest*
11879 fi
11880
11881
11882                 # restore the LIBS
11883                 LIBS="$ol_LIBS"
11884         
11885 fi
11886
11887 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11888
11889         if test $ol_cv_pthread_kthread = yes ; then
11890                 ol_link_pthreads="-kthread"
11891                 ol_link_threads=posix
11892         fi
11893 fi
11894
11895                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11896 if test "$ol_link_threads" = no ; then
11897         # try -pthread
11898         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11899 echo "configure:11900: checking for pthread link with -pthread" >&5
11900 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11901   echo $ac_n "(cached) $ac_c" 1>&6
11902 else
11903   
11904                 # save the flags
11905                 ol_LIBS="$LIBS"
11906                 LIBS="-pthread $LIBS"
11907
11908                 if test "$cross_compiling" = yes; then
11909   cat > conftest.$ac_ext <<EOF
11910 #line 11911 "configure"
11911 #include "confdefs.h"
11912 /* pthread test headers */
11913 #include <pthread.h>
11914 #if HAVE_PTHREADS < 7
11915 #include <errno.h>
11916 #endif
11917 #ifndef NULL
11918 #define NULL (void*)0
11919 #endif
11920
11921 static void *task(p)
11922         void *p;
11923 {
11924         return (void *) (p == NULL);
11925 }
11926
11927 int main() {
11928
11929         /* pthread test function */
11930 #ifndef PTHREAD_CREATE_DETACHED
11931 #define PTHREAD_CREATE_DETACHED 1
11932 #endif
11933         pthread_t t;
11934         int status;
11935         int detach = PTHREAD_CREATE_DETACHED;
11936
11937 #if HAVE_PTHREADS > 4
11938         /* Final pthreads */
11939         pthread_attr_t attr;
11940
11941         status = pthread_attr_init(&attr);
11942         if( status ) return status;
11943
11944 #if HAVE_PTHREADS < 7
11945         status = pthread_attr_setdetachstate(&attr, &detach);
11946         if( status < 0 ) status = errno;
11947 #else
11948         status = pthread_attr_setdetachstate(&attr, detach);
11949 #endif
11950         if( status ) return status;
11951         status = pthread_create( &t, &attr, task, NULL );
11952 #if HAVE_PTHREADS < 7
11953         if( status < 0 ) status = errno;
11954 #endif
11955         if( status ) return status;
11956 #else
11957         /* Draft 4 pthreads */
11958         status = pthread_create( &t, pthread_attr_default, task, NULL );
11959         if( status ) return errno;
11960
11961         /* give thread a chance to complete */
11962         /* it should remain joinable and hence detachable */
11963         sleep( 1 );
11964
11965         status = pthread_detach( &t );
11966         if( status ) return errno;
11967 #endif
11968
11969 #ifdef HAVE_LINUX_THREADS
11970         pthread_kill_other_threads_np();
11971 #endif
11972
11973         return 0;
11974
11975 ; return 0; }
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11978   rm -rf conftest*
11979   ol_cv_pthread_pthread=yes
11980 else
11981   echo "configure: failed program was:" >&5
11982   cat conftest.$ac_ext >&5
11983   rm -rf conftest*
11984   ol_cv_pthread_pthread=no
11985 fi
11986 rm -f conftest*
11987 else
11988   cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 /* pthread test headers */
11992 #include <pthread.h>
11993 #if HAVE_PTHREADS < 7
11994 #include <errno.h>
11995 #endif
11996 #ifndef NULL
11997 #define NULL (void*)0
11998 #endif
11999
12000 static void *task(p)
12001         void *p;
12002 {
12003         return (void *) (p == NULL);
12004 }
12005
12006
12007 int main(argc, argv)
12008         int argc;
12009         char **argv;
12010 {
12011
12012         /* pthread test function */
12013 #ifndef PTHREAD_CREATE_DETACHED
12014 #define PTHREAD_CREATE_DETACHED 1
12015 #endif
12016         pthread_t t;
12017         int status;
12018         int detach = PTHREAD_CREATE_DETACHED;
12019
12020 #if HAVE_PTHREADS > 4
12021         /* Final pthreads */
12022         pthread_attr_t attr;
12023
12024         status = pthread_attr_init(&attr);
12025         if( status ) return status;
12026
12027 #if HAVE_PTHREADS < 7
12028         status = pthread_attr_setdetachstate(&attr, &detach);
12029         if( status < 0 ) status = errno;
12030 #else
12031         status = pthread_attr_setdetachstate(&attr, detach);
12032 #endif
12033         if( status ) return status;
12034         status = pthread_create( &t, &attr, task, NULL );
12035 #if HAVE_PTHREADS < 7
12036         if( status < 0 ) status = errno;
12037 #endif
12038         if( status ) return status;
12039 #else
12040         /* Draft 4 pthreads */
12041         status = pthread_create( &t, pthread_attr_default, task, NULL );
12042         if( status ) return errno;
12043
12044         /* give thread a chance to complete */
12045         /* it should remain joinable and hence detachable */
12046         sleep( 1 );
12047
12048         status = pthread_detach( &t );
12049         if( status ) return errno;
12050 #endif
12051
12052 #ifdef HAVE_LINUX_THREADS
12053         pthread_kill_other_threads_np();
12054 #endif
12055
12056         return 0;
12057
12058 }
12059
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12062 then
12063   ol_cv_pthread_pthread=yes
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -fr conftest*
12068   ol_cv_pthread_pthread=no
12069 fi
12070 rm -fr conftest*
12071 fi
12072
12073
12074                 # restore the LIBS
12075                 LIBS="$ol_LIBS"
12076         
12077 fi
12078
12079 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12080
12081         if test $ol_cv_pthread_pthread = yes ; then
12082                 ol_link_pthreads="-pthread"
12083                 ol_link_threads=posix
12084         fi
12085 fi
12086
12087                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12088 if test "$ol_link_threads" = no ; then
12089         # try -pthreads
12090         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12091 echo "configure:12092: checking for pthread link with -pthreads" >&5
12092 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12093   echo $ac_n "(cached) $ac_c" 1>&6
12094 else
12095   
12096                 # save the flags
12097                 ol_LIBS="$LIBS"
12098                 LIBS="-pthreads $LIBS"
12099
12100                 if test "$cross_compiling" = yes; then
12101   cat > conftest.$ac_ext <<EOF
12102 #line 12103 "configure"
12103 #include "confdefs.h"
12104 /* pthread test headers */
12105 #include <pthread.h>
12106 #if HAVE_PTHREADS < 7
12107 #include <errno.h>
12108 #endif
12109 #ifndef NULL
12110 #define NULL (void*)0
12111 #endif
12112
12113 static void *task(p)
12114         void *p;
12115 {
12116         return (void *) (p == NULL);
12117 }
12118
12119 int main() {
12120
12121         /* pthread test function */
12122 #ifndef PTHREAD_CREATE_DETACHED
12123 #define PTHREAD_CREATE_DETACHED 1
12124 #endif
12125         pthread_t t;
12126         int status;
12127         int detach = PTHREAD_CREATE_DETACHED;
12128
12129 #if HAVE_PTHREADS > 4
12130         /* Final pthreads */
12131         pthread_attr_t attr;
12132
12133         status = pthread_attr_init(&attr);
12134         if( status ) return status;
12135
12136 #if HAVE_PTHREADS < 7
12137         status = pthread_attr_setdetachstate(&attr, &detach);
12138         if( status < 0 ) status = errno;
12139 #else
12140         status = pthread_attr_setdetachstate(&attr, detach);
12141 #endif
12142         if( status ) return status;
12143         status = pthread_create( &t, &attr, task, NULL );
12144 #if HAVE_PTHREADS < 7
12145         if( status < 0 ) status = errno;
12146 #endif
12147         if( status ) return status;
12148 #else
12149         /* Draft 4 pthreads */
12150         status = pthread_create( &t, pthread_attr_default, task, NULL );
12151         if( status ) return errno;
12152
12153         /* give thread a chance to complete */
12154         /* it should remain joinable and hence detachable */
12155         sleep( 1 );
12156
12157         status = pthread_detach( &t );
12158         if( status ) return errno;
12159 #endif
12160
12161 #ifdef HAVE_LINUX_THREADS
12162         pthread_kill_other_threads_np();
12163 #endif
12164
12165         return 0;
12166
12167 ; return 0; }
12168 EOF
12169 if { (eval echo configure:12170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12170   rm -rf conftest*
12171   ol_cv_pthread_pthreads=yes
12172 else
12173   echo "configure: failed program was:" >&5
12174   cat conftest.$ac_ext >&5
12175   rm -rf conftest*
12176   ol_cv_pthread_pthreads=no
12177 fi
12178 rm -f conftest*
12179 else
12180   cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* pthread test headers */
12184 #include <pthread.h>
12185 #if HAVE_PTHREADS < 7
12186 #include <errno.h>
12187 #endif
12188 #ifndef NULL
12189 #define NULL (void*)0
12190 #endif
12191
12192 static void *task(p)
12193         void *p;
12194 {
12195         return (void *) (p == NULL);
12196 }
12197
12198
12199 int main(argc, argv)
12200         int argc;
12201         char **argv;
12202 {
12203
12204         /* pthread test function */
12205 #ifndef PTHREAD_CREATE_DETACHED
12206 #define PTHREAD_CREATE_DETACHED 1
12207 #endif
12208         pthread_t t;
12209         int status;
12210         int detach = PTHREAD_CREATE_DETACHED;
12211
12212 #if HAVE_PTHREADS > 4
12213         /* Final pthreads */
12214         pthread_attr_t attr;
12215
12216         status = pthread_attr_init(&attr);
12217         if( status ) return status;
12218
12219 #if HAVE_PTHREADS < 7
12220         status = pthread_attr_setdetachstate(&attr, &detach);
12221         if( status < 0 ) status = errno;
12222 #else
12223         status = pthread_attr_setdetachstate(&attr, detach);
12224 #endif
12225         if( status ) return status;
12226         status = pthread_create( &t, &attr, task, NULL );
12227 #if HAVE_PTHREADS < 7
12228         if( status < 0 ) status = errno;
12229 #endif
12230         if( status ) return status;
12231 #else
12232         /* Draft 4 pthreads */
12233         status = pthread_create( &t, pthread_attr_default, task, NULL );
12234         if( status ) return errno;
12235
12236         /* give thread a chance to complete */
12237         /* it should remain joinable and hence detachable */
12238         sleep( 1 );
12239
12240         status = pthread_detach( &t );
12241         if( status ) return errno;
12242 #endif
12243
12244 #ifdef HAVE_LINUX_THREADS
12245         pthread_kill_other_threads_np();
12246 #endif
12247
12248         return 0;
12249
12250 }
12251
12252 EOF
12253 if { (eval echo configure:12254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12254 then
12255   ol_cv_pthread_pthreads=yes
12256 else
12257   echo "configure: failed program was:" >&5
12258   cat conftest.$ac_ext >&5
12259   rm -fr conftest*
12260   ol_cv_pthread_pthreads=no
12261 fi
12262 rm -fr conftest*
12263 fi
12264
12265
12266                 # restore the LIBS
12267                 LIBS="$ol_LIBS"
12268         
12269 fi
12270
12271 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12272
12273         if test $ol_cv_pthread_pthreads = yes ; then
12274                 ol_link_pthreads="-pthreads"
12275                 ol_link_threads=posix
12276         fi
12277 fi
12278
12279                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12280 if test "$ol_link_threads" = no ; then
12281         # try -mthreads
12282         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12283 echo "configure:12284: checking for pthread link with -mthreads" >&5
12284 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12285   echo $ac_n "(cached) $ac_c" 1>&6
12286 else
12287   
12288                 # save the flags
12289                 ol_LIBS="$LIBS"
12290                 LIBS="-mthreads $LIBS"
12291
12292                 if test "$cross_compiling" = yes; then
12293   cat > conftest.$ac_ext <<EOF
12294 #line 12295 "configure"
12295 #include "confdefs.h"
12296 /* pthread test headers */
12297 #include <pthread.h>
12298 #if HAVE_PTHREADS < 7
12299 #include <errno.h>
12300 #endif
12301 #ifndef NULL
12302 #define NULL (void*)0
12303 #endif
12304
12305 static void *task(p)
12306         void *p;
12307 {
12308         return (void *) (p == NULL);
12309 }
12310
12311 int main() {
12312
12313         /* pthread test function */
12314 #ifndef PTHREAD_CREATE_DETACHED
12315 #define PTHREAD_CREATE_DETACHED 1
12316 #endif
12317         pthread_t t;
12318         int status;
12319         int detach = PTHREAD_CREATE_DETACHED;
12320
12321 #if HAVE_PTHREADS > 4
12322         /* Final pthreads */
12323         pthread_attr_t attr;
12324
12325         status = pthread_attr_init(&attr);
12326         if( status ) return status;
12327
12328 #if HAVE_PTHREADS < 7
12329         status = pthread_attr_setdetachstate(&attr, &detach);
12330         if( status < 0 ) status = errno;
12331 #else
12332         status = pthread_attr_setdetachstate(&attr, detach);
12333 #endif
12334         if( status ) return status;
12335         status = pthread_create( &t, &attr, task, NULL );
12336 #if HAVE_PTHREADS < 7
12337         if( status < 0 ) status = errno;
12338 #endif
12339         if( status ) return status;
12340 #else
12341         /* Draft 4 pthreads */
12342         status = pthread_create( &t, pthread_attr_default, task, NULL );
12343         if( status ) return errno;
12344
12345         /* give thread a chance to complete */
12346         /* it should remain joinable and hence detachable */
12347         sleep( 1 );
12348
12349         status = pthread_detach( &t );
12350         if( status ) return errno;
12351 #endif
12352
12353 #ifdef HAVE_LINUX_THREADS
12354         pthread_kill_other_threads_np();
12355 #endif
12356
12357         return 0;
12358
12359 ; return 0; }
12360 EOF
12361 if { (eval echo configure:12362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12362   rm -rf conftest*
12363   ol_cv_pthread_mthreads=yes
12364 else
12365   echo "configure: failed program was:" >&5
12366   cat conftest.$ac_ext >&5
12367   rm -rf conftest*
12368   ol_cv_pthread_mthreads=no
12369 fi
12370 rm -f conftest*
12371 else
12372   cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375 /* pthread test headers */
12376 #include <pthread.h>
12377 #if HAVE_PTHREADS < 7
12378 #include <errno.h>
12379 #endif
12380 #ifndef NULL
12381 #define NULL (void*)0
12382 #endif
12383
12384 static void *task(p)
12385         void *p;
12386 {
12387         return (void *) (p == NULL);
12388 }
12389
12390
12391 int main(argc, argv)
12392         int argc;
12393         char **argv;
12394 {
12395
12396         /* pthread test function */
12397 #ifndef PTHREAD_CREATE_DETACHED
12398 #define PTHREAD_CREATE_DETACHED 1
12399 #endif
12400         pthread_t t;
12401         int status;
12402         int detach = PTHREAD_CREATE_DETACHED;
12403
12404 #if HAVE_PTHREADS > 4
12405         /* Final pthreads */
12406         pthread_attr_t attr;
12407
12408         status = pthread_attr_init(&attr);
12409         if( status ) return status;
12410
12411 #if HAVE_PTHREADS < 7
12412         status = pthread_attr_setdetachstate(&attr, &detach);
12413         if( status < 0 ) status = errno;
12414 #else
12415         status = pthread_attr_setdetachstate(&attr, detach);
12416 #endif
12417         if( status ) return status;
12418         status = pthread_create( &t, &attr, task, NULL );
12419 #if HAVE_PTHREADS < 7
12420         if( status < 0 ) status = errno;
12421 #endif
12422         if( status ) return status;
12423 #else
12424         /* Draft 4 pthreads */
12425         status = pthread_create( &t, pthread_attr_default, task, NULL );
12426         if( status ) return errno;
12427
12428         /* give thread a chance to complete */
12429         /* it should remain joinable and hence detachable */
12430         sleep( 1 );
12431
12432         status = pthread_detach( &t );
12433         if( status ) return errno;
12434 #endif
12435
12436 #ifdef HAVE_LINUX_THREADS
12437         pthread_kill_other_threads_np();
12438 #endif
12439
12440         return 0;
12441
12442 }
12443
12444 EOF
12445 if { (eval echo configure:12446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12446 then
12447   ol_cv_pthread_mthreads=yes
12448 else
12449   echo "configure: failed program was:" >&5
12450   cat conftest.$ac_ext >&5
12451   rm -fr conftest*
12452   ol_cv_pthread_mthreads=no
12453 fi
12454 rm -fr conftest*
12455 fi
12456
12457
12458                 # restore the LIBS
12459                 LIBS="$ol_LIBS"
12460         
12461 fi
12462
12463 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12464
12465         if test $ol_cv_pthread_mthreads = yes ; then
12466                 ol_link_pthreads="-mthreads"
12467                 ol_link_threads=posix
12468         fi
12469 fi
12470
12471                 # Pthread try link: -thread (ol_cv_pthread_thread)
12472 if test "$ol_link_threads" = no ; then
12473         # try -thread
12474         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12475 echo "configure:12476: checking for pthread link with -thread" >&5
12476 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12477   echo $ac_n "(cached) $ac_c" 1>&6
12478 else
12479   
12480                 # save the flags
12481                 ol_LIBS="$LIBS"
12482                 LIBS="-thread $LIBS"
12483
12484                 if test "$cross_compiling" = yes; then
12485   cat > conftest.$ac_ext <<EOF
12486 #line 12487 "configure"
12487 #include "confdefs.h"
12488 /* pthread test headers */
12489 #include <pthread.h>
12490 #if HAVE_PTHREADS < 7
12491 #include <errno.h>
12492 #endif
12493 #ifndef NULL
12494 #define NULL (void*)0
12495 #endif
12496
12497 static void *task(p)
12498         void *p;
12499 {
12500         return (void *) (p == NULL);
12501 }
12502
12503 int main() {
12504
12505         /* pthread test function */
12506 #ifndef PTHREAD_CREATE_DETACHED
12507 #define PTHREAD_CREATE_DETACHED 1
12508 #endif
12509         pthread_t t;
12510         int status;
12511         int detach = PTHREAD_CREATE_DETACHED;
12512
12513 #if HAVE_PTHREADS > 4
12514         /* Final pthreads */
12515         pthread_attr_t attr;
12516
12517         status = pthread_attr_init(&attr);
12518         if( status ) return status;
12519
12520 #if HAVE_PTHREADS < 7
12521         status = pthread_attr_setdetachstate(&attr, &detach);
12522         if( status < 0 ) status = errno;
12523 #else
12524         status = pthread_attr_setdetachstate(&attr, detach);
12525 #endif
12526         if( status ) return status;
12527         status = pthread_create( &t, &attr, task, NULL );
12528 #if HAVE_PTHREADS < 7
12529         if( status < 0 ) status = errno;
12530 #endif
12531         if( status ) return status;
12532 #else
12533         /* Draft 4 pthreads */
12534         status = pthread_create( &t, pthread_attr_default, task, NULL );
12535         if( status ) return errno;
12536
12537         /* give thread a chance to complete */
12538         /* it should remain joinable and hence detachable */
12539         sleep( 1 );
12540
12541         status = pthread_detach( &t );
12542         if( status ) return errno;
12543 #endif
12544
12545 #ifdef HAVE_LINUX_THREADS
12546         pthread_kill_other_threads_np();
12547 #endif
12548
12549         return 0;
12550
12551 ; return 0; }
12552 EOF
12553 if { (eval echo configure:12554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12554   rm -rf conftest*
12555   ol_cv_pthread_thread=yes
12556 else
12557   echo "configure: failed program was:" >&5
12558   cat conftest.$ac_ext >&5
12559   rm -rf conftest*
12560   ol_cv_pthread_thread=no
12561 fi
12562 rm -f conftest*
12563 else
12564   cat > conftest.$ac_ext <<EOF
12565 #line 12566 "configure"
12566 #include "confdefs.h"
12567 /* pthread test headers */
12568 #include <pthread.h>
12569 #if HAVE_PTHREADS < 7
12570 #include <errno.h>
12571 #endif
12572 #ifndef NULL
12573 #define NULL (void*)0
12574 #endif
12575
12576 static void *task(p)
12577         void *p;
12578 {
12579         return (void *) (p == NULL);
12580 }
12581
12582
12583 int main(argc, argv)
12584         int argc;
12585         char **argv;
12586 {
12587
12588         /* pthread test function */
12589 #ifndef PTHREAD_CREATE_DETACHED
12590 #define PTHREAD_CREATE_DETACHED 1
12591 #endif
12592         pthread_t t;
12593         int status;
12594         int detach = PTHREAD_CREATE_DETACHED;
12595
12596 #if HAVE_PTHREADS > 4
12597         /* Final pthreads */
12598         pthread_attr_t attr;
12599
12600         status = pthread_attr_init(&attr);
12601         if( status ) return status;
12602
12603 #if HAVE_PTHREADS < 7
12604         status = pthread_attr_setdetachstate(&attr, &detach);
12605         if( status < 0 ) status = errno;
12606 #else
12607         status = pthread_attr_setdetachstate(&attr, detach);
12608 #endif
12609         if( status ) return status;
12610         status = pthread_create( &t, &attr, task, NULL );
12611 #if HAVE_PTHREADS < 7
12612         if( status < 0 ) status = errno;
12613 #endif
12614         if( status ) return status;
12615 #else
12616         /* Draft 4 pthreads */
12617         status = pthread_create( &t, pthread_attr_default, task, NULL );
12618         if( status ) return errno;
12619
12620         /* give thread a chance to complete */
12621         /* it should remain joinable and hence detachable */
12622         sleep( 1 );
12623
12624         status = pthread_detach( &t );
12625         if( status ) return errno;
12626 #endif
12627
12628 #ifdef HAVE_LINUX_THREADS
12629         pthread_kill_other_threads_np();
12630 #endif
12631
12632         return 0;
12633
12634 }
12635
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12638 then
12639   ol_cv_pthread_thread=yes
12640 else
12641   echo "configure: failed program was:" >&5
12642   cat conftest.$ac_ext >&5
12643   rm -fr conftest*
12644   ol_cv_pthread_thread=no
12645 fi
12646 rm -fr conftest*
12647 fi
12648
12649
12650                 # restore the LIBS
12651                 LIBS="$ol_LIBS"
12652         
12653 fi
12654
12655 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12656
12657         if test $ol_cv_pthread_thread = yes ; then
12658                 ol_link_pthreads="-thread"
12659                 ol_link_threads=posix
12660         fi
12661 fi
12662
12663
12664                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12665 if test "$ol_link_threads" = no ; then
12666         # try -lpthread -lmach -lexc -lc_r
12667         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12668 echo "configure:12669: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12669 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12670   echo $ac_n "(cached) $ac_c" 1>&6
12671 else
12672   
12673                 # save the flags
12674                 ol_LIBS="$LIBS"
12675                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12676
12677                 if test "$cross_compiling" = yes; then
12678   cat > conftest.$ac_ext <<EOF
12679 #line 12680 "configure"
12680 #include "confdefs.h"
12681 /* pthread test headers */
12682 #include <pthread.h>
12683 #if HAVE_PTHREADS < 7
12684 #include <errno.h>
12685 #endif
12686 #ifndef NULL
12687 #define NULL (void*)0
12688 #endif
12689
12690 static void *task(p)
12691         void *p;
12692 {
12693         return (void *) (p == NULL);
12694 }
12695
12696 int main() {
12697
12698         /* pthread test function */
12699 #ifndef PTHREAD_CREATE_DETACHED
12700 #define PTHREAD_CREATE_DETACHED 1
12701 #endif
12702         pthread_t t;
12703         int status;
12704         int detach = PTHREAD_CREATE_DETACHED;
12705
12706 #if HAVE_PTHREADS > 4
12707         /* Final pthreads */
12708         pthread_attr_t attr;
12709
12710         status = pthread_attr_init(&attr);
12711         if( status ) return status;
12712
12713 #if HAVE_PTHREADS < 7
12714         status = pthread_attr_setdetachstate(&attr, &detach);
12715         if( status < 0 ) status = errno;
12716 #else
12717         status = pthread_attr_setdetachstate(&attr, detach);
12718 #endif
12719         if( status ) return status;
12720         status = pthread_create( &t, &attr, task, NULL );
12721 #if HAVE_PTHREADS < 7
12722         if( status < 0 ) status = errno;
12723 #endif
12724         if( status ) return status;
12725 #else
12726         /* Draft 4 pthreads */
12727         status = pthread_create( &t, pthread_attr_default, task, NULL );
12728         if( status ) return errno;
12729
12730         /* give thread a chance to complete */
12731         /* it should remain joinable and hence detachable */
12732         sleep( 1 );
12733
12734         status = pthread_detach( &t );
12735         if( status ) return errno;
12736 #endif
12737
12738 #ifdef HAVE_LINUX_THREADS
12739         pthread_kill_other_threads_np();
12740 #endif
12741
12742         return 0;
12743
12744 ; return 0; }
12745 EOF
12746 if { (eval echo configure:12747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12747   rm -rf conftest*
12748   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12749 else
12750   echo "configure: failed program was:" >&5
12751   cat conftest.$ac_ext >&5
12752   rm -rf conftest*
12753   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12754 fi
12755 rm -f conftest*
12756 else
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 /* pthread test headers */
12761 #include <pthread.h>
12762 #if HAVE_PTHREADS < 7
12763 #include <errno.h>
12764 #endif
12765 #ifndef NULL
12766 #define NULL (void*)0
12767 #endif
12768
12769 static void *task(p)
12770         void *p;
12771 {
12772         return (void *) (p == NULL);
12773 }
12774
12775
12776 int main(argc, argv)
12777         int argc;
12778         char **argv;
12779 {
12780
12781         /* pthread test function */
12782 #ifndef PTHREAD_CREATE_DETACHED
12783 #define PTHREAD_CREATE_DETACHED 1
12784 #endif
12785         pthread_t t;
12786         int status;
12787         int detach = PTHREAD_CREATE_DETACHED;
12788
12789 #if HAVE_PTHREADS > 4
12790         /* Final pthreads */
12791         pthread_attr_t attr;
12792
12793         status = pthread_attr_init(&attr);
12794         if( status ) return status;
12795
12796 #if HAVE_PTHREADS < 7
12797         status = pthread_attr_setdetachstate(&attr, &detach);
12798         if( status < 0 ) status = errno;
12799 #else
12800         status = pthread_attr_setdetachstate(&attr, detach);
12801 #endif
12802         if( status ) return status;
12803         status = pthread_create( &t, &attr, task, NULL );
12804 #if HAVE_PTHREADS < 7
12805         if( status < 0 ) status = errno;
12806 #endif
12807         if( status ) return status;
12808 #else
12809         /* Draft 4 pthreads */
12810         status = pthread_create( &t, pthread_attr_default, task, NULL );
12811         if( status ) return errno;
12812
12813         /* give thread a chance to complete */
12814         /* it should remain joinable and hence detachable */
12815         sleep( 1 );
12816
12817         status = pthread_detach( &t );
12818         if( status ) return errno;
12819 #endif
12820
12821 #ifdef HAVE_LINUX_THREADS
12822         pthread_kill_other_threads_np();
12823 #endif
12824
12825         return 0;
12826
12827 }
12828
12829 EOF
12830 if { (eval echo configure:12831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12831 then
12832   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12833 else
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -fr conftest*
12837   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12838 fi
12839 rm -fr conftest*
12840 fi
12841
12842
12843                 # restore the LIBS
12844                 LIBS="$ol_LIBS"
12845         
12846 fi
12847
12848 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12849
12850         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12851                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12852                 ol_link_threads=posix
12853         fi
12854 fi
12855
12856                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12857 if test "$ol_link_threads" = no ; then
12858         # try -lpthread -lmach -lexc
12859         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12860 echo "configure:12861: checking for pthread link with -lpthread -lmach -lexc" >&5
12861 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12862   echo $ac_n "(cached) $ac_c" 1>&6
12863 else
12864   
12865                 # save the flags
12866                 ol_LIBS="$LIBS"
12867                 LIBS="-lpthread -lmach -lexc $LIBS"
12868
12869                 if test "$cross_compiling" = yes; then
12870   cat > conftest.$ac_ext <<EOF
12871 #line 12872 "configure"
12872 #include "confdefs.h"
12873 /* pthread test headers */
12874 #include <pthread.h>
12875 #if HAVE_PTHREADS < 7
12876 #include <errno.h>
12877 #endif
12878 #ifndef NULL
12879 #define NULL (void*)0
12880 #endif
12881
12882 static void *task(p)
12883         void *p;
12884 {
12885         return (void *) (p == NULL);
12886 }
12887
12888 int main() {
12889
12890         /* pthread test function */
12891 #ifndef PTHREAD_CREATE_DETACHED
12892 #define PTHREAD_CREATE_DETACHED 1
12893 #endif
12894         pthread_t t;
12895         int status;
12896         int detach = PTHREAD_CREATE_DETACHED;
12897
12898 #if HAVE_PTHREADS > 4
12899         /* Final pthreads */
12900         pthread_attr_t attr;
12901
12902         status = pthread_attr_init(&attr);
12903         if( status ) return status;
12904
12905 #if HAVE_PTHREADS < 7
12906         status = pthread_attr_setdetachstate(&attr, &detach);
12907         if( status < 0 ) status = errno;
12908 #else
12909         status = pthread_attr_setdetachstate(&attr, detach);
12910 #endif
12911         if( status ) return status;
12912         status = pthread_create( &t, &attr, task, NULL );
12913 #if HAVE_PTHREADS < 7
12914         if( status < 0 ) status = errno;
12915 #endif
12916         if( status ) return status;
12917 #else
12918         /* Draft 4 pthreads */
12919         status = pthread_create( &t, pthread_attr_default, task, NULL );
12920         if( status ) return errno;
12921
12922         /* give thread a chance to complete */
12923         /* it should remain joinable and hence detachable */
12924         sleep( 1 );
12925
12926         status = pthread_detach( &t );
12927         if( status ) return errno;
12928 #endif
12929
12930 #ifdef HAVE_LINUX_THREADS
12931         pthread_kill_other_threads_np();
12932 #endif
12933
12934         return 0;
12935
12936 ; return 0; }
12937 EOF
12938 if { (eval echo configure:12939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12939   rm -rf conftest*
12940   ol_cv_pthread_lpthread_lmach_lexc=yes
12941 else
12942   echo "configure: failed program was:" >&5
12943   cat conftest.$ac_ext >&5
12944   rm -rf conftest*
12945   ol_cv_pthread_lpthread_lmach_lexc=no
12946 fi
12947 rm -f conftest*
12948 else
12949   cat > conftest.$ac_ext <<EOF
12950 #line 12951 "configure"
12951 #include "confdefs.h"
12952 /* pthread test headers */
12953 #include <pthread.h>
12954 #if HAVE_PTHREADS < 7
12955 #include <errno.h>
12956 #endif
12957 #ifndef NULL
12958 #define NULL (void*)0
12959 #endif
12960
12961 static void *task(p)
12962         void *p;
12963 {
12964         return (void *) (p == NULL);
12965 }
12966
12967
12968 int main(argc, argv)
12969         int argc;
12970         char **argv;
12971 {
12972
12973         /* pthread test function */
12974 #ifndef PTHREAD_CREATE_DETACHED
12975 #define PTHREAD_CREATE_DETACHED 1
12976 #endif
12977         pthread_t t;
12978         int status;
12979         int detach = PTHREAD_CREATE_DETACHED;
12980
12981 #if HAVE_PTHREADS > 4
12982         /* Final pthreads */
12983         pthread_attr_t attr;
12984
12985         status = pthread_attr_init(&attr);
12986         if( status ) return status;
12987
12988 #if HAVE_PTHREADS < 7
12989         status = pthread_attr_setdetachstate(&attr, &detach);
12990         if( status < 0 ) status = errno;
12991 #else
12992         status = pthread_attr_setdetachstate(&attr, detach);
12993 #endif
12994         if( status ) return status;
12995         status = pthread_create( &t, &attr, task, NULL );
12996 #if HAVE_PTHREADS < 7
12997         if( status < 0 ) status = errno;
12998 #endif
12999         if( status ) return status;
13000 #else
13001         /* Draft 4 pthreads */
13002         status = pthread_create( &t, pthread_attr_default, task, NULL );
13003         if( status ) return errno;
13004
13005         /* give thread a chance to complete */
13006         /* it should remain joinable and hence detachable */
13007         sleep( 1 );
13008
13009         status = pthread_detach( &t );
13010         if( status ) return errno;
13011 #endif
13012
13013 #ifdef HAVE_LINUX_THREADS
13014         pthread_kill_other_threads_np();
13015 #endif
13016
13017         return 0;
13018
13019 }
13020
13021 EOF
13022 if { (eval echo configure:13023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13023 then
13024   ol_cv_pthread_lpthread_lmach_lexc=yes
13025 else
13026   echo "configure: failed program was:" >&5
13027   cat conftest.$ac_ext >&5
13028   rm -fr conftest*
13029   ol_cv_pthread_lpthread_lmach_lexc=no
13030 fi
13031 rm -fr conftest*
13032 fi
13033
13034
13035                 # restore the LIBS
13036                 LIBS="$ol_LIBS"
13037         
13038 fi
13039
13040 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13041
13042         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13043                 ol_link_pthreads="-lpthread -lmach -lexc"
13044                 ol_link_threads=posix
13045         fi
13046 fi
13047
13048
13049                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13050 if test "$ol_link_threads" = no ; then
13051         # try -lpthread -Wl,-woff,85
13052         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13053 echo "configure:13054: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13054 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13055   echo $ac_n "(cached) $ac_c" 1>&6
13056 else
13057   
13058                 # save the flags
13059                 ol_LIBS="$LIBS"
13060                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13061
13062                 if test "$cross_compiling" = yes; then
13063   cat > conftest.$ac_ext <<EOF
13064 #line 13065 "configure"
13065 #include "confdefs.h"
13066 /* pthread test headers */
13067 #include <pthread.h>
13068 #if HAVE_PTHREADS < 7
13069 #include <errno.h>
13070 #endif
13071 #ifndef NULL
13072 #define NULL (void*)0
13073 #endif
13074
13075 static void *task(p)
13076         void *p;
13077 {
13078         return (void *) (p == NULL);
13079 }
13080
13081 int main() {
13082
13083         /* pthread test function */
13084 #ifndef PTHREAD_CREATE_DETACHED
13085 #define PTHREAD_CREATE_DETACHED 1
13086 #endif
13087         pthread_t t;
13088         int status;
13089         int detach = PTHREAD_CREATE_DETACHED;
13090
13091 #if HAVE_PTHREADS > 4
13092         /* Final pthreads */
13093         pthread_attr_t attr;
13094
13095         status = pthread_attr_init(&attr);
13096         if( status ) return status;
13097
13098 #if HAVE_PTHREADS < 7
13099         status = pthread_attr_setdetachstate(&attr, &detach);
13100         if( status < 0 ) status = errno;
13101 #else
13102         status = pthread_attr_setdetachstate(&attr, detach);
13103 #endif
13104         if( status ) return status;
13105         status = pthread_create( &t, &attr, task, NULL );
13106 #if HAVE_PTHREADS < 7
13107         if( status < 0 ) status = errno;
13108 #endif
13109         if( status ) return status;
13110 #else
13111         /* Draft 4 pthreads */
13112         status = pthread_create( &t, pthread_attr_default, task, NULL );
13113         if( status ) return errno;
13114
13115         /* give thread a chance to complete */
13116         /* it should remain joinable and hence detachable */
13117         sleep( 1 );
13118
13119         status = pthread_detach( &t );
13120         if( status ) return errno;
13121 #endif
13122
13123 #ifdef HAVE_LINUX_THREADS
13124         pthread_kill_other_threads_np();
13125 #endif
13126
13127         return 0;
13128
13129 ; return 0; }
13130 EOF
13131 if { (eval echo configure:13132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13132   rm -rf conftest*
13133   ol_cv_pthread_lib_lpthread_woff=yes
13134 else
13135   echo "configure: failed program was:" >&5
13136   cat conftest.$ac_ext >&5
13137   rm -rf conftest*
13138   ol_cv_pthread_lib_lpthread_woff=no
13139 fi
13140 rm -f conftest*
13141 else
13142   cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145 /* pthread test headers */
13146 #include <pthread.h>
13147 #if HAVE_PTHREADS < 7
13148 #include <errno.h>
13149 #endif
13150 #ifndef NULL
13151 #define NULL (void*)0
13152 #endif
13153
13154 static void *task(p)
13155         void *p;
13156 {
13157         return (void *) (p == NULL);
13158 }
13159
13160
13161 int main(argc, argv)
13162         int argc;
13163         char **argv;
13164 {
13165
13166         /* pthread test function */
13167 #ifndef PTHREAD_CREATE_DETACHED
13168 #define PTHREAD_CREATE_DETACHED 1
13169 #endif
13170         pthread_t t;
13171         int status;
13172         int detach = PTHREAD_CREATE_DETACHED;
13173
13174 #if HAVE_PTHREADS > 4
13175         /* Final pthreads */
13176         pthread_attr_t attr;
13177
13178         status = pthread_attr_init(&attr);
13179         if( status ) return status;
13180
13181 #if HAVE_PTHREADS < 7
13182         status = pthread_attr_setdetachstate(&attr, &detach);
13183         if( status < 0 ) status = errno;
13184 #else
13185         status = pthread_attr_setdetachstate(&attr, detach);
13186 #endif
13187         if( status ) return status;
13188         status = pthread_create( &t, &attr, task, NULL );
13189 #if HAVE_PTHREADS < 7
13190         if( status < 0 ) status = errno;
13191 #endif
13192         if( status ) return status;
13193 #else
13194         /* Draft 4 pthreads */
13195         status = pthread_create( &t, pthread_attr_default, task, NULL );
13196         if( status ) return errno;
13197
13198         /* give thread a chance to complete */
13199         /* it should remain joinable and hence detachable */
13200         sleep( 1 );
13201
13202         status = pthread_detach( &t );
13203         if( status ) return errno;
13204 #endif
13205
13206 #ifdef HAVE_LINUX_THREADS
13207         pthread_kill_other_threads_np();
13208 #endif
13209
13210         return 0;
13211
13212 }
13213
13214 EOF
13215 if { (eval echo configure:13216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13216 then
13217   ol_cv_pthread_lib_lpthread_woff=yes
13218 else
13219   echo "configure: failed program was:" >&5
13220   cat conftest.$ac_ext >&5
13221   rm -fr conftest*
13222   ol_cv_pthread_lib_lpthread_woff=no
13223 fi
13224 rm -fr conftest*
13225 fi
13226
13227
13228                 # restore the LIBS
13229                 LIBS="$ol_LIBS"
13230         
13231 fi
13232
13233 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13234
13235         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13236                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13237                 ol_link_threads=posix
13238         fi
13239 fi
13240
13241
13242                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13243 if test "$ol_link_threads" = no ; then
13244         # try -lpthread
13245         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13246 echo "configure:13247: checking for pthread link with -lpthread" >&5
13247 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13248   echo $ac_n "(cached) $ac_c" 1>&6
13249 else
13250   
13251                 # save the flags
13252                 ol_LIBS="$LIBS"
13253                 LIBS="-lpthread $LIBS"
13254
13255                 if test "$cross_compiling" = yes; then
13256   cat > conftest.$ac_ext <<EOF
13257 #line 13258 "configure"
13258 #include "confdefs.h"
13259 /* pthread test headers */
13260 #include <pthread.h>
13261 #if HAVE_PTHREADS < 7
13262 #include <errno.h>
13263 #endif
13264 #ifndef NULL
13265 #define NULL (void*)0
13266 #endif
13267
13268 static void *task(p)
13269         void *p;
13270 {
13271         return (void *) (p == NULL);
13272 }
13273
13274 int main() {
13275
13276         /* pthread test function */
13277 #ifndef PTHREAD_CREATE_DETACHED
13278 #define PTHREAD_CREATE_DETACHED 1
13279 #endif
13280         pthread_t t;
13281         int status;
13282         int detach = PTHREAD_CREATE_DETACHED;
13283
13284 #if HAVE_PTHREADS > 4
13285         /* Final pthreads */
13286         pthread_attr_t attr;
13287
13288         status = pthread_attr_init(&attr);
13289         if( status ) return status;
13290
13291 #if HAVE_PTHREADS < 7
13292         status = pthread_attr_setdetachstate(&attr, &detach);
13293         if( status < 0 ) status = errno;
13294 #else
13295         status = pthread_attr_setdetachstate(&attr, detach);
13296 #endif
13297         if( status ) return status;
13298         status = pthread_create( &t, &attr, task, NULL );
13299 #if HAVE_PTHREADS < 7
13300         if( status < 0 ) status = errno;
13301 #endif
13302         if( status ) return status;
13303 #else
13304         /* Draft 4 pthreads */
13305         status = pthread_create( &t, pthread_attr_default, task, NULL );
13306         if( status ) return errno;
13307
13308         /* give thread a chance to complete */
13309         /* it should remain joinable and hence detachable */
13310         sleep( 1 );
13311
13312         status = pthread_detach( &t );
13313         if( status ) return errno;
13314 #endif
13315
13316 #ifdef HAVE_LINUX_THREADS
13317         pthread_kill_other_threads_np();
13318 #endif
13319
13320         return 0;
13321
13322 ; return 0; }
13323 EOF
13324 if { (eval echo configure:13325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13325   rm -rf conftest*
13326   ol_cv_pthread_lpthread=yes
13327 else
13328   echo "configure: failed program was:" >&5
13329   cat conftest.$ac_ext >&5
13330   rm -rf conftest*
13331   ol_cv_pthread_lpthread=no
13332 fi
13333 rm -f conftest*
13334 else
13335   cat > conftest.$ac_ext <<EOF
13336 #line 13337 "configure"
13337 #include "confdefs.h"
13338 /* pthread test headers */
13339 #include <pthread.h>
13340 #if HAVE_PTHREADS < 7
13341 #include <errno.h>
13342 #endif
13343 #ifndef NULL
13344 #define NULL (void*)0
13345 #endif
13346
13347 static void *task(p)
13348         void *p;
13349 {
13350         return (void *) (p == NULL);
13351 }
13352
13353
13354 int main(argc, argv)
13355         int argc;
13356         char **argv;
13357 {
13358
13359         /* pthread test function */
13360 #ifndef PTHREAD_CREATE_DETACHED
13361 #define PTHREAD_CREATE_DETACHED 1
13362 #endif
13363         pthread_t t;
13364         int status;
13365         int detach = PTHREAD_CREATE_DETACHED;
13366
13367 #if HAVE_PTHREADS > 4
13368         /* Final pthreads */
13369         pthread_attr_t attr;
13370
13371         status = pthread_attr_init(&attr);
13372         if( status ) return status;
13373
13374 #if HAVE_PTHREADS < 7
13375         status = pthread_attr_setdetachstate(&attr, &detach);
13376         if( status < 0 ) status = errno;
13377 #else
13378         status = pthread_attr_setdetachstate(&attr, detach);
13379 #endif
13380         if( status ) return status;
13381         status = pthread_create( &t, &attr, task, NULL );
13382 #if HAVE_PTHREADS < 7
13383         if( status < 0 ) status = errno;
13384 #endif
13385         if( status ) return status;
13386 #else
13387         /* Draft 4 pthreads */
13388         status = pthread_create( &t, pthread_attr_default, task, NULL );
13389         if( status ) return errno;
13390
13391         /* give thread a chance to complete */
13392         /* it should remain joinable and hence detachable */
13393         sleep( 1 );
13394
13395         status = pthread_detach( &t );
13396         if( status ) return errno;
13397 #endif
13398
13399 #ifdef HAVE_LINUX_THREADS
13400         pthread_kill_other_threads_np();
13401 #endif
13402
13403         return 0;
13404
13405 }
13406
13407 EOF
13408 if { (eval echo configure:13409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13409 then
13410   ol_cv_pthread_lpthread=yes
13411 else
13412   echo "configure: failed program was:" >&5
13413   cat conftest.$ac_ext >&5
13414   rm -fr conftest*
13415   ol_cv_pthread_lpthread=no
13416 fi
13417 rm -fr conftest*
13418 fi
13419
13420
13421                 # restore the LIBS
13422                 LIBS="$ol_LIBS"
13423         
13424 fi
13425
13426 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13427
13428         if test $ol_cv_pthread_lpthread = yes ; then
13429                 ol_link_pthreads="-lpthread"
13430                 ol_link_threads=posix
13431         fi
13432 fi
13433
13434                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13435 if test "$ol_link_threads" = no ; then
13436         # try -lc_r
13437         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13438 echo "configure:13439: checking for pthread link with -lc_r" >&5
13439 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13440   echo $ac_n "(cached) $ac_c" 1>&6
13441 else
13442   
13443                 # save the flags
13444                 ol_LIBS="$LIBS"
13445                 LIBS="-lc_r $LIBS"
13446
13447                 if test "$cross_compiling" = yes; then
13448   cat > conftest.$ac_ext <<EOF
13449 #line 13450 "configure"
13450 #include "confdefs.h"
13451 /* pthread test headers */
13452 #include <pthread.h>
13453 #if HAVE_PTHREADS < 7
13454 #include <errno.h>
13455 #endif
13456 #ifndef NULL
13457 #define NULL (void*)0
13458 #endif
13459
13460 static void *task(p)
13461         void *p;
13462 {
13463         return (void *) (p == NULL);
13464 }
13465
13466 int main() {
13467
13468         /* pthread test function */
13469 #ifndef PTHREAD_CREATE_DETACHED
13470 #define PTHREAD_CREATE_DETACHED 1
13471 #endif
13472         pthread_t t;
13473         int status;
13474         int detach = PTHREAD_CREATE_DETACHED;
13475
13476 #if HAVE_PTHREADS > 4
13477         /* Final pthreads */
13478         pthread_attr_t attr;
13479
13480         status = pthread_attr_init(&attr);
13481         if( status ) return status;
13482
13483 #if HAVE_PTHREADS < 7
13484         status = pthread_attr_setdetachstate(&attr, &detach);
13485         if( status < 0 ) status = errno;
13486 #else
13487         status = pthread_attr_setdetachstate(&attr, detach);
13488 #endif
13489         if( status ) return status;
13490         status = pthread_create( &t, &attr, task, NULL );
13491 #if HAVE_PTHREADS < 7
13492         if( status < 0 ) status = errno;
13493 #endif
13494         if( status ) return status;
13495 #else
13496         /* Draft 4 pthreads */
13497         status = pthread_create( &t, pthread_attr_default, task, NULL );
13498         if( status ) return errno;
13499
13500         /* give thread a chance to complete */
13501         /* it should remain joinable and hence detachable */
13502         sleep( 1 );
13503
13504         status = pthread_detach( &t );
13505         if( status ) return errno;
13506 #endif
13507
13508 #ifdef HAVE_LINUX_THREADS
13509         pthread_kill_other_threads_np();
13510 #endif
13511
13512         return 0;
13513
13514 ; return 0; }
13515 EOF
13516 if { (eval echo configure:13517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13517   rm -rf conftest*
13518   ol_cv_pthread_lc_r=yes
13519 else
13520   echo "configure: failed program was:" >&5
13521   cat conftest.$ac_ext >&5
13522   rm -rf conftest*
13523   ol_cv_pthread_lc_r=no
13524 fi
13525 rm -f conftest*
13526 else
13527   cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 /* pthread test headers */
13531 #include <pthread.h>
13532 #if HAVE_PTHREADS < 7
13533 #include <errno.h>
13534 #endif
13535 #ifndef NULL
13536 #define NULL (void*)0
13537 #endif
13538
13539 static void *task(p)
13540         void *p;
13541 {
13542         return (void *) (p == NULL);
13543 }
13544
13545
13546 int main(argc, argv)
13547         int argc;
13548         char **argv;
13549 {
13550
13551         /* pthread test function */
13552 #ifndef PTHREAD_CREATE_DETACHED
13553 #define PTHREAD_CREATE_DETACHED 1
13554 #endif
13555         pthread_t t;
13556         int status;
13557         int detach = PTHREAD_CREATE_DETACHED;
13558
13559 #if HAVE_PTHREADS > 4
13560         /* Final pthreads */
13561         pthread_attr_t attr;
13562
13563         status = pthread_attr_init(&attr);
13564         if( status ) return status;
13565
13566 #if HAVE_PTHREADS < 7
13567         status = pthread_attr_setdetachstate(&attr, &detach);
13568         if( status < 0 ) status = errno;
13569 #else
13570         status = pthread_attr_setdetachstate(&attr, detach);
13571 #endif
13572         if( status ) return status;
13573         status = pthread_create( &t, &attr, task, NULL );
13574 #if HAVE_PTHREADS < 7
13575         if( status < 0 ) status = errno;
13576 #endif
13577         if( status ) return status;
13578 #else
13579         /* Draft 4 pthreads */
13580         status = pthread_create( &t, pthread_attr_default, task, NULL );
13581         if( status ) return errno;
13582
13583         /* give thread a chance to complete */
13584         /* it should remain joinable and hence detachable */
13585         sleep( 1 );
13586
13587         status = pthread_detach( &t );
13588         if( status ) return errno;
13589 #endif
13590
13591 #ifdef HAVE_LINUX_THREADS
13592         pthread_kill_other_threads_np();
13593 #endif
13594
13595         return 0;
13596
13597 }
13598
13599 EOF
13600 if { (eval echo configure:13601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13601 then
13602   ol_cv_pthread_lc_r=yes
13603 else
13604   echo "configure: failed program was:" >&5
13605   cat conftest.$ac_ext >&5
13606   rm -fr conftest*
13607   ol_cv_pthread_lc_r=no
13608 fi
13609 rm -fr conftest*
13610 fi
13611
13612
13613                 # restore the LIBS
13614                 LIBS="$ol_LIBS"
13615         
13616 fi
13617
13618 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13619
13620         if test $ol_cv_pthread_lc_r = yes ; then
13621                 ol_link_pthreads="-lc_r"
13622                 ol_link_threads=posix
13623         fi
13624 fi
13625
13626
13627                 # Pthread try link: -threads (ol_cv_pthread_threads)
13628 if test "$ol_link_threads" = no ; then
13629         # try -threads
13630         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13631 echo "configure:13632: checking for pthread link with -threads" >&5
13632 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13633   echo $ac_n "(cached) $ac_c" 1>&6
13634 else
13635   
13636                 # save the flags
13637                 ol_LIBS="$LIBS"
13638                 LIBS="-threads $LIBS"
13639
13640                 if test "$cross_compiling" = yes; then
13641   cat > conftest.$ac_ext <<EOF
13642 #line 13643 "configure"
13643 #include "confdefs.h"
13644 /* pthread test headers */
13645 #include <pthread.h>
13646 #if HAVE_PTHREADS < 7
13647 #include <errno.h>
13648 #endif
13649 #ifndef NULL
13650 #define NULL (void*)0
13651 #endif
13652
13653 static void *task(p)
13654         void *p;
13655 {
13656         return (void *) (p == NULL);
13657 }
13658
13659 int main() {
13660
13661         /* pthread test function */
13662 #ifndef PTHREAD_CREATE_DETACHED
13663 #define PTHREAD_CREATE_DETACHED 1
13664 #endif
13665         pthread_t t;
13666         int status;
13667         int detach = PTHREAD_CREATE_DETACHED;
13668
13669 #if HAVE_PTHREADS > 4
13670         /* Final pthreads */
13671         pthread_attr_t attr;
13672
13673         status = pthread_attr_init(&attr);
13674         if( status ) return status;
13675
13676 #if HAVE_PTHREADS < 7
13677         status = pthread_attr_setdetachstate(&attr, &detach);
13678         if( status < 0 ) status = errno;
13679 #else
13680         status = pthread_attr_setdetachstate(&attr, detach);
13681 #endif
13682         if( status ) return status;
13683         status = pthread_create( &t, &attr, task, NULL );
13684 #if HAVE_PTHREADS < 7
13685         if( status < 0 ) status = errno;
13686 #endif
13687         if( status ) return status;
13688 #else
13689         /* Draft 4 pthreads */
13690         status = pthread_create( &t, pthread_attr_default, task, NULL );
13691         if( status ) return errno;
13692
13693         /* give thread a chance to complete */
13694         /* it should remain joinable and hence detachable */
13695         sleep( 1 );
13696
13697         status = pthread_detach( &t );
13698         if( status ) return errno;
13699 #endif
13700
13701 #ifdef HAVE_LINUX_THREADS
13702         pthread_kill_other_threads_np();
13703 #endif
13704
13705         return 0;
13706
13707 ; return 0; }
13708 EOF
13709 if { (eval echo configure:13710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13710   rm -rf conftest*
13711   ol_cv_pthread_threads=yes
13712 else
13713   echo "configure: failed program was:" >&5
13714   cat conftest.$ac_ext >&5
13715   rm -rf conftest*
13716   ol_cv_pthread_threads=no
13717 fi
13718 rm -f conftest*
13719 else
13720   cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 /* pthread test headers */
13724 #include <pthread.h>
13725 #if HAVE_PTHREADS < 7
13726 #include <errno.h>
13727 #endif
13728 #ifndef NULL
13729 #define NULL (void*)0
13730 #endif
13731
13732 static void *task(p)
13733         void *p;
13734 {
13735         return (void *) (p == NULL);
13736 }
13737
13738
13739 int main(argc, argv)
13740         int argc;
13741         char **argv;
13742 {
13743
13744         /* pthread test function */
13745 #ifndef PTHREAD_CREATE_DETACHED
13746 #define PTHREAD_CREATE_DETACHED 1
13747 #endif
13748         pthread_t t;
13749         int status;
13750         int detach = PTHREAD_CREATE_DETACHED;
13751
13752 #if HAVE_PTHREADS > 4
13753         /* Final pthreads */
13754         pthread_attr_t attr;
13755
13756         status = pthread_attr_init(&attr);
13757         if( status ) return status;
13758
13759 #if HAVE_PTHREADS < 7
13760         status = pthread_attr_setdetachstate(&attr, &detach);
13761         if( status < 0 ) status = errno;
13762 #else
13763         status = pthread_attr_setdetachstate(&attr, detach);
13764 #endif
13765         if( status ) return status;
13766         status = pthread_create( &t, &attr, task, NULL );
13767 #if HAVE_PTHREADS < 7
13768         if( status < 0 ) status = errno;
13769 #endif
13770         if( status ) return status;
13771 #else
13772         /* Draft 4 pthreads */
13773         status = pthread_create( &t, pthread_attr_default, task, NULL );
13774         if( status ) return errno;
13775
13776         /* give thread a chance to complete */
13777         /* it should remain joinable and hence detachable */
13778         sleep( 1 );
13779
13780         status = pthread_detach( &t );
13781         if( status ) return errno;
13782 #endif
13783
13784 #ifdef HAVE_LINUX_THREADS
13785         pthread_kill_other_threads_np();
13786 #endif
13787
13788         return 0;
13789
13790 }
13791
13792 EOF
13793 if { (eval echo configure:13794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13794 then
13795   ol_cv_pthread_threads=yes
13796 else
13797   echo "configure: failed program was:" >&5
13798   cat conftest.$ac_ext >&5
13799   rm -fr conftest*
13800   ol_cv_pthread_threads=no
13801 fi
13802 rm -fr conftest*
13803 fi
13804
13805
13806                 # restore the LIBS
13807                 LIBS="$ol_LIBS"
13808         
13809 fi
13810
13811 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13812
13813         if test $ol_cv_pthread_threads = yes ; then
13814                 ol_link_pthreads="-threads"
13815                 ol_link_threads=posix
13816         fi
13817 fi
13818
13819
13820                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13821 if test "$ol_link_threads" = no ; then
13822         # try -lpthreads -lmach -lexc -lc_r
13823         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13824 echo "configure:13825: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13825 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13826   echo $ac_n "(cached) $ac_c" 1>&6
13827 else
13828   
13829                 # save the flags
13830                 ol_LIBS="$LIBS"
13831                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13832
13833                 if test "$cross_compiling" = yes; then
13834   cat > conftest.$ac_ext <<EOF
13835 #line 13836 "configure"
13836 #include "confdefs.h"
13837 /* pthread test headers */
13838 #include <pthread.h>
13839 #if HAVE_PTHREADS < 7
13840 #include <errno.h>
13841 #endif
13842 #ifndef NULL
13843 #define NULL (void*)0
13844 #endif
13845
13846 static void *task(p)
13847         void *p;
13848 {
13849         return (void *) (p == NULL);
13850 }
13851
13852 int main() {
13853
13854         /* pthread test function */
13855 #ifndef PTHREAD_CREATE_DETACHED
13856 #define PTHREAD_CREATE_DETACHED 1
13857 #endif
13858         pthread_t t;
13859         int status;
13860         int detach = PTHREAD_CREATE_DETACHED;
13861
13862 #if HAVE_PTHREADS > 4
13863         /* Final pthreads */
13864         pthread_attr_t attr;
13865
13866         status = pthread_attr_init(&attr);
13867         if( status ) return status;
13868
13869 #if HAVE_PTHREADS < 7
13870         status = pthread_attr_setdetachstate(&attr, &detach);
13871         if( status < 0 ) status = errno;
13872 #else
13873         status = pthread_attr_setdetachstate(&attr, detach);
13874 #endif
13875         if( status ) return status;
13876         status = pthread_create( &t, &attr, task, NULL );
13877 #if HAVE_PTHREADS < 7
13878         if( status < 0 ) status = errno;
13879 #endif
13880         if( status ) return status;
13881 #else
13882         /* Draft 4 pthreads */
13883         status = pthread_create( &t, pthread_attr_default, task, NULL );
13884         if( status ) return errno;
13885
13886         /* give thread a chance to complete */
13887         /* it should remain joinable and hence detachable */
13888         sleep( 1 );
13889
13890         status = pthread_detach( &t );
13891         if( status ) return errno;
13892 #endif
13893
13894 #ifdef HAVE_LINUX_THREADS
13895         pthread_kill_other_threads_np();
13896 #endif
13897
13898         return 0;
13899
13900 ; return 0; }
13901 EOF
13902 if { (eval echo configure:13903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13903   rm -rf conftest*
13904   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13905 else
13906   echo "configure: failed program was:" >&5
13907   cat conftest.$ac_ext >&5
13908   rm -rf conftest*
13909   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13910 fi
13911 rm -f conftest*
13912 else
13913   cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 /* pthread test headers */
13917 #include <pthread.h>
13918 #if HAVE_PTHREADS < 7
13919 #include <errno.h>
13920 #endif
13921 #ifndef NULL
13922 #define NULL (void*)0
13923 #endif
13924
13925 static void *task(p)
13926         void *p;
13927 {
13928         return (void *) (p == NULL);
13929 }
13930
13931
13932 int main(argc, argv)
13933         int argc;
13934         char **argv;
13935 {
13936
13937         /* pthread test function */
13938 #ifndef PTHREAD_CREATE_DETACHED
13939 #define PTHREAD_CREATE_DETACHED 1
13940 #endif
13941         pthread_t t;
13942         int status;
13943         int detach = PTHREAD_CREATE_DETACHED;
13944
13945 #if HAVE_PTHREADS > 4
13946         /* Final pthreads */
13947         pthread_attr_t attr;
13948
13949         status = pthread_attr_init(&attr);
13950         if( status ) return status;
13951
13952 #if HAVE_PTHREADS < 7
13953         status = pthread_attr_setdetachstate(&attr, &detach);
13954         if( status < 0 ) status = errno;
13955 #else
13956         status = pthread_attr_setdetachstate(&attr, detach);
13957 #endif
13958         if( status ) return status;
13959         status = pthread_create( &t, &attr, task, NULL );
13960 #if HAVE_PTHREADS < 7
13961         if( status < 0 ) status = errno;
13962 #endif
13963         if( status ) return status;
13964 #else
13965         /* Draft 4 pthreads */
13966         status = pthread_create( &t, pthread_attr_default, task, NULL );
13967         if( status ) return errno;
13968
13969         /* give thread a chance to complete */
13970         /* it should remain joinable and hence detachable */
13971         sleep( 1 );
13972
13973         status = pthread_detach( &t );
13974         if( status ) return errno;
13975 #endif
13976
13977 #ifdef HAVE_LINUX_THREADS
13978         pthread_kill_other_threads_np();
13979 #endif
13980
13981         return 0;
13982
13983 }
13984
13985 EOF
13986 if { (eval echo configure:13987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13987 then
13988   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13989 else
13990   echo "configure: failed program was:" >&5
13991   cat conftest.$ac_ext >&5
13992   rm -fr conftest*
13993   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13994 fi
13995 rm -fr conftest*
13996 fi
13997
13998
13999                 # restore the LIBS
14000                 LIBS="$ol_LIBS"
14001         
14002 fi
14003
14004 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14005
14006         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14007                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14008                 ol_link_threads=posix
14009         fi
14010 fi
14011
14012                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14013 if test "$ol_link_threads" = no ; then
14014         # try -lpthreads -lmach -lexc
14015         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14016 echo "configure:14017: checking for pthread link with -lpthreads -lmach -lexc" >&5
14017 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14018   echo $ac_n "(cached) $ac_c" 1>&6
14019 else
14020   
14021                 # save the flags
14022                 ol_LIBS="$LIBS"
14023                 LIBS="-lpthreads -lmach -lexc $LIBS"
14024
14025                 if test "$cross_compiling" = yes; then
14026   cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 /* pthread test headers */
14030 #include <pthread.h>
14031 #if HAVE_PTHREADS < 7
14032 #include <errno.h>
14033 #endif
14034 #ifndef NULL
14035 #define NULL (void*)0
14036 #endif
14037
14038 static void *task(p)
14039         void *p;
14040 {
14041         return (void *) (p == NULL);
14042 }
14043
14044 int main() {
14045
14046         /* pthread test function */
14047 #ifndef PTHREAD_CREATE_DETACHED
14048 #define PTHREAD_CREATE_DETACHED 1
14049 #endif
14050         pthread_t t;
14051         int status;
14052         int detach = PTHREAD_CREATE_DETACHED;
14053
14054 #if HAVE_PTHREADS > 4
14055         /* Final pthreads */
14056         pthread_attr_t attr;
14057
14058         status = pthread_attr_init(&attr);
14059         if( status ) return status;
14060
14061 #if HAVE_PTHREADS < 7
14062         status = pthread_attr_setdetachstate(&attr, &detach);
14063         if( status < 0 ) status = errno;
14064 #else
14065         status = pthread_attr_setdetachstate(&attr, detach);
14066 #endif
14067         if( status ) return status;
14068         status = pthread_create( &t, &attr, task, NULL );
14069 #if HAVE_PTHREADS < 7
14070         if( status < 0 ) status = errno;
14071 #endif
14072         if( status ) return status;
14073 #else
14074         /* Draft 4 pthreads */
14075         status = pthread_create( &t, pthread_attr_default, task, NULL );
14076         if( status ) return errno;
14077
14078         /* give thread a chance to complete */
14079         /* it should remain joinable and hence detachable */
14080         sleep( 1 );
14081
14082         status = pthread_detach( &t );
14083         if( status ) return errno;
14084 #endif
14085
14086 #ifdef HAVE_LINUX_THREADS
14087         pthread_kill_other_threads_np();
14088 #endif
14089
14090         return 0;
14091
14092 ; return 0; }
14093 EOF
14094 if { (eval echo configure:14095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14095   rm -rf conftest*
14096   ol_cv_pthread_lpthreads_lmach_lexc=yes
14097 else
14098   echo "configure: failed program was:" >&5
14099   cat conftest.$ac_ext >&5
14100   rm -rf conftest*
14101   ol_cv_pthread_lpthreads_lmach_lexc=no
14102 fi
14103 rm -f conftest*
14104 else
14105   cat > conftest.$ac_ext <<EOF
14106 #line 14107 "configure"
14107 #include "confdefs.h"
14108 /* pthread test headers */
14109 #include <pthread.h>
14110 #if HAVE_PTHREADS < 7
14111 #include <errno.h>
14112 #endif
14113 #ifndef NULL
14114 #define NULL (void*)0
14115 #endif
14116
14117 static void *task(p)
14118         void *p;
14119 {
14120         return (void *) (p == NULL);
14121 }
14122
14123
14124 int main(argc, argv)
14125         int argc;
14126         char **argv;
14127 {
14128
14129         /* pthread test function */
14130 #ifndef PTHREAD_CREATE_DETACHED
14131 #define PTHREAD_CREATE_DETACHED 1
14132 #endif
14133         pthread_t t;
14134         int status;
14135         int detach = PTHREAD_CREATE_DETACHED;
14136
14137 #if HAVE_PTHREADS > 4
14138         /* Final pthreads */
14139         pthread_attr_t attr;
14140
14141         status = pthread_attr_init(&attr);
14142         if( status ) return status;
14143
14144 #if HAVE_PTHREADS < 7
14145         status = pthread_attr_setdetachstate(&attr, &detach);
14146         if( status < 0 ) status = errno;
14147 #else
14148         status = pthread_attr_setdetachstate(&attr, detach);
14149 #endif
14150         if( status ) return status;
14151         status = pthread_create( &t, &attr, task, NULL );
14152 #if HAVE_PTHREADS < 7
14153         if( status < 0 ) status = errno;
14154 #endif
14155         if( status ) return status;
14156 #else
14157         /* Draft 4 pthreads */
14158         status = pthread_create( &t, pthread_attr_default, task, NULL );
14159         if( status ) return errno;
14160
14161         /* give thread a chance to complete */
14162         /* it should remain joinable and hence detachable */
14163         sleep( 1 );
14164
14165         status = pthread_detach( &t );
14166         if( status ) return errno;
14167 #endif
14168
14169 #ifdef HAVE_LINUX_THREADS
14170         pthread_kill_other_threads_np();
14171 #endif
14172
14173         return 0;
14174
14175 }
14176
14177 EOF
14178 if { (eval echo configure:14179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14179 then
14180   ol_cv_pthread_lpthreads_lmach_lexc=yes
14181 else
14182   echo "configure: failed program was:" >&5
14183   cat conftest.$ac_ext >&5
14184   rm -fr conftest*
14185   ol_cv_pthread_lpthreads_lmach_lexc=no
14186 fi
14187 rm -fr conftest*
14188 fi
14189
14190
14191                 # restore the LIBS
14192                 LIBS="$ol_LIBS"
14193         
14194 fi
14195
14196 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14197
14198         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14199                 ol_link_pthreads="-lpthreads -lmach -lexc"
14200                 ol_link_threads=posix
14201         fi
14202 fi
14203
14204                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14205 if test "$ol_link_threads" = no ; then
14206         # try -lpthreads -lexc
14207         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14208 echo "configure:14209: checking for pthread link with -lpthreads -lexc" >&5
14209 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14210   echo $ac_n "(cached) $ac_c" 1>&6
14211 else
14212   
14213                 # save the flags
14214                 ol_LIBS="$LIBS"
14215                 LIBS="-lpthreads -lexc $LIBS"
14216
14217                 if test "$cross_compiling" = yes; then
14218   cat > conftest.$ac_ext <<EOF
14219 #line 14220 "configure"
14220 #include "confdefs.h"
14221 /* pthread test headers */
14222 #include <pthread.h>
14223 #if HAVE_PTHREADS < 7
14224 #include <errno.h>
14225 #endif
14226 #ifndef NULL
14227 #define NULL (void*)0
14228 #endif
14229
14230 static void *task(p)
14231         void *p;
14232 {
14233         return (void *) (p == NULL);
14234 }
14235
14236 int main() {
14237
14238         /* pthread test function */
14239 #ifndef PTHREAD_CREATE_DETACHED
14240 #define PTHREAD_CREATE_DETACHED 1
14241 #endif
14242         pthread_t t;
14243         int status;
14244         int detach = PTHREAD_CREATE_DETACHED;
14245
14246 #if HAVE_PTHREADS > 4
14247         /* Final pthreads */
14248         pthread_attr_t attr;
14249
14250         status = pthread_attr_init(&attr);
14251         if( status ) return status;
14252
14253 #if HAVE_PTHREADS < 7
14254         status = pthread_attr_setdetachstate(&attr, &detach);
14255         if( status < 0 ) status = errno;
14256 #else
14257         status = pthread_attr_setdetachstate(&attr, detach);
14258 #endif
14259         if( status ) return status;
14260         status = pthread_create( &t, &attr, task, NULL );
14261 #if HAVE_PTHREADS < 7
14262         if( status < 0 ) status = errno;
14263 #endif
14264         if( status ) return status;
14265 #else
14266         /* Draft 4 pthreads */
14267         status = pthread_create( &t, pthread_attr_default, task, NULL );
14268         if( status ) return errno;
14269
14270         /* give thread a chance to complete */
14271         /* it should remain joinable and hence detachable */
14272         sleep( 1 );
14273
14274         status = pthread_detach( &t );
14275         if( status ) return errno;
14276 #endif
14277
14278 #ifdef HAVE_LINUX_THREADS
14279         pthread_kill_other_threads_np();
14280 #endif
14281
14282         return 0;
14283
14284 ; return 0; }
14285 EOF
14286 if { (eval echo configure:14287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14287   rm -rf conftest*
14288   ol_cv_pthread_lpthreads_lexc=yes
14289 else
14290   echo "configure: failed program was:" >&5
14291   cat conftest.$ac_ext >&5
14292   rm -rf conftest*
14293   ol_cv_pthread_lpthreads_lexc=no
14294 fi
14295 rm -f conftest*
14296 else
14297   cat > conftest.$ac_ext <<EOF
14298 #line 14299 "configure"
14299 #include "confdefs.h"
14300 /* pthread test headers */
14301 #include <pthread.h>
14302 #if HAVE_PTHREADS < 7
14303 #include <errno.h>
14304 #endif
14305 #ifndef NULL
14306 #define NULL (void*)0
14307 #endif
14308
14309 static void *task(p)
14310         void *p;
14311 {
14312         return (void *) (p == NULL);
14313 }
14314
14315
14316 int main(argc, argv)
14317         int argc;
14318         char **argv;
14319 {
14320
14321         /* pthread test function */
14322 #ifndef PTHREAD_CREATE_DETACHED
14323 #define PTHREAD_CREATE_DETACHED 1
14324 #endif
14325         pthread_t t;
14326         int status;
14327         int detach = PTHREAD_CREATE_DETACHED;
14328
14329 #if HAVE_PTHREADS > 4
14330         /* Final pthreads */
14331         pthread_attr_t attr;
14332
14333         status = pthread_attr_init(&attr);
14334         if( status ) return status;
14335
14336 #if HAVE_PTHREADS < 7
14337         status = pthread_attr_setdetachstate(&attr, &detach);
14338         if( status < 0 ) status = errno;
14339 #else
14340         status = pthread_attr_setdetachstate(&attr, detach);
14341 #endif
14342         if( status ) return status;
14343         status = pthread_create( &t, &attr, task, NULL );
14344 #if HAVE_PTHREADS < 7
14345         if( status < 0 ) status = errno;
14346 #endif
14347         if( status ) return status;
14348 #else
14349         /* Draft 4 pthreads */
14350         status = pthread_create( &t, pthread_attr_default, task, NULL );
14351         if( status ) return errno;
14352
14353         /* give thread a chance to complete */
14354         /* it should remain joinable and hence detachable */
14355         sleep( 1 );
14356
14357         status = pthread_detach( &t );
14358         if( status ) return errno;
14359 #endif
14360
14361 #ifdef HAVE_LINUX_THREADS
14362         pthread_kill_other_threads_np();
14363 #endif
14364
14365         return 0;
14366
14367 }
14368
14369 EOF
14370 if { (eval echo configure:14371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14371 then
14372   ol_cv_pthread_lpthreads_lexc=yes
14373 else
14374   echo "configure: failed program was:" >&5
14375   cat conftest.$ac_ext >&5
14376   rm -fr conftest*
14377   ol_cv_pthread_lpthreads_lexc=no
14378 fi
14379 rm -fr conftest*
14380 fi
14381
14382
14383                 # restore the LIBS
14384                 LIBS="$ol_LIBS"
14385         
14386 fi
14387
14388 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14389
14390         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14391                 ol_link_pthreads="-lpthreads -lexc"
14392                 ol_link_threads=posix
14393         fi
14394 fi
14395
14396
14397                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14398 if test "$ol_link_threads" = no ; then
14399         # try -lpthreads
14400         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14401 echo "configure:14402: checking for pthread link with -lpthreads" >&5
14402 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14403   echo $ac_n "(cached) $ac_c" 1>&6
14404 else
14405   
14406                 # save the flags
14407                 ol_LIBS="$LIBS"
14408                 LIBS="-lpthreads $LIBS"
14409
14410                 if test "$cross_compiling" = yes; then
14411   cat > conftest.$ac_ext <<EOF
14412 #line 14413 "configure"
14413 #include "confdefs.h"
14414 /* pthread test headers */
14415 #include <pthread.h>
14416 #if HAVE_PTHREADS < 7
14417 #include <errno.h>
14418 #endif
14419 #ifndef NULL
14420 #define NULL (void*)0
14421 #endif
14422
14423 static void *task(p)
14424         void *p;
14425 {
14426         return (void *) (p == NULL);
14427 }
14428
14429 int main() {
14430
14431         /* pthread test function */
14432 #ifndef PTHREAD_CREATE_DETACHED
14433 #define PTHREAD_CREATE_DETACHED 1
14434 #endif
14435         pthread_t t;
14436         int status;
14437         int detach = PTHREAD_CREATE_DETACHED;
14438
14439 #if HAVE_PTHREADS > 4
14440         /* Final pthreads */
14441         pthread_attr_t attr;
14442
14443         status = pthread_attr_init(&attr);
14444         if( status ) return status;
14445
14446 #if HAVE_PTHREADS < 7
14447         status = pthread_attr_setdetachstate(&attr, &detach);
14448         if( status < 0 ) status = errno;
14449 #else
14450         status = pthread_attr_setdetachstate(&attr, detach);
14451 #endif
14452         if( status ) return status;
14453         status = pthread_create( &t, &attr, task, NULL );
14454 #if HAVE_PTHREADS < 7
14455         if( status < 0 ) status = errno;
14456 #endif
14457         if( status ) return status;
14458 #else
14459         /* Draft 4 pthreads */
14460         status = pthread_create( &t, pthread_attr_default, task, NULL );
14461         if( status ) return errno;
14462
14463         /* give thread a chance to complete */
14464         /* it should remain joinable and hence detachable */
14465         sleep( 1 );
14466
14467         status = pthread_detach( &t );
14468         if( status ) return errno;
14469 #endif
14470
14471 #ifdef HAVE_LINUX_THREADS
14472         pthread_kill_other_threads_np();
14473 #endif
14474
14475         return 0;
14476
14477 ; return 0; }
14478 EOF
14479 if { (eval echo configure:14480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14480   rm -rf conftest*
14481   ol_cv_pthread_lib_lpthreads=yes
14482 else
14483   echo "configure: failed program was:" >&5
14484   cat conftest.$ac_ext >&5
14485   rm -rf conftest*
14486   ol_cv_pthread_lib_lpthreads=no
14487 fi
14488 rm -f conftest*
14489 else
14490   cat > conftest.$ac_ext <<EOF
14491 #line 14492 "configure"
14492 #include "confdefs.h"
14493 /* pthread test headers */
14494 #include <pthread.h>
14495 #if HAVE_PTHREADS < 7
14496 #include <errno.h>
14497 #endif
14498 #ifndef NULL
14499 #define NULL (void*)0
14500 #endif
14501
14502 static void *task(p)
14503         void *p;
14504 {
14505         return (void *) (p == NULL);
14506 }
14507
14508
14509 int main(argc, argv)
14510         int argc;
14511         char **argv;
14512 {
14513
14514         /* pthread test function */
14515 #ifndef PTHREAD_CREATE_DETACHED
14516 #define PTHREAD_CREATE_DETACHED 1
14517 #endif
14518         pthread_t t;
14519         int status;
14520         int detach = PTHREAD_CREATE_DETACHED;
14521
14522 #if HAVE_PTHREADS > 4
14523         /* Final pthreads */
14524         pthread_attr_t attr;
14525
14526         status = pthread_attr_init(&attr);
14527         if( status ) return status;
14528
14529 #if HAVE_PTHREADS < 7
14530         status = pthread_attr_setdetachstate(&attr, &detach);
14531         if( status < 0 ) status = errno;
14532 #else
14533         status = pthread_attr_setdetachstate(&attr, detach);
14534 #endif
14535         if( status ) return status;
14536         status = pthread_create( &t, &attr, task, NULL );
14537 #if HAVE_PTHREADS < 7
14538         if( status < 0 ) status = errno;
14539 #endif
14540         if( status ) return status;
14541 #else
14542         /* Draft 4 pthreads */
14543         status = pthread_create( &t, pthread_attr_default, task, NULL );
14544         if( status ) return errno;
14545
14546         /* give thread a chance to complete */
14547         /* it should remain joinable and hence detachable */
14548         sleep( 1 );
14549
14550         status = pthread_detach( &t );
14551         if( status ) return errno;
14552 #endif
14553
14554 #ifdef HAVE_LINUX_THREADS
14555         pthread_kill_other_threads_np();
14556 #endif
14557
14558         return 0;
14559
14560 }
14561
14562 EOF
14563 if { (eval echo configure:14564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14564 then
14565   ol_cv_pthread_lib_lpthreads=yes
14566 else
14567   echo "configure: failed program was:" >&5
14568   cat conftest.$ac_ext >&5
14569   rm -fr conftest*
14570   ol_cv_pthread_lib_lpthreads=no
14571 fi
14572 rm -fr conftest*
14573 fi
14574
14575
14576                 # restore the LIBS
14577                 LIBS="$ol_LIBS"
14578         
14579 fi
14580
14581 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14582
14583         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14584                 ol_link_pthreads="-lpthreads"
14585                 ol_link_threads=posix
14586         fi
14587 fi
14588
14589
14590                 if test $ol_link_threads != no ; then
14591                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14592
14593                                                 save_CPPFLAGS="$CPPFLAGS"
14594                         save_LIBS="$LIBS"
14595                         LIBS="$LTHREAD_LIBS $LIBS"
14596
14597                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14598 do
14599 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14600 echo "configure:14601: checking for $ac_func" >&5
14601 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14602   echo $ac_n "(cached) $ac_c" 1>&6
14603 else
14604   cat > conftest.$ac_ext <<EOF
14605 #line 14606 "configure"
14606 #include "confdefs.h"
14607 /* System header to define __stub macros and hopefully few prototypes,
14608     which can conflict with char $ac_func(); below.  */
14609 #include <assert.h>
14610 /* Override any gcc2 internal prototype to avoid an error.  */
14611 /* We use char because int might match the return type of a gcc2
14612     builtin and then its argument prototype would still apply.  */
14613 char $ac_func();
14614 char (*f)();
14615
14616 int main() {
14617
14618 /* The GNU C library defines this for functions which it implements
14619     to always fail with ENOSYS.  Some functions are actually named
14620     something starting with __ and the normal name is an alias.  */
14621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14622 choke me
14623 #else
14624 f = $ac_func;
14625 #endif
14626
14627 ; return 0; }
14628 EOF
14629 if { (eval echo configure:14630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14630   rm -rf conftest*
14631   eval "ac_cv_func_$ac_func=yes"
14632 else
14633   echo "configure: failed program was:" >&5
14634   cat conftest.$ac_ext >&5
14635   rm -rf conftest*
14636   eval "ac_cv_func_$ac_func=no"
14637 fi
14638 rm -f conftest*
14639 fi
14640
14641 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14642   echo "$ac_t""yes" 1>&6
14643     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14644   cat >> confdefs.h <<EOF
14645 #define $ac_tr_func 1
14646 EOF
14647  
14648 else
14649   echo "$ac_t""no" 1>&6
14650 fi
14651 done
14652
14653
14654                         if test $ac_cv_func_sched_yield = no -a \
14655                                 $ac_cv_func_pthread_yield = no -a \
14656                                 $ac_cv_func_thr_yield = no ; then
14657                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14658 echo "configure:14659: checking for sched_yield in -lrt" >&5
14659 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14661   echo $ac_n "(cached) $ac_c" 1>&6
14662 else
14663   ac_save_LIBS="$LIBS"
14664 LIBS="-lrt  $LIBS"
14665 cat > conftest.$ac_ext <<EOF
14666 #line 14667 "configure"
14667 #include "confdefs.h"
14668 /* Override any gcc2 internal prototype to avoid an error.  */
14669 /* We use char because int might match the return type of a gcc2
14670     builtin and then its argument prototype would still apply.  */
14671 char sched_yield();
14672
14673 int main() {
14674 sched_yield()
14675 ; return 0; }
14676 EOF
14677 if { (eval echo configure:14678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14678   rm -rf conftest*
14679   eval "ac_cv_lib_$ac_lib_var=yes"
14680 else
14681   echo "configure: failed program was:" >&5
14682   cat conftest.$ac_ext >&5
14683   rm -rf conftest*
14684   eval "ac_cv_lib_$ac_lib_var=no"
14685 fi
14686 rm -f conftest*
14687 LIBS="$ac_save_LIBS"
14688
14689 fi
14690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14691   echo "$ac_t""yes" 1>&6
14692   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14693                                         cat >> confdefs.h <<\EOF
14694 #define HAVE_SCHED_YIELD 1
14695 EOF
14696
14697                                         ac_cv_func_sched_yield=yes
14698 else
14699   echo "$ac_t""no" 1>&6
14700 ac_cv_func_sched_yield=no
14701 fi
14702
14703                         fi
14704                         if test $ac_cv_func_sched_yield = no -a \
14705                                 $ac_cv_func_pthread_yield = no -a \
14706                                 "$ac_cv_func_thr_yield" = no ; then
14707                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14708                         fi
14709
14710                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14711 do
14712 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14713 echo "configure:14714: checking for $ac_func" >&5
14714 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14715   echo $ac_n "(cached) $ac_c" 1>&6
14716 else
14717   cat > conftest.$ac_ext <<EOF
14718 #line 14719 "configure"
14719 #include "confdefs.h"
14720 /* System header to define __stub macros and hopefully few prototypes,
14721     which can conflict with char $ac_func(); below.  */
14722 #include <assert.h>
14723 /* Override any gcc2 internal prototype to avoid an error.  */
14724 /* We use char because int might match the return type of a gcc2
14725     builtin and then its argument prototype would still apply.  */
14726 char $ac_func();
14727 char (*f)();
14728
14729 int main() {
14730
14731 /* The GNU C library defines this for functions which it implements
14732     to always fail with ENOSYS.  Some functions are actually named
14733     something starting with __ and the normal name is an alias.  */
14734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14735 choke me
14736 #else
14737 f = $ac_func;
14738 #endif
14739
14740 ; return 0; }
14741 EOF
14742 if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14743   rm -rf conftest*
14744   eval "ac_cv_func_$ac_func=yes"
14745 else
14746   echo "configure: failed program was:" >&5
14747   cat conftest.$ac_ext >&5
14748   rm -rf conftest*
14749   eval "ac_cv_func_$ac_func=no"
14750 fi
14751 rm -f conftest*
14752 fi
14753
14754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14755   echo "$ac_t""yes" 1>&6
14756     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14757   cat >> confdefs.h <<EOF
14758 #define $ac_tr_func 1
14759 EOF
14760  
14761 else
14762   echo "$ac_t""no" 1>&6
14763 fi
14764 done
14765
14766
14767                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14768 echo "configure:14769: checking for pthread_detach with <pthread.h>" >&5
14769 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14770   echo $ac_n "(cached) $ac_c" 1>&6
14771 else
14772   
14773                                                                 cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776
14777 #include <pthread.h>
14778 #ifndef NULL
14779 #define NULL (void*)0
14780 #endif
14781
14782 int main() {
14783 pthread_detach(NULL);
14784 ; return 0; }
14785 EOF
14786 if { (eval echo configure:14787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14787   rm -rf conftest*
14788   ol_cv_func_pthread_detach=yes
14789 else
14790   echo "configure: failed program was:" >&5
14791   cat conftest.$ac_ext >&5
14792   rm -rf conftest*
14793   ol_cv_func_pthread_detach=no
14794 fi
14795 rm -f conftest*
14796                         
14797 fi
14798
14799 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14800
14801                         if test $ol_cv_func_pthread_detach = no ; then
14802                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14803                         fi
14804
14805                         cat >> confdefs.h <<\EOF
14806 #define HAVE_PTHREAD_DETACH 1
14807 EOF
14808
14809
14810                                                 for ac_func in \
14811                                 pthread_setconcurrency \
14812                                 pthread_getconcurrency \
14813                                 thr_setconcurrency \
14814                                 thr_getconcurrency \
14815                         
14816 do
14817 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14818 echo "configure:14819: checking for $ac_func" >&5
14819 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14820   echo $ac_n "(cached) $ac_c" 1>&6
14821 else
14822   cat > conftest.$ac_ext <<EOF
14823 #line 14824 "configure"
14824 #include "confdefs.h"
14825 /* System header to define __stub macros and hopefully few prototypes,
14826     which can conflict with char $ac_func(); below.  */
14827 #include <assert.h>
14828 /* Override any gcc2 internal prototype to avoid an error.  */
14829 /* We use char because int might match the return type of a gcc2
14830     builtin and then its argument prototype would still apply.  */
14831 char $ac_func();
14832 char (*f)();
14833
14834 int main() {
14835
14836 /* The GNU C library defines this for functions which it implements
14837     to always fail with ENOSYS.  Some functions are actually named
14838     something starting with __ and the normal name is an alias.  */
14839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14840 choke me
14841 #else
14842 f = $ac_func;
14843 #endif
14844
14845 ; return 0; }
14846 EOF
14847 if { (eval echo configure:14848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14848   rm -rf conftest*
14849   eval "ac_cv_func_$ac_func=yes"
14850 else
14851   echo "configure: failed program was:" >&5
14852   cat conftest.$ac_ext >&5
14853   rm -rf conftest*
14854   eval "ac_cv_func_$ac_func=no"
14855 fi
14856 rm -f conftest*
14857 fi
14858
14859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14860   echo "$ac_t""yes" 1>&6
14861     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14862   cat >> confdefs.h <<EOF
14863 #define $ac_tr_func 1
14864 EOF
14865  
14866 else
14867   echo "$ac_t""no" 1>&6
14868 fi
14869 done
14870
14871
14872                         
14873         for ac_func in pthread_kill_other_threads_np
14874 do
14875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14876 echo "configure:14877: checking for $ac_func" >&5
14877 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14878   echo $ac_n "(cached) $ac_c" 1>&6
14879 else
14880   cat > conftest.$ac_ext <<EOF
14881 #line 14882 "configure"
14882 #include "confdefs.h"
14883 /* System header to define __stub macros and hopefully few prototypes,
14884     which can conflict with char $ac_func(); below.  */
14885 #include <assert.h>
14886 /* Override any gcc2 internal prototype to avoid an error.  */
14887 /* We use char because int might match the return type of a gcc2
14888     builtin and then its argument prototype would still apply.  */
14889 char $ac_func();
14890 char (*f)();
14891
14892 int main() {
14893
14894 /* The GNU C library defines this for functions which it implements
14895     to always fail with ENOSYS.  Some functions are actually named
14896     something starting with __ and the normal name is an alias.  */
14897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14898 choke me
14899 #else
14900 f = $ac_func;
14901 #endif
14902
14903 ; return 0; }
14904 EOF
14905 if { (eval echo configure:14906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14906   rm -rf conftest*
14907   eval "ac_cv_func_$ac_func=yes"
14908 else
14909   echo "configure: failed program was:" >&5
14910   cat conftest.$ac_ext >&5
14911   rm -rf conftest*
14912   eval "ac_cv_func_$ac_func=no"
14913 fi
14914 rm -f conftest*
14915 fi
14916
14917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14918   echo "$ac_t""yes" 1>&6
14919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14920   cat >> confdefs.h <<EOF
14921 #define $ac_tr_func 1
14922 EOF
14923  
14924 else
14925   echo "$ac_t""no" 1>&6
14926 fi
14927 done
14928
14929         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14930 echo "configure:14931: checking for LinuxThreads implementation" >&5
14931 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14932   echo $ac_n "(cached) $ac_c" 1>&6
14933 else
14934   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14935 fi
14936
14937 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14938
14939                         
14940         
14941         
14942         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14943 echo "configure:14944: checking for LinuxThreads consistency" >&5
14944 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   
14948                 if test $ol_cv_header_linux_threads = yes -a \
14949                         $ol_cv_sys_linux_threads = yes; then
14950                         ol_cv_linux_threads=yes
14951                 elif test $ol_cv_header_linux_threads = no -a \
14952                         $ol_cv_sys_linux_threads = no; then
14953                         ol_cv_linux_threads=no
14954                 else
14955                         ol_cv_linux_threads=error
14956                 fi
14957         
14958 fi
14959
14960 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14961
14962
14963                         if test $ol_cv_linux_threads = error; then
14964                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14965                         fi
14966
14967                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14968 echo "configure:14969: checking if pthread_create() works" >&5
14969 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14970   echo $ac_n "(cached) $ac_c" 1>&6
14971 else
14972   
14973                         if test "$cross_compiling" = yes; then
14974                                 ol_cv_pthread_create_works=yes
14975 else
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 /* pthread test headers */
14980 #include <pthread.h>
14981 #if HAVE_PTHREADS < 7
14982 #include <errno.h>
14983 #endif
14984 #ifndef NULL
14985 #define NULL (void*)0
14986 #endif
14987
14988 static void *task(p)
14989         void *p;
14990 {
14991         return (void *) (p == NULL);
14992 }
14993
14994
14995 int main(argc, argv)
14996         int argc;
14997         char **argv;
14998 {
14999
15000         /* pthread test function */
15001 #ifndef PTHREAD_CREATE_DETACHED
15002 #define PTHREAD_CREATE_DETACHED 1
15003 #endif
15004         pthread_t t;
15005         int status;
15006         int detach = PTHREAD_CREATE_DETACHED;
15007
15008 #if HAVE_PTHREADS > 4
15009         /* Final pthreads */
15010         pthread_attr_t attr;
15011
15012         status = pthread_attr_init(&attr);
15013         if( status ) return status;
15014
15015 #if HAVE_PTHREADS < 7
15016         status = pthread_attr_setdetachstate(&attr, &detach);
15017         if( status < 0 ) status = errno;
15018 #else
15019         status = pthread_attr_setdetachstate(&attr, detach);
15020 #endif
15021         if( status ) return status;
15022         status = pthread_create( &t, &attr, task, NULL );
15023 #if HAVE_PTHREADS < 7
15024         if( status < 0 ) status = errno;
15025 #endif
15026         if( status ) return status;
15027 #else
15028         /* Draft 4 pthreads */
15029         status = pthread_create( &t, pthread_attr_default, task, NULL );
15030         if( status ) return errno;
15031
15032         /* give thread a chance to complete */
15033         /* it should remain joinable and hence detachable */
15034         sleep( 1 );
15035
15036         status = pthread_detach( &t );
15037         if( status ) return errno;
15038 #endif
15039
15040 #ifdef HAVE_LINUX_THREADS
15041         pthread_kill_other_threads_np();
15042 #endif
15043
15044         return 0;
15045
15046 }
15047
15048 EOF
15049 if { (eval echo configure:15050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15050 then
15051   ol_cv_pthread_create_works=yes
15052 else
15053   echo "configure: failed program was:" >&5
15054   cat conftest.$ac_ext >&5
15055   rm -fr conftest*
15056   ol_cv_pthread_create_works=no
15057 fi
15058 rm -fr conftest*
15059 fi
15060
15061 fi
15062
15063 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15064
15065                         if test $ol_cv_pthread_create_works = no ; then
15066                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15067                         fi
15068
15069                                                 if test $ol_with_yielding_select = auto ; then
15070                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15071 echo "configure:15072: checking if select yields when using pthreads" >&5
15072 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15073   echo $ac_n "(cached) $ac_c" 1>&6
15074 else
15075   
15076                                 if test "$cross_compiling" = yes; then
15077   ol_cv_pthread_select_yields=cross
15078 else
15079   cat > conftest.$ac_ext <<EOF
15080 #line 15081 "configure"
15081 #include "confdefs.h"
15082
15083 #include <sys/types.h>
15084 #include <sys/time.h>
15085 #include <unistd.h>
15086 #include <pthread.h>
15087 #ifndef NULL
15088 #define NULL (void*) 0
15089 #endif
15090
15091 static int fildes[2];
15092
15093 static void *task(p)
15094         void *p;
15095 {
15096         int i;
15097         struct timeval tv;
15098
15099         fd_set rfds;
15100
15101         tv.tv_sec=10;
15102         tv.tv_usec=0;
15103
15104         FD_ZERO(&rfds);
15105         FD_SET(fildes[0], &rfds);
15106
15107         /* we're not interested in any fds */
15108         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15109
15110         if(i < 0) {
15111                 perror("select");
15112                 exit(10);
15113         }
15114
15115         exit(0); /* if we exit here, the select blocked the whole process */
15116 }
15117
15118 int main(argc, argv)
15119         int argc;
15120         char **argv;
15121 {
15122         pthread_t t;
15123
15124         /* create a pipe to select */
15125         if(pipe(&fildes[0])) {
15126                 perror("select");
15127                 exit(1);
15128         }
15129
15130 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15131         (void) pthread_setconcurrency(2);
15132 #else
15133 #ifdef HAVE_THR_SETCONCURRENCY
15134         /* Set Solaris LWP concurrency to 2 */
15135         thr_setconcurrency(2);
15136 #endif
15137 #endif
15138
15139 #if HAVE_PTHREADS < 6
15140         pthread_create(&t, pthread_attr_default, task, NULL);
15141 #else
15142         pthread_create(&t, NULL, task, NULL);
15143 #endif
15144
15145         /* make sure task runs first */
15146 #if HAVE_THR_YIELD
15147         thr_yield();
15148 #elif defined( HAVE_SCHED_YIELD )
15149         sched_yield();
15150 #elif defined( HAVE_PTHREAD_YIELD )
15151         pthread_yield();
15152 #endif
15153
15154         exit(2);
15155 }
15156 EOF
15157 if { (eval echo configure:15158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15158 then
15159   ol_cv_pthread_select_yields=no
15160 else
15161   echo "configure: failed program was:" >&5
15162   cat conftest.$ac_ext >&5
15163   rm -fr conftest*
15164   ol_cv_pthread_select_yields=yes
15165 fi
15166 rm -fr conftest*
15167 fi
15168
15169 fi
15170
15171 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15172
15173                                 if test $ol_cv_pthread_select_yields = cross ; then
15174                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15175                                 fi
15176
15177                                 if test $ol_cv_pthread_select_yields = yes ; then
15178                                         ol_with_yielding_select=yes
15179                                 fi
15180                         fi
15181
15182                                                 CPPFLAGS="$save_CPPFLAGS"
15183                         LIBS="$save_LIBS"
15184                 else
15185                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15186                 fi
15187         fi
15188
15189         if test $ol_with_threads = posix ; then
15190                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15191         fi
15192 fi
15193
15194 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15195         -o $ol_with_threads = mach ; then
15196
15197                 for ac_hdr in mach/cthreads.h cthreads.h
15198 do
15199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15201 echo "configure:15202: checking for $ac_hdr" >&5
15202 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15203   echo $ac_n "(cached) $ac_c" 1>&6
15204 else
15205   cat > conftest.$ac_ext <<EOF
15206 #line 15207 "configure"
15207 #include "confdefs.h"
15208 #include <$ac_hdr>
15209 EOF
15210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15211 { (eval echo configure:15212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15213 if test -z "$ac_err"; then
15214   rm -rf conftest*
15215   eval "ac_cv_header_$ac_safe=yes"
15216 else
15217   echo "$ac_err" >&5
15218   echo "configure: failed program was:" >&5
15219   cat conftest.$ac_ext >&5
15220   rm -rf conftest*
15221   eval "ac_cv_header_$ac_safe=no"
15222 fi
15223 rm -f conftest*
15224 fi
15225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15226   echo "$ac_t""yes" 1>&6
15227     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15228   cat >> confdefs.h <<EOF
15229 #define $ac_tr_hdr 1
15230 EOF
15231  
15232 else
15233   echo "$ac_t""no" 1>&6
15234 fi
15235 done
15236
15237         if test $ac_cv_header_mach_cthreads_h = yes ; then
15238                 ol_with_threads=found
15239
15240                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15241 echo "configure:15242: checking for cthread_fork" >&5
15242 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15243   echo $ac_n "(cached) $ac_c" 1>&6
15244 else
15245   cat > conftest.$ac_ext <<EOF
15246 #line 15247 "configure"
15247 #include "confdefs.h"
15248 /* System header to define __stub macros and hopefully few prototypes,
15249     which can conflict with char cthread_fork(); below.  */
15250 #include <assert.h>
15251 /* Override any gcc2 internal prototype to avoid an error.  */
15252 /* We use char because int might match the return type of a gcc2
15253     builtin and then its argument prototype would still apply.  */
15254 char cthread_fork();
15255 char (*f)();
15256
15257 int main() {
15258
15259 /* The GNU C library defines this for functions which it implements
15260     to always fail with ENOSYS.  Some functions are actually named
15261     something starting with __ and the normal name is an alias.  */
15262 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15263 choke me
15264 #else
15265 f = cthread_fork;
15266 #endif
15267
15268 ; return 0; }
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15271   rm -rf conftest*
15272   eval "ac_cv_func_cthread_fork=yes"
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -rf conftest*
15277   eval "ac_cv_func_cthread_fork=no"
15278 fi
15279 rm -f conftest*
15280 fi
15281
15282 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15283   echo "$ac_t""yes" 1>&6
15284   ol_link_threads=yes
15285 else
15286   echo "$ac_t""no" 1>&6
15287 fi
15288
15289
15290                 if test $ol_link_threads = no ; then
15291                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15292 echo "configure:15293: checking for cthread_fork with -all_load" >&5
15293 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15294   echo $ac_n "(cached) $ac_c" 1>&6
15295 else
15296   
15297                                                                 save_LIBS="$LIBS"
15298                                 LIBS="-all_load $LIBS"
15299                                 cat > conftest.$ac_ext <<EOF
15300 #line 15301 "configure"
15301 #include "confdefs.h"
15302 #include <mach/cthreads.h>
15303 int main() {
15304
15305                                         cthread_fork((void *)0, (void *)0);
15306                                         
15307 ; return 0; }
15308 EOF
15309 if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15310   rm -rf conftest*
15311   ol_cv_cthread_all_load=yes
15312 else
15313   echo "configure: failed program was:" >&5
15314   cat conftest.$ac_ext >&5
15315   rm -rf conftest*
15316   ol_cv_cthread_all_load=no
15317 fi
15318 rm -f conftest*
15319                                                                 LIBS="$save_LIBS"
15320                         
15321 fi
15322
15323 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15324
15325                         if test $ol_cv_cthread_all_load = yes ; then
15326                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15327                                 ol_link_threads=mach
15328                                 ol_with_threads=found
15329                         fi
15330                 fi
15331
15332         elif test $ac_cv_header_cthreads_h = yes ; then
15333                                 
15334                 ol_with_threads=found
15335  
15336                                 save_LIBS="$LIBS"
15337                 LIBS="$LIBS -lthreads"
15338                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15339 echo "configure:15340: checking for cthread_fork" >&5
15340 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15341   echo $ac_n "(cached) $ac_c" 1>&6
15342 else
15343   cat > conftest.$ac_ext <<EOF
15344 #line 15345 "configure"
15345 #include "confdefs.h"
15346 /* System header to define __stub macros and hopefully few prototypes,
15347     which can conflict with char cthread_fork(); below.  */
15348 #include <assert.h>
15349 /* Override any gcc2 internal prototype to avoid an error.  */
15350 /* We use char because int might match the return type of a gcc2
15351     builtin and then its argument prototype would still apply.  */
15352 char cthread_fork();
15353 char (*f)();
15354
15355 int main() {
15356
15357 /* The GNU C library defines this for functions which it implements
15358     to always fail with ENOSYS.  Some functions are actually named
15359     something starting with __ and the normal name is an alias.  */
15360 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15361 choke me
15362 #else
15363 f = cthread_fork;
15364 #endif
15365
15366 ; return 0; }
15367 EOF
15368 if { (eval echo configure:15369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15369   rm -rf conftest*
15370   eval "ac_cv_func_cthread_fork=yes"
15371 else
15372   echo "configure: failed program was:" >&5
15373   cat conftest.$ac_ext >&5
15374   rm -rf conftest*
15375   eval "ac_cv_func_cthread_fork=no"
15376 fi
15377 rm -f conftest*
15378 fi
15379
15380 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15381   echo "$ac_t""yes" 1>&6
15382   ol_link_threads=yes
15383 else
15384   echo "$ac_t""no" 1>&6
15385 fi
15386
15387                 LIBS="$save_LIBS"
15388
15389                 if test $ol_link_threads = yes ; then
15390                         LTHREAD_LIBS="-lthreads"
15391                         ol_link_threads=mach
15392                         ol_with_threads=found
15393                 else
15394                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15395                 fi
15396
15397         elif test $ol_with_threads = mach ; then
15398                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15399         fi
15400
15401         if test $ol_link_threads = mach ; then
15402                 cat >> confdefs.h <<\EOF
15403 #define HAVE_MACH_CTHREADS 1
15404 EOF
15405
15406         elif test $ol_with_threads = found ; then
15407                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15408         fi
15409 fi
15410
15411 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15412         -o $ol_with_threads = pth ; then
15413
15414         for ac_hdr in pth.h
15415 do
15416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15418 echo "configure:15419: checking for $ac_hdr" >&5
15419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   cat > conftest.$ac_ext <<EOF
15423 #line 15424 "configure"
15424 #include "confdefs.h"
15425 #include <$ac_hdr>
15426 EOF
15427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15428 { (eval echo configure:15429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15430 if test -z "$ac_err"; then
15431   rm -rf conftest*
15432   eval "ac_cv_header_$ac_safe=yes"
15433 else
15434   echo "$ac_err" >&5
15435   echo "configure: failed program was:" >&5
15436   cat conftest.$ac_ext >&5
15437   rm -rf conftest*
15438   eval "ac_cv_header_$ac_safe=no"
15439 fi
15440 rm -f conftest*
15441 fi
15442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15443   echo "$ac_t""yes" 1>&6
15444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15445   cat >> confdefs.h <<EOF
15446 #define $ac_tr_hdr 1
15447 EOF
15448  
15449 else
15450   echo "$ac_t""no" 1>&6
15451 fi
15452 done
15453
15454
15455         if test $ac_cv_header_pth_h = yes ; then
15456                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15457 echo "configure:15458: checking for pth_version in -lpth" >&5
15458 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15460   echo $ac_n "(cached) $ac_c" 1>&6
15461 else
15462   ac_save_LIBS="$LIBS"
15463 LIBS="-lpth  $LIBS"
15464 cat > conftest.$ac_ext <<EOF
15465 #line 15466 "configure"
15466 #include "confdefs.h"
15467 /* Override any gcc2 internal prototype to avoid an error.  */
15468 /* We use char because int might match the return type of a gcc2
15469     builtin and then its argument prototype would still apply.  */
15470 char pth_version();
15471
15472 int main() {
15473 pth_version()
15474 ; return 0; }
15475 EOF
15476 if { (eval echo configure:15477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15477   rm -rf conftest*
15478   eval "ac_cv_lib_$ac_lib_var=yes"
15479 else
15480   echo "configure: failed program was:" >&5
15481   cat conftest.$ac_ext >&5
15482   rm -rf conftest*
15483   eval "ac_cv_lib_$ac_lib_var=no"
15484 fi
15485 rm -f conftest*
15486 LIBS="$ac_save_LIBS"
15487
15488 fi
15489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15490   echo "$ac_t""yes" 1>&6
15491   have_pth=yes
15492 else
15493   echo "$ac_t""no" 1>&6
15494 have_pth=no
15495 fi
15496
15497
15498                 if test $have_pth = yes ; then
15499                         cat >> confdefs.h <<\EOF
15500 #define HAVE_GNU_PTH 1
15501 EOF
15502
15503                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15504                         ol_link_threads=pth
15505                         ol_with_threads=found
15506
15507                         if test $ol_with_yielding_select = auto ; then
15508                                 ol_with_yielding_select=yes
15509                         fi
15510                 fi
15511         fi
15512 fi
15513
15514 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15515         -o $ol_with_threads = lwp ; then
15516
15517                 for ac_hdr in thread.h synch.h
15518 do
15519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15521 echo "configure:15522: checking for $ac_hdr" >&5
15522 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15523   echo $ac_n "(cached) $ac_c" 1>&6
15524 else
15525   cat > conftest.$ac_ext <<EOF
15526 #line 15527 "configure"
15527 #include "confdefs.h"
15528 #include <$ac_hdr>
15529 EOF
15530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15531 { (eval echo configure:15532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15533 if test -z "$ac_err"; then
15534   rm -rf conftest*
15535   eval "ac_cv_header_$ac_safe=yes"
15536 else
15537   echo "$ac_err" >&5
15538   echo "configure: failed program was:" >&5
15539   cat conftest.$ac_ext >&5
15540   rm -rf conftest*
15541   eval "ac_cv_header_$ac_safe=no"
15542 fi
15543 rm -f conftest*
15544 fi
15545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15546   echo "$ac_t""yes" 1>&6
15547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15548   cat >> confdefs.h <<EOF
15549 #define $ac_tr_hdr 1
15550 EOF
15551  
15552 else
15553   echo "$ac_t""no" 1>&6
15554 fi
15555 done
15556
15557         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15558                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15559 echo "configure:15560: checking for thr_create in -lthread" >&5
15560 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   ac_save_LIBS="$LIBS"
15565 LIBS="-lthread  $LIBS"
15566 cat > conftest.$ac_ext <<EOF
15567 #line 15568 "configure"
15568 #include "confdefs.h"
15569 /* Override any gcc2 internal prototype to avoid an error.  */
15570 /* We use char because int might match the return type of a gcc2
15571     builtin and then its argument prototype would still apply.  */
15572 char thr_create();
15573
15574 int main() {
15575 thr_create()
15576 ; return 0; }
15577 EOF
15578 if { (eval echo configure:15579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15579   rm -rf conftest*
15580   eval "ac_cv_lib_$ac_lib_var=yes"
15581 else
15582   echo "configure: failed program was:" >&5
15583   cat conftest.$ac_ext >&5
15584   rm -rf conftest*
15585   eval "ac_cv_lib_$ac_lib_var=no"
15586 fi
15587 rm -f conftest*
15588 LIBS="$ac_save_LIBS"
15589
15590 fi
15591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15592   echo "$ac_t""yes" 1>&6
15593   have_thr=yes
15594 else
15595   echo "$ac_t""no" 1>&6
15596 have_thr=no
15597 fi
15598
15599
15600                 if test $have_thr = yes ; then
15601                         cat >> confdefs.h <<\EOF
15602 #define HAVE_THR 1
15603 EOF
15604
15605                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15606                         ol_link_threads=thr
15607
15608                         if test $ol_with_yielding_select = auto ; then
15609                                 ol_with_yielding_select=yes
15610                         fi
15611
15612                                                 for ac_func in \
15613                                 thr_setconcurrency \
15614                                 thr_getconcurrency \
15615                         
15616 do
15617 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15618 echo "configure:15619: checking for $ac_func" >&5
15619 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15620   echo $ac_n "(cached) $ac_c" 1>&6
15621 else
15622   cat > conftest.$ac_ext <<EOF
15623 #line 15624 "configure"
15624 #include "confdefs.h"
15625 /* System header to define __stub macros and hopefully few prototypes,
15626     which can conflict with char $ac_func(); below.  */
15627 #include <assert.h>
15628 /* Override any gcc2 internal prototype to avoid an error.  */
15629 /* We use char because int might match the return type of a gcc2
15630     builtin and then its argument prototype would still apply.  */
15631 char $ac_func();
15632 char (*f)();
15633
15634 int main() {
15635
15636 /* The GNU C library defines this for functions which it implements
15637     to always fail with ENOSYS.  Some functions are actually named
15638     something starting with __ and the normal name is an alias.  */
15639 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15640 choke me
15641 #else
15642 f = $ac_func;
15643 #endif
15644
15645 ; return 0; }
15646 EOF
15647 if { (eval echo configure:15648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15648   rm -rf conftest*
15649   eval "ac_cv_func_$ac_func=yes"
15650 else
15651   echo "configure: failed program was:" >&5
15652   cat conftest.$ac_ext >&5
15653   rm -rf conftest*
15654   eval "ac_cv_func_$ac_func=no"
15655 fi
15656 rm -f conftest*
15657 fi
15658
15659 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15660   echo "$ac_t""yes" 1>&6
15661     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15662   cat >> confdefs.h <<EOF
15663 #define $ac_tr_func 1
15664 EOF
15665  
15666 else
15667   echo "$ac_t""no" 1>&6
15668 fi
15669 done
15670
15671                 fi
15672         fi
15673
15674                 for ac_hdr in lwp/lwp.h
15675 do
15676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15678 echo "configure:15679: checking for $ac_hdr" >&5
15679 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15680   echo $ac_n "(cached) $ac_c" 1>&6
15681 else
15682   cat > conftest.$ac_ext <<EOF
15683 #line 15684 "configure"
15684 #include "confdefs.h"
15685 #include <$ac_hdr>
15686 EOF
15687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15688 { (eval echo configure:15689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15690 if test -z "$ac_err"; then
15691   rm -rf conftest*
15692   eval "ac_cv_header_$ac_safe=yes"
15693 else
15694   echo "$ac_err" >&5
15695   echo "configure: failed program was:" >&5
15696   cat conftest.$ac_ext >&5
15697   rm -rf conftest*
15698   eval "ac_cv_header_$ac_safe=no"
15699 fi
15700 rm -f conftest*
15701 fi
15702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15703   echo "$ac_t""yes" 1>&6
15704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15705   cat >> confdefs.h <<EOF
15706 #define $ac_tr_hdr 1
15707 EOF
15708  
15709 else
15710   echo "$ac_t""no" 1>&6
15711 fi
15712 done
15713
15714         if test $ac_cv_header_lwp_lwp_h = yes ; then
15715                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15716 echo "configure:15717: checking for lwp_create in -llwp" >&5
15717 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15719   echo $ac_n "(cached) $ac_c" 1>&6
15720 else
15721   ac_save_LIBS="$LIBS"
15722 LIBS="-llwp  $LIBS"
15723 cat > conftest.$ac_ext <<EOF
15724 #line 15725 "configure"
15725 #include "confdefs.h"
15726 /* Override any gcc2 internal prototype to avoid an error.  */
15727 /* We use char because int might match the return type of a gcc2
15728     builtin and then its argument prototype would still apply.  */
15729 char lwp_create();
15730
15731 int main() {
15732 lwp_create()
15733 ; return 0; }
15734 EOF
15735 if { (eval echo configure:15736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15736   rm -rf conftest*
15737   eval "ac_cv_lib_$ac_lib_var=yes"
15738 else
15739   echo "configure: failed program was:" >&5
15740   cat conftest.$ac_ext >&5
15741   rm -rf conftest*
15742   eval "ac_cv_lib_$ac_lib_var=no"
15743 fi
15744 rm -f conftest*
15745 LIBS="$ac_save_LIBS"
15746
15747 fi
15748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15749   echo "$ac_t""yes" 1>&6
15750   have_lwp=yes
15751 else
15752   echo "$ac_t""no" 1>&6
15753 have_lwp=no
15754 fi
15755
15756
15757                 if test $have_lwp = yes ; then
15758                         cat >> confdefs.h <<\EOF
15759 #define HAVE_LWP 1
15760 EOF
15761
15762                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15763                         ol_link_threads=lwp
15764
15765                         if test $ol_with_yielding_select = auto ; then
15766                                 ol_with_yielding_select=no
15767                         fi
15768                 fi
15769         fi
15770 fi
15771
15772 if test $ol_with_yielding_select = yes ; then
15773         cat >> confdefs.h <<\EOF
15774 #define HAVE_YIELDING_SELECT 1
15775 EOF
15776
15777 fi
15778
15779 if test $ol_with_threads = manual ; then
15780                 ol_link_threads=yes
15781
15782         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15783
15784         for ac_hdr in pthread.h sched.h
15785 do
15786 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15787 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15788 echo "configure:15789: checking for $ac_hdr" >&5
15789 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15790   echo $ac_n "(cached) $ac_c" 1>&6
15791 else
15792   cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 #include <$ac_hdr>
15796 EOF
15797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15798 { (eval echo configure:15799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15800 if test -z "$ac_err"; then
15801   rm -rf conftest*
15802   eval "ac_cv_header_$ac_safe=yes"
15803 else
15804   echo "$ac_err" >&5
15805   echo "configure: failed program was:" >&5
15806   cat conftest.$ac_ext >&5
15807   rm -rf conftest*
15808   eval "ac_cv_header_$ac_safe=no"
15809 fi
15810 rm -f conftest*
15811 fi
15812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15813   echo "$ac_t""yes" 1>&6
15814     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15815   cat >> confdefs.h <<EOF
15816 #define $ac_tr_hdr 1
15817 EOF
15818  
15819 else
15820   echo "$ac_t""no" 1>&6
15821 fi
15822 done
15823
15824         for ac_func in sched_yield pthread_yield
15825 do
15826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15827 echo "configure:15828: checking for $ac_func" >&5
15828 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15829   echo $ac_n "(cached) $ac_c" 1>&6
15830 else
15831   cat > conftest.$ac_ext <<EOF
15832 #line 15833 "configure"
15833 #include "confdefs.h"
15834 /* System header to define __stub macros and hopefully few prototypes,
15835     which can conflict with char $ac_func(); below.  */
15836 #include <assert.h>
15837 /* Override any gcc2 internal prototype to avoid an error.  */
15838 /* We use char because int might match the return type of a gcc2
15839     builtin and then its argument prototype would still apply.  */
15840 char $ac_func();
15841 char (*f)();
15842
15843 int main() {
15844
15845 /* The GNU C library defines this for functions which it implements
15846     to always fail with ENOSYS.  Some functions are actually named
15847     something starting with __ and the normal name is an alias.  */
15848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15849 choke me
15850 #else
15851 f = $ac_func;
15852 #endif
15853
15854 ; return 0; }
15855 EOF
15856 if { (eval echo configure:15857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15857   rm -rf conftest*
15858   eval "ac_cv_func_$ac_func=yes"
15859 else
15860   echo "configure: failed program was:" >&5
15861   cat conftest.$ac_ext >&5
15862   rm -rf conftest*
15863   eval "ac_cv_func_$ac_func=no"
15864 fi
15865 rm -f conftest*
15866 fi
15867
15868 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15869   echo "$ac_t""yes" 1>&6
15870     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15871   cat >> confdefs.h <<EOF
15872 #define $ac_tr_func 1
15873 EOF
15874  
15875 else
15876   echo "$ac_t""no" 1>&6
15877 fi
15878 done
15879
15880         
15881         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15882 echo "configure:15883: checking for LinuxThreads pthread.h" >&5
15883 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15884   echo $ac_n "(cached) $ac_c" 1>&6
15885 else
15886   cat > conftest.$ac_ext <<EOF
15887 #line 15888 "configure"
15888 #include "confdefs.h"
15889 #include <pthread.h>
15890 EOF
15891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15892   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15893   rm -rf conftest*
15894   ol_cv_header_linux_threads=yes
15895 else
15896   rm -rf conftest*
15897   ol_cv_header_linux_threads=no
15898 fi
15899 rm -f conftest*
15900
15901                 
15902 fi
15903
15904 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15905         if test $ol_cv_header_linux_threads = yes; then
15906                 cat >> confdefs.h <<\EOF
15907 #define HAVE_LINUX_THREADS 1
15908 EOF
15909
15910         fi
15911
15912
15913         for ac_hdr in mach/cthreads.h
15914 do
15915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15917 echo "configure:15918: checking for $ac_hdr" >&5
15918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15919   echo $ac_n "(cached) $ac_c" 1>&6
15920 else
15921   cat > conftest.$ac_ext <<EOF
15922 #line 15923 "configure"
15923 #include "confdefs.h"
15924 #include <$ac_hdr>
15925 EOF
15926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15927 { (eval echo configure:15928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15929 if test -z "$ac_err"; then
15930   rm -rf conftest*
15931   eval "ac_cv_header_$ac_safe=yes"
15932 else
15933   echo "$ac_err" >&5
15934   echo "configure: failed program was:" >&5
15935   cat conftest.$ac_ext >&5
15936   rm -rf conftest*
15937   eval "ac_cv_header_$ac_safe=no"
15938 fi
15939 rm -f conftest*
15940 fi
15941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15942   echo "$ac_t""yes" 1>&6
15943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15944   cat >> confdefs.h <<EOF
15945 #define $ac_tr_hdr 1
15946 EOF
15947  
15948 else
15949   echo "$ac_t""no" 1>&6
15950 fi
15951 done
15952
15953         for ac_hdr in lwp/lwp.h
15954 do
15955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15957 echo "configure:15958: checking for $ac_hdr" >&5
15958 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   cat > conftest.$ac_ext <<EOF
15962 #line 15963 "configure"
15963 #include "confdefs.h"
15964 #include <$ac_hdr>
15965 EOF
15966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15967 { (eval echo configure:15968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15969 if test -z "$ac_err"; then
15970   rm -rf conftest*
15971   eval "ac_cv_header_$ac_safe=yes"
15972 else
15973   echo "$ac_err" >&5
15974   echo "configure: failed program was:" >&5
15975   cat conftest.$ac_ext >&5
15976   rm -rf conftest*
15977   eval "ac_cv_header_$ac_safe=no"
15978 fi
15979 rm -f conftest*
15980 fi
15981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15982   echo "$ac_t""yes" 1>&6
15983     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15984   cat >> confdefs.h <<EOF
15985 #define $ac_tr_hdr 1
15986 EOF
15987  
15988 else
15989   echo "$ac_t""no" 1>&6
15990 fi
15991 done
15992
15993         for ac_hdr in thread.h synch.h
15994 do
15995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15997 echo "configure:15998: checking for $ac_hdr" >&5
15998 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15999   echo $ac_n "(cached) $ac_c" 1>&6
16000 else
16001   cat > conftest.$ac_ext <<EOF
16002 #line 16003 "configure"
16003 #include "confdefs.h"
16004 #include <$ac_hdr>
16005 EOF
16006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16007 { (eval echo configure:16008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16009 if test -z "$ac_err"; then
16010   rm -rf conftest*
16011   eval "ac_cv_header_$ac_safe=yes"
16012 else
16013   echo "$ac_err" >&5
16014   echo "configure: failed program was:" >&5
16015   cat conftest.$ac_ext >&5
16016   rm -rf conftest*
16017   eval "ac_cv_header_$ac_safe=no"
16018 fi
16019 rm -f conftest*
16020 fi
16021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16022   echo "$ac_t""yes" 1>&6
16023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16024   cat >> confdefs.h <<EOF
16025 #define $ac_tr_hdr 1
16026 EOF
16027  
16028 else
16029   echo "$ac_t""no" 1>&6
16030 fi
16031 done
16032
16033 fi
16034
16035 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16036                         cat >> confdefs.h <<\EOF
16037 #define REENTRANT 1
16038 EOF
16039
16040         cat >> confdefs.h <<\EOF
16041 #define _REENTRANT 1
16042 EOF
16043
16044         cat >> confdefs.h <<\EOF
16045 #define THREAD_SAFE 1
16046 EOF
16047
16048         cat >> confdefs.h <<\EOF
16049 #define _THREAD_SAFE 1
16050 EOF
16051
16052         cat >> confdefs.h <<\EOF
16053 #define THREADSAFE 1
16054 EOF
16055
16056         cat >> confdefs.h <<\EOF
16057 #define _THREADSAFE 1
16058 EOF
16059
16060         cat >> confdefs.h <<\EOF
16061 #define _SGI_MP_SOURCE 1
16062 EOF
16063
16064
16065                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16066 echo "configure:16067: checking for thread specific errno" >&5
16067 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16068   echo $ac_n "(cached) $ac_c" 1>&6
16069 else
16070   
16071                 cat > conftest.$ac_ext <<EOF
16072 #line 16073 "configure"
16073 #include "confdefs.h"
16074 #include <errno.h>
16075 int main() {
16076 errno = 0;
16077 ; return 0; }
16078 EOF
16079 if { (eval echo configure:16080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16080   rm -rf conftest*
16081   ol_cv_errno_thread_specific=yes
16082 else
16083   echo "configure: failed program was:" >&5
16084   cat conftest.$ac_ext >&5
16085   rm -rf conftest*
16086   ol_cv_errno_thread_specific=no
16087 fi
16088 rm -f conftest*
16089         
16090 fi
16091
16092 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16093
16094                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16095 echo "configure:16096: checking for thread specific h_errno" >&5
16096 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16097   echo $ac_n "(cached) $ac_c" 1>&6
16098 else
16099   
16100                 cat > conftest.$ac_ext <<EOF
16101 #line 16102 "configure"
16102 #include "confdefs.h"
16103 #include <netdb.h>
16104 int main() {
16105 h_errno = 0;
16106 ; return 0; }
16107 EOF
16108 if { (eval echo configure:16109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16109   rm -rf conftest*
16110   ol_cv_h_errno_thread_specific=yes
16111 else
16112   echo "configure: failed program was:" >&5
16113   cat conftest.$ac_ext >&5
16114   rm -rf conftest*
16115   ol_cv_h_errno_thread_specific=no
16116 fi
16117 rm -f conftest*
16118         
16119 fi
16120
16121 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16122
16123         if test $ol_cv_errno_thread_specific != yes \
16124                 -o $ol_cv_h_errno_thread_specific != yes ; then
16125                 LIBS="$LTHREAD_LIBS $LIBS"
16126                 LTHREAD_LIBS=""
16127         fi
16128
16129 fi  
16130
16131 if test $ol_link_threads = no ; then
16132         if test $ol_with_threads = yes ; then
16133                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16134         fi
16135
16136         if test $ol_with_threads = auto ; then
16137                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16138                 ol_with_threads=no
16139         fi
16140
16141         cat >> confdefs.h <<\EOF
16142 #define NO_THREADS 1
16143 EOF
16144
16145         LTHREAD_LIBS=""
16146 fi
16147
16148 if test $ol_link_threads != no ; then
16149         cat >> confdefs.h <<\EOF
16150 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16151 EOF
16152
16153 fi
16154
16155 for ac_func in \
16156         ctime_r                 \
16157         gethostbyname_r gethostbyaddr_r \
16158
16159 do
16160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16161 echo "configure:16162: checking for $ac_func" >&5
16162 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16163   echo $ac_n "(cached) $ac_c" 1>&6
16164 else
16165   cat > conftest.$ac_ext <<EOF
16166 #line 16167 "configure"
16167 #include "confdefs.h"
16168 /* System header to define __stub macros and hopefully few prototypes,
16169     which can conflict with char $ac_func(); below.  */
16170 #include <assert.h>
16171 /* Override any gcc2 internal prototype to avoid an error.  */
16172 /* We use char because int might match the return type of a gcc2
16173     builtin and then its argument prototype would still apply.  */
16174 char $ac_func();
16175 char (*f)();
16176
16177 int main() {
16178
16179 /* The GNU C library defines this for functions which it implements
16180     to always fail with ENOSYS.  Some functions are actually named
16181     something starting with __ and the normal name is an alias.  */
16182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16183 choke me
16184 #else
16185 f = $ac_func;
16186 #endif
16187
16188 ; return 0; }
16189 EOF
16190 if { (eval echo configure:16191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16191   rm -rf conftest*
16192   eval "ac_cv_func_$ac_func=yes"
16193 else
16194   echo "configure: failed program was:" >&5
16195   cat conftest.$ac_ext >&5
16196   rm -rf conftest*
16197   eval "ac_cv_func_$ac_func=no"
16198 fi
16199 rm -f conftest*
16200 fi
16201
16202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16203   echo "$ac_t""yes" 1>&6
16204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16205   cat >> confdefs.h <<EOF
16206 #define $ac_tr_func 1
16207 EOF
16208  
16209 else
16210   echo "$ac_t""no" 1>&6
16211 fi
16212 done
16213
16214
16215 if test "$ac_cv_func_ctime_r" = no ; then
16216         ol_cv_func_ctime_r_nargs=0
16217 else
16218         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16219 echo "configure:16220: checking number of arguments of ctime_r" >&5
16220 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16221   echo $ac_n "(cached) $ac_c" 1>&6
16222 else
16223   cat > conftest.$ac_ext <<EOF
16224 #line 16225 "configure"
16225 #include "confdefs.h"
16226 #include <time.h>
16227 int main() {
16228 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16229 ; return 0; }
16230 EOF
16231 if { (eval echo configure:16232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16232   rm -rf conftest*
16233   ol_cv_func_ctime_r_nargs3=yes
16234 else
16235   echo "configure: failed program was:" >&5
16236   cat conftest.$ac_ext >&5
16237   rm -rf conftest*
16238   ol_cv_func_ctime_r_nargs3=no
16239 fi
16240 rm -f conftest*
16241
16242         cat > conftest.$ac_ext <<EOF
16243 #line 16244 "configure"
16244 #include "confdefs.h"
16245 #include <time.h>
16246 int main() {
16247 time_t ti; char *buffer; ctime_r(&ti,buffer);
16248 ; return 0; }
16249 EOF
16250 if { (eval echo configure:16251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16251   rm -rf conftest*
16252   ol_cv_func_ctime_r_nargs2=yes
16253 else
16254   echo "configure: failed program was:" >&5
16255   cat conftest.$ac_ext >&5
16256   rm -rf conftest*
16257   ol_cv_func_ctime_r_nargs2=no
16258 fi
16259 rm -f conftest*
16260
16261         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16262                 $ol_cv_func_ctime_r_nargs2 = no ; then
16263
16264                 ol_cv_func_ctime_r_nargs=3
16265
16266         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16267                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16268
16269                 ol_cv_func_ctime_r_nargs=2
16270
16271         else
16272                 ol_cv_func_ctime_r_nargs=0
16273         fi
16274   
16275 fi
16276
16277 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16278
16279   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16280         cat >> confdefs.h <<EOF
16281 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16282 EOF
16283
16284   fi
16285
16286 fi
16287
16288 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16289         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16290 echo "configure:16291: checking number of arguments of gethostbyname_r" >&5
16291 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16292   echo $ac_n "(cached) $ac_c" 1>&6
16293 else
16294   cat > conftest.$ac_ext <<EOF
16295 #line 16296 "configure"
16296 #include "confdefs.h"
16297 #include <sys/types.h>
16298 #include <sys/socket.h>
16299 #include <netinet/in.h>
16300 #include <netdb.h>
16301 #define BUFSIZE (sizeof(struct hostent)+10)
16302 int main() {
16303 struct hostent hent; char buffer[BUFSIZE];
16304                 int bufsize=BUFSIZE;int h_errno;
16305                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16306                         buffer, bufsize, &h_errno);
16307 ; return 0; }
16308 EOF
16309 if { (eval echo configure:16310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16310   rm -rf conftest*
16311   ol_cv_func_gethostbyname_r_nargs5=yes
16312 else
16313   echo "configure: failed program was:" >&5
16314   cat conftest.$ac_ext >&5
16315   rm -rf conftest*
16316   ol_cv_func_gethostbyname_r_nargs5=no
16317 fi
16318 rm -f conftest*
16319
16320         cat > conftest.$ac_ext <<EOF
16321 #line 16322 "configure"
16322 #include "confdefs.h"
16323 #include <sys/types.h>
16324 #include <sys/socket.h>
16325 #include <netinet/in.h>
16326 #include <netdb.h>
16327 #define BUFSIZE (sizeof(struct hostent)+10)
16328 int main() {
16329 struct hostent hent;struct hostent *rhent;
16330                 char buffer[BUFSIZE];
16331                 int bufsize=BUFSIZE;int h_errno;
16332                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16333                         &rhent, &h_errno);
16334 ; return 0; }
16335 EOF
16336 if { (eval echo configure:16337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16337   rm -rf conftest*
16338   ol_cv_func_gethostbyname_r_nargs6=yes
16339 else
16340   echo "configure: failed program was:" >&5
16341   cat conftest.$ac_ext >&5
16342   rm -rf conftest*
16343   ol_cv_func_gethostbyname_r_nargs6=no
16344 fi
16345 rm -f conftest*
16346
16347         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16348                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16349
16350                 ol_cv_func_gethostbyname_r_nargs=5
16351
16352         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16353                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16354
16355                 ol_cv_func_gethostbyname_r_nargs=6
16356
16357         else
16358                 ol_cv_func_gethostbyname_r_nargs=0
16359         fi
16360   
16361 fi
16362
16363 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16364   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16365         cat >> confdefs.h <<EOF
16366 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16367 EOF
16368
16369   fi
16370
16371 else
16372         ol_cv_func_gethostbyname_r_nargs=0
16373 fi
16374  
16375 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16376         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16377 echo "configure:16378: checking number of arguments of gethostbyaddr_r" >&5
16378 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16379   echo $ac_n "(cached) $ac_c" 1>&6
16380 else
16381   cat > conftest.$ac_ext <<EOF
16382 #line 16383 "configure"
16383 #include "confdefs.h"
16384 #include <sys/types.h>
16385 #include <sys/socket.h>
16386 #include <netinet/in.h>
16387 #include <netdb.h>
16388 #define BUFSIZE (sizeof(struct hostent)+10)
16389 int main() {
16390 struct hostent hent; char buffer[BUFSIZE]; 
16391             struct in_addr add;
16392             size_t alen=sizeof(struct in_addr);
16393             int bufsize=BUFSIZE;int h_errno;
16394                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16395                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16396 ; return 0; }
16397 EOF
16398 if { (eval echo configure:16399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16399   rm -rf conftest*
16400   ol_cv_func_gethostbyaddr_r_nargs7=yes
16401 else
16402   echo "configure: failed program was:" >&5
16403   cat conftest.$ac_ext >&5
16404   rm -rf conftest*
16405   ol_cv_func_gethostbyaddr_r_nargs7=no
16406 fi
16407 rm -f conftest*
16408
16409         cat > conftest.$ac_ext <<EOF
16410 #line 16411 "configure"
16411 #include "confdefs.h"
16412 #include <sys/types.h>
16413 #include <sys/socket.h>
16414 #include <netinet/in.h>
16415 #include <netdb.h>
16416 #define BUFSIZE (sizeof(struct hostent)+10)
16417 int main() {
16418 struct hostent hent;
16419                 struct hostent *rhent; char buffer[BUFSIZE]; 
16420                 struct in_addr add;
16421                 size_t alen=sizeof(struct in_addr);
16422                 int bufsize=BUFSIZE;int h_errno;
16423                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16424                         alen, AF_INET, &hent, buffer, bufsize, 
16425                         &rhent, &h_errno);
16426 ; return 0; }
16427 EOF
16428 if { (eval echo configure:16429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16429   rm -rf conftest*
16430   ol_cv_func_gethostbyaddr_r_nargs8=yes
16431 else
16432   echo "configure: failed program was:" >&5
16433   cat conftest.$ac_ext >&5
16434   rm -rf conftest*
16435   ol_cv_func_gethostbyaddr_r_nargs8=no
16436 fi
16437 rm -f conftest*
16438
16439         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16440                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16441
16442                 ol_cv_func_gethostbyaddr_r_nargs=7
16443
16444         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16445                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16446
16447                 ol_cv_func_gethostbyaddr_r_nargs=8
16448
16449         else
16450                 ol_cv_func_gethostbyaddr_r_nargs=0
16451         fi
16452   
16453 fi
16454
16455 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16456   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16457     cat >> confdefs.h <<EOF
16458 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16459 EOF
16460
16461   fi
16462
16463 else
16464         ol_cv_func_gethostbyaddr_r_nargs=0
16465 fi
16466
16467 ol_link_ldbm=no 
16468
16469 if test $ol_with_ldbm_api = auto \
16470         -o $ol_with_ldbm_api = berkeley \
16471         -o $ol_with_ldbm_api = bcompat ; then
16472
16473         if test $ol_with_ldbm_api = bcompat; then \
16474                 for ac_hdr in db_185.h db.h
16475 do
16476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16478 echo "configure:16479: checking for $ac_hdr" >&5
16479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16480   echo $ac_n "(cached) $ac_c" 1>&6
16481 else
16482   cat > conftest.$ac_ext <<EOF
16483 #line 16484 "configure"
16484 #include "confdefs.h"
16485 #include <$ac_hdr>
16486 EOF
16487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16488 { (eval echo configure:16489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16490 if test -z "$ac_err"; then
16491   rm -rf conftest*
16492   eval "ac_cv_header_$ac_safe=yes"
16493 else
16494   echo "$ac_err" >&5
16495   echo "configure: failed program was:" >&5
16496   cat conftest.$ac_ext >&5
16497   rm -rf conftest*
16498   eval "ac_cv_header_$ac_safe=no"
16499 fi
16500 rm -f conftest*
16501 fi
16502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16503   echo "$ac_t""yes" 1>&6
16504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16505   cat >> confdefs.h <<EOF
16506 #define $ac_tr_hdr 1
16507 EOF
16508  
16509 else
16510   echo "$ac_t""no" 1>&6
16511 fi
16512 done
16513
16514 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16515         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16516 echo "configure:16517: checking if Berkeley DB header compatibility" >&5
16517 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16518   echo $ac_n "(cached) $ac_c" 1>&6
16519 else
16520   
16521                 cat > conftest.$ac_ext <<EOF
16522 #line 16523 "configure"
16523 #include "confdefs.h"
16524
16525 #if HAVE_DB_185_H
16526 #       include <db_185.h>
16527 #else
16528 #       include <db.h>
16529 #endif
16530
16531  /* this check could be improved */
16532 #ifndef DB_VERSION_MAJOR
16533 #       define DB_VERSION_MAJOR 1
16534 #endif
16535
16536 #if DB_VERSION_MAJOR == 1 
16537         __db_version_1
16538 #endif
16539
16540 EOF
16541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16542   egrep "__db_version_1" >/dev/null 2>&1; then
16543   rm -rf conftest*
16544   ol_cv_header_db1=yes
16545 else
16546   rm -rf conftest*
16547   ol_cv_header_db1=no
16548 fi
16549 rm -f conftest*
16550
16551 fi
16552
16553 echo "$ac_t""$ol_cv_header_db1" 1>&6
16554
16555         if test $ol_cv_header_db1 = yes ; then
16556                 ol_cv_lib_db=no
16557 if test $ol_cv_lib_db = no ; then
16558         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16559 echo "configure:16560: checking for Berkeley DB link (default)" >&5
16560 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16561   echo $ac_n "(cached) $ac_c" 1>&6
16562 else
16563   
16564         ol_DB_LIB=
16565         ol_LIBS=$LIBS
16566         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16567
16568         cat > conftest.$ac_ext <<EOF
16569 #line 16570 "configure"
16570 #include "confdefs.h"
16571
16572 #ifdef HAVE_DB_185_H
16573 # include <db_185.h>
16574 #else
16575 # include <db.h>
16576 #endif
16577
16578 #ifndef DB_VERSION_MAJOR
16579 # define DB_VERSION_MAJOR 1
16580 #endif
16581
16582 #ifndef NULL
16583 #define NULL ((void*)0)
16584 #endif
16585
16586 int main() {
16587
16588 #if DB_VERSION_MAJOR > 1
16589         {
16590                 char *version;
16591                 int major, minor, patch;
16592
16593                 version = db_version( &major, &minor, &patch );
16594
16595                 if( major != DB_VERSION_MAJOR ||
16596                         minor < DB_VERSION_MINOR )
16597                 {
16598                         printf("Berkeley DB version mismatch\n"
16599                                 "\texpected: %s\n\tgot: %s\n",
16600                                 DB_VERSION_STRING, version);
16601                         return 1;
16602                 }
16603         }
16604 #endif
16605
16606 #if DB_VERSION_MAJOR > 2
16607         db_env_create( NULL, 0 );
16608 #elif DB_VERSION_MAJOR > 1
16609         db_appexit( NULL );
16610 #else
16611         (void) dbopen( NULL, 0, 0, 0, NULL);
16612 #endif
16613
16614 ; return 0; }
16615 EOF
16616 if { (eval echo configure:16617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16617   rm -rf conftest*
16618   ol_cv_db_none=yes
16619 else
16620   echo "configure: failed program was:" >&5
16621   cat conftest.$ac_ext >&5
16622   rm -rf conftest*
16623   ol_cv_db_none=no
16624 fi
16625 rm -f conftest*
16626
16627         LIBS="$ol_LIBS"
16628
16629 fi
16630
16631 echo "$ac_t""$ol_cv_db_none" 1>&6
16632
16633         if test $ol_cv_db_none = yes ; then
16634                 ol_cv_lib_db=yes
16635         fi
16636 fi
16637
16638 if test $ol_cv_lib_db = no ; then
16639         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16640 echo "configure:16641: checking for Berkeley DB link (-ldb4)" >&5
16641 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16642   echo $ac_n "(cached) $ac_c" 1>&6
16643 else
16644   
16645         ol_DB_LIB=-ldb4
16646         ol_LIBS=$LIBS
16647         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16648
16649         cat > conftest.$ac_ext <<EOF
16650 #line 16651 "configure"
16651 #include "confdefs.h"
16652
16653 #ifdef HAVE_DB_185_H
16654 # include <db_185.h>
16655 #else
16656 # include <db.h>
16657 #endif
16658
16659 #ifndef DB_VERSION_MAJOR
16660 # define DB_VERSION_MAJOR 1
16661 #endif
16662
16663 #ifndef NULL
16664 #define NULL ((void*)0)
16665 #endif
16666
16667 int main() {
16668
16669 #if DB_VERSION_MAJOR > 1
16670         {
16671                 char *version;
16672                 int major, minor, patch;
16673
16674                 version = db_version( &major, &minor, &patch );
16675
16676                 if( major != DB_VERSION_MAJOR ||
16677                         minor < DB_VERSION_MINOR )
16678                 {
16679                         printf("Berkeley DB version mismatch\n"
16680                                 "\texpected: %s\n\tgot: %s\n",
16681                                 DB_VERSION_STRING, version);
16682                         return 1;
16683                 }
16684         }
16685 #endif
16686
16687 #if DB_VERSION_MAJOR > 2
16688         db_env_create( NULL, 0 );
16689 #elif DB_VERSION_MAJOR > 1
16690         db_appexit( NULL );
16691 #else
16692         (void) dbopen( NULL, 0, 0, 0, NULL);
16693 #endif
16694
16695 ; return 0; }
16696 EOF
16697 if { (eval echo configure:16698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16698   rm -rf conftest*
16699   ol_cv_db_db4=yes
16700 else
16701   echo "configure: failed program was:" >&5
16702   cat conftest.$ac_ext >&5
16703   rm -rf conftest*
16704   ol_cv_db_db4=no
16705 fi
16706 rm -f conftest*
16707
16708         LIBS="$ol_LIBS"
16709
16710 fi
16711
16712 echo "$ac_t""$ol_cv_db_db4" 1>&6
16713
16714         if test $ol_cv_db_db4 = yes ; then
16715                 ol_cv_lib_db=-ldb4
16716         fi
16717 fi
16718
16719 if test $ol_cv_lib_db = no ; then
16720         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16721 echo "configure:16722: checking for Berkeley DB link (-ldb-4)" >&5
16722 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16723   echo $ac_n "(cached) $ac_c" 1>&6
16724 else
16725   
16726         ol_DB_LIB=-ldb-4
16727         ol_LIBS=$LIBS
16728         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16729
16730         cat > conftest.$ac_ext <<EOF
16731 #line 16732 "configure"
16732 #include "confdefs.h"
16733
16734 #ifdef HAVE_DB_185_H
16735 # include <db_185.h>
16736 #else
16737 # include <db.h>
16738 #endif
16739
16740 #ifndef DB_VERSION_MAJOR
16741 # define DB_VERSION_MAJOR 1
16742 #endif
16743
16744 #ifndef NULL
16745 #define NULL ((void*)0)
16746 #endif
16747
16748 int main() {
16749
16750 #if DB_VERSION_MAJOR > 1
16751         {
16752                 char *version;
16753                 int major, minor, patch;
16754
16755                 version = db_version( &major, &minor, &patch );
16756
16757                 if( major != DB_VERSION_MAJOR ||
16758                         minor < DB_VERSION_MINOR )
16759                 {
16760                         printf("Berkeley DB version mismatch\n"
16761                                 "\texpected: %s\n\tgot: %s\n",
16762                                 DB_VERSION_STRING, version);
16763                         return 1;
16764                 }
16765         }
16766 #endif
16767
16768 #if DB_VERSION_MAJOR > 2
16769         db_env_create( NULL, 0 );
16770 #elif DB_VERSION_MAJOR > 1
16771         db_appexit( NULL );
16772 #else
16773         (void) dbopen( NULL, 0, 0, 0, NULL);
16774 #endif
16775
16776 ; return 0; }
16777 EOF
16778 if { (eval echo configure:16779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16779   rm -rf conftest*
16780   ol_cv_db_db_4=yes
16781 else
16782   echo "configure: failed program was:" >&5
16783   cat conftest.$ac_ext >&5
16784   rm -rf conftest*
16785   ol_cv_db_db_4=no
16786 fi
16787 rm -f conftest*
16788
16789         LIBS="$ol_LIBS"
16790
16791 fi
16792
16793 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16794
16795         if test $ol_cv_db_db_4 = yes ; then
16796                 ol_cv_lib_db=-ldb-4
16797         fi
16798 fi
16799
16800 if test $ol_cv_lib_db = no ; then
16801         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16802 echo "configure:16803: checking for Berkeley DB link (-ldb)" >&5
16803 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16804   echo $ac_n "(cached) $ac_c" 1>&6
16805 else
16806   
16807         ol_DB_LIB=-ldb
16808         ol_LIBS=$LIBS
16809         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16810
16811         cat > conftest.$ac_ext <<EOF
16812 #line 16813 "configure"
16813 #include "confdefs.h"
16814
16815 #ifdef HAVE_DB_185_H
16816 # include <db_185.h>
16817 #else
16818 # include <db.h>
16819 #endif
16820
16821 #ifndef DB_VERSION_MAJOR
16822 # define DB_VERSION_MAJOR 1
16823 #endif
16824
16825 #ifndef NULL
16826 #define NULL ((void*)0)
16827 #endif
16828
16829 int main() {
16830
16831 #if DB_VERSION_MAJOR > 1
16832         {
16833                 char *version;
16834                 int major, minor, patch;
16835
16836                 version = db_version( &major, &minor, &patch );
16837
16838                 if( major != DB_VERSION_MAJOR ||
16839                         minor < DB_VERSION_MINOR )
16840                 {
16841                         printf("Berkeley DB version mismatch\n"
16842                                 "\texpected: %s\n\tgot: %s\n",
16843                                 DB_VERSION_STRING, version);
16844                         return 1;
16845                 }
16846         }
16847 #endif
16848
16849 #if DB_VERSION_MAJOR > 2
16850         db_env_create( NULL, 0 );
16851 #elif DB_VERSION_MAJOR > 1
16852         db_appexit( NULL );
16853 #else
16854         (void) dbopen( NULL, 0, 0, 0, NULL);
16855 #endif
16856
16857 ; return 0; }
16858 EOF
16859 if { (eval echo configure:16860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16860   rm -rf conftest*
16861   ol_cv_db_db=yes
16862 else
16863   echo "configure: failed program was:" >&5
16864   cat conftest.$ac_ext >&5
16865   rm -rf conftest*
16866   ol_cv_db_db=no
16867 fi
16868 rm -f conftest*
16869
16870         LIBS="$ol_LIBS"
16871
16872 fi
16873
16874 echo "$ac_t""$ol_cv_db_db" 1>&6
16875
16876         if test $ol_cv_db_db = yes ; then
16877                 ol_cv_lib_db=-ldb
16878         fi
16879 fi
16880
16881 if test $ol_cv_lib_db = no ; then
16882         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
16883 echo "configure:16884: checking for Berkeley DB link (-ldb3)" >&5
16884 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
16885   echo $ac_n "(cached) $ac_c" 1>&6
16886 else
16887   
16888         ol_DB_LIB=-ldb3
16889         ol_LIBS=$LIBS
16890         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16891
16892         cat > conftest.$ac_ext <<EOF
16893 #line 16894 "configure"
16894 #include "confdefs.h"
16895
16896 #ifdef HAVE_DB_185_H
16897 # include <db_185.h>
16898 #else
16899 # include <db.h>
16900 #endif
16901
16902 #ifndef DB_VERSION_MAJOR
16903 # define DB_VERSION_MAJOR 1
16904 #endif
16905
16906 #ifndef NULL
16907 #define NULL ((void*)0)
16908 #endif
16909
16910 int main() {
16911
16912 #if DB_VERSION_MAJOR > 1
16913         {
16914                 char *version;
16915                 int major, minor, patch;
16916
16917                 version = db_version( &major, &minor, &patch );
16918
16919                 if( major != DB_VERSION_MAJOR ||
16920                         minor < DB_VERSION_MINOR )
16921                 {
16922                         printf("Berkeley DB version mismatch\n"
16923                                 "\texpected: %s\n\tgot: %s\n",
16924                                 DB_VERSION_STRING, version);
16925                         return 1;
16926                 }
16927         }
16928 #endif
16929
16930 #if DB_VERSION_MAJOR > 2
16931         db_env_create( NULL, 0 );
16932 #elif DB_VERSION_MAJOR > 1
16933         db_appexit( NULL );
16934 #else
16935         (void) dbopen( NULL, 0, 0, 0, NULL);
16936 #endif
16937
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_db_db3=yes
16943 else
16944   echo "configure: failed program was:" >&5
16945   cat conftest.$ac_ext >&5
16946   rm -rf conftest*
16947   ol_cv_db_db3=no
16948 fi
16949 rm -f conftest*
16950
16951         LIBS="$ol_LIBS"
16952
16953 fi
16954
16955 echo "$ac_t""$ol_cv_db_db3" 1>&6
16956
16957         if test $ol_cv_db_db3 = yes ; then
16958                 ol_cv_lib_db=-ldb3
16959         fi
16960 fi
16961
16962 if test $ol_cv_lib_db = no ; then
16963         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
16964 echo "configure:16965: checking for Berkeley DB link (-ldb-3)" >&5
16965 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
16966   echo $ac_n "(cached) $ac_c" 1>&6
16967 else
16968   
16969         ol_DB_LIB=-ldb-3
16970         ol_LIBS=$LIBS
16971         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16972
16973         cat > conftest.$ac_ext <<EOF
16974 #line 16975 "configure"
16975 #include "confdefs.h"
16976
16977 #ifdef HAVE_DB_185_H
16978 # include <db_185.h>
16979 #else
16980 # include <db.h>
16981 #endif
16982
16983 #ifndef DB_VERSION_MAJOR
16984 # define DB_VERSION_MAJOR 1
16985 #endif
16986
16987 #ifndef NULL
16988 #define NULL ((void*)0)
16989 #endif
16990
16991 int main() {
16992
16993 #if DB_VERSION_MAJOR > 1
16994         {
16995                 char *version;
16996                 int major, minor, patch;
16997
16998                 version = db_version( &major, &minor, &patch );
16999
17000                 if( major != DB_VERSION_MAJOR ||
17001                         minor < DB_VERSION_MINOR )
17002                 {
17003                         printf("Berkeley DB version mismatch\n"
17004                                 "\texpected: %s\n\tgot: %s\n",
17005                                 DB_VERSION_STRING, version);
17006                         return 1;
17007                 }
17008         }
17009 #endif
17010
17011 #if DB_VERSION_MAJOR > 2
17012         db_env_create( NULL, 0 );
17013 #elif DB_VERSION_MAJOR > 1
17014         db_appexit( NULL );
17015 #else
17016         (void) dbopen( NULL, 0, 0, 0, NULL);
17017 #endif
17018
17019 ; return 0; }
17020 EOF
17021 if { (eval echo configure:17022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17022   rm -rf conftest*
17023   ol_cv_db_db_3=yes
17024 else
17025   echo "configure: failed program was:" >&5
17026   cat conftest.$ac_ext >&5
17027   rm -rf conftest*
17028   ol_cv_db_db_3=no
17029 fi
17030 rm -f conftest*
17031
17032         LIBS="$ol_LIBS"
17033
17034 fi
17035
17036 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17037
17038         if test $ol_cv_db_db_3 = yes ; then
17039                 ol_cv_lib_db=-ldb-3
17040         fi
17041 fi
17042
17043 if test $ol_cv_lib_db = no ; then
17044         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17045 echo "configure:17046: checking for Berkeley DB link (-ldb2)" >&5
17046 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17047   echo $ac_n "(cached) $ac_c" 1>&6
17048 else
17049   
17050         ol_DB_LIB=-ldb2
17051         ol_LIBS=$LIBS
17052         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17053
17054         cat > conftest.$ac_ext <<EOF
17055 #line 17056 "configure"
17056 #include "confdefs.h"
17057
17058 #ifdef HAVE_DB_185_H
17059 # include <db_185.h>
17060 #else
17061 # include <db.h>
17062 #endif
17063
17064 #ifndef DB_VERSION_MAJOR
17065 # define DB_VERSION_MAJOR 1
17066 #endif
17067
17068 #ifndef NULL
17069 #define NULL ((void*)0)
17070 #endif
17071
17072 int main() {
17073
17074 #if DB_VERSION_MAJOR > 1
17075         {
17076                 char *version;
17077                 int major, minor, patch;
17078
17079                 version = db_version( &major, &minor, &patch );
17080
17081                 if( major != DB_VERSION_MAJOR ||
17082                         minor < DB_VERSION_MINOR )
17083                 {
17084                         printf("Berkeley DB version mismatch\n"
17085                                 "\texpected: %s\n\tgot: %s\n",
17086                                 DB_VERSION_STRING, version);
17087                         return 1;
17088                 }
17089         }
17090 #endif
17091
17092 #if DB_VERSION_MAJOR > 2
17093         db_env_create( NULL, 0 );
17094 #elif DB_VERSION_MAJOR > 1
17095         db_appexit( NULL );
17096 #else
17097         (void) dbopen( NULL, 0, 0, 0, NULL);
17098 #endif
17099
17100 ; return 0; }
17101 EOF
17102 if { (eval echo configure:17103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17103   rm -rf conftest*
17104   ol_cv_db_db2=yes
17105 else
17106   echo "configure: failed program was:" >&5
17107   cat conftest.$ac_ext >&5
17108   rm -rf conftest*
17109   ol_cv_db_db2=no
17110 fi
17111 rm -f conftest*
17112
17113         LIBS="$ol_LIBS"
17114
17115 fi
17116
17117 echo "$ac_t""$ol_cv_db_db2" 1>&6
17118
17119         if test $ol_cv_db_db2 = yes ; then
17120                 ol_cv_lib_db=-ldb2
17121         fi
17122 fi
17123
17124 if test $ol_cv_lib_db = no ; then
17125         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17126 echo "configure:17127: checking for Berkeley DB link (-ldb-2)" >&5
17127 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17128   echo $ac_n "(cached) $ac_c" 1>&6
17129 else
17130   
17131         ol_DB_LIB=-ldb-2
17132         ol_LIBS=$LIBS
17133         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17134
17135         cat > conftest.$ac_ext <<EOF
17136 #line 17137 "configure"
17137 #include "confdefs.h"
17138
17139 #ifdef HAVE_DB_185_H
17140 # include <db_185.h>
17141 #else
17142 # include <db.h>
17143 #endif
17144
17145 #ifndef DB_VERSION_MAJOR
17146 # define DB_VERSION_MAJOR 1
17147 #endif
17148
17149 #ifndef NULL
17150 #define NULL ((void*)0)
17151 #endif
17152
17153 int main() {
17154
17155 #if DB_VERSION_MAJOR > 1
17156         {
17157                 char *version;
17158                 int major, minor, patch;
17159
17160                 version = db_version( &major, &minor, &patch );
17161
17162                 if( major != DB_VERSION_MAJOR ||
17163                         minor < DB_VERSION_MINOR )
17164                 {
17165                         printf("Berkeley DB version mismatch\n"
17166                                 "\texpected: %s\n\tgot: %s\n",
17167                                 DB_VERSION_STRING, version);
17168                         return 1;
17169                 }
17170         }
17171 #endif
17172
17173 #if DB_VERSION_MAJOR > 2
17174         db_env_create( NULL, 0 );
17175 #elif DB_VERSION_MAJOR > 1
17176         db_appexit( NULL );
17177 #else
17178         (void) dbopen( NULL, 0, 0, 0, NULL);
17179 #endif
17180
17181 ; return 0; }
17182 EOF
17183 if { (eval echo configure:17184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17184   rm -rf conftest*
17185   ol_cv_db_db_2=yes
17186 else
17187   echo "configure: failed program was:" >&5
17188   cat conftest.$ac_ext >&5
17189   rm -rf conftest*
17190   ol_cv_db_db_2=no
17191 fi
17192 rm -f conftest*
17193
17194         LIBS="$ol_LIBS"
17195
17196 fi
17197
17198 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17199
17200         if test $ol_cv_db_db_2 = yes ; then
17201                 ol_cv_lib_db=-ldb-2
17202         fi
17203 fi
17204
17205 if test $ol_cv_lib_db = no ; then
17206         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17207 echo "configure:17208: checking for Berkeley DB link (-ldb1)" >&5
17208 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17209   echo $ac_n "(cached) $ac_c" 1>&6
17210 else
17211   
17212         ol_DB_LIB=-ldb1
17213         ol_LIBS=$LIBS
17214         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17215
17216         cat > conftest.$ac_ext <<EOF
17217 #line 17218 "configure"
17218 #include "confdefs.h"
17219
17220 #ifdef HAVE_DB_185_H
17221 # include <db_185.h>
17222 #else
17223 # include <db.h>
17224 #endif
17225
17226 #ifndef DB_VERSION_MAJOR
17227 # define DB_VERSION_MAJOR 1
17228 #endif
17229
17230 #ifndef NULL
17231 #define NULL ((void*)0)
17232 #endif
17233
17234 int main() {
17235
17236 #if DB_VERSION_MAJOR > 1
17237         {
17238                 char *version;
17239                 int major, minor, patch;
17240
17241                 version = db_version( &major, &minor, &patch );
17242
17243                 if( major != DB_VERSION_MAJOR ||
17244                         minor < DB_VERSION_MINOR )
17245                 {
17246                         printf("Berkeley DB version mismatch\n"
17247                                 "\texpected: %s\n\tgot: %s\n",
17248                                 DB_VERSION_STRING, version);
17249                         return 1;
17250                 }
17251         }
17252 #endif
17253
17254 #if DB_VERSION_MAJOR > 2
17255         db_env_create( NULL, 0 );
17256 #elif DB_VERSION_MAJOR > 1
17257         db_appexit( NULL );
17258 #else
17259         (void) dbopen( NULL, 0, 0, 0, NULL);
17260 #endif
17261
17262 ; return 0; }
17263 EOF
17264 if { (eval echo configure:17265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17265   rm -rf conftest*
17266   ol_cv_db_db1=yes
17267 else
17268   echo "configure: failed program was:" >&5
17269   cat conftest.$ac_ext >&5
17270   rm -rf conftest*
17271   ol_cv_db_db1=no
17272 fi
17273 rm -f conftest*
17274
17275         LIBS="$ol_LIBS"
17276
17277 fi
17278
17279 echo "$ac_t""$ol_cv_db_db1" 1>&6
17280
17281         if test $ol_cv_db_db1 = yes ; then
17282                 ol_cv_lib_db=-ldb1
17283         fi
17284 fi
17285
17286 if test $ol_cv_lib_db = no ; then
17287         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17288 echo "configure:17289: checking for Berkeley DB link (-ldb-1)" >&5
17289 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17290   echo $ac_n "(cached) $ac_c" 1>&6
17291 else
17292   
17293         ol_DB_LIB=-ldb-1
17294         ol_LIBS=$LIBS
17295         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17296
17297         cat > conftest.$ac_ext <<EOF
17298 #line 17299 "configure"
17299 #include "confdefs.h"
17300
17301 #ifdef HAVE_DB_185_H
17302 # include <db_185.h>
17303 #else
17304 # include <db.h>
17305 #endif
17306
17307 #ifndef DB_VERSION_MAJOR
17308 # define DB_VERSION_MAJOR 1
17309 #endif
17310
17311 #ifndef NULL
17312 #define NULL ((void*)0)
17313 #endif
17314
17315 int main() {
17316
17317 #if DB_VERSION_MAJOR > 1
17318         {
17319                 char *version;
17320                 int major, minor, patch;
17321
17322                 version = db_version( &major, &minor, &patch );
17323
17324                 if( major != DB_VERSION_MAJOR ||
17325                         minor < DB_VERSION_MINOR )
17326                 {
17327                         printf("Berkeley DB version mismatch\n"
17328                                 "\texpected: %s\n\tgot: %s\n",
17329                                 DB_VERSION_STRING, version);
17330                         return 1;
17331                 }
17332         }
17333 #endif
17334
17335 #if DB_VERSION_MAJOR > 2
17336         db_env_create( NULL, 0 );
17337 #elif DB_VERSION_MAJOR > 1
17338         db_appexit( NULL );
17339 #else
17340         (void) dbopen( NULL, 0, 0, 0, NULL);
17341 #endif
17342
17343 ; return 0; }
17344 EOF
17345 if { (eval echo configure:17346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17346   rm -rf conftest*
17347   ol_cv_db_db_1=yes
17348 else
17349   echo "configure: failed program was:" >&5
17350   cat conftest.$ac_ext >&5
17351   rm -rf conftest*
17352   ol_cv_db_db_1=no
17353 fi
17354 rm -f conftest*
17355
17356         LIBS="$ol_LIBS"
17357
17358 fi
17359
17360 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17361
17362         if test $ol_cv_db_db_1 = yes ; then
17363                 ol_cv_lib_db=-ldb-1
17364         fi
17365 fi
17366
17367
17368                 if test "$ol_cv_lib_db" != no ; then
17369                         ol_cv_berkeley_db=yes
17370                 fi
17371         fi
17372 fi
17373
17374         else
17375                 ol_cv_berkeley_db=no
17376 for ac_hdr in db.h
17377 do
17378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17380 echo "configure:17381: checking for $ac_hdr" >&5
17381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17382   echo $ac_n "(cached) $ac_c" 1>&6
17383 else
17384   cat > conftest.$ac_ext <<EOF
17385 #line 17386 "configure"
17386 #include "confdefs.h"
17387 #include <$ac_hdr>
17388 EOF
17389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17390 { (eval echo configure:17391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17392 if test -z "$ac_err"; then
17393   rm -rf conftest*
17394   eval "ac_cv_header_$ac_safe=yes"
17395 else
17396   echo "$ac_err" >&5
17397   echo "configure: failed program was:" >&5
17398   cat conftest.$ac_ext >&5
17399   rm -rf conftest*
17400   eval "ac_cv_header_$ac_safe=no"
17401 fi
17402 rm -f conftest*
17403 fi
17404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17405   echo "$ac_t""yes" 1>&6
17406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17407   cat >> confdefs.h <<EOF
17408 #define $ac_tr_hdr 1
17409 EOF
17410  
17411 else
17412   echo "$ac_t""no" 1>&6
17413 fi
17414 done
17415
17416 if test $ac_cv_header_db_h = yes; then
17417         ol_cv_lib_db=no
17418 if test $ol_cv_lib_db = no ; then
17419         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17420 echo "configure:17421: checking for Berkeley DB link (default)" >&5
17421 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17422   echo $ac_n "(cached) $ac_c" 1>&6
17423 else
17424   
17425         ol_DB_LIB=
17426         ol_LIBS=$LIBS
17427         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17428
17429         cat > conftest.$ac_ext <<EOF
17430 #line 17431 "configure"
17431 #include "confdefs.h"
17432
17433 #ifdef HAVE_DB_185_H
17434 # include <db_185.h>
17435 #else
17436 # include <db.h>
17437 #endif
17438
17439 #ifndef DB_VERSION_MAJOR
17440 # define DB_VERSION_MAJOR 1
17441 #endif
17442
17443 #ifndef NULL
17444 #define NULL ((void*)0)
17445 #endif
17446
17447 int main() {
17448
17449 #if DB_VERSION_MAJOR > 1
17450         {
17451                 char *version;
17452                 int major, minor, patch;
17453
17454                 version = db_version( &major, &minor, &patch );
17455
17456                 if( major != DB_VERSION_MAJOR ||
17457                         minor < DB_VERSION_MINOR )
17458                 {
17459                         printf("Berkeley DB version mismatch\n"
17460                                 "\texpected: %s\n\tgot: %s\n",
17461                                 DB_VERSION_STRING, version);
17462                         return 1;
17463                 }
17464         }
17465 #endif
17466
17467 #if DB_VERSION_MAJOR > 2
17468         db_env_create( NULL, 0 );
17469 #elif DB_VERSION_MAJOR > 1
17470         db_appexit( NULL );
17471 #else
17472         (void) dbopen( NULL, 0, 0, 0, NULL);
17473 #endif
17474
17475 ; return 0; }
17476 EOF
17477 if { (eval echo configure:17478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17478   rm -rf conftest*
17479   ol_cv_db_none=yes
17480 else
17481   echo "configure: failed program was:" >&5
17482   cat conftest.$ac_ext >&5
17483   rm -rf conftest*
17484   ol_cv_db_none=no
17485 fi
17486 rm -f conftest*
17487
17488         LIBS="$ol_LIBS"
17489
17490 fi
17491
17492 echo "$ac_t""$ol_cv_db_none" 1>&6
17493
17494         if test $ol_cv_db_none = yes ; then
17495                 ol_cv_lib_db=yes
17496         fi
17497 fi
17498
17499 if test $ol_cv_lib_db = no ; then
17500         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17501 echo "configure:17502: checking for Berkeley DB link (-ldb4)" >&5
17502 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17503   echo $ac_n "(cached) $ac_c" 1>&6
17504 else
17505   
17506         ol_DB_LIB=-ldb4
17507         ol_LIBS=$LIBS
17508         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17509
17510         cat > conftest.$ac_ext <<EOF
17511 #line 17512 "configure"
17512 #include "confdefs.h"
17513
17514 #ifdef HAVE_DB_185_H
17515 # include <db_185.h>
17516 #else
17517 # include <db.h>
17518 #endif
17519
17520 #ifndef DB_VERSION_MAJOR
17521 # define DB_VERSION_MAJOR 1
17522 #endif
17523
17524 #ifndef NULL
17525 #define NULL ((void*)0)
17526 #endif
17527
17528 int main() {
17529
17530 #if DB_VERSION_MAJOR > 1
17531         {
17532                 char *version;
17533                 int major, minor, patch;
17534
17535                 version = db_version( &major, &minor, &patch );
17536
17537                 if( major != DB_VERSION_MAJOR ||
17538                         minor < DB_VERSION_MINOR )
17539                 {
17540                         printf("Berkeley DB version mismatch\n"
17541                                 "\texpected: %s\n\tgot: %s\n",
17542                                 DB_VERSION_STRING, version);
17543                         return 1;
17544                 }
17545         }
17546 #endif
17547
17548 #if DB_VERSION_MAJOR > 2
17549         db_env_create( NULL, 0 );
17550 #elif DB_VERSION_MAJOR > 1
17551         db_appexit( NULL );
17552 #else
17553         (void) dbopen( NULL, 0, 0, 0, NULL);
17554 #endif
17555
17556 ; return 0; }
17557 EOF
17558 if { (eval echo configure:17559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17559   rm -rf conftest*
17560   ol_cv_db_db4=yes
17561 else
17562   echo "configure: failed program was:" >&5
17563   cat conftest.$ac_ext >&5
17564   rm -rf conftest*
17565   ol_cv_db_db4=no
17566 fi
17567 rm -f conftest*
17568
17569         LIBS="$ol_LIBS"
17570
17571 fi
17572
17573 echo "$ac_t""$ol_cv_db_db4" 1>&6
17574
17575         if test $ol_cv_db_db4 = yes ; then
17576                 ol_cv_lib_db=-ldb4
17577         fi
17578 fi
17579
17580 if test $ol_cv_lib_db = no ; then
17581         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17582 echo "configure:17583: checking for Berkeley DB link (-ldb-4)" >&5
17583 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17584   echo $ac_n "(cached) $ac_c" 1>&6
17585 else
17586   
17587         ol_DB_LIB=-ldb-4
17588         ol_LIBS=$LIBS
17589         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17590
17591         cat > conftest.$ac_ext <<EOF
17592 #line 17593 "configure"
17593 #include "confdefs.h"
17594
17595 #ifdef HAVE_DB_185_H
17596 # include <db_185.h>
17597 #else
17598 # include <db.h>
17599 #endif
17600
17601 #ifndef DB_VERSION_MAJOR
17602 # define DB_VERSION_MAJOR 1
17603 #endif
17604
17605 #ifndef NULL
17606 #define NULL ((void*)0)
17607 #endif
17608
17609 int main() {
17610
17611 #if DB_VERSION_MAJOR > 1
17612         {
17613                 char *version;
17614                 int major, minor, patch;
17615
17616                 version = db_version( &major, &minor, &patch );
17617
17618                 if( major != DB_VERSION_MAJOR ||
17619                         minor < DB_VERSION_MINOR )
17620                 {
17621                         printf("Berkeley DB version mismatch\n"
17622                                 "\texpected: %s\n\tgot: %s\n",
17623                                 DB_VERSION_STRING, version);
17624                         return 1;
17625                 }
17626         }
17627 #endif
17628
17629 #if DB_VERSION_MAJOR > 2
17630         db_env_create( NULL, 0 );
17631 #elif DB_VERSION_MAJOR > 1
17632         db_appexit( NULL );
17633 #else
17634         (void) dbopen( NULL, 0, 0, 0, NULL);
17635 #endif
17636
17637 ; return 0; }
17638 EOF
17639 if { (eval echo configure:17640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17640   rm -rf conftest*
17641   ol_cv_db_db_4=yes
17642 else
17643   echo "configure: failed program was:" >&5
17644   cat conftest.$ac_ext >&5
17645   rm -rf conftest*
17646   ol_cv_db_db_4=no
17647 fi
17648 rm -f conftest*
17649
17650         LIBS="$ol_LIBS"
17651
17652 fi
17653
17654 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17655
17656         if test $ol_cv_db_db_4 = yes ; then
17657                 ol_cv_lib_db=-ldb-4
17658         fi
17659 fi
17660
17661 if test $ol_cv_lib_db = no ; then
17662         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17663 echo "configure:17664: checking for Berkeley DB link (-ldb)" >&5
17664 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17665   echo $ac_n "(cached) $ac_c" 1>&6
17666 else
17667   
17668         ol_DB_LIB=-ldb
17669         ol_LIBS=$LIBS
17670         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17671
17672         cat > conftest.$ac_ext <<EOF
17673 #line 17674 "configure"
17674 #include "confdefs.h"
17675
17676 #ifdef HAVE_DB_185_H
17677 # include <db_185.h>
17678 #else
17679 # include <db.h>
17680 #endif
17681
17682 #ifndef DB_VERSION_MAJOR
17683 # define DB_VERSION_MAJOR 1
17684 #endif
17685
17686 #ifndef NULL
17687 #define NULL ((void*)0)
17688 #endif
17689
17690 int main() {
17691
17692 #if DB_VERSION_MAJOR > 1
17693         {
17694                 char *version;
17695                 int major, minor, patch;
17696
17697                 version = db_version( &major, &minor, &patch );
17698
17699                 if( major != DB_VERSION_MAJOR ||
17700                         minor < DB_VERSION_MINOR )
17701                 {
17702                         printf("Berkeley DB version mismatch\n"
17703                                 "\texpected: %s\n\tgot: %s\n",
17704                                 DB_VERSION_STRING, version);
17705                         return 1;
17706                 }
17707         }
17708 #endif
17709
17710 #if DB_VERSION_MAJOR > 2
17711         db_env_create( NULL, 0 );
17712 #elif DB_VERSION_MAJOR > 1
17713         db_appexit( NULL );
17714 #else
17715         (void) dbopen( NULL, 0, 0, 0, NULL);
17716 #endif
17717
17718 ; return 0; }
17719 EOF
17720 if { (eval echo configure:17721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17721   rm -rf conftest*
17722   ol_cv_db_db=yes
17723 else
17724   echo "configure: failed program was:" >&5
17725   cat conftest.$ac_ext >&5
17726   rm -rf conftest*
17727   ol_cv_db_db=no
17728 fi
17729 rm -f conftest*
17730
17731         LIBS="$ol_LIBS"
17732
17733 fi
17734
17735 echo "$ac_t""$ol_cv_db_db" 1>&6
17736
17737         if test $ol_cv_db_db = yes ; then
17738                 ol_cv_lib_db=-ldb
17739         fi
17740 fi
17741
17742 if test $ol_cv_lib_db = no ; then
17743         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17744 echo "configure:17745: checking for Berkeley DB link (-ldb3)" >&5
17745 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17746   echo $ac_n "(cached) $ac_c" 1>&6
17747 else
17748   
17749         ol_DB_LIB=-ldb3
17750         ol_LIBS=$LIBS
17751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17752
17753         cat > conftest.$ac_ext <<EOF
17754 #line 17755 "configure"
17755 #include "confdefs.h"
17756
17757 #ifdef HAVE_DB_185_H
17758 # include <db_185.h>
17759 #else
17760 # include <db.h>
17761 #endif
17762
17763 #ifndef DB_VERSION_MAJOR
17764 # define DB_VERSION_MAJOR 1
17765 #endif
17766
17767 #ifndef NULL
17768 #define NULL ((void*)0)
17769 #endif
17770
17771 int main() {
17772
17773 #if DB_VERSION_MAJOR > 1
17774         {
17775                 char *version;
17776                 int major, minor, patch;
17777
17778                 version = db_version( &major, &minor, &patch );
17779
17780                 if( major != DB_VERSION_MAJOR ||
17781                         minor < DB_VERSION_MINOR )
17782                 {
17783                         printf("Berkeley DB version mismatch\n"
17784                                 "\texpected: %s\n\tgot: %s\n",
17785                                 DB_VERSION_STRING, version);
17786                         return 1;
17787                 }
17788         }
17789 #endif
17790
17791 #if DB_VERSION_MAJOR > 2
17792         db_env_create( NULL, 0 );
17793 #elif DB_VERSION_MAJOR > 1
17794         db_appexit( NULL );
17795 #else
17796         (void) dbopen( NULL, 0, 0, 0, NULL);
17797 #endif
17798
17799 ; return 0; }
17800 EOF
17801 if { (eval echo configure:17802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17802   rm -rf conftest*
17803   ol_cv_db_db3=yes
17804 else
17805   echo "configure: failed program was:" >&5
17806   cat conftest.$ac_ext >&5
17807   rm -rf conftest*
17808   ol_cv_db_db3=no
17809 fi
17810 rm -f conftest*
17811
17812         LIBS="$ol_LIBS"
17813
17814 fi
17815
17816 echo "$ac_t""$ol_cv_db_db3" 1>&6
17817
17818         if test $ol_cv_db_db3 = yes ; then
17819                 ol_cv_lib_db=-ldb3
17820         fi
17821 fi
17822
17823 if test $ol_cv_lib_db = no ; then
17824         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17825 echo "configure:17826: checking for Berkeley DB link (-ldb-3)" >&5
17826 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17827   echo $ac_n "(cached) $ac_c" 1>&6
17828 else
17829   
17830         ol_DB_LIB=-ldb-3
17831         ol_LIBS=$LIBS
17832         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17833
17834         cat > conftest.$ac_ext <<EOF
17835 #line 17836 "configure"
17836 #include "confdefs.h"
17837
17838 #ifdef HAVE_DB_185_H
17839 # include <db_185.h>
17840 #else
17841 # include <db.h>
17842 #endif
17843
17844 #ifndef DB_VERSION_MAJOR
17845 # define DB_VERSION_MAJOR 1
17846 #endif
17847
17848 #ifndef NULL
17849 #define NULL ((void*)0)
17850 #endif
17851
17852 int main() {
17853
17854 #if DB_VERSION_MAJOR > 1
17855         {
17856                 char *version;
17857                 int major, minor, patch;
17858
17859                 version = db_version( &major, &minor, &patch );
17860
17861                 if( major != DB_VERSION_MAJOR ||
17862                         minor < DB_VERSION_MINOR )
17863                 {
17864                         printf("Berkeley DB version mismatch\n"
17865                                 "\texpected: %s\n\tgot: %s\n",
17866                                 DB_VERSION_STRING, version);
17867                         return 1;
17868                 }
17869         }
17870 #endif
17871
17872 #if DB_VERSION_MAJOR > 2
17873         db_env_create( NULL, 0 );
17874 #elif DB_VERSION_MAJOR > 1
17875         db_appexit( NULL );
17876 #else
17877         (void) dbopen( NULL, 0, 0, 0, NULL);
17878 #endif
17879
17880 ; return 0; }
17881 EOF
17882 if { (eval echo configure:17883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17883   rm -rf conftest*
17884   ol_cv_db_db_3=yes
17885 else
17886   echo "configure: failed program was:" >&5
17887   cat conftest.$ac_ext >&5
17888   rm -rf conftest*
17889   ol_cv_db_db_3=no
17890 fi
17891 rm -f conftest*
17892
17893         LIBS="$ol_LIBS"
17894
17895 fi
17896
17897 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17898
17899         if test $ol_cv_db_db_3 = yes ; then
17900                 ol_cv_lib_db=-ldb-3
17901         fi
17902 fi
17903
17904 if test $ol_cv_lib_db = no ; then
17905         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17906 echo "configure:17907: checking for Berkeley DB link (-ldb2)" >&5
17907 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17908   echo $ac_n "(cached) $ac_c" 1>&6
17909 else
17910   
17911         ol_DB_LIB=-ldb2
17912         ol_LIBS=$LIBS
17913         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17914
17915         cat > conftest.$ac_ext <<EOF
17916 #line 17917 "configure"
17917 #include "confdefs.h"
17918
17919 #ifdef HAVE_DB_185_H
17920 # include <db_185.h>
17921 #else
17922 # include <db.h>
17923 #endif
17924
17925 #ifndef DB_VERSION_MAJOR
17926 # define DB_VERSION_MAJOR 1
17927 #endif
17928
17929 #ifndef NULL
17930 #define NULL ((void*)0)
17931 #endif
17932
17933 int main() {
17934
17935 #if DB_VERSION_MAJOR > 1
17936         {
17937                 char *version;
17938                 int major, minor, patch;
17939
17940                 version = db_version( &major, &minor, &patch );
17941
17942                 if( major != DB_VERSION_MAJOR ||
17943                         minor < DB_VERSION_MINOR )
17944                 {
17945                         printf("Berkeley DB version mismatch\n"
17946                                 "\texpected: %s\n\tgot: %s\n",
17947                                 DB_VERSION_STRING, version);
17948                         return 1;
17949                 }
17950         }
17951 #endif
17952
17953 #if DB_VERSION_MAJOR > 2
17954         db_env_create( NULL, 0 );
17955 #elif DB_VERSION_MAJOR > 1
17956         db_appexit( NULL );
17957 #else
17958         (void) dbopen( NULL, 0, 0, 0, NULL);
17959 #endif
17960
17961 ; return 0; }
17962 EOF
17963 if { (eval echo configure:17964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17964   rm -rf conftest*
17965   ol_cv_db_db2=yes
17966 else
17967   echo "configure: failed program was:" >&5
17968   cat conftest.$ac_ext >&5
17969   rm -rf conftest*
17970   ol_cv_db_db2=no
17971 fi
17972 rm -f conftest*
17973
17974         LIBS="$ol_LIBS"
17975
17976 fi
17977
17978 echo "$ac_t""$ol_cv_db_db2" 1>&6
17979
17980         if test $ol_cv_db_db2 = yes ; then
17981                 ol_cv_lib_db=-ldb2
17982         fi
17983 fi
17984
17985 if test $ol_cv_lib_db = no ; then
17986         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17987 echo "configure:17988: checking for Berkeley DB link (-ldb-2)" >&5
17988 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17989   echo $ac_n "(cached) $ac_c" 1>&6
17990 else
17991   
17992         ol_DB_LIB=-ldb-2
17993         ol_LIBS=$LIBS
17994         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17995
17996         cat > conftest.$ac_ext <<EOF
17997 #line 17998 "configure"
17998 #include "confdefs.h"
17999
18000 #ifdef HAVE_DB_185_H
18001 # include <db_185.h>
18002 #else
18003 # include <db.h>
18004 #endif
18005
18006 #ifndef DB_VERSION_MAJOR
18007 # define DB_VERSION_MAJOR 1
18008 #endif
18009
18010 #ifndef NULL
18011 #define NULL ((void*)0)
18012 #endif
18013
18014 int main() {
18015
18016 #if DB_VERSION_MAJOR > 1
18017         {
18018                 char *version;
18019                 int major, minor, patch;
18020
18021                 version = db_version( &major, &minor, &patch );
18022
18023                 if( major != DB_VERSION_MAJOR ||
18024                         minor < DB_VERSION_MINOR )
18025                 {
18026                         printf("Berkeley DB version mismatch\n"
18027                                 "\texpected: %s\n\tgot: %s\n",
18028                                 DB_VERSION_STRING, version);
18029                         return 1;
18030                 }
18031         }
18032 #endif
18033
18034 #if DB_VERSION_MAJOR > 2
18035         db_env_create( NULL, 0 );
18036 #elif DB_VERSION_MAJOR > 1
18037         db_appexit( NULL );
18038 #else
18039         (void) dbopen( NULL, 0, 0, 0, NULL);
18040 #endif
18041
18042 ; return 0; }
18043 EOF
18044 if { (eval echo configure:18045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18045   rm -rf conftest*
18046   ol_cv_db_db_2=yes
18047 else
18048   echo "configure: failed program was:" >&5
18049   cat conftest.$ac_ext >&5
18050   rm -rf conftest*
18051   ol_cv_db_db_2=no
18052 fi
18053 rm -f conftest*
18054
18055         LIBS="$ol_LIBS"
18056
18057 fi
18058
18059 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18060
18061         if test $ol_cv_db_db_2 = yes ; then
18062                 ol_cv_lib_db=-ldb-2
18063         fi
18064 fi
18065
18066 if test $ol_cv_lib_db = no ; then
18067         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18068 echo "configure:18069: checking for Berkeley DB link (-ldb1)" >&5
18069 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18070   echo $ac_n "(cached) $ac_c" 1>&6
18071 else
18072   
18073         ol_DB_LIB=-ldb1
18074         ol_LIBS=$LIBS
18075         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18076
18077         cat > conftest.$ac_ext <<EOF
18078 #line 18079 "configure"
18079 #include "confdefs.h"
18080
18081 #ifdef HAVE_DB_185_H
18082 # include <db_185.h>
18083 #else
18084 # include <db.h>
18085 #endif
18086
18087 #ifndef DB_VERSION_MAJOR
18088 # define DB_VERSION_MAJOR 1
18089 #endif
18090
18091 #ifndef NULL
18092 #define NULL ((void*)0)
18093 #endif
18094
18095 int main() {
18096
18097 #if DB_VERSION_MAJOR > 1
18098         {
18099                 char *version;
18100                 int major, minor, patch;
18101
18102                 version = db_version( &major, &minor, &patch );
18103
18104                 if( major != DB_VERSION_MAJOR ||
18105                         minor < DB_VERSION_MINOR )
18106                 {
18107                         printf("Berkeley DB version mismatch\n"
18108                                 "\texpected: %s\n\tgot: %s\n",
18109                                 DB_VERSION_STRING, version);
18110                         return 1;
18111                 }
18112         }
18113 #endif
18114
18115 #if DB_VERSION_MAJOR > 2
18116         db_env_create( NULL, 0 );
18117 #elif DB_VERSION_MAJOR > 1
18118         db_appexit( NULL );
18119 #else
18120         (void) dbopen( NULL, 0, 0, 0, NULL);
18121 #endif
18122
18123 ; return 0; }
18124 EOF
18125 if { (eval echo configure:18126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18126   rm -rf conftest*
18127   ol_cv_db_db1=yes
18128 else
18129   echo "configure: failed program was:" >&5
18130   cat conftest.$ac_ext >&5
18131   rm -rf conftest*
18132   ol_cv_db_db1=no
18133 fi
18134 rm -f conftest*
18135
18136         LIBS="$ol_LIBS"
18137
18138 fi
18139
18140 echo "$ac_t""$ol_cv_db_db1" 1>&6
18141
18142         if test $ol_cv_db_db1 = yes ; then
18143                 ol_cv_lib_db=-ldb1
18144         fi
18145 fi
18146
18147 if test $ol_cv_lib_db = no ; then
18148         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18149 echo "configure:18150: checking for Berkeley DB link (-ldb-1)" >&5
18150 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18151   echo $ac_n "(cached) $ac_c" 1>&6
18152 else
18153   
18154         ol_DB_LIB=-ldb-1
18155         ol_LIBS=$LIBS
18156         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18157
18158         cat > conftest.$ac_ext <<EOF
18159 #line 18160 "configure"
18160 #include "confdefs.h"
18161
18162 #ifdef HAVE_DB_185_H
18163 # include <db_185.h>
18164 #else
18165 # include <db.h>
18166 #endif
18167
18168 #ifndef DB_VERSION_MAJOR
18169 # define DB_VERSION_MAJOR 1
18170 #endif
18171
18172 #ifndef NULL
18173 #define NULL ((void*)0)
18174 #endif
18175
18176 int main() {
18177
18178 #if DB_VERSION_MAJOR > 1
18179         {
18180                 char *version;
18181                 int major, minor, patch;
18182
18183                 version = db_version( &major, &minor, &patch );
18184
18185                 if( major != DB_VERSION_MAJOR ||
18186                         minor < DB_VERSION_MINOR )
18187                 {
18188                         printf("Berkeley DB version mismatch\n"
18189                                 "\texpected: %s\n\tgot: %s\n",
18190                                 DB_VERSION_STRING, version);
18191                         return 1;
18192                 }
18193         }
18194 #endif
18195
18196 #if DB_VERSION_MAJOR > 2
18197         db_env_create( NULL, 0 );
18198 #elif DB_VERSION_MAJOR > 1
18199         db_appexit( NULL );
18200 #else
18201         (void) dbopen( NULL, 0, 0, 0, NULL);
18202 #endif
18203
18204 ; return 0; }
18205 EOF
18206 if { (eval echo configure:18207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18207   rm -rf conftest*
18208   ol_cv_db_db_1=yes
18209 else
18210   echo "configure: failed program was:" >&5
18211   cat conftest.$ac_ext >&5
18212   rm -rf conftest*
18213   ol_cv_db_db_1=no
18214 fi
18215 rm -f conftest*
18216
18217         LIBS="$ol_LIBS"
18218
18219 fi
18220
18221 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18222
18223         if test $ol_cv_db_db_1 = yes ; then
18224                 ol_cv_lib_db=-ldb-1
18225         fi
18226 fi
18227
18228
18229         if test "$ol_cv_lib_db" != no ; then
18230                 ol_cv_berkeley_db=yes
18231                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18232 echo "configure:18233: checking for Berkeley DB thread support" >&5
18233 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18234   echo $ac_n "(cached) $ac_c" 1>&6
18235 else
18236   
18237         ol_LIBS="$LIBS"
18238         LIBS="$LTHREAD_LIBS $LIBS"
18239         if test $ol_cv_lib_db != yes ; then
18240                 LIBS="$ol_cv_lib_db $LIBS"
18241         fi
18242
18243         if test "$cross_compiling" = yes; then
18244   ol_cv_berkeley_db_thread=cross
18245 else
18246   cat > conftest.$ac_ext <<EOF
18247 #line 18248 "configure"
18248 #include "confdefs.h"
18249
18250 #ifdef HAVE_DB_185_H
18251         choke me;
18252 #else
18253 #include <db.h>
18254 #endif
18255 #ifndef NULL
18256 #define NULL ((void *)0)
18257 #endif
18258 main()
18259 {
18260         int rc;
18261         u_int32_t flags = DB_CREATE |
18262 #ifdef DB_PRIVATE
18263                 DB_PRIVATE |
18264 #endif
18265                 DB_THREAD;
18266
18267 #if DB_VERSION_MAJOR > 2
18268         DB_ENV *env = NULL;
18269
18270         rc = db_env_create( &env, 0 );
18271
18272         flags |= DB_INIT_MPOOL;
18273 #ifdef DB_MPOOL_PRIVATE
18274         flags |= DB_MPOOL_PRIVATE;
18275 #endif
18276
18277         if( rc ) {
18278                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18279                 return rc;
18280         }
18281
18282 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18283         rc = env->open( env, NULL, flags, 0 );
18284 #else
18285         rc = env->open( env, NULL, NULL, flags, 0 );
18286 #endif
18287
18288         if ( rc == 0 ) {
18289                 rc = env->close( env, 0 );
18290         }
18291
18292         if( rc ) {
18293                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18294                 return rc;
18295         }
18296
18297 #else
18298         DB_ENV env;
18299         memset( &env, '\0', sizeof(env) );
18300
18301         rc = db_appinit( NULL, NULL, &env, flags );
18302
18303         if( rc == 0 ) {
18304                 db_appexit( &env );
18305         }
18306
18307         unlink("__db_mpool.share");
18308         unlink("__db_lock.share");
18309 #endif
18310
18311         return rc;
18312 }
18313 EOF
18314 if { (eval echo configure:18315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18315 then
18316   ol_cv_berkeley_db_thread=yes
18317 else
18318   echo "configure: failed program was:" >&5
18319   cat conftest.$ac_ext >&5
18320   rm -fr conftest*
18321   ol_cv_berkeley_db_thread=no
18322 fi
18323 rm -fr conftest*
18324 fi
18325
18326
18327         LIBS="$ol_LIBS"
18328
18329 fi
18330
18331 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18332
18333         if test $ol_cv_berkeley_db_thread != no ; then
18334                 cat >> confdefs.h <<\EOF
18335 #define HAVE_BERKELEY_DB_THREAD 1
18336 EOF
18337
18338         fi
18339
18340         fi
18341 fi
18342
18343         fi
18344
18345         if test $ol_cv_berkeley_db != no ; then
18346                 cat >> confdefs.h <<\EOF
18347 #define HAVE_BERKELEY_DB 1
18348 EOF
18349
18350
18351                 ol_link_ldbm=berkeley
18352                 ol_with_ldbm_api=berkeley
18353
18354                 if test $ol_with_ldbm_type = hash ; then
18355                         cat >> confdefs.h <<\EOF
18356 #define LDBM_USE_DBHASH 1
18357 EOF
18358
18359                 else
18360                         cat >> confdefs.h <<\EOF
18361 #define LDBM_USE_DBBTREE 1
18362 EOF
18363
18364                 fi
18365
18366                                                 if test $ol_cv_lib_db != yes ; then
18367                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18368                 fi
18369         fi
18370 fi
18371
18372 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18373         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18374 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18375         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18376 echo "configure:18377: checking Berkeley DB version for BDB backend" >&5
18377 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18378   echo $ac_n "(cached) $ac_c" 1>&6
18379 else
18380   
18381         cat > conftest.$ac_ext <<EOF
18382 #line 18383 "configure"
18383 #include "confdefs.h"
18384
18385 #include <db.h>
18386
18387  /* this check could be improved */
18388 #ifndef DB_VERSION_MAJOR
18389 #       define DB_VERSION_MAJOR 1
18390 #endif
18391
18392 /* require 4.0 or later */
18393 #if DB_VERSION_MAJOR >= 4 
18394         __db_version_compat
18395 #endif
18396         
18397 EOF
18398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18399   egrep "__db_version_compat" >/dev/null 2>&1; then
18400   rm -rf conftest*
18401   ol_cv_bdb_compat=yes
18402 else
18403   rm -rf conftest*
18404   ol_cv_bdb_compat=no
18405 fi
18406 rm -f conftest*
18407
18408 fi
18409
18410 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18411
18412
18413         if test $ol_cv_bdb_compat = yes ; then
18414                 ol_enable_bdb=yes
18415         elif test $ol_enable_bdb = yes ; then
18416                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18417         else
18418                 ol_enable_bdb=no
18419         fi
18420 fi
18421
18422 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18423         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18424         ol_with_ldbm_api=none
18425 fi
18426
18427 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18428         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18429 echo "configure:18430: checking for MDBM library" >&5
18430 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18431   echo $ac_n "(cached) $ac_c" 1>&6
18432 else
18433         ol_LIBS="$LIBS"
18434         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18435 echo "configure:18436: checking for mdbm_set_chain" >&5
18436 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18437   echo $ac_n "(cached) $ac_c" 1>&6
18438 else
18439   cat > conftest.$ac_ext <<EOF
18440 #line 18441 "configure"
18441 #include "confdefs.h"
18442 /* System header to define __stub macros and hopefully few prototypes,
18443     which can conflict with char mdbm_set_chain(); below.  */
18444 #include <assert.h>
18445 /* Override any gcc2 internal prototype to avoid an error.  */
18446 /* We use char because int might match the return type of a gcc2
18447     builtin and then its argument prototype would still apply.  */
18448 char mdbm_set_chain();
18449 char (*f)();
18450
18451 int main() {
18452
18453 /* The GNU C library defines this for functions which it implements
18454     to always fail with ENOSYS.  Some functions are actually named
18455     something starting with __ and the normal name is an alias.  */
18456 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18457 choke me
18458 #else
18459 f = mdbm_set_chain;
18460 #endif
18461
18462 ; return 0; }
18463 EOF
18464 if { (eval echo configure:18465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18465   rm -rf conftest*
18466   eval "ac_cv_func_mdbm_set_chain=yes"
18467 else
18468   echo "configure: failed program was:" >&5
18469   cat conftest.$ac_ext >&5
18470   rm -rf conftest*
18471   eval "ac_cv_func_mdbm_set_chain=no"
18472 fi
18473 rm -f conftest*
18474 fi
18475
18476 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18477   echo "$ac_t""yes" 1>&6
18478   ol_cv_lib_mdbm=yes
18479 else
18480   echo "$ac_t""no" 1>&6
18481
18482                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18483 echo "configure:18484: checking for mdbm_set_chain in -lmdbm" >&5
18484 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18485 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18486   echo $ac_n "(cached) $ac_c" 1>&6
18487 else
18488   ac_save_LIBS="$LIBS"
18489 LIBS="-lmdbm  $LIBS"
18490 cat > conftest.$ac_ext <<EOF
18491 #line 18492 "configure"
18492 #include "confdefs.h"
18493 /* Override any gcc2 internal prototype to avoid an error.  */
18494 /* We use char because int might match the return type of a gcc2
18495     builtin and then its argument prototype would still apply.  */
18496 char mdbm_set_chain();
18497
18498 int main() {
18499 mdbm_set_chain()
18500 ; return 0; }
18501 EOF
18502 if { (eval echo configure:18503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18503   rm -rf conftest*
18504   eval "ac_cv_lib_$ac_lib_var=yes"
18505 else
18506   echo "configure: failed program was:" >&5
18507   cat conftest.$ac_ext >&5
18508   rm -rf conftest*
18509   eval "ac_cv_lib_$ac_lib_var=no"
18510 fi
18511 rm -f conftest*
18512 LIBS="$ac_save_LIBS"
18513
18514 fi
18515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18516   echo "$ac_t""yes" 1>&6
18517   ol_cv_lib_mdbm=-lmdbm
18518 else
18519   echo "$ac_t""no" 1>&6
18520 ol_cv_lib_mdbm=no
18521 fi
18522
18523         
18524 fi
18525
18526         LIBS="$ol_LIBS"
18527
18528 fi
18529
18530 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18531
18532
18533  for ac_hdr in mdbm.h
18534 do
18535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18537 echo "configure:18538: checking for $ac_hdr" >&5
18538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18539   echo $ac_n "(cached) $ac_c" 1>&6
18540 else
18541   cat > conftest.$ac_ext <<EOF
18542 #line 18543 "configure"
18543 #include "confdefs.h"
18544 #include <$ac_hdr>
18545 EOF
18546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18547 { (eval echo configure:18548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18549 if test -z "$ac_err"; then
18550   rm -rf conftest*
18551   eval "ac_cv_header_$ac_safe=yes"
18552 else
18553   echo "$ac_err" >&5
18554   echo "configure: failed program was:" >&5
18555   cat conftest.$ac_ext >&5
18556   rm -rf conftest*
18557   eval "ac_cv_header_$ac_safe=no"
18558 fi
18559 rm -f conftest*
18560 fi
18561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18562   echo "$ac_t""yes" 1>&6
18563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18564   cat >> confdefs.h <<EOF
18565 #define $ac_tr_hdr 1
18566 EOF
18567  
18568 else
18569   echo "$ac_t""no" 1>&6
18570 fi
18571 done
18572
18573  echo $ac_n "checking for db""... $ac_c" 1>&6
18574 echo "configure:18575: checking for db" >&5
18575 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18576   echo $ac_n "(cached) $ac_c" 1>&6
18577 else
18578   
18579         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18580                 ol_cv_mdbm=no
18581         else
18582                 ol_cv_mdbm=yes
18583         fi
18584
18585 fi
18586
18587 echo "$ac_t""$ol_cv_mdbm" 1>&6
18588  if test $ol_cv_mdbm = yes ; then
18589         cat >> confdefs.h <<\EOF
18590 #define HAVE_MDBM 1
18591 EOF
18592
18593  fi
18594
18595
18596         if test $ol_cv_mdbm = yes ; then
18597                 ol_link_ldbm=mdbm
18598                 ol_with_ldbm_api=mdbm
18599                 if test $ol_cv_lib_mdbm != yes ; then
18600                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18601                 fi
18602         fi
18603 fi
18604
18605 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18606         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18607 echo "configure:18608: checking for GDBM library" >&5
18608 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18609   echo $ac_n "(cached) $ac_c" 1>&6
18610 else
18611         ol_LIBS="$LIBS"
18612         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18613 echo "configure:18614: checking for gdbm_open" >&5
18614 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18615   echo $ac_n "(cached) $ac_c" 1>&6
18616 else
18617   cat > conftest.$ac_ext <<EOF
18618 #line 18619 "configure"
18619 #include "confdefs.h"
18620 /* System header to define __stub macros and hopefully few prototypes,
18621     which can conflict with char gdbm_open(); below.  */
18622 #include <assert.h>
18623 /* Override any gcc2 internal prototype to avoid an error.  */
18624 /* We use char because int might match the return type of a gcc2
18625     builtin and then its argument prototype would still apply.  */
18626 char gdbm_open();
18627 char (*f)();
18628
18629 int main() {
18630
18631 /* The GNU C library defines this for functions which it implements
18632     to always fail with ENOSYS.  Some functions are actually named
18633     something starting with __ and the normal name is an alias.  */
18634 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18635 choke me
18636 #else
18637 f = gdbm_open;
18638 #endif
18639
18640 ; return 0; }
18641 EOF
18642 if { (eval echo configure:18643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18643   rm -rf conftest*
18644   eval "ac_cv_func_gdbm_open=yes"
18645 else
18646   echo "configure: failed program was:" >&5
18647   cat conftest.$ac_ext >&5
18648   rm -rf conftest*
18649   eval "ac_cv_func_gdbm_open=no"
18650 fi
18651 rm -f conftest*
18652 fi
18653
18654 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18655   echo "$ac_t""yes" 1>&6
18656   ol_cv_lib_gdbm=yes
18657 else
18658   echo "$ac_t""no" 1>&6
18659
18660                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18661 echo "configure:18662: checking for gdbm_open in -lgdbm" >&5
18662 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18664   echo $ac_n "(cached) $ac_c" 1>&6
18665 else
18666   ac_save_LIBS="$LIBS"
18667 LIBS="-lgdbm  $LIBS"
18668 cat > conftest.$ac_ext <<EOF
18669 #line 18670 "configure"
18670 #include "confdefs.h"
18671 /* Override any gcc2 internal prototype to avoid an error.  */
18672 /* We use char because int might match the return type of a gcc2
18673     builtin and then its argument prototype would still apply.  */
18674 char gdbm_open();
18675
18676 int main() {
18677 gdbm_open()
18678 ; return 0; }
18679 EOF
18680 if { (eval echo configure:18681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18681   rm -rf conftest*
18682   eval "ac_cv_lib_$ac_lib_var=yes"
18683 else
18684   echo "configure: failed program was:" >&5
18685   cat conftest.$ac_ext >&5
18686   rm -rf conftest*
18687   eval "ac_cv_lib_$ac_lib_var=no"
18688 fi
18689 rm -f conftest*
18690 LIBS="$ac_save_LIBS"
18691
18692 fi
18693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18694   echo "$ac_t""yes" 1>&6
18695   ol_cv_lib_gdbm=-lgdbm
18696 else
18697   echo "$ac_t""no" 1>&6
18698 ol_cv_lib_gdbm=no
18699 fi
18700
18701         
18702 fi
18703
18704         LIBS="$ol_LIBS"
18705
18706 fi
18707
18708 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18709
18710
18711  for ac_hdr in gdbm.h
18712 do
18713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18715 echo "configure:18716: checking for $ac_hdr" >&5
18716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18717   echo $ac_n "(cached) $ac_c" 1>&6
18718 else
18719   cat > conftest.$ac_ext <<EOF
18720 #line 18721 "configure"
18721 #include "confdefs.h"
18722 #include <$ac_hdr>
18723 EOF
18724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18725 { (eval echo configure:18726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18727 if test -z "$ac_err"; then
18728   rm -rf conftest*
18729   eval "ac_cv_header_$ac_safe=yes"
18730 else
18731   echo "$ac_err" >&5
18732   echo "configure: failed program was:" >&5
18733   cat conftest.$ac_ext >&5
18734   rm -rf conftest*
18735   eval "ac_cv_header_$ac_safe=no"
18736 fi
18737 rm -f conftest*
18738 fi
18739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18740   echo "$ac_t""yes" 1>&6
18741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18742   cat >> confdefs.h <<EOF
18743 #define $ac_tr_hdr 1
18744 EOF
18745  
18746 else
18747   echo "$ac_t""no" 1>&6
18748 fi
18749 done
18750
18751  echo $ac_n "checking for db""... $ac_c" 1>&6
18752 echo "configure:18753: checking for db" >&5
18753 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18754   echo $ac_n "(cached) $ac_c" 1>&6
18755 else
18756   
18757         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18758                 ol_cv_gdbm=no
18759         else
18760                 ol_cv_gdbm=yes
18761         fi
18762
18763 fi
18764
18765 echo "$ac_t""$ol_cv_gdbm" 1>&6
18766  if test $ol_cv_gdbm = yes ; then
18767         cat >> confdefs.h <<\EOF
18768 #define HAVE_GDBM 1
18769 EOF
18770
18771  fi
18772
18773
18774         if test $ol_cv_gdbm = yes ; then
18775                 ol_link_ldbm=gdbm
18776                 ol_with_ldbm_api=gdbm
18777
18778                 if test $ol_cv_lib_gdbm != yes ; then
18779                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18780                 fi
18781         fi
18782 fi
18783
18784 if test $ol_with_ldbm_api = ndbm ; then
18785         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18786 echo "configure:18787: checking for NDBM library" >&5
18787 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18788   echo $ac_n "(cached) $ac_c" 1>&6
18789 else
18790         ol_LIBS="$LIBS"
18791         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18792 echo "configure:18793: checking for dbm_open" >&5
18793 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18794   echo $ac_n "(cached) $ac_c" 1>&6
18795 else
18796   cat > conftest.$ac_ext <<EOF
18797 #line 18798 "configure"
18798 #include "confdefs.h"
18799 /* System header to define __stub macros and hopefully few prototypes,
18800     which can conflict with char dbm_open(); below.  */
18801 #include <assert.h>
18802 /* Override any gcc2 internal prototype to avoid an error.  */
18803 /* We use char because int might match the return type of a gcc2
18804     builtin and then its argument prototype would still apply.  */
18805 char dbm_open();
18806 char (*f)();
18807
18808 int main() {
18809
18810 /* The GNU C library defines this for functions which it implements
18811     to always fail with ENOSYS.  Some functions are actually named
18812     something starting with __ and the normal name is an alias.  */
18813 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18814 choke me
18815 #else
18816 f = dbm_open;
18817 #endif
18818
18819 ; return 0; }
18820 EOF
18821 if { (eval echo configure:18822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18822   rm -rf conftest*
18823   eval "ac_cv_func_dbm_open=yes"
18824 else
18825   echo "configure: failed program was:" >&5
18826   cat conftest.$ac_ext >&5
18827   rm -rf conftest*
18828   eval "ac_cv_func_dbm_open=no"
18829 fi
18830 rm -f conftest*
18831 fi
18832
18833 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18834   echo "$ac_t""yes" 1>&6
18835   ol_cv_lib_ndbm=yes
18836 else
18837   echo "$ac_t""no" 1>&6
18838
18839                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18840 echo "configure:18841: checking for dbm_open in -lndbm" >&5
18841 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18843   echo $ac_n "(cached) $ac_c" 1>&6
18844 else
18845   ac_save_LIBS="$LIBS"
18846 LIBS="-lndbm  $LIBS"
18847 cat > conftest.$ac_ext <<EOF
18848 #line 18849 "configure"
18849 #include "confdefs.h"
18850 /* Override any gcc2 internal prototype to avoid an error.  */
18851 /* We use char because int might match the return type of a gcc2
18852     builtin and then its argument prototype would still apply.  */
18853 char dbm_open();
18854
18855 int main() {
18856 dbm_open()
18857 ; return 0; }
18858 EOF
18859 if { (eval echo configure:18860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18860   rm -rf conftest*
18861   eval "ac_cv_lib_$ac_lib_var=yes"
18862 else
18863   echo "configure: failed program was:" >&5
18864   cat conftest.$ac_ext >&5
18865   rm -rf conftest*
18866   eval "ac_cv_lib_$ac_lib_var=no"
18867 fi
18868 rm -f conftest*
18869 LIBS="$ac_save_LIBS"
18870
18871 fi
18872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18873   echo "$ac_t""yes" 1>&6
18874   ol_cv_lib_ndbm=-lndbm
18875 else
18876   echo "$ac_t""no" 1>&6
18877
18878                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18879 echo "configure:18880: checking for dbm_open in -ldbm" >&5
18880 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18882   echo $ac_n "(cached) $ac_c" 1>&6
18883 else
18884   ac_save_LIBS="$LIBS"
18885 LIBS="-ldbm  $LIBS"
18886 cat > conftest.$ac_ext <<EOF
18887 #line 18888 "configure"
18888 #include "confdefs.h"
18889 /* Override any gcc2 internal prototype to avoid an error.  */
18890 /* We use char because int might match the return type of a gcc2
18891     builtin and then its argument prototype would still apply.  */
18892 char dbm_open();
18893
18894 int main() {
18895 dbm_open()
18896 ; return 0; }
18897 EOF
18898 if { (eval echo configure:18899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18899   rm -rf conftest*
18900   eval "ac_cv_lib_$ac_lib_var=yes"
18901 else
18902   echo "configure: failed program was:" >&5
18903   cat conftest.$ac_ext >&5
18904   rm -rf conftest*
18905   eval "ac_cv_lib_$ac_lib_var=no"
18906 fi
18907 rm -f conftest*
18908 LIBS="$ac_save_LIBS"
18909
18910 fi
18911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18912   echo "$ac_t""yes" 1>&6
18913   ol_cv_lib_ndbm=-ldbm
18914 else
18915   echo "$ac_t""no" 1>&6
18916 ol_cv_lib_ndbm=no
18917 fi
18918                 
18919 fi
18920
18921         
18922 fi
18923
18924         LIBS="$ol_LIBS"
18925
18926 fi
18927
18928 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18929
18930
18931  for ac_hdr in ndbm.h
18932 do
18933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18935 echo "configure:18936: checking for $ac_hdr" >&5
18936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18937   echo $ac_n "(cached) $ac_c" 1>&6
18938 else
18939   cat > conftest.$ac_ext <<EOF
18940 #line 18941 "configure"
18941 #include "confdefs.h"
18942 #include <$ac_hdr>
18943 EOF
18944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18945 { (eval echo configure:18946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18947 if test -z "$ac_err"; then
18948   rm -rf conftest*
18949   eval "ac_cv_header_$ac_safe=yes"
18950 else
18951   echo "$ac_err" >&5
18952   echo "configure: failed program was:" >&5
18953   cat conftest.$ac_ext >&5
18954   rm -rf conftest*
18955   eval "ac_cv_header_$ac_safe=no"
18956 fi
18957 rm -f conftest*
18958 fi
18959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18960   echo "$ac_t""yes" 1>&6
18961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18962   cat >> confdefs.h <<EOF
18963 #define $ac_tr_hdr 1
18964 EOF
18965  
18966 else
18967   echo "$ac_t""no" 1>&6
18968 fi
18969 done
18970
18971  echo $ac_n "checking for db""... $ac_c" 1>&6
18972 echo "configure:18973: checking for db" >&5
18973 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18974   echo $ac_n "(cached) $ac_c" 1>&6
18975 else
18976   
18977         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18978                 ol_cv_ndbm=no
18979         else
18980                 ol_cv_ndbm=yes
18981         fi
18982
18983 fi
18984
18985 echo "$ac_t""$ol_cv_ndbm" 1>&6
18986  if test $ol_cv_ndbm = yes ; then
18987         cat >> confdefs.h <<\EOF
18988 #define HAVE_NDBM 1
18989 EOF
18990
18991  fi
18992
18993
18994         if test $ol_cv_ndbm = yes ; then
18995                 ol_link_ldbm=ndbm
18996                 ol_with_ldbm_api=ndbm
18997
18998                 if test $ol_cv_lib_ndbm != yes ; then
18999                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19000                 fi
19001         fi
19002 fi
19003
19004 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19005         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19006         if test $ol_enable_ldbm = yes ; then
19007                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19008         fi
19009
19010         echo "configure: warning: disabling LDBM" 1>&2
19011         ol_enable_ldbm=no
19012 fi
19013
19014 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19015         BUILD_LIBS_DYNAMIC=shared
19016         cat >> confdefs.h <<\EOF
19017 #define LDAP_LIBS_DYNAMIC 1
19018 EOF
19019
19020 else
19021         BUILD_LIBS_DYNAMIC=static
19022 fi
19023
19024 if test $ol_enable_wrappers != no ; then
19025         for ac_hdr in tcpd.h
19026 do
19027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19029 echo "configure:19030: checking for $ac_hdr" >&5
19030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19031   echo $ac_n "(cached) $ac_c" 1>&6
19032 else
19033   cat > conftest.$ac_ext <<EOF
19034 #line 19035 "configure"
19035 #include "confdefs.h"
19036 #include <$ac_hdr>
19037 EOF
19038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19039 { (eval echo configure:19040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19041 if test -z "$ac_err"; then
19042   rm -rf conftest*
19043   eval "ac_cv_header_$ac_safe=yes"
19044 else
19045   echo "$ac_err" >&5
19046   echo "configure: failed program was:" >&5
19047   cat conftest.$ac_ext >&5
19048   rm -rf conftest*
19049   eval "ac_cv_header_$ac_safe=no"
19050 fi
19051 rm -f conftest*
19052 fi
19053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19054   echo "$ac_t""yes" 1>&6
19055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19056   cat >> confdefs.h <<EOF
19057 #define $ac_tr_hdr 1
19058 EOF
19059  
19060                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19061 echo "configure:19062: checking for TCP wrappers library" >&5
19062                 save_LIBS="$LIBS"
19063                 LIBS="$LIBS -lwrap"
19064                 cat > conftest.$ac_ext <<EOF
19065 #line 19066 "configure"
19066 #include "confdefs.h"
19067
19068 #include <tcpd.h>
19069 int allow_severity = 0;
19070 int deny_severity  = 0;
19071
19072 struct request_info *req;
19073                 
19074 int main() {
19075
19076 hosts_access(req)
19077                 
19078 ; return 0; }
19079 EOF
19080 if { (eval echo configure:19081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19081   rm -rf conftest*
19082   echo "$ac_t""-lwrap" 1>&6
19083                 have_wrappers=yes
19084                 LIBS="$save_LIBS"
19085 else
19086   echo "configure: failed program was:" >&5
19087   cat conftest.$ac_ext >&5
19088   rm -rf conftest*
19089   
19090                                 LIBS="$LIBS -lnsl"
19091                 cat > conftest.$ac_ext <<EOF
19092 #line 19093 "configure"
19093 #include "confdefs.h"
19094
19095 #include <tcpd.h>
19096 int allow_severity = 0;
19097 int deny_severity  = 0;
19098
19099 struct request_info *req;
19100                 
19101 int main() {
19102
19103 hosts_access(req)
19104                 
19105 ; return 0; }
19106 EOF
19107 if { (eval echo configure:19108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19108   rm -rf conftest*
19109   echo "$ac_t""-lwrap -lnsl" 1>&6
19110                 have_wrappers=yes
19111                 LIBS="$save_LIBS -lnsl"
19112 else
19113   echo "configure: failed program was:" >&5
19114   cat conftest.$ac_ext >&5
19115   rm -rf conftest*
19116   
19117                 echo "$ac_t""no" 1>&6
19118                 have_wrappers=no
19119                 LIBS=$save_LIBS
19120 fi
19121 rm -f conftest*
19122 fi
19123 rm -f conftest*
19124 else
19125   echo "$ac_t""no" 1>&6
19126 have_wrappers=no
19127 fi
19128 done
19129
19130
19131         if test $have_wrappers = yes ; then
19132                 cat >> confdefs.h <<\EOF
19133 #define HAVE_TCPD 1
19134 EOF
19135
19136                 WRAP_LIBS="-lwrap"
19137         elif test $ol_enable_wrappers = yes ; then
19138                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19139         else
19140                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19141                 WRAP_LIBS=""
19142         fi
19143 fi
19144
19145 if test $ol_enable_syslog != no ; then
19146         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19147 echo "configure:19148: checking for openlog" >&5
19148 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19149   echo $ac_n "(cached) $ac_c" 1>&6
19150 else
19151   cat > conftest.$ac_ext <<EOF
19152 #line 19153 "configure"
19153 #include "confdefs.h"
19154 /* System header to define __stub macros and hopefully few prototypes,
19155     which can conflict with char openlog(); below.  */
19156 #include <assert.h>
19157 /* Override any gcc2 internal prototype to avoid an error.  */
19158 /* We use char because int might match the return type of a gcc2
19159     builtin and then its argument prototype would still apply.  */
19160 char openlog();
19161 char (*f)();
19162
19163 int main() {
19164
19165 /* The GNU C library defines this for functions which it implements
19166     to always fail with ENOSYS.  Some functions are actually named
19167     something starting with __ and the normal name is an alias.  */
19168 #if defined (__stub_openlog) || defined (__stub___openlog)
19169 choke me
19170 #else
19171 f = openlog;
19172 #endif
19173
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   eval "ac_cv_func_openlog=yes"
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   eval "ac_cv_func_openlog=no"
19184 fi
19185 rm -f conftest*
19186 fi
19187
19188 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19189   echo "$ac_t""yes" 1>&6
19190   :
19191 else
19192   echo "$ac_t""no" 1>&6
19193 fi
19194
19195         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19196                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19197         fi
19198         ol_enable_syslog=$ac_cv_func_openlog
19199 fi
19200
19201
19202 ol_link_sql=no
19203 if test $ol_enable_sql != no ; then
19204         for ac_hdr in sql.h sqlext.h
19205 do
19206 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19207 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19208 echo "configure:19209: checking for $ac_hdr" >&5
19209 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19210   echo $ac_n "(cached) $ac_c" 1>&6
19211 else
19212   cat > conftest.$ac_ext <<EOF
19213 #line 19214 "configure"
19214 #include "confdefs.h"
19215 #include <$ac_hdr>
19216 EOF
19217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19218 { (eval echo configure:19219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19220 if test -z "$ac_err"; then
19221   rm -rf conftest*
19222   eval "ac_cv_header_$ac_safe=yes"
19223 else
19224   echo "$ac_err" >&5
19225   echo "configure: failed program was:" >&5
19226   cat conftest.$ac_ext >&5
19227   rm -rf conftest*
19228   eval "ac_cv_header_$ac_safe=no"
19229 fi
19230 rm -f conftest*
19231 fi
19232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19233   echo "$ac_t""yes" 1>&6
19234     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19235   cat >> confdefs.h <<EOF
19236 #define $ac_tr_hdr 1
19237 EOF
19238  
19239 else
19240   echo "$ac_t""no" 1>&6
19241 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19242         
19243 fi
19244 done
19245
19246
19247         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19248 echo "configure:19249: checking for SQLDriverConnect in -liodbc" >&5
19249 ac_lib_var=`echo iodbc'_'SQLDriverConnect | 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="-liodbc  $LIBS"
19255 cat > conftest.$ac_ext <<EOF
19256 #line 19257 "configure"
19257 #include "confdefs.h"
19258 /* Override any gcc2 internal prototype to avoid an error.  */
19259 /* We use char because int might match the return type of a gcc2
19260     builtin and then its argument prototype would still apply.  */
19261 char SQLDriverConnect();
19262
19263 int main() {
19264 SQLDriverConnect()
19265 ; return 0; }
19266 EOF
19267 if { (eval echo configure:19268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19268   rm -rf conftest*
19269   eval "ac_cv_lib_$ac_lib_var=yes"
19270 else
19271   echo "configure: failed program was:" >&5
19272   cat conftest.$ac_ext >&5
19273   rm -rf conftest*
19274   eval "ac_cv_lib_$ac_lib_var=no"
19275 fi
19276 rm -f conftest*
19277 LIBS="$ac_save_LIBS"
19278
19279 fi
19280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19281   echo "$ac_t""yes" 1>&6
19282   have_iodbc=yes
19283 else
19284   echo "$ac_t""no" 1>&6
19285 have_iodbc=no
19286 fi
19287
19288         if test $have_iodbc = yes ; then
19289                 ol_link_sql="-liodbc"
19290         else
19291                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19292 echo "configure:19293: checking for SQLDriverConnect in -lodbc" >&5
19293 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19295   echo $ac_n "(cached) $ac_c" 1>&6
19296 else
19297   ac_save_LIBS="$LIBS"
19298 LIBS="-lodbc  $LIBS"
19299 cat > conftest.$ac_ext <<EOF
19300 #line 19301 "configure"
19301 #include "confdefs.h"
19302 /* Override any gcc2 internal prototype to avoid an error.  */
19303 /* We use char because int might match the return type of a gcc2
19304     builtin and then its argument prototype would still apply.  */
19305 char SQLDriverConnect();
19306
19307 int main() {
19308 SQLDriverConnect()
19309 ; return 0; }
19310 EOF
19311 if { (eval echo configure:19312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19312   rm -rf conftest*
19313   eval "ac_cv_lib_$ac_lib_var=yes"
19314 else
19315   echo "configure: failed program was:" >&5
19316   cat conftest.$ac_ext >&5
19317   rm -rf conftest*
19318   eval "ac_cv_lib_$ac_lib_var=no"
19319 fi
19320 rm -f conftest*
19321 LIBS="$ac_save_LIBS"
19322
19323 fi
19324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19325   echo "$ac_t""yes" 1>&6
19326   have_odbc=yes
19327 else
19328   echo "$ac_t""no" 1>&6
19329 have_odbc=no
19330 fi
19331
19332                 if test $have_odbc = yes ; then
19333                         ol_link_sql="-lodbc"
19334                 fi
19335         fi
19336
19337         if test $ol_link_sql != no ; then
19338                 SLAPD_SQL_LIBS="$ol_link_sql"
19339
19340         elif test $ol_enable_sql != auto ; then
19341                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19342         fi
19343 fi
19344
19345 if test $ol_enable_tcl != no ; then
19346         for ac_hdr in tcl.h
19347 do
19348 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19349 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19350 echo "configure:19351: checking for $ac_hdr" >&5
19351 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19352   echo $ac_n "(cached) $ac_c" 1>&6
19353 else
19354   cat > conftest.$ac_ext <<EOF
19355 #line 19356 "configure"
19356 #include "confdefs.h"
19357 #include <$ac_hdr>
19358 EOF
19359 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19360 { (eval echo configure:19361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19361 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19362 if test -z "$ac_err"; then
19363   rm -rf conftest*
19364   eval "ac_cv_header_$ac_safe=yes"
19365 else
19366   echo "$ac_err" >&5
19367   echo "configure: failed program was:" >&5
19368   cat conftest.$ac_ext >&5
19369   rm -rf conftest*
19370   eval "ac_cv_header_$ac_safe=no"
19371 fi
19372 rm -f conftest*
19373 fi
19374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19375   echo "$ac_t""yes" 1>&6
19376     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19377   cat >> confdefs.h <<EOF
19378 #define $ac_tr_hdr 1
19379 EOF
19380  
19381 else
19382   echo "$ac_t""no" 1>&6
19383 fi
19384 done
19385
19386
19387         if test $ac_cv_header_tcl_h != yes ; then
19388                 have_tcl=no
19389         else
19390                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19391                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19392 echo "configure:19393: checking for main in -l$lib" >&5
19393 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19394 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19395   echo $ac_n "(cached) $ac_c" 1>&6
19396 else
19397   ac_save_LIBS="$LIBS"
19398 LIBS="-l$lib  $LIBS"
19399 cat > conftest.$ac_ext <<EOF
19400 #line 19401 "configure"
19401 #include "confdefs.h"
19402
19403 int main() {
19404 main()
19405 ; return 0; }
19406 EOF
19407 if { (eval echo configure:19408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19408   rm -rf conftest*
19409   eval "ac_cv_lib_$ac_lib_var=yes"
19410 else
19411   echo "configure: failed program was:" >&5
19412   cat conftest.$ac_ext >&5
19413   rm -rf conftest*
19414   eval "ac_cv_lib_$ac_lib_var=no"
19415 fi
19416 rm -f conftest*
19417 LIBS="$ac_save_LIBS"
19418
19419 fi
19420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19421   echo "$ac_t""yes" 1>&6
19422   have_tcl=yes
19423                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19424                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19425                            else
19426                                         MOD_TCL_LIB="-l${lib}"
19427                            fi;break
19428 else
19429   echo "$ac_t""no" 1>&6
19430 have_tcl=no
19431 fi
19432
19433                 done
19434         fi
19435
19436         if test $have_tcl != yes ; then
19437                 echo "configure: warning: could not find -ltcl" 1>&2
19438                 if test $ol_enable_tcl = yes ; then
19439                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19440                 fi
19441
19442                 ol_enable_tcl=no
19443         fi
19444 fi
19445
19446 ol_link_termcap=no
19447 for ac_hdr in termcap.h ncurses.h
19448 do
19449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19451 echo "configure:19452: checking for $ac_hdr" >&5
19452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19453   echo $ac_n "(cached) $ac_c" 1>&6
19454 else
19455   cat > conftest.$ac_ext <<EOF
19456 #line 19457 "configure"
19457 #include "confdefs.h"
19458 #include <$ac_hdr>
19459 EOF
19460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19461 { (eval echo configure:19462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19463 if test -z "$ac_err"; then
19464   rm -rf conftest*
19465   eval "ac_cv_header_$ac_safe=yes"
19466 else
19467   echo "$ac_err" >&5
19468   echo "configure: failed program was:" >&5
19469   cat conftest.$ac_ext >&5
19470   rm -rf conftest*
19471   eval "ac_cv_header_$ac_safe=no"
19472 fi
19473 rm -f conftest*
19474 fi
19475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19476   echo "$ac_t""yes" 1>&6
19477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19478   cat >> confdefs.h <<EOF
19479 #define $ac_tr_hdr 1
19480 EOF
19481  
19482 else
19483   echo "$ac_t""no" 1>&6
19484 fi
19485 done
19486
19487
19488 if test $ol_link_termcap = no ; then
19489         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19490 echo "configure:19491: checking for tputs in -ltermcap" >&5
19491 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19493   echo $ac_n "(cached) $ac_c" 1>&6
19494 else
19495   ac_save_LIBS="$LIBS"
19496 LIBS="-ltermcap  $LIBS"
19497 cat > conftest.$ac_ext <<EOF
19498 #line 19499 "configure"
19499 #include "confdefs.h"
19500 /* Override any gcc2 internal prototype to avoid an error.  */
19501 /* We use char because int might match the return type of a gcc2
19502     builtin and then its argument prototype would still apply.  */
19503 char tputs();
19504
19505 int main() {
19506 tputs()
19507 ; return 0; }
19508 EOF
19509 if { (eval echo configure:19510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19510   rm -rf conftest*
19511   eval "ac_cv_lib_$ac_lib_var=yes"
19512 else
19513   echo "configure: failed program was:" >&5
19514   cat conftest.$ac_ext >&5
19515   rm -rf conftest*
19516   eval "ac_cv_lib_$ac_lib_var=no"
19517 fi
19518 rm -f conftest*
19519 LIBS="$ac_save_LIBS"
19520
19521 fi
19522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19523   echo "$ac_t""yes" 1>&6
19524   have_termcap=yes
19525 else
19526   echo "$ac_t""no" 1>&6
19527 have_termcap=no
19528 fi
19529
19530         if test $have_termcap = yes ; then
19531                 cat >> confdefs.h <<\EOF
19532 #define HAVE_TERMCAP 1
19533 EOF
19534
19535                 ol_link_termcap=yes
19536                 TERMCAP_LIBS=-ltermcap
19537         fi
19538 fi
19539
19540 if test $ol_link_termcap = no ; then
19541         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19542 echo "configure:19543: checking for initscr in -lncurses" >&5
19543 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19544 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19545   echo $ac_n "(cached) $ac_c" 1>&6
19546 else
19547   ac_save_LIBS="$LIBS"
19548 LIBS="-lncurses  $LIBS"
19549 cat > conftest.$ac_ext <<EOF
19550 #line 19551 "configure"
19551 #include "confdefs.h"
19552 /* Override any gcc2 internal prototype to avoid an error.  */
19553 /* We use char because int might match the return type of a gcc2
19554     builtin and then its argument prototype would still apply.  */
19555 char initscr();
19556
19557 int main() {
19558 initscr()
19559 ; return 0; }
19560 EOF
19561 if { (eval echo configure:19562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19562   rm -rf conftest*
19563   eval "ac_cv_lib_$ac_lib_var=yes"
19564 else
19565   echo "configure: failed program was:" >&5
19566   cat conftest.$ac_ext >&5
19567   rm -rf conftest*
19568   eval "ac_cv_lib_$ac_lib_var=no"
19569 fi
19570 rm -f conftest*
19571 LIBS="$ac_save_LIBS"
19572
19573 fi
19574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19575   echo "$ac_t""yes" 1>&6
19576   have_ncurses=yes
19577 else
19578   echo "$ac_t""no" 1>&6
19579 have_ncurses=no
19580 fi
19581
19582         if test $have_ncurses = yes ; then
19583                 cat >> confdefs.h <<\EOF
19584 #define HAVE_NCURSES 1
19585 EOF
19586
19587                 ol_link_termcap=yes
19588                 TERMCAP_LIBS=-lncurses
19589         fi
19590 fi
19591
19592 if test $ol_link_termcap = no ; then
19593         cat >> confdefs.h <<\EOF
19594 #define NO_TERMCAP 1
19595 EOF
19596
19597         TERMCAP_LIBS=
19598 fi
19599
19600 ol_link_sasl=no
19601 ol_link_spasswd=no
19602 if test $ol_with_cyrus_sasl != no ; then
19603         for ac_hdr in sasl/sasl.h sasl.h
19604 do
19605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19607 echo "configure:19608: checking for $ac_hdr" >&5
19608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19609   echo $ac_n "(cached) $ac_c" 1>&6
19610 else
19611   cat > conftest.$ac_ext <<EOF
19612 #line 19613 "configure"
19613 #include "confdefs.h"
19614 #include <$ac_hdr>
19615 EOF
19616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19617 { (eval echo configure:19618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19619 if test -z "$ac_err"; then
19620   rm -rf conftest*
19621   eval "ac_cv_header_$ac_safe=yes"
19622 else
19623   echo "$ac_err" >&5
19624   echo "configure: failed program was:" >&5
19625   cat conftest.$ac_ext >&5
19626   rm -rf conftest*
19627   eval "ac_cv_header_$ac_safe=no"
19628 fi
19629 rm -f conftest*
19630 fi
19631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19632   echo "$ac_t""yes" 1>&6
19633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19634   cat >> confdefs.h <<EOF
19635 #define $ac_tr_hdr 1
19636 EOF
19637  
19638 else
19639   echo "$ac_t""no" 1>&6
19640 fi
19641 done
19642
19643
19644         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19645                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19646 echo "configure:19647: checking for sasl_client_init in -lsasl2" >&5
19647 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19649   echo $ac_n "(cached) $ac_c" 1>&6
19650 else
19651   ac_save_LIBS="$LIBS"
19652 LIBS="-lsasl2  $LIBS"
19653 cat > conftest.$ac_ext <<EOF
19654 #line 19655 "configure"
19655 #include "confdefs.h"
19656 /* Override any gcc2 internal prototype to avoid an error.  */
19657 /* We use char because int might match the return type of a gcc2
19658     builtin and then its argument prototype would still apply.  */
19659 char sasl_client_init();
19660
19661 int main() {
19662 sasl_client_init()
19663 ; return 0; }
19664 EOF
19665 if { (eval echo configure:19666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19666   rm -rf conftest*
19667   eval "ac_cv_lib_$ac_lib_var=yes"
19668 else
19669   echo "configure: failed program was:" >&5
19670   cat conftest.$ac_ext >&5
19671   rm -rf conftest*
19672   eval "ac_cv_lib_$ac_lib_var=no"
19673 fi
19674 rm -f conftest*
19675 LIBS="$ac_save_LIBS"
19676
19677 fi
19678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19679   echo "$ac_t""yes" 1>&6
19680   ol_link_sasl="-lsasl2"
19681 else
19682   echo "$ac_t""no" 1>&6
19683 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19684 echo "configure:19685: checking for sasl_client_init in -lsasl" >&5
19685 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19686 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19687   echo $ac_n "(cached) $ac_c" 1>&6
19688 else
19689   ac_save_LIBS="$LIBS"
19690 LIBS="-lsasl  $LIBS"
19691 cat > conftest.$ac_ext <<EOF
19692 #line 19693 "configure"
19693 #include "confdefs.h"
19694 /* Override any gcc2 internal prototype to avoid an error.  */
19695 /* We use char because int might match the return type of a gcc2
19696     builtin and then its argument prototype would still apply.  */
19697 char sasl_client_init();
19698
19699 int main() {
19700 sasl_client_init()
19701 ; return 0; }
19702 EOF
19703 if { (eval echo configure:19704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19704   rm -rf conftest*
19705   eval "ac_cv_lib_$ac_lib_var=yes"
19706 else
19707   echo "configure: failed program was:" >&5
19708   cat conftest.$ac_ext >&5
19709   rm -rf conftest*
19710   eval "ac_cv_lib_$ac_lib_var=no"
19711 fi
19712 rm -f conftest*
19713 LIBS="$ac_save_LIBS"
19714
19715 fi
19716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19717   echo "$ac_t""yes" 1>&6
19718   ol_link_sasl="-lsasl"
19719 else
19720   echo "$ac_t""no" 1>&6
19721 fi
19722
19723 fi
19724
19725         fi
19726
19727         if test $ol_link_sasl = no ; then
19728                 if test $ol_with_cyrus_sasl != auto ; then
19729                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19730                 else
19731                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19732                         echo "configure: warning: SASL authentication not supported!" 1>&2
19733                         if test $ol_link_tls = no ; then
19734                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19735                         fi
19736                 fi
19737         else
19738                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19739 echo "configure:19740: checking Cyrus SASL library version" >&5
19740 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19741   echo $ac_n "(cached) $ac_c" 1>&6
19742 else
19743   
19744         cat > conftest.$ac_ext <<EOF
19745 #line 19746 "configure"
19746 #include "confdefs.h"
19747
19748 #ifdef HAVE_SASL_SASL_H
19749 #include <sasl/sasl.h>
19750 #else
19751 #include <sasl.h>
19752 #endif
19753
19754 /* require 2.1.3 or later */
19755 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19756         char *__sasl_compat = "1.5.x okay";
19757 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19758         __sasl_compat "2.2+ or better okay (we guess)";
19759 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19760         && SASL_VERSION_STEP >=3
19761         __sasl_compat = "2.1.3+ or better okay";
19762 #endif
19763         
19764 EOF
19765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19766   egrep "__sasl_compat" >/dev/null 2>&1; then
19767   rm -rf conftest*
19768   ol_cv_sasl_compat=yes
19769 else
19770   rm -rf conftest*
19771   ol_cv_sasl_compat=no
19772 fi
19773 rm -f conftest*
19774
19775 fi
19776
19777 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19778
19779                 if test $ol_cv_sasl_compat = no ; then
19780                         ol_link_sasl=no
19781                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19782                 fi
19783
19784                 cat >> confdefs.h <<\EOF
19785 #define HAVE_CYRUS_SASL 1
19786 EOF
19787
19788                 SASL_LIBS="$ol_link_sasl"
19789                 if test $ol_enable_spasswd != no ; then
19790                         ol_link_spasswd=yes
19791                 fi
19792
19793                 ac_save_LIBS="$LIBS"
19794                 LIBS="$LIBS $ol_link_sasl"
19795                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19796 echo "configure:19797: checking for sasl_version" >&5
19797 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19798   echo $ac_n "(cached) $ac_c" 1>&6
19799 else
19800   cat > conftest.$ac_ext <<EOF
19801 #line 19802 "configure"
19802 #include "confdefs.h"
19803 /* System header to define __stub macros and hopefully few prototypes,
19804     which can conflict with char sasl_version(); below.  */
19805 #include <assert.h>
19806 /* Override any gcc2 internal prototype to avoid an error.  */
19807 /* We use char because int might match the return type of a gcc2
19808     builtin and then its argument prototype would still apply.  */
19809 char sasl_version();
19810 char (*f)();
19811
19812 int main() {
19813
19814 /* The GNU C library defines this for functions which it implements
19815     to always fail with ENOSYS.  Some functions are actually named
19816     something starting with __ and the normal name is an alias.  */
19817 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19818 choke me
19819 #else
19820 f = sasl_version;
19821 #endif
19822
19823 ; return 0; }
19824 EOF
19825 if { (eval echo configure:19826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19826   rm -rf conftest*
19827   eval "ac_cv_func_sasl_version=yes"
19828 else
19829   echo "configure: failed program was:" >&5
19830   cat conftest.$ac_ext >&5
19831   rm -rf conftest*
19832   eval "ac_cv_func_sasl_version=no"
19833 fi
19834 rm -f conftest*
19835 fi
19836
19837 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19838   echo "$ac_t""yes" 1>&6
19839   cat >> confdefs.h <<\EOF
19840 #define HAVE_SASL_VERSION 1
19841 EOF
19842
19843 else
19844   echo "$ac_t""no" 1>&6
19845 fi
19846
19847                 LIBS="$ac_save_LIBS"
19848         fi
19849
19850 else
19851         echo "configure: warning: SASL authentication not supported!" 1>&2
19852         if test $ol_link_tls = no ; then
19853                 echo "configure: warning: Strong authentication not supported!" 1>&2
19854         fi
19855 fi
19856
19857 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19858         dev=no
19859         if test -r /dev/urandom ; then
19860                 dev="/dev/urandom";
19861         elif test -r /idev/urandom ; then
19862                 dev="/idev/urandom";
19863         elif test -r /dev/srandom ; then
19864                 dev="/dev/srandom";
19865         elif test -r /dev/random ; then
19866                 dev="/dev/random";
19867         elif test -r /idev/random ; then
19868                 dev="/idev/random";
19869         fi
19870
19871         if test $dev != no ; then
19872                 cat >> confdefs.h <<EOF
19873 #define URANDOM_DEVICE "$dev"
19874 EOF
19875
19876         fi
19877 fi
19878
19879 ol_link_fetch=no
19880 if test $ol_with_fetch != no ; then
19881         ol_LIBS=$LIBS
19882 LIBS="-lfetch -lcom_err $LIBS"
19883 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19884 echo "configure:19885: checking fetch(3) library" >&5
19885 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19886   echo $ac_n "(cached) $ac_c" 1>&6
19887 else
19888   
19889         cat > conftest.$ac_ext <<EOF
19890 #line 19891 "configure"
19891 #include "confdefs.h"
19892
19893 #include <sys/param.h>
19894 #include <stdio.h>
19895 #include <fetch.h>
19896 int main() {
19897 struct url *u = fetchParseURL("file:///"); 
19898 ; return 0; }
19899 EOF
19900 if { (eval echo configure:19901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19901   rm -rf conftest*
19902   ol_cv_lib_fetch=yes
19903 else
19904   echo "configure: failed program was:" >&5
19905   cat conftest.$ac_ext >&5
19906   rm -rf conftest*
19907   ol_cv_lib_fetch=no
19908 fi
19909 rm -f conftest*
19910 fi
19911
19912 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19913 LIBS=$ol_LIBS
19914 if test $ol_cv_lib_fetch != no ; then
19915         ol_link_fetch="-lfetch -lcom_err"
19916         cat >> confdefs.h <<\EOF
19917 #define HAVE_FETCH 1
19918 EOF
19919
19920 fi
19921
19922
19923         if test $ol_cv_lib_fetch != no ; then
19924                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19925                 ol_link_fetch=freebsd
19926
19927         elif test $ol_with_fetch != auto ; then
19928                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19929         fi 
19930 fi
19931
19932 ol_link_readline=no
19933 if test $ol_with_readline != no ; then
19934         for ac_hdr in readline/readline.h readline/history.h
19935 do
19936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19938 echo "configure:19939: checking for $ac_hdr" >&5
19939 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19940   echo $ac_n "(cached) $ac_c" 1>&6
19941 else
19942   cat > conftest.$ac_ext <<EOF
19943 #line 19944 "configure"
19944 #include "confdefs.h"
19945 #include <$ac_hdr>
19946 EOF
19947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19948 { (eval echo configure:19949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19950 if test -z "$ac_err"; then
19951   rm -rf conftest*
19952   eval "ac_cv_header_$ac_safe=yes"
19953 else
19954   echo "$ac_err" >&5
19955   echo "configure: failed program was:" >&5
19956   cat conftest.$ac_ext >&5
19957   rm -rf conftest*
19958   eval "ac_cv_header_$ac_safe=no"
19959 fi
19960 rm -f conftest*
19961 fi
19962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19963   echo "$ac_t""yes" 1>&6
19964     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19965   cat >> confdefs.h <<EOF
19966 #define $ac_tr_hdr 1
19967 EOF
19968  
19969 else
19970   echo "$ac_t""no" 1>&6
19971 fi
19972 done
19973
19974
19975         if test $ac_cv_header_readline_readline_h = yes ; then
19976                 save_LIBS="$LIBS"
19977                 LIBS="$TERMCAP_LIBS $LIBS"
19978                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19979 echo "configure:19980: checking for readline in -lreadline" >&5
19980 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19982   echo $ac_n "(cached) $ac_c" 1>&6
19983 else
19984   ac_save_LIBS="$LIBS"
19985 LIBS="-lreadline  $LIBS"
19986 cat > conftest.$ac_ext <<EOF
19987 #line 19988 "configure"
19988 #include "confdefs.h"
19989 /* Override any gcc2 internal prototype to avoid an error.  */
19990 /* We use char because int might match the return type of a gcc2
19991     builtin and then its argument prototype would still apply.  */
19992 char readline();
19993
19994 int main() {
19995 readline()
19996 ; return 0; }
19997 EOF
19998 if { (eval echo configure:19999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19999   rm -rf conftest*
20000   eval "ac_cv_lib_$ac_lib_var=yes"
20001 else
20002   echo "configure: failed program was:" >&5
20003   cat conftest.$ac_ext >&5
20004   rm -rf conftest*
20005   eval "ac_cv_lib_$ac_lib_var=no"
20006 fi
20007 rm -f conftest*
20008 LIBS="$ac_save_LIBS"
20009
20010 fi
20011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20012   echo "$ac_t""yes" 1>&6
20013   have_readline=yes
20014 else
20015   echo "$ac_t""no" 1>&6
20016 have_readline=no
20017 fi
20018
20019                 LIBS="$save_LIBS"
20020                         
20021                 if test $have_readline = yes ; then
20022                         ol_with_readline=found
20023                         ol_link_readline=yes
20024
20025                         READLINE_LIBS="-lreadline"
20026                 fi
20027         fi
20028 fi
20029
20030 if test $ol_link_readline = yes ; then
20031         cat >> confdefs.h <<\EOF
20032 #define HAVE_READLINE 1
20033 EOF
20034
20035 fi
20036
20037
20038 if test $ol_enable_crypt != no ; then
20039         save_LIBS="$LIBS"
20040         LIBS="$TLS_LIBS $LIBS"
20041
20042         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20043 echo "configure:20044: checking for crypt" >&5
20044 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20045   echo $ac_n "(cached) $ac_c" 1>&6
20046 else
20047   cat > conftest.$ac_ext <<EOF
20048 #line 20049 "configure"
20049 #include "confdefs.h"
20050 /* System header to define __stub macros and hopefully few prototypes,
20051     which can conflict with char crypt(); below.  */
20052 #include <assert.h>
20053 /* Override any gcc2 internal prototype to avoid an error.  */
20054 /* We use char because int might match the return type of a gcc2
20055     builtin and then its argument prototype would still apply.  */
20056 char crypt();
20057 char (*f)();
20058
20059 int main() {
20060
20061 /* The GNU C library defines this for functions which it implements
20062     to always fail with ENOSYS.  Some functions are actually named
20063     something starting with __ and the normal name is an alias.  */
20064 #if defined (__stub_crypt) || defined (__stub___crypt)
20065 choke me
20066 #else
20067 f = crypt;
20068 #endif
20069
20070 ; return 0; }
20071 EOF
20072 if { (eval echo configure:20073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20073   rm -rf conftest*
20074   eval "ac_cv_func_crypt=yes"
20075 else
20076   echo "configure: failed program was:" >&5
20077   cat conftest.$ac_ext >&5
20078   rm -rf conftest*
20079   eval "ac_cv_func_crypt=no"
20080 fi
20081 rm -f conftest*
20082 fi
20083
20084 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20085   echo "$ac_t""yes" 1>&6
20086   have_crypt=yes
20087 else
20088   echo "$ac_t""no" 1>&6
20089
20090                 LIBS="$save_LIBS"
20091                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20092 echo "configure:20093: checking for crypt in -lcrypt" >&5
20093 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20095   echo $ac_n "(cached) $ac_c" 1>&6
20096 else
20097   ac_save_LIBS="$LIBS"
20098 LIBS="-lcrypt  $LIBS"
20099 cat > conftest.$ac_ext <<EOF
20100 #line 20101 "configure"
20101 #include "confdefs.h"
20102 /* Override any gcc2 internal prototype to avoid an error.  */
20103 /* We use char because int might match the return type of a gcc2
20104     builtin and then its argument prototype would still apply.  */
20105 char crypt();
20106
20107 int main() {
20108 crypt()
20109 ; return 0; }
20110 EOF
20111 if { (eval echo configure:20112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20112   rm -rf conftest*
20113   eval "ac_cv_lib_$ac_lib_var=yes"
20114 else
20115   echo "configure: failed program was:" >&5
20116   cat conftest.$ac_ext >&5
20117   rm -rf conftest*
20118   eval "ac_cv_lib_$ac_lib_var=no"
20119 fi
20120 rm -f conftest*
20121 LIBS="$ac_save_LIBS"
20122
20123 fi
20124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20125   echo "$ac_t""yes" 1>&6
20126   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20127                         have_crypt=yes
20128 else
20129   echo "$ac_t""no" 1>&6
20130 have_crypt=no
20131 fi
20132
20133 fi
20134
20135
20136         LIBS="$save_LIBS"
20137
20138         if test $have_crypt = yes ; then
20139                 cat >> confdefs.h <<\EOF
20140 #define HAVE_CRYPT 1
20141 EOF
20142
20143         else
20144                 echo "configure: warning: could not find crypt" 1>&2
20145                 if test $ol_enable_crypt = yes ; then
20146                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20147                 fi
20148
20149                 echo "configure: warning: disabling crypt support" 1>&2
20150                 ol_enable_crypt=no
20151         fi
20152 fi
20153
20154 if test $ol_enable_proctitle != no ; then
20155         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20156 echo "configure:20157: checking for setproctitle" >&5
20157 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20158   echo $ac_n "(cached) $ac_c" 1>&6
20159 else
20160   cat > conftest.$ac_ext <<EOF
20161 #line 20162 "configure"
20162 #include "confdefs.h"
20163 /* System header to define __stub macros and hopefully few prototypes,
20164     which can conflict with char setproctitle(); below.  */
20165 #include <assert.h>
20166 /* Override any gcc2 internal prototype to avoid an error.  */
20167 /* We use char because int might match the return type of a gcc2
20168     builtin and then its argument prototype would still apply.  */
20169 char setproctitle();
20170 char (*f)();
20171
20172 int main() {
20173
20174 /* The GNU C library defines this for functions which it implements
20175     to always fail with ENOSYS.  Some functions are actually named
20176     something starting with __ and the normal name is an alias.  */
20177 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20178 choke me
20179 #else
20180 f = setproctitle;
20181 #endif
20182
20183 ; return 0; }
20184 EOF
20185 if { (eval echo configure:20186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20186   rm -rf conftest*
20187   eval "ac_cv_func_setproctitle=yes"
20188 else
20189   echo "configure: failed program was:" >&5
20190   cat conftest.$ac_ext >&5
20191   rm -rf conftest*
20192   eval "ac_cv_func_setproctitle=no"
20193 fi
20194 rm -f conftest*
20195 fi
20196
20197 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20198   echo "$ac_t""yes" 1>&6
20199   have_setproctitle=yes
20200 else
20201   echo "$ac_t""no" 1>&6
20202
20203                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20204 echo "configure:20205: checking for setproctitle in -lutil" >&5
20205 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20206 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20207   echo $ac_n "(cached) $ac_c" 1>&6
20208 else
20209   ac_save_LIBS="$LIBS"
20210 LIBS="-lutil  $LIBS"
20211 cat > conftest.$ac_ext <<EOF
20212 #line 20213 "configure"
20213 #include "confdefs.h"
20214 /* Override any gcc2 internal prototype to avoid an error.  */
20215 /* We use char because int might match the return type of a gcc2
20216     builtin and then its argument prototype would still apply.  */
20217 char setproctitle();
20218
20219 int main() {
20220 setproctitle()
20221 ; return 0; }
20222 EOF
20223 if { (eval echo configure:20224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20224   rm -rf conftest*
20225   eval "ac_cv_lib_$ac_lib_var=yes"
20226 else
20227   echo "configure: failed program was:" >&5
20228   cat conftest.$ac_ext >&5
20229   rm -rf conftest*
20230   eval "ac_cv_lib_$ac_lib_var=no"
20231 fi
20232 rm -f conftest*
20233 LIBS="$ac_save_LIBS"
20234
20235 fi
20236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20237   echo "$ac_t""yes" 1>&6
20238   have_setproctitle=yes
20239                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20240 else
20241   echo "$ac_t""no" 1>&6
20242 have_setproctitle=no
20243                         LIBOBJS="$LIBOBJS setproctitle.o"
20244                         LIBSRCS="$LIBSRCS setproctitle.c"
20245 fi
20246
20247 fi
20248
20249
20250         if test $have_setproctitle = yes ; then
20251                 cat >> confdefs.h <<\EOF
20252 #define HAVE_SETPROCTITLE 1
20253 EOF
20254
20255         fi
20256 fi
20257
20258 if test $ol_enable_slp != no ; then
20259         for ac_hdr in slp.h 
20260 do
20261 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20262 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20263 echo "configure:20264: checking for $ac_hdr" >&5
20264 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20265   echo $ac_n "(cached) $ac_c" 1>&6
20266 else
20267   cat > conftest.$ac_ext <<EOF
20268 #line 20269 "configure"
20269 #include "confdefs.h"
20270 #include <$ac_hdr>
20271 EOF
20272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20273 { (eval echo configure:20274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20275 if test -z "$ac_err"; then
20276   rm -rf conftest*
20277   eval "ac_cv_header_$ac_safe=yes"
20278 else
20279   echo "$ac_err" >&5
20280   echo "configure: failed program was:" >&5
20281   cat conftest.$ac_ext >&5
20282   rm -rf conftest*
20283   eval "ac_cv_header_$ac_safe=no"
20284 fi
20285 rm -f conftest*
20286 fi
20287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20288   echo "$ac_t""yes" 1>&6
20289     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20290   cat >> confdefs.h <<EOF
20291 #define $ac_tr_hdr 1
20292 EOF
20293  
20294 else
20295   echo "$ac_t""no" 1>&6
20296 fi
20297 done
20298
20299
20300         if test $ac_cv_header_slp_h = yes ; then
20301                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20302 echo "configure:20303: checking for SLPOpen in -lslp" >&5
20303 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20304 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20305   echo $ac_n "(cached) $ac_c" 1>&6
20306 else
20307   ac_save_LIBS="$LIBS"
20308 LIBS="-lslp  $LIBS"
20309 cat > conftest.$ac_ext <<EOF
20310 #line 20311 "configure"
20311 #include "confdefs.h"
20312 /* Override any gcc2 internal prototype to avoid an error.  */
20313 /* We use char because int might match the return type of a gcc2
20314     builtin and then its argument prototype would still apply.  */
20315 char SLPOpen();
20316
20317 int main() {
20318 SLPOpen()
20319 ; return 0; }
20320 EOF
20321 if { (eval echo configure:20322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20322   rm -rf conftest*
20323   eval "ac_cv_lib_$ac_lib_var=yes"
20324 else
20325   echo "configure: failed program was:" >&5
20326   cat conftest.$ac_ext >&5
20327   rm -rf conftest*
20328   eval "ac_cv_lib_$ac_lib_var=no"
20329 fi
20330 rm -f conftest*
20331 LIBS="$ac_save_LIBS"
20332
20333 fi
20334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20335   echo "$ac_t""yes" 1>&6
20336   have_slp=yes
20337 else
20338   echo "$ac_t""no" 1>&6
20339 have_slp=no
20340 fi
20341
20342                 if test $have_slp = yes ; then
20343                         cat >> confdefs.h <<\EOF
20344 #define HAVE_SLP 1
20345 EOF
20346
20347                         SLAPD_SLP_LIBS=-lslp
20348                 fi
20349
20350         elif test $ol_enable_slp = yes ; then
20351                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20352         fi
20353 fi
20354
20355 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20356 echo "configure:20357: checking for ANSI C header files" >&5
20357 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20358   echo $ac_n "(cached) $ac_c" 1>&6
20359 else
20360   cat > conftest.$ac_ext <<EOF
20361 #line 20362 "configure"
20362 #include "confdefs.h"
20363 #include <stdlib.h>
20364 #include <stdarg.h>
20365 #include <string.h>
20366 #include <float.h>
20367 EOF
20368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20369 { (eval echo configure:20370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20371 if test -z "$ac_err"; then
20372   rm -rf conftest*
20373   ac_cv_header_stdc=yes
20374 else
20375   echo "$ac_err" >&5
20376   echo "configure: failed program was:" >&5
20377   cat conftest.$ac_ext >&5
20378   rm -rf conftest*
20379   ac_cv_header_stdc=no
20380 fi
20381 rm -f conftest*
20382
20383 if test $ac_cv_header_stdc = yes; then
20384   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20385 cat > conftest.$ac_ext <<EOF
20386 #line 20387 "configure"
20387 #include "confdefs.h"
20388 #include <string.h>
20389 EOF
20390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20391   egrep "memchr" >/dev/null 2>&1; then
20392   :
20393 else
20394   rm -rf conftest*
20395   ac_cv_header_stdc=no
20396 fi
20397 rm -f conftest*
20398
20399 fi
20400
20401 if test $ac_cv_header_stdc = yes; then
20402   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20403 cat > conftest.$ac_ext <<EOF
20404 #line 20405 "configure"
20405 #include "confdefs.h"
20406 #include <stdlib.h>
20407 EOF
20408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20409   egrep "free" >/dev/null 2>&1; then
20410   :
20411 else
20412   rm -rf conftest*
20413   ac_cv_header_stdc=no
20414 fi
20415 rm -f conftest*
20416
20417 fi
20418
20419 if test $ac_cv_header_stdc = yes; then
20420   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20421 if test "$cross_compiling" = yes; then
20422   :
20423 else
20424   cat > conftest.$ac_ext <<EOF
20425 #line 20426 "configure"
20426 #include "confdefs.h"
20427 #include <ctype.h>
20428 #if ((' ' & 0x0FF) == 0x020)
20429 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20430 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20431 #else
20432 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20433  || ('j' <= (c) && (c) <= 'r') \
20434  || ('s' <= (c) && (c) <= 'z'))
20435 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20436 #endif
20437 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20438 int main () { int i; for (i = 0; i < 256; i++)
20439 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20440 exit (0); }
20441
20442 EOF
20443 if { (eval echo configure:20444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20444 then
20445   :
20446 else
20447   echo "configure: failed program was:" >&5
20448   cat conftest.$ac_ext >&5
20449   rm -fr conftest*
20450   ac_cv_header_stdc=no
20451 fi
20452 rm -fr conftest*
20453 fi
20454
20455 fi
20456 fi
20457
20458 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20459 if test $ac_cv_header_stdc = yes; then
20460   cat >> confdefs.h <<\EOF
20461 #define STDC_HEADERS 1
20462 EOF
20463
20464 fi
20465
20466 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20467 echo "configure:20468: checking for mode_t" >&5
20468 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   cat > conftest.$ac_ext <<EOF
20472 #line 20473 "configure"
20473 #include "confdefs.h"
20474 #include <sys/types.h>
20475 #if STDC_HEADERS
20476 #include <stdlib.h>
20477 #include <stddef.h>
20478 #endif
20479
20480 EOF
20481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20482   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20483   rm -rf conftest*
20484   eval "ac_cv_type_mode_t=yes"
20485 else
20486   rm -rf conftest*
20487   eval "ac_cv_type_mode_t=no"
20488 fi
20489 rm -f conftest*
20490
20491 fi
20492 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20493   echo "$ac_t""yes" 1>&6
20494 else
20495   echo "$ac_t""no" 1>&6
20496   cat >> confdefs.h <<EOF
20497 #define mode_t int
20498 EOF
20499
20500 fi
20501
20502 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20503 echo "configure:20504: checking for off_t" >&5
20504 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20505   echo $ac_n "(cached) $ac_c" 1>&6
20506 else
20507   cat > conftest.$ac_ext <<EOF
20508 #line 20509 "configure"
20509 #include "confdefs.h"
20510 #include <sys/types.h>
20511 #if STDC_HEADERS
20512 #include <stdlib.h>
20513 #include <stddef.h>
20514 #endif
20515
20516 EOF
20517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20518   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20519   rm -rf conftest*
20520   eval "ac_cv_type_off_t=yes"
20521 else
20522   rm -rf conftest*
20523   eval "ac_cv_type_off_t=no"
20524 fi
20525 rm -f conftest*
20526
20527 fi
20528 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20529   echo "$ac_t""yes" 1>&6
20530 else
20531   echo "$ac_t""no" 1>&6
20532   cat >> confdefs.h <<EOF
20533 #define off_t long
20534 EOF
20535
20536 fi
20537
20538 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20539 echo "configure:20540: checking for pid_t" >&5
20540 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20541   echo $ac_n "(cached) $ac_c" 1>&6
20542 else
20543   cat > conftest.$ac_ext <<EOF
20544 #line 20545 "configure"
20545 #include "confdefs.h"
20546 #include <sys/types.h>
20547 #if STDC_HEADERS
20548 #include <stdlib.h>
20549 #include <stddef.h>
20550 #endif
20551
20552 EOF
20553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20554   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20555   rm -rf conftest*
20556   eval "ac_cv_type_pid_t=yes"
20557 else
20558   rm -rf conftest*
20559   eval "ac_cv_type_pid_t=no"
20560 fi
20561 rm -f conftest*
20562
20563 fi
20564 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20565   echo "$ac_t""yes" 1>&6
20566 else
20567   echo "$ac_t""no" 1>&6
20568   cat >> confdefs.h <<EOF
20569 #define pid_t int
20570 EOF
20571
20572 fi
20573
20574 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20575 echo "configure:20576: checking for ptrdiff_t" >&5
20576 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20577   echo $ac_n "(cached) $ac_c" 1>&6
20578 else
20579   cat > conftest.$ac_ext <<EOF
20580 #line 20581 "configure"
20581 #include "confdefs.h"
20582 #include <stddef.h>
20583 int main() {
20584 ptrdiff_t p
20585 ; return 0; }
20586 EOF
20587 if { (eval echo configure:20588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20588   rm -rf conftest*
20589   am_cv_type_ptrdiff_t=yes
20590 else
20591   echo "configure: failed program was:" >&5
20592   cat conftest.$ac_ext >&5
20593   rm -rf conftest*
20594   am_cv_type_ptrdiff_t=no
20595 fi
20596 rm -f conftest*
20597 fi
20598
20599 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20600    if test $am_cv_type_ptrdiff_t = yes; then
20601      cat >> confdefs.h <<\EOF
20602 #define HAVE_PTRDIFF_T 1
20603 EOF
20604
20605    fi
20606
20607 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20608 echo "configure:20609: checking return type of signal handlers" >&5
20609 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20610   echo $ac_n "(cached) $ac_c" 1>&6
20611 else
20612   cat > conftest.$ac_ext <<EOF
20613 #line 20614 "configure"
20614 #include "confdefs.h"
20615 #include <sys/types.h>
20616 #include <signal.h>
20617 #ifdef signal
20618 #undef signal
20619 #endif
20620 #ifdef __cplusplus
20621 extern "C" void (*signal (int, void (*)(int)))(int);
20622 #else
20623 void (*signal ()) ();
20624 #endif
20625
20626 int main() {
20627 int i;
20628 ; return 0; }
20629 EOF
20630 if { (eval echo configure:20631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20631   rm -rf conftest*
20632   ac_cv_type_signal=void
20633 else
20634   echo "configure: failed program was:" >&5
20635   cat conftest.$ac_ext >&5
20636   rm -rf conftest*
20637   ac_cv_type_signal=int
20638 fi
20639 rm -f conftest*
20640 fi
20641
20642 echo "$ac_t""$ac_cv_type_signal" 1>&6
20643 cat >> confdefs.h <<EOF
20644 #define RETSIGTYPE $ac_cv_type_signal
20645 EOF
20646
20647
20648 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20649 echo "configure:20650: checking for size_t" >&5
20650 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20651   echo $ac_n "(cached) $ac_c" 1>&6
20652 else
20653   cat > conftest.$ac_ext <<EOF
20654 #line 20655 "configure"
20655 #include "confdefs.h"
20656 #include <sys/types.h>
20657 #if STDC_HEADERS
20658 #include <stdlib.h>
20659 #include <stddef.h>
20660 #endif
20661
20662 EOF
20663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20664   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20665   rm -rf conftest*
20666   eval "ac_cv_type_size_t=yes"
20667 else
20668   rm -rf conftest*
20669   eval "ac_cv_type_size_t=no"
20670 fi
20671 rm -f conftest*
20672
20673 fi
20674 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20675   echo "$ac_t""yes" 1>&6
20676 else
20677   echo "$ac_t""no" 1>&6
20678   cat >> confdefs.h <<EOF
20679 #define size_t unsigned
20680 EOF
20681
20682 fi
20683
20684
20685 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20686 echo "configure:20687: checking for ssize_t" >&5
20687 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20688   echo $ac_n "(cached) $ac_c" 1>&6
20689 else
20690   cat > conftest.$ac_ext <<EOF
20691 #line 20692 "configure"
20692 #include "confdefs.h"
20693 #include <sys/types.h>
20694 #if STDC_HEADERS
20695 #include <stdlib.h>
20696 #include <stddef.h>
20697 #endif
20698
20699 EOF
20700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20701   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20702   rm -rf conftest*
20703   eval "ac_cv_type_ssize_t=yes"
20704 else
20705   rm -rf conftest*
20706   eval "ac_cv_type_ssize_t=no"
20707 fi
20708 rm -f conftest*
20709
20710 fi
20711 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20712   echo "$ac_t""yes" 1>&6
20713 else
20714   echo "$ac_t""no" 1>&6
20715   cat >> confdefs.h <<EOF
20716 #define ssize_t signed int
20717 EOF
20718
20719 fi
20720
20721 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20722 echo "configure:20723: checking for caddr_t" >&5
20723 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20724   echo $ac_n "(cached) $ac_c" 1>&6
20725 else
20726   cat > conftest.$ac_ext <<EOF
20727 #line 20728 "configure"
20728 #include "confdefs.h"
20729 #include <sys/types.h>
20730 #if STDC_HEADERS
20731 #include <stdlib.h>
20732 #include <stddef.h>
20733 #endif
20734
20735 EOF
20736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20737   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20738   rm -rf conftest*
20739   eval "ac_cv_type_caddr_t=yes"
20740 else
20741   rm -rf conftest*
20742   eval "ac_cv_type_caddr_t=no"
20743 fi
20744 rm -f conftest*
20745
20746 fi
20747 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20748   echo "$ac_t""yes" 1>&6
20749 else
20750   echo "$ac_t""no" 1>&6
20751   cat >> confdefs.h <<EOF
20752 #define caddr_t char *
20753 EOF
20754
20755 fi
20756
20757
20758 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20759 echo "configure:20760: checking for socklen_t" >&5
20760 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20761   echo $ac_n "(cached) $ac_c" 1>&6
20762 else
20763   cat > conftest.$ac_ext <<EOF
20764 #line 20765 "configure"
20765 #include "confdefs.h"
20766
20767 #ifdef HAVE_SYS_TYPES_H
20768 #include <sys/types.h>
20769 #endif
20770 #ifdef HAVE_SYS_SOCKET_H
20771 #include <sys/socket.h>
20772 #endif
20773
20774 int main() {
20775 socklen_t len;
20776 ; return 0; }
20777 EOF
20778 if { (eval echo configure:20779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20779   rm -rf conftest*
20780   ol_cv_type_socklen_t=yes
20781 else
20782   echo "configure: failed program was:" >&5
20783   cat conftest.$ac_ext >&5
20784   rm -rf conftest*
20785   ol_cv_type_socklen_t=no
20786 fi
20787 rm -f conftest*
20788 fi
20789
20790 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20791   if test $ol_cv_type_socklen_t = no; then
20792     cat >> confdefs.h <<\EOF
20793 #define socklen_t int
20794 EOF
20795
20796   fi
20797  
20798 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20799 echo "configure:20800: checking for member st_blksize in aggregate type struct stat" >&5
20800 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20801   echo $ac_n "(cached) $ac_c" 1>&6
20802 else
20803   cat > conftest.$ac_ext <<EOF
20804 #line 20805 "configure"
20805 #include "confdefs.h"
20806 #include <sys/types.h>
20807 #include <sys/stat.h>
20808 int main() {
20809 struct stat foo; foo.st_blksize;
20810 ; return 0; }
20811 EOF
20812 if { (eval echo configure:20813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20813   rm -rf conftest*
20814   ac_cv_c_struct_member_st_blksize=yes
20815 else
20816   echo "configure: failed program was:" >&5
20817   cat conftest.$ac_ext >&5
20818   rm -rf conftest*
20819   ac_cv_c_struct_member_st_blksize=no
20820 fi
20821 rm -f conftest*
20822 fi
20823
20824 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20825 st_blksize="$ac_cv_c_struct_member_st_blksize"
20826 if test $ac_cv_c_struct_member_st_blksize = yes; then
20827   cat >> confdefs.h <<\EOF
20828 #define HAVE_ST_BLKSIZE 1
20829 EOF
20830
20831 fi
20832
20833 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20834 echo "configure:20835: checking whether time.h and sys/time.h may both be included" >&5
20835 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20836   echo $ac_n "(cached) $ac_c" 1>&6
20837 else
20838   cat > conftest.$ac_ext <<EOF
20839 #line 20840 "configure"
20840 #include "confdefs.h"
20841 #include <sys/types.h>
20842 #include <sys/time.h>
20843 #include <time.h>
20844 int main() {
20845 struct tm *tp;
20846 ; return 0; }
20847 EOF
20848 if { (eval echo configure:20849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20849   rm -rf conftest*
20850   ac_cv_header_time=yes
20851 else
20852   echo "configure: failed program was:" >&5
20853   cat conftest.$ac_ext >&5
20854   rm -rf conftest*
20855   ac_cv_header_time=no
20856 fi
20857 rm -f conftest*
20858 fi
20859
20860 echo "$ac_t""$ac_cv_header_time" 1>&6
20861 if test $ac_cv_header_time = yes; then
20862   cat >> confdefs.h <<\EOF
20863 #define TIME_WITH_SYS_TIME 1
20864 EOF
20865
20866 fi
20867
20868 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20869 echo "configure:20870: checking whether struct tm is in sys/time.h or time.h" >&5
20870 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20871   echo $ac_n "(cached) $ac_c" 1>&6
20872 else
20873   cat > conftest.$ac_ext <<EOF
20874 #line 20875 "configure"
20875 #include "confdefs.h"
20876 #include <sys/types.h>
20877 #include <time.h>
20878 int main() {
20879 struct tm *tp; tp->tm_sec;
20880 ; return 0; }
20881 EOF
20882 if { (eval echo configure:20883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20883   rm -rf conftest*
20884   ac_cv_struct_tm=time.h
20885 else
20886   echo "configure: failed program was:" >&5
20887   cat conftest.$ac_ext >&5
20888   rm -rf conftest*
20889   ac_cv_struct_tm=sys/time.h
20890 fi
20891 rm -f conftest*
20892 fi
20893
20894 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20895 if test $ac_cv_struct_tm = sys/time.h; then
20896   cat >> confdefs.h <<\EOF
20897 #define TM_IN_SYS_TIME 1
20898 EOF
20899
20900 fi
20901
20902 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20903 echo "configure:20904: checking for uid_t in sys/types.h" >&5
20904 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20905   echo $ac_n "(cached) $ac_c" 1>&6
20906 else
20907   cat > conftest.$ac_ext <<EOF
20908 #line 20909 "configure"
20909 #include "confdefs.h"
20910 #include <sys/types.h>
20911 EOF
20912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20913   egrep "uid_t" >/dev/null 2>&1; then
20914   rm -rf conftest*
20915   ac_cv_type_uid_t=yes
20916 else
20917   rm -rf conftest*
20918   ac_cv_type_uid_t=no
20919 fi
20920 rm -f conftest*
20921
20922 fi
20923
20924 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20925 if test $ac_cv_type_uid_t = no; then
20926   cat >> confdefs.h <<\EOF
20927 #define uid_t int
20928 EOF
20929
20930   cat >> confdefs.h <<\EOF
20931 #define gid_t int
20932 EOF
20933
20934 fi
20935
20936 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20937 echo "configure:20938: checking for sig_atomic_t" >&5
20938 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20939   echo $ac_n "(cached) $ac_c" 1>&6
20940 else
20941   cat > conftest.$ac_ext <<EOF
20942 #line 20943 "configure"
20943 #include "confdefs.h"
20944 #include <signal.h>
20945 int main() {
20946 sig_atomic_t atomic;
20947 ; return 0; }
20948 EOF
20949 if { (eval echo configure:20950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20950   rm -rf conftest*
20951   ol_cv_type_sig_atomic_t=yes
20952 else
20953   echo "configure: failed program was:" >&5
20954   cat conftest.$ac_ext >&5
20955   rm -rf conftest*
20956   ol_cv_type_sig_atomic_t=no
20957 fi
20958 rm -f conftest*
20959 fi
20960
20961 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20962   if test $ol_cv_type_sig_atomic_t = no; then
20963     cat >> confdefs.h <<\EOF
20964 #define sig_atomic_t int
20965 EOF
20966
20967   fi
20968  
20969
20970
20971 # test for pw_gecos in struct passwd
20972 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20973 echo "configure:20974: checking struct passwd for pw_gecos" >&5
20974 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20975   echo $ac_n "(cached) $ac_c" 1>&6
20976 else
20977   
20978         cat > conftest.$ac_ext <<EOF
20979 #line 20980 "configure"
20980 #include "confdefs.h"
20981 #include <pwd.h>
20982 int main() {
20983
20984         struct passwd pwd;
20985         pwd.pw_gecos = pwd.pw_name;
20986
20987 ; return 0; }
20988 EOF
20989 if { (eval echo configure:20990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20990   rm -rf conftest*
20991   ol_cv_struct_passwd_pw_gecos=yes
20992 else
20993   echo "configure: failed program was:" >&5
20994   cat conftest.$ac_ext >&5
20995   rm -rf conftest*
20996   ol_cv_struct_passwd_pw_gecos=no
20997 fi
20998 rm -f conftest*
20999 fi
21000
21001 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21002 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21003         cat >> confdefs.h <<\EOF
21004 #define HAVE_PW_GECOS 1
21005 EOF
21006
21007 fi
21008
21009 # test for pw_passwd in struct passwd
21010 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21011 echo "configure:21012: checking struct passwd for pw_passwd" >&5
21012 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21013   echo $ac_n "(cached) $ac_c" 1>&6
21014 else
21015   
21016         cat > conftest.$ac_ext <<EOF
21017 #line 21018 "configure"
21018 #include "confdefs.h"
21019 #include <pwd.h>
21020 int main() {
21021
21022         struct passwd pwd;
21023         pwd.pw_passwd = pwd.pw_name;
21024
21025 ; return 0; }
21026 EOF
21027 if { (eval echo configure:21028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21028   rm -rf conftest*
21029   ol_cv_struct_passwd_pw_passwd=yes
21030 else
21031   echo "configure: failed program was:" >&5
21032   cat conftest.$ac_ext >&5
21033   rm -rf conftest*
21034   ol_cv_struct_passwd_pw_passwd=no
21035 fi
21036 rm -f conftest*
21037 fi
21038
21039 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21040 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21041         cat >> confdefs.h <<\EOF
21042 #define HAVE_PW_PASSWD 1
21043 EOF
21044
21045 fi
21046
21047
21048 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21049 echo "configure:21050: checking if toupper() requires islower()" >&5
21050 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21051   echo $ac_n "(cached) $ac_c" 1>&6
21052 else
21053   
21054         if test "$cross_compiling" = yes; then
21055   ol_cv_c_upper_lower=safe
21056 else
21057   cat > conftest.$ac_ext <<EOF
21058 #line 21059 "configure"
21059 #include "confdefs.h"
21060
21061 #include <ctype.h>
21062 main()
21063 {
21064         if ('C' == toupper('C'))
21065                 exit(0);
21066         else
21067                 exit(1);
21068 }
21069 EOF
21070 if { (eval echo configure:21071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21071 then
21072   ol_cv_c_upper_lower=no
21073 else
21074   echo "configure: failed program was:" >&5
21075   cat conftest.$ac_ext >&5
21076   rm -fr conftest*
21077   ol_cv_c_upper_lower=yes
21078 fi
21079 rm -fr conftest*
21080 fi
21081
21082 fi
21083
21084 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21085 if test $ol_cv_c_upper_lower != no ; then
21086         cat >> confdefs.h <<\EOF
21087 #define C_UPPER_LOWER 1
21088 EOF
21089
21090 fi
21091
21092 echo $ac_n "checking for working const""... $ac_c" 1>&6
21093 echo "configure:21094: checking for working const" >&5
21094 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21095   echo $ac_n "(cached) $ac_c" 1>&6
21096 else
21097   cat > conftest.$ac_ext <<EOF
21098 #line 21099 "configure"
21099 #include "confdefs.h"
21100
21101 int main() {
21102
21103 /* Ultrix mips cc rejects this.  */
21104 typedef int charset[2]; const charset x;
21105 /* SunOS 4.1.1 cc rejects this.  */
21106 char const *const *ccp;
21107 char **p;
21108 /* NEC SVR4.0.2 mips cc rejects this.  */
21109 struct point {int x, y;};
21110 static struct point const zero = {0,0};
21111 /* AIX XL C 1.02.0.0 rejects this.
21112    It does not let you subtract one const X* pointer from another in an arm
21113    of an if-expression whose if-part is not a constant expression */
21114 const char *g = "string";
21115 ccp = &g + (g ? g-g : 0);
21116 /* HPUX 7.0 cc rejects these. */
21117 ++ccp;
21118 p = (char**) ccp;
21119 ccp = (char const *const *) p;
21120 { /* SCO 3.2v4 cc rejects this.  */
21121   char *t;
21122   char const *s = 0 ? (char *) 0 : (char const *) 0;
21123
21124   *t++ = 0;
21125 }
21126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21127   int x[] = {25, 17};
21128   const int *foo = &x[0];
21129   ++foo;
21130 }
21131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21132   typedef const int *iptr;
21133   iptr p = 0;
21134   ++p;
21135 }
21136 { /* AIX XL C 1.02.0.0 rejects this saying
21137      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21138   struct s { int j; const int *ap[3]; };
21139   struct s *b; b->j = 5;
21140 }
21141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21142   const int foo = 10;
21143 }
21144
21145 ; return 0; }
21146 EOF
21147 if { (eval echo configure:21148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21148   rm -rf conftest*
21149   ac_cv_c_const=yes
21150 else
21151   echo "configure: failed program was:" >&5
21152   cat conftest.$ac_ext >&5
21153   rm -rf conftest*
21154   ac_cv_c_const=no
21155 fi
21156 rm -f conftest*
21157 fi
21158
21159 echo "$ac_t""$ac_cv_c_const" 1>&6
21160 if test $ac_cv_c_const = no; then
21161   cat >> confdefs.h <<\EOF
21162 #define const 
21163 EOF
21164
21165 fi
21166
21167 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21168 echo "configure:21169: checking if compiler understands volatile" >&5
21169 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21170   echo $ac_n "(cached) $ac_c" 1>&6
21171 else
21172   cat > conftest.$ac_ext <<EOF
21173 #line 21174 "configure"
21174 #include "confdefs.h"
21175 int x, y, z;
21176 int main() {
21177 volatile int a; int * volatile b = x ? &y : &z;
21178       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21179       *b = 0;
21180 ; return 0; }
21181 EOF
21182 if { (eval echo configure:21183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21183   rm -rf conftest*
21184   ol_cv_c_volatile=yes
21185 else
21186   echo "configure: failed program was:" >&5
21187   cat conftest.$ac_ext >&5
21188   rm -rf conftest*
21189   ol_cv_c_volatile=no
21190 fi
21191 rm -f conftest*
21192 fi
21193
21194 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21195   if test $ol_cv_c_volatile = yes; then
21196     : 
21197   else
21198     cat >> confdefs.h <<\EOF
21199 #define volatile 
21200 EOF
21201
21202   fi
21203  
21204
21205 if test $cross_compiling = yes ; then
21206         cat >> confdefs.h <<\EOF
21207 #define CROSS_COMPILING 1
21208 EOF
21209
21210 else
21211         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21212 echo "configure:21213: checking whether byte ordering is bigendian" >&5
21213 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21214   echo $ac_n "(cached) $ac_c" 1>&6
21215 else
21216   ac_cv_c_bigendian=unknown
21217 # See if sys/param.h defines the BYTE_ORDER macro.
21218 cat > conftest.$ac_ext <<EOF
21219 #line 21220 "configure"
21220 #include "confdefs.h"
21221 #include <sys/types.h>
21222 #include <sys/param.h>
21223 int main() {
21224
21225 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21226  bogus endian macros
21227 #endif
21228 ; return 0; }
21229 EOF
21230 if { (eval echo configure:21231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21231   rm -rf conftest*
21232   # It does; now see whether it defined to BIG_ENDIAN or not.
21233 cat > conftest.$ac_ext <<EOF
21234 #line 21235 "configure"
21235 #include "confdefs.h"
21236 #include <sys/types.h>
21237 #include <sys/param.h>
21238 int main() {
21239
21240 #if BYTE_ORDER != BIG_ENDIAN
21241  not big endian
21242 #endif
21243 ; return 0; }
21244 EOF
21245 if { (eval echo configure:21246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21246   rm -rf conftest*
21247   ac_cv_c_bigendian=yes
21248 else
21249   echo "configure: failed program was:" >&5
21250   cat conftest.$ac_ext >&5
21251   rm -rf conftest*
21252   ac_cv_c_bigendian=no
21253 fi
21254 rm -f conftest*
21255 else
21256   echo "configure: failed program was:" >&5
21257   cat conftest.$ac_ext >&5
21258 fi
21259 rm -f conftest*
21260 if test $ac_cv_c_bigendian = unknown; then
21261 if test "$cross_compiling" = yes; then
21262     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21263 else
21264   cat > conftest.$ac_ext <<EOF
21265 #line 21266 "configure"
21266 #include "confdefs.h"
21267 main () {
21268   /* Are we little or big endian?  From Harbison&Steele.  */
21269   union
21270   {
21271     long l;
21272     char c[sizeof (long)];
21273   } u;
21274   u.l = 1;
21275   exit (u.c[sizeof (long) - 1] == 1);
21276 }
21277 EOF
21278 if { (eval echo configure:21279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21279 then
21280   ac_cv_c_bigendian=no
21281 else
21282   echo "configure: failed program was:" >&5
21283   cat conftest.$ac_ext >&5
21284   rm -fr conftest*
21285   ac_cv_c_bigendian=yes
21286 fi
21287 rm -fr conftest*
21288 fi
21289
21290 fi
21291 fi
21292
21293 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21294 if test $ac_cv_c_bigendian = yes; then
21295   cat >> confdefs.h <<\EOF
21296 #define WORDS_BIGENDIAN 1
21297 EOF
21298
21299 fi
21300
21301 fi
21302
21303 echo $ac_n "checking size of short""... $ac_c" 1>&6
21304 echo "configure:21305: checking size of short" >&5 
21305 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21306   echo $ac_n "(cached) $ac_c" 1>&6
21307 else
21308   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21309   cat > conftest.$ac_ext <<EOF
21310 #line 21311 "configure"
21311 #include "confdefs.h"
21312 #include "confdefs.h" 
21313 #include <sys/types.h> 
21314  
21315
21316 int main() {
21317 switch (0) case 0: case (sizeof (short) == $ac_size):;
21318 ; return 0; }
21319 EOF
21320 if { (eval echo configure:21321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21321   rm -rf conftest*
21322   ac_cv_sizeof_short=$ac_size
21323 else
21324   echo "configure: failed program was:" >&5
21325   cat conftest.$ac_ext >&5
21326 fi
21327 rm -f conftest* 
21328   if test x$ac_cv_sizeof_short != x ; then break; fi 
21329 done 
21330
21331 fi
21332  
21333 if test x$ac_cv_sizeof_short = x ; then 
21334   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21335 fi 
21336 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21337 cat >> confdefs.h <<EOF
21338 #define SIZEOF_SHORT $ac_cv_sizeof_short
21339 EOF
21340  
21341  
21342 echo $ac_n "checking size of int""... $ac_c" 1>&6
21343 echo "configure:21344: checking size of int" >&5 
21344 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21345   echo $ac_n "(cached) $ac_c" 1>&6
21346 else
21347   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21348   cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351 #include "confdefs.h" 
21352 #include <sys/types.h> 
21353  
21354
21355 int main() {
21356 switch (0) case 0: case (sizeof (int) == $ac_size):;
21357 ; return 0; }
21358 EOF
21359 if { (eval echo configure:21360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21360   rm -rf conftest*
21361   ac_cv_sizeof_int=$ac_size
21362 else
21363   echo "configure: failed program was:" >&5
21364   cat conftest.$ac_ext >&5
21365 fi
21366 rm -f conftest* 
21367   if test x$ac_cv_sizeof_int != x ; then break; fi 
21368 done 
21369
21370 fi
21371  
21372 if test x$ac_cv_sizeof_int = x ; then 
21373   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21374 fi 
21375 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21376 cat >> confdefs.h <<EOF
21377 #define SIZEOF_INT $ac_cv_sizeof_int
21378 EOF
21379  
21380  
21381 echo $ac_n "checking size of long""... $ac_c" 1>&6
21382 echo "configure:21383: checking size of long" >&5 
21383 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21384   echo $ac_n "(cached) $ac_c" 1>&6
21385 else
21386   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21387   cat > conftest.$ac_ext <<EOF
21388 #line 21389 "configure"
21389 #include "confdefs.h"
21390 #include "confdefs.h" 
21391 #include <sys/types.h> 
21392  
21393
21394 int main() {
21395 switch (0) case 0: case (sizeof (long) == $ac_size):;
21396 ; return 0; }
21397 EOF
21398 if { (eval echo configure:21399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21399   rm -rf conftest*
21400   ac_cv_sizeof_long=$ac_size
21401 else
21402   echo "configure: failed program was:" >&5
21403   cat conftest.$ac_ext >&5
21404 fi
21405 rm -f conftest* 
21406   if test x$ac_cv_sizeof_long != x ; then break; fi 
21407 done 
21408
21409 fi
21410  
21411 if test x$ac_cv_sizeof_long = x ; then 
21412   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21413 fi 
21414 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21415 cat >> confdefs.h <<EOF
21416 #define SIZEOF_LONG $ac_cv_sizeof_long
21417 EOF
21418  
21419
21420
21421 if test "$ac_cv_sizeof_int" -lt 4 ; then
21422         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21423
21424         cat >> confdefs.h <<\EOF
21425 #define LBER_INT_T long
21426 EOF
21427
21428 else
21429         cat >> confdefs.h <<\EOF
21430 #define LBER_INT_T int
21431 EOF
21432
21433 fi
21434
21435 cat >> confdefs.h <<\EOF
21436 #define LBER_LEN_T long
21437 EOF
21438
21439 cat >> confdefs.h <<\EOF
21440 #define LBER_SOCKET_T int
21441 EOF
21442
21443 cat >> confdefs.h <<\EOF
21444 #define LBER_TAG_T long
21445 EOF
21446
21447
21448 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21449 echo "configure:21450: checking for 8-bit clean memcmp" >&5
21450 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21451   echo $ac_n "(cached) $ac_c" 1>&6
21452 else
21453   if test "$cross_compiling" = yes; then
21454   ac_cv_func_memcmp_clean=no
21455 else
21456   cat > conftest.$ac_ext <<EOF
21457 #line 21458 "configure"
21458 #include "confdefs.h"
21459
21460 main()
21461 {
21462   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21463   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21464 }
21465
21466 EOF
21467 if { (eval echo configure:21468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21468 then
21469   ac_cv_func_memcmp_clean=yes
21470 else
21471   echo "configure: failed program was:" >&5
21472   cat conftest.$ac_ext >&5
21473   rm -fr conftest*
21474   ac_cv_func_memcmp_clean=no
21475 fi
21476 rm -fr conftest*
21477 fi
21478
21479 fi
21480
21481 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21482 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21483
21484 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21485 echo "configure:21486: checking for strftime" >&5
21486 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21487   echo $ac_n "(cached) $ac_c" 1>&6
21488 else
21489   cat > conftest.$ac_ext <<EOF
21490 #line 21491 "configure"
21491 #include "confdefs.h"
21492 /* System header to define __stub macros and hopefully few prototypes,
21493     which can conflict with char strftime(); below.  */
21494 #include <assert.h>
21495 /* Override any gcc2 internal prototype to avoid an error.  */
21496 /* We use char because int might match the return type of a gcc2
21497     builtin and then its argument prototype would still apply.  */
21498 char strftime();
21499 char (*f)();
21500
21501 int main() {
21502
21503 /* The GNU C library defines this for functions which it implements
21504     to always fail with ENOSYS.  Some functions are actually named
21505     something starting with __ and the normal name is an alias.  */
21506 #if defined (__stub_strftime) || defined (__stub___strftime)
21507 choke me
21508 #else
21509 f = strftime;
21510 #endif
21511
21512 ; return 0; }
21513 EOF
21514 if { (eval echo configure:21515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21515   rm -rf conftest*
21516   eval "ac_cv_func_strftime=yes"
21517 else
21518   echo "configure: failed program was:" >&5
21519   cat conftest.$ac_ext >&5
21520   rm -rf conftest*
21521   eval "ac_cv_func_strftime=no"
21522 fi
21523 rm -f conftest*
21524 fi
21525
21526 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21527   echo "$ac_t""yes" 1>&6
21528   cat >> confdefs.h <<\EOF
21529 #define HAVE_STRFTIME 1
21530 EOF
21531
21532 else
21533   echo "$ac_t""no" 1>&6
21534 # strftime is in -lintl on SCO UNIX.
21535 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21536 echo "configure:21537: checking for strftime in -lintl" >&5
21537 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21539   echo $ac_n "(cached) $ac_c" 1>&6
21540 else
21541   ac_save_LIBS="$LIBS"
21542 LIBS="-lintl  $LIBS"
21543 cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546 /* Override any gcc2 internal prototype to avoid an error.  */
21547 /* We use char because int might match the return type of a gcc2
21548     builtin and then its argument prototype would still apply.  */
21549 char strftime();
21550
21551 int main() {
21552 strftime()
21553 ; return 0; }
21554 EOF
21555 if { (eval echo configure:21556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21556   rm -rf conftest*
21557   eval "ac_cv_lib_$ac_lib_var=yes"
21558 else
21559   echo "configure: failed program was:" >&5
21560   cat conftest.$ac_ext >&5
21561   rm -rf conftest*
21562   eval "ac_cv_lib_$ac_lib_var=no"
21563 fi
21564 rm -f conftest*
21565 LIBS="$ac_save_LIBS"
21566
21567 fi
21568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21569   echo "$ac_t""yes" 1>&6
21570   cat >> confdefs.h <<\EOF
21571 #define HAVE_STRFTIME 1
21572 EOF
21573
21574 LIBS="-lintl $LIBS"
21575 else
21576   echo "$ac_t""no" 1>&6
21577 fi
21578
21579 fi
21580
21581
21582 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21583 echo "configure:21584: checking for inet_aton()" >&5
21584 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21585   echo $ac_n "(cached) $ac_c" 1>&6
21586 else
21587   cat > conftest.$ac_ext <<EOF
21588 #line 21589 "configure"
21589 #include "confdefs.h"
21590
21591 #ifdef HAVE_SYS_TYPES_H
21592 #       include <sys/types.h>
21593 #endif
21594 #ifdef HAVE_SYS_SOCKET_H
21595 #       include <sys/socket.h>
21596 #       ifdef HAVE_SYS_SELECT_H
21597 #               include <sys/select.h>
21598 #       endif
21599 #       include <netinet/in.h>
21600 #       ifdef HAVE_ARPA_INET_H
21601 #               include <arpa/inet.h>
21602 #       endif
21603 #endif
21604
21605 int main() {
21606 struct in_addr in;
21607 int rc = inet_aton( "255.255.255.255", &in );
21608 ; return 0; }
21609 EOF
21610 if { (eval echo configure:21611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21611   rm -rf conftest*
21612   ol_cv_func_inet_aton=yes
21613 else
21614   echo "configure: failed program was:" >&5
21615   cat conftest.$ac_ext >&5
21616   rm -rf conftest*
21617   ol_cv_func_inet_aton=no
21618 fi
21619 rm -f conftest*
21620 fi
21621
21622 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21623   if test $ol_cv_func_inet_aton != no; then
21624     cat >> confdefs.h <<\EOF
21625 #define HAVE_INET_ATON 1
21626 EOF
21627
21628   fi
21629  
21630
21631 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21632 echo "configure:21633: checking for _spawnlp" >&5
21633 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21634   echo $ac_n "(cached) $ac_c" 1>&6
21635 else
21636   cat > conftest.$ac_ext <<EOF
21637 #line 21638 "configure"
21638 #include "confdefs.h"
21639 /* System header to define __stub macros and hopefully few prototypes,
21640     which can conflict with char _spawnlp(); below.  */
21641 #include <assert.h>
21642 /* Override any gcc2 internal prototype to avoid an error.  */
21643 /* We use char because int might match the return type of a gcc2
21644     builtin and then its argument prototype would still apply.  */
21645 char _spawnlp();
21646 char (*f)();
21647
21648 int main() {
21649
21650 /* The GNU C library defines this for functions which it implements
21651     to always fail with ENOSYS.  Some functions are actually named
21652     something starting with __ and the normal name is an alias.  */
21653 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21654 choke me
21655 #else
21656 f = _spawnlp;
21657 #endif
21658
21659 ; return 0; }
21660 EOF
21661 if { (eval echo configure:21662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21662   rm -rf conftest*
21663   eval "ac_cv_func__spawnlp=yes"
21664 else
21665   echo "configure: failed program was:" >&5
21666   cat conftest.$ac_ext >&5
21667   rm -rf conftest*
21668   eval "ac_cv_func__spawnlp=no"
21669 fi
21670 rm -f conftest*
21671 fi
21672
21673 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21674   echo "$ac_t""yes" 1>&6
21675   cat >> confdefs.h <<\EOF
21676 #define HAVE_SPAWNLP 1
21677 EOF
21678
21679 else
21680   echo "$ac_t""no" 1>&6
21681 fi
21682
21683
21684 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21685 echo "configure:21686: checking for _snprintf" >&5
21686 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21687   echo $ac_n "(cached) $ac_c" 1>&6
21688 else
21689   cat > conftest.$ac_ext <<EOF
21690 #line 21691 "configure"
21691 #include "confdefs.h"
21692 /* System header to define __stub macros and hopefully few prototypes,
21693     which can conflict with char _snprintf(); below.  */
21694 #include <assert.h>
21695 /* Override any gcc2 internal prototype to avoid an error.  */
21696 /* We use char because int might match the return type of a gcc2
21697     builtin and then its argument prototype would still apply.  */
21698 char _snprintf();
21699 char (*f)();
21700
21701 int main() {
21702
21703 /* The GNU C library defines this for functions which it implements
21704     to always fail with ENOSYS.  Some functions are actually named
21705     something starting with __ and the normal name is an alias.  */
21706 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21707 choke me
21708 #else
21709 f = _snprintf;
21710 #endif
21711
21712 ; return 0; }
21713 EOF
21714 if { (eval echo configure:21715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21715   rm -rf conftest*
21716   eval "ac_cv_func__snprintf=yes"
21717 else
21718   echo "configure: failed program was:" >&5
21719   cat conftest.$ac_ext >&5
21720   rm -rf conftest*
21721   eval "ac_cv_func__snprintf=no"
21722 fi
21723 rm -f conftest*
21724 fi
21725
21726 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21727   echo "$ac_t""yes" 1>&6
21728   ac_cv_func_snprintf=yes
21729         cat >> confdefs.h <<\EOF
21730 #define snprintf _snprintf
21731 EOF
21732
21733
21734 else
21735   echo "$ac_t""no" 1>&6
21736 fi
21737
21738
21739 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21740 echo "configure:21741: checking for _vsnprintf" >&5
21741 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21742   echo $ac_n "(cached) $ac_c" 1>&6
21743 else
21744   cat > conftest.$ac_ext <<EOF
21745 #line 21746 "configure"
21746 #include "confdefs.h"
21747 /* System header to define __stub macros and hopefully few prototypes,
21748     which can conflict with char _vsnprintf(); below.  */
21749 #include <assert.h>
21750 /* Override any gcc2 internal prototype to avoid an error.  */
21751 /* We use char because int might match the return type of a gcc2
21752     builtin and then its argument prototype would still apply.  */
21753 char _vsnprintf();
21754 char (*f)();
21755
21756 int main() {
21757
21758 /* The GNU C library defines this for functions which it implements
21759     to always fail with ENOSYS.  Some functions are actually named
21760     something starting with __ and the normal name is an alias.  */
21761 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21762 choke me
21763 #else
21764 f = _vsnprintf;
21765 #endif
21766
21767 ; return 0; }
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21770   rm -rf conftest*
21771   eval "ac_cv_func__vsnprintf=yes"
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775   rm -rf conftest*
21776   eval "ac_cv_func__vsnprintf=no"
21777 fi
21778 rm -f conftest*
21779 fi
21780
21781 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21782   echo "$ac_t""yes" 1>&6
21783   ac_cv_func_vsnprintf=yes
21784         cat >> confdefs.h <<\EOF
21785 #define vsnprintf _vsnprintf
21786 EOF
21787
21788
21789 else
21790   echo "$ac_t""no" 1>&6
21791 fi
21792
21793
21794 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21795 echo "configure:21796: checking for vprintf" >&5
21796 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21797   echo $ac_n "(cached) $ac_c" 1>&6
21798 else
21799   cat > conftest.$ac_ext <<EOF
21800 #line 21801 "configure"
21801 #include "confdefs.h"
21802 /* System header to define __stub macros and hopefully few prototypes,
21803     which can conflict with char vprintf(); below.  */
21804 #include <assert.h>
21805 /* Override any gcc2 internal prototype to avoid an error.  */
21806 /* We use char because int might match the return type of a gcc2
21807     builtin and then its argument prototype would still apply.  */
21808 char vprintf();
21809 char (*f)();
21810
21811 int main() {
21812
21813 /* The GNU C library defines this for functions which it implements
21814     to always fail with ENOSYS.  Some functions are actually named
21815     something starting with __ and the normal name is an alias.  */
21816 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21817 choke me
21818 #else
21819 f = vprintf;
21820 #endif
21821
21822 ; return 0; }
21823 EOF
21824 if { (eval echo configure:21825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21825   rm -rf conftest*
21826   eval "ac_cv_func_vprintf=yes"
21827 else
21828   echo "configure: failed program was:" >&5
21829   cat conftest.$ac_ext >&5
21830   rm -rf conftest*
21831   eval "ac_cv_func_vprintf=no"
21832 fi
21833 rm -f conftest*
21834 fi
21835
21836 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21837   echo "$ac_t""yes" 1>&6
21838   cat >> confdefs.h <<\EOF
21839 #define HAVE_VPRINTF 1
21840 EOF
21841
21842 else
21843   echo "$ac_t""no" 1>&6
21844 fi
21845
21846 if test "$ac_cv_func_vprintf" != yes; then
21847 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21848 echo "configure:21849: checking for _doprnt" >&5
21849 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21850   echo $ac_n "(cached) $ac_c" 1>&6
21851 else
21852   cat > conftest.$ac_ext <<EOF
21853 #line 21854 "configure"
21854 #include "confdefs.h"
21855 /* System header to define __stub macros and hopefully few prototypes,
21856     which can conflict with char _doprnt(); below.  */
21857 #include <assert.h>
21858 /* Override any gcc2 internal prototype to avoid an error.  */
21859 /* We use char because int might match the return type of a gcc2
21860     builtin and then its argument prototype would still apply.  */
21861 char _doprnt();
21862 char (*f)();
21863
21864 int main() {
21865
21866 /* The GNU C library defines this for functions which it implements
21867     to always fail with ENOSYS.  Some functions are actually named
21868     something starting with __ and the normal name is an alias.  */
21869 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21870 choke me
21871 #else
21872 f = _doprnt;
21873 #endif
21874
21875 ; return 0; }
21876 EOF
21877 if { (eval echo configure:21878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21878   rm -rf conftest*
21879   eval "ac_cv_func__doprnt=yes"
21880 else
21881   echo "configure: failed program was:" >&5
21882   cat conftest.$ac_ext >&5
21883   rm -rf conftest*
21884   eval "ac_cv_func__doprnt=no"
21885 fi
21886 rm -f conftest*
21887 fi
21888
21889 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21890   echo "$ac_t""yes" 1>&6
21891   cat >> confdefs.h <<\EOF
21892 #define HAVE_DOPRNT 1
21893 EOF
21894
21895 else
21896   echo "$ac_t""no" 1>&6
21897 fi
21898
21899 fi
21900
21901
21902 if test $ac_cv_func_vprintf = yes ; then
21903                 for ac_func in snprintf vsnprintf
21904 do
21905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21906 echo "configure:21907: checking for $ac_func" >&5
21907 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21908   echo $ac_n "(cached) $ac_c" 1>&6
21909 else
21910   cat > conftest.$ac_ext <<EOF
21911 #line 21912 "configure"
21912 #include "confdefs.h"
21913 /* System header to define __stub macros and hopefully few prototypes,
21914     which can conflict with char $ac_func(); below.  */
21915 #include <assert.h>
21916 /* Override any gcc2 internal prototype to avoid an error.  */
21917 /* We use char because int might match the return type of a gcc2
21918     builtin and then its argument prototype would still apply.  */
21919 char $ac_func();
21920 char (*f)();
21921
21922 int main() {
21923
21924 /* The GNU C library defines this for functions which it implements
21925     to always fail with ENOSYS.  Some functions are actually named
21926     something starting with __ and the normal name is an alias.  */
21927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21928 choke me
21929 #else
21930 f = $ac_func;
21931 #endif
21932
21933 ; return 0; }
21934 EOF
21935 if { (eval echo configure:21936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21936   rm -rf conftest*
21937   eval "ac_cv_func_$ac_func=yes"
21938 else
21939   echo "configure: failed program was:" >&5
21940   cat conftest.$ac_ext >&5
21941   rm -rf conftest*
21942   eval "ac_cv_func_$ac_func=no"
21943 fi
21944 rm -f conftest*
21945 fi
21946
21947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21948   echo "$ac_t""yes" 1>&6
21949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21950   cat >> confdefs.h <<EOF
21951 #define $ac_tr_func 1
21952 EOF
21953  
21954 else
21955   echo "$ac_t""no" 1>&6
21956 fi
21957 done
21958
21959 fi
21960
21961 for ac_func in \
21962         bcopy                   \
21963         closesocket             \
21964         chroot                  \
21965         endgrent                \
21966         endpwent                \
21967         fcntl                   \
21968         flock                   \
21969         fstat                   \
21970         getdtablesize   \
21971         getgrgid                \
21972         gethostname             \
21973         getpass                 \
21974         getpassphrase   \
21975         getpwuid                \
21976         getpwnam                \
21977         getspnam                \
21978         gettimeofday    \
21979         initgroups              \
21980         lockf                   \
21981         memcpy                  \
21982         memmove                 \
21983         mkstemp                 \
21984         mktemp                  \
21985         pipe                    \
21986         read                    \
21987         recv                    \
21988         recvfrom                \
21989         setpwfile               \
21990         setgid                  \
21991         setegid                 \
21992         setsid                  \
21993         setuid                  \
21994         seteuid                 \
21995         sigaction               \
21996         signal                  \
21997         sigset                  \
21998         strdup                  \
21999         strerror                \
22000         strpbrk                 \
22001         strrchr                 \
22002         strsep                  \
22003         strstr                  \
22004         strtol                  \
22005         strtoul                 \
22006         strspn                  \
22007         sysconf                 \
22008         usleep                  \
22009         waitpid                 \
22010         wait4                   \
22011         write                   \
22012         send                    \
22013         sendto                  \
22014
22015 do
22016 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22017 echo "configure:22018: checking for $ac_func" >&5
22018 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22019   echo $ac_n "(cached) $ac_c" 1>&6
22020 else
22021   cat > conftest.$ac_ext <<EOF
22022 #line 22023 "configure"
22023 #include "confdefs.h"
22024 /* System header to define __stub macros and hopefully few prototypes,
22025     which can conflict with char $ac_func(); below.  */
22026 #include <assert.h>
22027 /* Override any gcc2 internal prototype to avoid an error.  */
22028 /* We use char because int might match the return type of a gcc2
22029     builtin and then its argument prototype would still apply.  */
22030 char $ac_func();
22031 char (*f)();
22032
22033 int main() {
22034
22035 /* The GNU C library defines this for functions which it implements
22036     to always fail with ENOSYS.  Some functions are actually named
22037     something starting with __ and the normal name is an alias.  */
22038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22039 choke me
22040 #else
22041 f = $ac_func;
22042 #endif
22043
22044 ; return 0; }
22045 EOF
22046 if { (eval echo configure:22047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22047   rm -rf conftest*
22048   eval "ac_cv_func_$ac_func=yes"
22049 else
22050   echo "configure: failed program was:" >&5
22051   cat conftest.$ac_ext >&5
22052   rm -rf conftest*
22053   eval "ac_cv_func_$ac_func=no"
22054 fi
22055 rm -f conftest*
22056 fi
22057
22058 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22059   echo "$ac_t""yes" 1>&6
22060     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22061   cat >> confdefs.h <<EOF
22062 #define $ac_tr_func 1
22063 EOF
22064  
22065 else
22066   echo "$ac_t""no" 1>&6
22067 fi
22068 done
22069
22070
22071 for ac_func in getopt getpeereid
22072 do
22073 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22074 echo "configure:22075: checking for $ac_func" >&5
22075 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22076   echo $ac_n "(cached) $ac_c" 1>&6
22077 else
22078   cat > conftest.$ac_ext <<EOF
22079 #line 22080 "configure"
22080 #include "confdefs.h"
22081 /* System header to define __stub macros and hopefully few prototypes,
22082     which can conflict with char $ac_func(); below.  */
22083 #include <assert.h>
22084 /* Override any gcc2 internal prototype to avoid an error.  */
22085 /* We use char because int might match the return type of a gcc2
22086     builtin and then its argument prototype would still apply.  */
22087 char $ac_func();
22088 char (*f)();
22089
22090 int main() {
22091
22092 /* The GNU C library defines this for functions which it implements
22093     to always fail with ENOSYS.  Some functions are actually named
22094     something starting with __ and the normal name is an alias.  */
22095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22096 choke me
22097 #else
22098 f = $ac_func;
22099 #endif
22100
22101 ; return 0; }
22102 EOF
22103 if { (eval echo configure:22104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22104   rm -rf conftest*
22105   eval "ac_cv_func_$ac_func=yes"
22106 else
22107   echo "configure: failed program was:" >&5
22108   cat conftest.$ac_ext >&5
22109   rm -rf conftest*
22110   eval "ac_cv_func_$ac_func=no"
22111 fi
22112 rm -f conftest*
22113 fi
22114
22115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22116   echo "$ac_t""yes" 1>&6
22117     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22118   cat >> confdefs.h <<EOF
22119 #define $ac_tr_func 1
22120 EOF
22121  
22122 else
22123   echo "$ac_t""no" 1>&6
22124 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22125 fi
22126 done
22127
22128
22129
22130 if test "$ac_cv_func_getopt" != yes; then
22131         LIBSRCS="$LIBSRCS getopt.c"
22132 fi
22133 if test "$ac_cv_func_getpeereid" != yes; then
22134         LIBSRCS="$LIBSRCS getpeereid.c"
22135 fi
22136 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22137         if test "$ac_cv_func_snprintf" != yes; then
22138                 cat >> confdefs.h <<\EOF
22139 #define snprintf ber_pvt_snprintf
22140 EOF
22141
22142         fi
22143         if test "$ac_cv_func_vsnprintf" != yes; then
22144                 cat >> confdefs.h <<\EOF
22145 #define vsnprintf ber_pvt_vsnprintf
22146 EOF
22147
22148         fi
22149 fi
22150
22151 # Check Configuration
22152 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22153 echo "configure:22154: checking declaration of sys_errlist" >&5
22154 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22155   echo $ac_n "(cached) $ac_c" 1>&6
22156 else
22157   
22158         cat > conftest.$ac_ext <<EOF
22159 #line 22160 "configure"
22160 #include "confdefs.h"
22161
22162 #include <stdio.h>
22163 #include <sys/types.h>
22164 #include <errno.h>
22165 #ifdef WINNT
22166 #include <stdlib.h>
22167 #endif 
22168 int main() {
22169 char *c = (char *) *sys_errlist
22170 ; return 0; }
22171 EOF
22172 if { (eval echo configure:22173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22173   rm -rf conftest*
22174   ol_cv_dcl_sys_errlist=yes
22175         ol_cv_have_sys_errlist=yes
22176 else
22177   echo "configure: failed program was:" >&5
22178   cat conftest.$ac_ext >&5
22179   rm -rf conftest*
22180   ol_cv_dcl_sys_errlist=no
22181 fi
22182 rm -f conftest*
22183 fi
22184
22185 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22186 #
22187 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22188 if test $ol_cv_dcl_sys_errlist = no ; then
22189         cat >> confdefs.h <<\EOF
22190 #define DECL_SYS_ERRLIST 1
22191 EOF
22192
22193
22194         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22195 echo "configure:22196: checking existence of sys_errlist" >&5
22196 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22197   echo $ac_n "(cached) $ac_c" 1>&6
22198 else
22199   
22200                 cat > conftest.$ac_ext <<EOF
22201 #line 22202 "configure"
22202 #include "confdefs.h"
22203 #include <errno.h>
22204 int main() {
22205 char *c = (char *) *sys_errlist
22206 ; return 0; }
22207 EOF
22208 if { (eval echo configure:22209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22209   rm -rf conftest*
22210   ol_cv_have_sys_errlist=yes
22211 else
22212   echo "configure: failed program was:" >&5
22213   cat conftest.$ac_ext >&5
22214   rm -rf conftest*
22215   ol_cv_have_sys_errlist=no
22216 fi
22217 rm -f conftest*
22218 fi
22219
22220 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22221 fi
22222 if test $ol_cv_have_sys_errlist = yes ; then
22223         cat >> confdefs.h <<\EOF
22224 #define HAVE_SYS_ERRLIST 1
22225 EOF
22226
22227 fi
22228
22229
22230
22231 if test "$ol_enable_debug" != no ; then
22232         cat >> confdefs.h <<\EOF
22233 #define LDAP_DEBUG 1
22234 EOF
22235
22236 fi
22237 if test "$ol_enable_syslog" = yes ; then
22238         cat >> confdefs.h <<\EOF
22239 #define LDAP_SYSLOG 1
22240 EOF
22241
22242 fi
22243 if test "$ol_enable_cache" = no ; then
22244         cat >> confdefs.h <<\EOF
22245 #define LDAP_NOCACHE 1
22246 EOF
22247
22248 fi
22249 if test "$ol_link_kbind" != no ; then
22250         cat >> confdefs.h <<\EOF
22251 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22252 EOF
22253
22254 fi
22255 if test "$ol_enable_proctitle" != no ; then
22256         cat >> confdefs.h <<\EOF
22257 #define LDAP_PROCTITLE 1
22258 EOF
22259
22260 fi
22261 if test "$ol_enable_referrals" != no ; then
22262         cat >> confdefs.h <<\EOF
22263 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22264 EOF
22265
22266 fi
22267 if test "$ol_enable_local" != no; then
22268         cat >> confdefs.h <<\EOF
22269 #define LDAP_PF_LOCAL 1
22270 EOF
22271
22272 fi
22273 if test "$ol_link_ipv6" != no; then
22274         cat >> confdefs.h <<\EOF
22275 #define LDAP_PF_INET6 1
22276 EOF
22277
22278 fi
22279 if test "$ol_enable_cleartext" != no ; then
22280         cat >> confdefs.h <<\EOF
22281 #define SLAPD_CLEARTEXT 1
22282 EOF
22283
22284 fi
22285 if test "$ol_enable_crypt" != no ; then
22286         cat >> confdefs.h <<\EOF
22287 #define SLAPD_CRYPT 1
22288 EOF
22289
22290 fi
22291 if test "$ol_link_kpasswd" != no ; then
22292         cat >> confdefs.h <<\EOF
22293 #define SLAPD_KPASSWD 1
22294 EOF
22295
22296 fi
22297 if test "$ol_link_spasswd" != no ; then
22298         cat >> confdefs.h <<\EOF
22299 #define SLAPD_SPASSWD 1
22300 EOF
22301
22302 fi
22303 if test "$ol_enable_multimaster" != no ; then
22304         cat >> confdefs.h <<\EOF
22305 #define SLAPD_MULTIMASTER 1
22306 EOF
22307
22308 fi
22309 if test "$ol_enable_phonetic" != no ; then
22310         cat >> confdefs.h <<\EOF
22311 #define SLAPD_PHONETIC 1
22312 EOF
22313
22314 fi
22315 if test "$ol_enable_rlookups" != no ; then
22316         cat >> confdefs.h <<\EOF
22317 #define SLAPD_RLOOKUPS 1
22318 EOF
22319
22320 fi
22321 if test "$ol_enable_aci" != no ; then
22322         cat >> confdefs.h <<\EOF
22323 #define SLAPD_ACI_ENABLED 1
22324 EOF
22325
22326 fi
22327
22328 if test "$ol_link_modules" != no ; then
22329         cat >> confdefs.h <<\EOF
22330 #define SLAPD_MODULES 1
22331 EOF
22332
22333         BUILD_SLAPD=yes
22334         SLAPD_MODULES_LDFLAGS="-dlopen self"
22335 fi
22336
22337 if test "$ol_enable_bdb" != no ; then
22338         cat >> confdefs.h <<\EOF
22339 #define SLAPD_BDB 1
22340 EOF
22341
22342         BUILD_SLAPD=yes
22343         BUILD_BDB=yes
22344         if test "$ol_with_bdb_module" != static ; then
22345                 cat >> confdefs.h <<\EOF
22346 #define SLAPD_BDB_DYNAMIC 1
22347 EOF
22348
22349                 BUILD_BDB=mod
22350                 BUILD_BDB_DYNAMIC=shared
22351                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22352         else
22353                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22354         fi
22355 fi
22356
22357 if test "$ol_link_dnssrv" != no ; then
22358         cat >> confdefs.h <<\EOF
22359 #define SLAPD_DNSSRV 1
22360 EOF
22361
22362         BUILD_SLAPD=yes
22363         BUILD_DNSSRV=yes
22364         if test "$ol_with_dnssrv_module" != static ; then
22365                 cat >> confdefs.h <<\EOF
22366 #define SLAPD_DNSSRV_DYNAMIC 1
22367 EOF
22368
22369                 BUILD_DNSSRV=mod
22370                 BUILD_DNSSRV_DYNAMIC=shared
22371                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22372         else
22373                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22374         fi
22375 fi
22376
22377 if test "$ol_enable_ldap" != no ; then
22378         cat >> confdefs.h <<\EOF
22379 #define SLAPD_LDAP 1
22380 EOF
22381
22382         BUILD_SLAPD=yes
22383         BUILD_LDAP=yes
22384         if test "$ol_with_ldap_module" != static ; then
22385                 cat >> confdefs.h <<\EOF
22386 #define SLAPD_LDAP_DYNAMIC 1
22387 EOF
22388
22389                 BUILD_LDAP=mod
22390                 BUILD_LDAP_DYNAMIC=shared
22391                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22392         else
22393                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22394         fi
22395 fi
22396
22397 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22398         cat >> confdefs.h <<\EOF
22399 #define SLAPD_LDBM 1
22400 EOF
22401
22402         BUILD_SLAPD=yes
22403         BUILD_LDBM=yes
22404         if test "$ol_with_ldbm_module" != static ; then
22405                 cat >> confdefs.h <<\EOF
22406 #define SLAPD_LDBM_DYNAMIC 1
22407 EOF
22408
22409                 BUILD_LDBM=mod
22410                 BUILD_LDBM_DYNAMIC=shared
22411                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22412         else
22413                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22414         fi
22415 fi
22416
22417 if test "$ol_enable_meta" != no ; then
22418         if test "$ol_enable_ldap" = no ; then
22419                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22420         fi
22421         if test "$ol_enable_rewrite" = no ; then
22422                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22423         fi
22424         cat >> confdefs.h <<\EOF
22425 #define SLAPD_META 1
22426 EOF
22427
22428         BUILD_SLAPD=yes
22429         BUILD_META=yes
22430         BUILD_LDAP=yes
22431         BUILD_REWRITE=yes
22432         if test "$ol_with_meta_module" != static ; then
22433                 cat >> confdefs.h <<\EOF
22434 #define SLAPD_META_DYNAMIC 1
22435 EOF
22436
22437                 BUILD_META=mod
22438                 BUILD_META_DYNAMIC=shared
22439                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22440         else
22441                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22442         fi
22443 fi
22444
22445 if test "$ol_enable_monitor" != no ; then
22446         cat >> confdefs.h <<\EOF
22447 #define SLAPD_MONITOR 1
22448 EOF
22449
22450         BUILD_SLAPD=yes
22451         BUILD_MONITOR=yes
22452         if test "$ol_with_monitor_module" != static ; then
22453                 cat >> confdefs.h <<\EOF
22454 #define SLAPD_MONITOR_DYNAMIC 1
22455 EOF
22456
22457                 BUILD_MONITOR=mod
22458                 BUILD_MONITOR_DYNAMIC=shared
22459                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22460         else
22461                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22462         fi
22463 fi
22464
22465 if test "$ol_enable_null" != no ; then
22466         cat >> confdefs.h <<\EOF
22467 #define SLAPD_NULL 1
22468 EOF
22469
22470         BUILD_SLAPD=yes
22471         BUILD_NULL=yes
22472         if test "$ol_with_null_module" != static ; then
22473                 cat >> confdefs.h <<\EOF
22474 #define SLAPD_NULL_DYNAMIC 1
22475 EOF
22476
22477                 BUILD_NULL=mod
22478                 BUILD_NULL_DYNAMIC=shared
22479                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22480         else
22481                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22482         fi
22483 fi
22484
22485 if test "$ol_enable_passwd" != no ; then
22486         cat >> confdefs.h <<\EOF
22487 #define SLAPD_PASSWD 1
22488 EOF
22489
22490         BUILD_SLAPD=yes
22491         BUILD_PASSWD=yes
22492         if test "$ol_with_passwd_module" != static ; then
22493                 cat >> confdefs.h <<\EOF
22494 #define SLAPD_PASSWD_DYNAMIC 1
22495 EOF
22496
22497                 BUILD_PASSWD=mod
22498                 BUILD_PASSWD_DYNAMIC=shared
22499                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22500         else
22501                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22502         fi
22503 fi
22504
22505 if test "$ol_link_perl" != no ; then
22506         cat >> confdefs.h <<\EOF
22507 #define SLAPD_PERL 1
22508 EOF
22509
22510         BUILD_SLAPD=yes
22511         BUILD_PERL=yes
22512         if test "$ol_with_perl_module" != static ; then
22513                 cat >> confdefs.h <<\EOF
22514 #define SLAPD_PERL_DYNAMIC 1
22515 EOF
22516
22517                 BUILD_PERL=mod
22518                 BUILD_PERL_DYNAMIC=shared
22519                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22520         else
22521                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22522         fi
22523 fi
22524
22525 if test "$ol_enable_shell" != no ; then
22526         if test "$ol_link_thread" != no ; then
22527                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22528         fi
22529         cat >> confdefs.h <<\EOF
22530 #define SLAPD_SHELL 1
22531 EOF
22532
22533         BUILD_SLAPD=yes
22534         BUILD_SHELL=yes
22535         if test "$ol_with_shell_module" != static ; then
22536                 cat >> confdefs.h <<\EOF
22537 #define SLAPD_SHELL_DYNAMIC 1
22538 EOF
22539
22540                 BUILD_SHELL=mod
22541                 BUILD_SHELL_DYNAMIC=shared
22542                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22543         else
22544                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22545         fi
22546 fi
22547
22548 if test "$ol_enable_tcl" != no ; then
22549         cat >> confdefs.h <<\EOF
22550 #define SLAPD_TCL 1
22551 EOF
22552
22553         BUILD_SLAPD=yes
22554         BUILD_TCL=yes
22555         if test "$ol_with_tcl_module" != static; then
22556                 cat >> confdefs.h <<\EOF
22557 #define SLAPD_TCL_DYNAMIC 1
22558 EOF
22559
22560                 BUILD_TCL=mod
22561                 BUILD_TCL_DYNAMIC=shared
22562                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22563         else
22564                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22565         fi
22566 fi
22567
22568 if test "$ol_link_sql" != no ; then
22569         cat >> confdefs.h <<\EOF
22570 #define SLAPD_SQL 1
22571 EOF
22572
22573         BUILD_SLAPD=yes
22574         BUILD_SQL=yes
22575         if test "$ol_with_sql_module" != static; then
22576                 cat >> confdefs.h <<\EOF
22577 #define SLAPD_SQL_DYNAMIC 1
22578 EOF
22579
22580                 BUILD_SQL=mod
22581                 BUILD_SQL_DYNAMIC=shared
22582                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22583         else
22584                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22585         fi
22586 fi
22587
22588 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22589         $BUILD_SLAPD = yes ; then
22590         BUILD_SLURPD=yes
22591 fi
22592
22593 if test "$ol_enable_rewrite" != no ; then
22594         cat >> confdefs.h <<\EOF
22595 #define ENABLE_REWRITE 1
22596 EOF
22597
22598         BUILD_REWRITE=yes
22599 fi
22600
22601
22602
22603 if test "$ac_cv_mingw32" = yes ; then
22604         PLAT=NT
22605         SLAPD_MODULES_LDFLAGS=
22606 else
22607         PLAT=UNIX
22608 fi
22609
22610 if test -z "$SLAPD_STATIC_BACKENDS"; then
22611         SLAPD_NO_STATIC='#'
22612 else
22613         SLAPD_NO_STATIC=
22614 fi
22615
22616
22617
22618
22619
22620
22621   
22622   
22623   
22624   
22625   
22626   
22627   
22628   
22629   
22630   
22631   
22632   
22633   
22634   
22635   
22636   
22637   
22638   
22639   
22640   
22641   
22642   
22643   
22644   
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683 # Check whether --with-xxinstall or --without-xxinstall was given.
22684 if test "${with_xxinstall+set}" = set; then
22685   withval="$with_xxinstall"
22686   :
22687 fi
22688
22689
22690
22691 trap '' 1 2 15
22692
22693 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22694
22695 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22696 # Let make expand exec_prefix.
22697 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22698
22699 # Any assignment to VPATH causes Sun make to only execute
22700 # the first set of double-colon rules, so remove it if not needed.
22701 # If there is a colon in the path, we need to keep it.
22702 if test "x$srcdir" = x.; then
22703   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22704 fi
22705
22706 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22707
22708 DEFS=-DHAVE_CONFIG_H
22709
22710 # Without the "./", some shells look in PATH for config.status.
22711 : ${CONFIG_STATUS=./config.status}
22712
22713 echo creating $CONFIG_STATUS
22714 rm -f $CONFIG_STATUS
22715 cat > $CONFIG_STATUS <<EOF
22716 #! /bin/sh
22717 # Generated automatically by configure.
22718 # Run this file to recreate the current configuration.
22719 # This directory was configured as follows,
22720 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22721 #
22722 # $0 $ac_configure_args
22723 #
22724 # Compiler output produced by configure, useful for debugging
22725 # configure, is in ./config.log if it exists.
22726
22727 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22728 for ac_option
22729 do
22730   case "\$ac_option" in
22731   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22732     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22733     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22734   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22735     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22736     exit 0 ;;
22737   -help | --help | --hel | --he | --h)
22738     echo "\$ac_cs_usage"; exit 0 ;;
22739   *) echo "\$ac_cs_usage"; exit 1 ;;
22740   esac
22741 done
22742
22743 ac_given_srcdir=$srcdir
22744 ac_given_INSTALL="$INSTALL"
22745
22746 trap 'rm -fr `echo "\
22747 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22748 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22749 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22750 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22751 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22752 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22753 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22754 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22755 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22756 include/Makefile:build/top.mk:include/Makefile.in \
22757 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22758 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22759 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22760 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22761 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22762 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22763 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22764 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22765 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22766 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22767 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22768 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22769 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22770 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22771 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22772 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22773 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22774 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22775 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22776 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22777 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22778 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22779 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22780 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22781 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22782 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22783 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22784 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22785 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22786  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22787 EOF
22788 cat >> $CONFIG_STATUS <<EOF
22789
22790 # Protect against being on the right side of a sed subst in config.status.
22791 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22792  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22793 $ac_vpsub
22794 $extrasub
22795 s%@SHELL@%$SHELL%g
22796 s%@CFLAGS@%$CFLAGS%g
22797 s%@CPPFLAGS@%$CPPFLAGS%g
22798 s%@CXXFLAGS@%$CXXFLAGS%g
22799 s%@FFLAGS@%$FFLAGS%g
22800 s%@DEFS@%$DEFS%g
22801 s%@LDFLAGS@%$LDFLAGS%g
22802 s%@LIBS@%$LIBS%g
22803 s%@exec_prefix@%$exec_prefix%g
22804 s%@prefix@%$prefix%g
22805 s%@program_transform_name@%$program_transform_name%g
22806 s%@bindir@%$bindir%g
22807 s%@sbindir@%$sbindir%g
22808 s%@libexecdir@%$libexecdir%g
22809 s%@datadir@%$datadir%g
22810 s%@sysconfdir@%$sysconfdir%g
22811 s%@sharedstatedir@%$sharedstatedir%g
22812 s%@localstatedir@%$localstatedir%g
22813 s%@libdir@%$libdir%g
22814 s%@includedir@%$includedir%g
22815 s%@oldincludedir@%$oldincludedir%g
22816 s%@infodir@%$infodir%g
22817 s%@mandir@%$mandir%g
22818 s%@host@%$host%g
22819 s%@host_alias@%$host_alias%g
22820 s%@host_cpu@%$host_cpu%g
22821 s%@host_vendor@%$host_vendor%g
22822 s%@host_os@%$host_os%g
22823 s%@target@%$target%g
22824 s%@target_alias@%$target_alias%g
22825 s%@target_cpu@%$target_cpu%g
22826 s%@target_vendor@%$target_vendor%g
22827 s%@target_os@%$target_os%g
22828 s%@build@%$build%g
22829 s%@build_alias@%$build_alias%g
22830 s%@build_cpu@%$build_cpu%g
22831 s%@build_vendor@%$build_vendor%g
22832 s%@build_os@%$build_os%g
22833 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22834 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22835 s%@INSTALL_DATA@%$INSTALL_DATA%g
22836 s%@PACKAGE@%$PACKAGE%g
22837 s%@VERSION@%$VERSION%g
22838 s%@ACLOCAL@%$ACLOCAL%g
22839 s%@AUTOCONF@%$AUTOCONF%g
22840 s%@AUTOMAKE@%$AUTOMAKE%g
22841 s%@AUTOHEADER@%$AUTOHEADER%g
22842 s%@MAKEINFO@%$MAKEINFO%g
22843 s%@install_sh@%$install_sh%g
22844 s%@AMTAR@%$AMTAR%g
22845 s%@AWK@%$AWK%g
22846 s%@AMTARFLAGS@%$AMTARFLAGS%g
22847 s%@SET_MAKE@%$SET_MAKE%g
22848 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22849 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22850 s%@top_builddir@%$top_builddir%g
22851 s%@ldap_subdir@%$ldap_subdir%g
22852 s%@CC@%$CC%g
22853 s%@AR@%$AR%g
22854 s%@LN_S@%$LN_S%g
22855 s%@OBJEXT@%$OBJEXT%g
22856 s%@EXEEXT@%$EXEEXT%g
22857 s%@ECHO@%$ECHO%g
22858 s%@RANLIB@%$RANLIB%g
22859 s%@STRIP@%$STRIP%g
22860 s%@DLLTOOL@%$DLLTOOL%g
22861 s%@AS@%$AS%g
22862 s%@OBJDUMP@%$OBJDUMP%g
22863 s%@CPP@%$CPP%g
22864 s%@LIBTOOL@%$LIBTOOL%g
22865 s%@LTSTATIC@%$LTSTATIC%g
22866 s%@LN_H@%$LN_H%g
22867 s%@PERLBIN@%$PERLBIN%g
22868 s%@OL_MKDEP@%$OL_MKDEP%g
22869 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22870 s%@LIBOBJS@%$LIBOBJS%g
22871 s%@LIBSRCS@%$LIBSRCS%g
22872 s%@PLAT@%$PLAT%g
22873 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22874 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22875 s%@BUILD_BDB@%$BUILD_BDB%g
22876 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22877 s%@BUILD_LDAP@%$BUILD_LDAP%g
22878 s%@BUILD_LDBM@%$BUILD_LDBM%g
22879 s%@BUILD_META@%$BUILD_META%g
22880 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22881 s%@BUILD_NULL@%$BUILD_NULL%g
22882 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22883 s%@BUILD_PERL@%$BUILD_PERL%g
22884 s%@BUILD_SHELL@%$BUILD_SHELL%g
22885 s%@BUILD_SQL@%$BUILD_SQL%g
22886 s%@BUILD_TCL@%$BUILD_TCL%g
22887 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22888 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22889 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22890 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22891 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22892 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22893 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22894 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22895 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22896 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22897 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22898 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22899 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22900 s%@LDAP_LIBS@%$LDAP_LIBS%g
22901 s%@LDIF_LIBS@%$LDIF_LIBS%g
22902 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22903 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22904 s%@LDBM_LIBS@%$LDBM_LIBS%g
22905 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22906 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22907 s%@WRAP_LIBS@%$WRAP_LIBS%g
22908 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22909 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22910 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22911 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
22912 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22913 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22914 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22915 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22916 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22917 s%@KRB4_LIBS@%$KRB4_LIBS%g
22918 s%@KRB5_LIBS@%$KRB5_LIBS%g
22919 s%@READLINE_LIBS@%$READLINE_LIBS%g
22920 s%@SASL_LIBS@%$SASL_LIBS%g
22921 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22922 s%@TLS_LIBS@%$TLS_LIBS%g
22923 s%@MODULES_LIBS@%$MODULES_LIBS%g
22924 s%@AUTH_LIBS@%$AUTH_LIBS%g
22925 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22926 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22927 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22928 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22929
22930 CEOF
22931 EOF
22932
22933 cat >> $CONFIG_STATUS <<\EOF
22934
22935 # Split the substitutions into bite-sized pieces for seds with
22936 # small command number limits, like on Digital OSF/1 and HP-UX.
22937 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22938 ac_file=1 # Number of current file.
22939 ac_beg=1 # First line for current file.
22940 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22941 ac_more_lines=:
22942 ac_sed_cmds=""
22943 while $ac_more_lines; do
22944   if test $ac_beg -gt 1; then
22945     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22946   else
22947     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22948   fi
22949   if test ! -s conftest.s$ac_file; then
22950     ac_more_lines=false
22951     rm -f conftest.s$ac_file
22952   else
22953     if test -z "$ac_sed_cmds"; then
22954       ac_sed_cmds="sed -f conftest.s$ac_file"
22955     else
22956       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22957     fi
22958     ac_file=`expr $ac_file + 1`
22959     ac_beg=$ac_end
22960     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22961   fi
22962 done
22963 if test -z "$ac_sed_cmds"; then
22964   ac_sed_cmds=cat
22965 fi
22966 EOF
22967
22968 cat >> $CONFIG_STATUS <<EOF
22969
22970 CONFIG_FILES=\${CONFIG_FILES-"\
22971 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22972 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22973 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22974 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22975 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22976 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22977 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22978 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22979 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22980 include/Makefile:build/top.mk:include/Makefile.in \
22981 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22982 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22983 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22984 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22985 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22986 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22987 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22988 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22989 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22990 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22991 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22992 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22993 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22994 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22995 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22996 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22997 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22998 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22999 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23000 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23001 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23002 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23003 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23004 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23005 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23006 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23007 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23008 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23009 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23010 "}
23011 EOF
23012 cat >> $CONFIG_STATUS <<\EOF
23013 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23014   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23015   case "$ac_file" in
23016   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23017        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23018   *) ac_file_in="${ac_file}.in" ;;
23019   esac
23020
23021   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23022
23023   # Remove last slash and all that follows it.  Not all systems have dirname.
23024   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23025   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23026     # The file is in a subdirectory.
23027     test ! -d "$ac_dir" && mkdir "$ac_dir"
23028     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23029     # A "../" for each directory in $ac_dir_suffix.
23030     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23031   else
23032     ac_dir_suffix= ac_dots=
23033   fi
23034
23035   case "$ac_given_srcdir" in
23036   .)  srcdir=.
23037       if test -z "$ac_dots"; then top_srcdir=.
23038       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23039   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23040   *) # Relative path.
23041     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23042     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23043   esac
23044
23045   case "$ac_given_INSTALL" in
23046   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23047   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23048   esac
23049
23050   echo creating "$ac_file"
23051   rm -f "$ac_file"
23052   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23053   case "$ac_file" in
23054   *[Mm]akefile*) ac_comsub="1i\\
23055 # $configure_input" ;;
23056   *) ac_comsub= ;;
23057   esac
23058
23059   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23060   sed -e "$ac_comsub
23061 s%@configure_input@%$configure_input%g
23062 s%@srcdir@%$srcdir%g
23063 s%@top_srcdir@%$top_srcdir%g
23064 s%@INSTALL@%$INSTALL%g
23065 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23066 fi; done
23067 rm -f conftest.s*
23068
23069 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23070 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23071 #
23072 # ac_d sets the value in "#define NAME VALUE" lines.
23073 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23074 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23075 ac_dC='\3'
23076 ac_dD='%g'
23077 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23078 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23079 ac_uB='\([      ]\)%\1#\2define\3'
23080 ac_uC=' '
23081 ac_uD='\4%g'
23082 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23083 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23084 ac_eB='$%\1#\2define\3'
23085 ac_eC=' '
23086 ac_eD='%g'
23087
23088 if test "${CONFIG_HEADERS+set}" != set; then
23089 EOF
23090 cat >> $CONFIG_STATUS <<EOF
23091   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23092 EOF
23093 cat >> $CONFIG_STATUS <<\EOF
23094 fi
23095 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23096   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23097   case "$ac_file" in
23098   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23099        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23100   *) ac_file_in="${ac_file}.in" ;;
23101   esac
23102
23103   echo creating $ac_file
23104
23105   rm -f conftest.frag conftest.in conftest.out
23106   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23107   cat $ac_file_inputs > conftest.in
23108
23109 EOF
23110
23111 # Transform confdefs.h into a sed script conftest.vals that substitutes
23112 # the proper values into config.h.in to produce config.h.  And first:
23113 # Protect against being on the right side of a sed subst in config.status.
23114 # Protect against being in an unquoted here document in config.status.
23115 rm -f conftest.vals
23116 cat > conftest.hdr <<\EOF
23117 s/[\\&%]/\\&/g
23118 s%[\\$`]%\\&%g
23119 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23120 s%ac_d%ac_u%gp
23121 s%ac_u%ac_e%gp
23122 EOF
23123 sed -n -f conftest.hdr confdefs.h > conftest.vals
23124 rm -f conftest.hdr
23125
23126 # This sed command replaces #undef with comments.  This is necessary, for
23127 # example, in the case of _POSIX_SOURCE, which is predefined and required
23128 # on some systems where configure will not decide to define it.
23129 cat >> conftest.vals <<\EOF
23130 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23131 EOF
23132
23133 # Break up conftest.vals because some shells have a limit on
23134 # the size of here documents, and old seds have small limits too.
23135
23136 rm -f conftest.tail
23137 while :
23138 do
23139   ac_lines=`grep -c . conftest.vals`
23140   # grep -c gives empty output for an empty file on some AIX systems.
23141   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23142   # Write a limited-size here document to conftest.frag.
23143   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23144   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23145   echo 'CEOF
23146   sed -f conftest.frag conftest.in > conftest.out
23147   rm -f conftest.in
23148   mv conftest.out conftest.in
23149 ' >> $CONFIG_STATUS
23150   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23151   rm -f conftest.vals
23152   mv conftest.tail conftest.vals
23153 done
23154 rm -f conftest.vals
23155
23156 cat >> $CONFIG_STATUS <<\EOF
23157   rm -f conftest.frag conftest.h
23158   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23159   cat conftest.in >> conftest.h
23160   rm -f conftest.in
23161   if cmp -s $ac_file conftest.h 2>/dev/null; then
23162     echo "$ac_file is unchanged"
23163     rm -f conftest.h
23164   else
23165     # Remove last slash and all that follows it.  Not all systems have dirname.
23166       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23167       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23168       # The file is in a subdirectory.
23169       test ! -d "$ac_dir" && mkdir "$ac_dir"
23170     fi
23171     rm -f $ac_file
23172     mv conftest.h $ac_file
23173   fi
23174 fi; done
23175
23176 EOF
23177 cat >> $CONFIG_STATUS <<EOF
23178
23179 EOF
23180 cat >> $CONFIG_STATUS <<\EOF
23181
23182 date > stamp-h
23183 echo Please run \"make depend\" to build dependencies
23184
23185 exit 0
23186 EOF
23187 chmod +x $CONFIG_STATUS
23188 rm -fr confdefs* $ac_clean_files
23189 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23190