]> git.sur5r.net Git - openldap/blob - configure
update back-monitor man page
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.474 2003/04/23 07:13:24 hyc Exp  
4
5 # Copyright 1998-2003 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-2003 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-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos support [auto]"
50 ac_help="$ac_help
51   --with-readline         with readline support [auto]"
52 ac_help="$ac_help
53   --with-threads          with threads [auto]"
54 ac_help="$ac_help
55   --with-tls              with TLS/SSL support [auto]"
56 ac_help="$ac_help
57   --with-yielding-select  with implicitly yielding select [auto]"
58 ac_help="$ac_help
59
60 SLAPD (Standalone LDAP Daemon) Options:"
61 ac_help="$ac_help
62   --enable-slapd          enable building slapd [yes]"
63 ac_help="$ac_help
64     --enable-aci          enable per-object ACIs (experimental) [no]"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords [yes]"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords [no]"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification [no]"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords [no]"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support [no]"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex [no]"
79 ac_help="$ac_help
80     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
81 ac_help="$ac_help
82     --enable-rlookups     enable reverse lookups of client hostnames [no]"
83 ac_help="$ac_help
84     --enable-slapi        enable installation of slapi library [no]"
85 ac_help="$ac_help
86     --enable-slp          enable SLPv2 support [no]"
87 ac_help="$ac_help
88     --enable-wrappers     enable tcp wrapper support [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend [yes]"
91 ac_help="$ac_help
92     --with-bdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend [no]"
95 ac_help="$ac_help
96     --with-dnssrv-module  module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend [no]"
99 ac_help="$ac_help
100     --with-hdb-module     module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142     --enable-tcl          enable tcl backend [no]"
143 ac_help="$ac_help
144     --with-tcl-module     module type static|dynamic [static]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
876 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
877
878 OPENLDAP_CVS=""
879 if test -d $ac_aux_dir/CVS; then
880         OPENLDAP_CVS="(from CVS sources) "
881 fi
882
883 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
884
885
886 echo $ac_n "checking host system type""... $ac_c" 1>&6
887 echo "configure:888: checking host system type" >&5
888 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
889
890 # Make sure we can run config.sub.
891   if $ac_config_sub sun4 >/dev/null 2>&1; then :
892     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
893   fi
894
895   ac_cv_host_alias=$host
896   case "$ac_cv_host_alias" in
897   NONE)
898     case $nonopt in
899     NONE)
900       if ac_cv_host_alias=`$ac_config_guess`; then :
901       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
902       fi ;;
903     *) ac_cv_host_alias=$nonopt ;;
904     esac ;;
905   esac
906
907   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
908   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
909   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
910   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
911 else
912   echo $ac_n "(cached) $ac_c" 1>&6
913 fi
914
915 echo "$ac_t""$ac_cv_host" 1>&6
916
917 host=$ac_cv_host
918 host_alias=$ac_cv_host_alias
919 host_cpu=$ac_cv_host_cpu
920 host_vendor=$ac_cv_host_vendor
921 host_os=$ac_cv_host_os
922
923
924
925
926
927 echo $ac_n "checking target system type""... $ac_c" 1>&6
928 echo "configure:929: checking target system type" >&5
929 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
930
931 # Make sure we can run config.sub.
932   if $ac_config_sub sun4 >/dev/null 2>&1; then :
933     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
934   fi
935
936   ac_cv_target_alias=$target
937   case "$ac_cv_target_alias" in
938   NONE)
939     case $nonopt in
940     NONE)
941       ac_cv_target_alias=$host_alias ;;
942
943     *) ac_cv_target_alias=$nonopt ;;
944     esac ;;
945   esac
946
947   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
948   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
949   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
950   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
951 else
952   echo $ac_n "(cached) $ac_c" 1>&6
953 fi
954
955 echo "$ac_t""$ac_cv_target" 1>&6
956
957 target=$ac_cv_target
958 target_alias=$ac_cv_target_alias
959 target_cpu=$ac_cv_target_cpu
960 target_vendor=$ac_cv_target_vendor
961 target_os=$ac_cv_target_os
962
963
964
965
966
967 echo $ac_n "checking build system type""... $ac_c" 1>&6
968 echo "configure:969: checking build system type" >&5
969 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
970
971 # Make sure we can run config.sub.
972   if $ac_config_sub sun4 >/dev/null 2>&1; then :
973     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
974   fi
975
976   ac_cv_build_alias=$build
977   case "$ac_cv_build_alias" in
978   NONE)
979     case $nonopt in
980     NONE)
981       ac_cv_build_alias=$host_alias ;;
982
983     *) ac_cv_build_alias=$nonopt ;;
984     esac ;;
985   esac
986
987   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
988   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991 else
992   echo $ac_n "(cached) $ac_c" 1>&6
993 fi
994
995 echo "$ac_t""$ac_cv_build" 1>&6
996
997 build=$ac_cv_build
998 build_alias=$ac_cv_build_alias
999 build_cpu=$ac_cv_build_cpu
1000 build_vendor=$ac_cv_build_vendor
1001 build_os=$ac_cv_build_os
1002
1003
1004
1005
1006
1007 # Do some error checking and defaulting for the host and target type.
1008 # The inputs are:
1009 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1010 #
1011 # The rules are:
1012 # 1. You are not allowed to specify --host, --target, and nonopt at the
1013 #    same time.
1014 # 2. Host defaults to nonopt.
1015 # 3. If nonopt is not specified, then host defaults to the current host,
1016 #    as determined by config.guess.
1017 # 4. Target and build default to nonopt.
1018 # 5. If nonopt is not specified, then target and build default to host.
1019
1020 # The aliases save the names the user supplied, while $host etc.
1021 # will get canonicalized.
1022 case $host---$target---$nonopt in
1023 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1024 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1025 esac
1026
1027 test "$host_alias" != "$target_alias" &&
1028   test "$program_prefix$program_suffix$program_transform_name" = \
1029     NONENONEs,x,x, &&
1030   program_prefix=${target_alias}-
1031
1032
1033 # Find a good install program.  We prefer a C program (faster),
1034 # so one script is as good as another.  But avoid the broken or
1035 # incompatible versions:
1036 # SysV /etc/install, /usr/sbin/install
1037 # SunOS /usr/etc/install
1038 # IRIX /sbin/install
1039 # AIX /bin/install
1040 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1041 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1042 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1043 # ./install, which can be erroneously created by make from ./install.sh.
1044 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1045 echo "configure:1046: checking for a BSD compatible install" >&5
1046 if test -z "$INSTALL"; then
1047 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1048   echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1051   for ac_dir in $PATH; do
1052     # Account for people who put trailing slashes in PATH elements.
1053     case "$ac_dir/" in
1054     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1055     *)
1056       # OSF1 and SCO ODT 3.0 have their own names for install.
1057       # Don't use installbsd from OSF since it installs stuff as root
1058       # by default.
1059       for ac_prog in ginstall scoinst install; do
1060         if test -f $ac_dir/$ac_prog; then
1061           if test $ac_prog = install &&
1062             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # AIX install.  It has an incompatible calling convention.
1064             :
1065           elif test $ac_prog = install &&
1066             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1067             # program-specific install script used by HP pwplus--don't use.
1068             :
1069           else
1070             ac_cv_path_install="$ac_dir/$ac_prog -c"
1071             break 2
1072           fi
1073         fi
1074       done
1075       ;;
1076     esac
1077   done
1078   IFS="$ac_save_IFS"
1079
1080 fi
1081   if test "${ac_cv_path_install+set}" = set; then
1082     INSTALL="$ac_cv_path_install"
1083   else
1084     # As a last resort, use the slow shell script.  We don't cache a
1085     # path for INSTALL within a source directory, because that will
1086     # break other packages using the cache if that directory is
1087     # removed, or if the path is relative.
1088     INSTALL="$ac_install_sh"
1089   fi
1090 fi
1091 echo "$ac_t""$INSTALL" 1>&6
1092
1093 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1094 # It thinks the first close brace ends the variable substitution.
1095 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1096
1097 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1098
1099 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1100
1101 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1102 echo "configure:1103: checking whether build environment is sane" >&5
1103 # Just in case
1104 sleep 1
1105 echo timestamp > conftestfile
1106 # Do `set' in a subshell so we don't clobber the current shell's
1107 # arguments.  Must try -L first in case configure is actually a
1108 # symlink; some systems play weird games with the mod time of symlinks
1109 # (eg FreeBSD returns the mod time of the symlink's containing
1110 # directory).
1111 if (
1112    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1113    if test "$*" = "X"; then
1114       # -L didn't work.
1115       set X `ls -t $srcdir/configure conftestfile`
1116    fi
1117    if test "$*" != "X $srcdir/configure conftestfile" \
1118       && test "$*" != "X conftestfile $srcdir/configure"; then
1119
1120       # If neither matched, then we have a broken ls.  This can happen
1121       # if, for instance, CONFIG_SHELL is bash and it inherits a
1122       # broken ls alias from the environment.  This has actually
1123       # happened.  Such a system could not be considered "sane".
1124       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1125 alias in your environment" 1>&2; exit 1; }
1126    fi
1127
1128    test "$2" = conftestfile
1129    )
1130 then
1131    # Ok.
1132    :
1133 else
1134    { echo "configure: error: newly created file is older than distributed files!
1135 Check your system clock" 1>&2; exit 1; }
1136 fi
1137 rm -f conftest*
1138 echo "$ac_t""yes" 1>&6
1139 if test "$program_transform_name" = s,x,x,; then
1140   program_transform_name=
1141 else
1142   # Double any \ or $.  echo might interpret backslashes.
1143   cat <<\EOF_SED > conftestsed
1144 s,\\,\\\\,g; s,\$,$$,g
1145 EOF_SED
1146   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1147   rm -f conftestsed
1148 fi
1149 test "$program_prefix" != NONE &&
1150   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1151 # Use a double $ so make ignores it.
1152 test "$program_suffix" != NONE &&
1153   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1154
1155 # sed with no file args requires a program.
1156 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1157
1158 for ac_prog in mawk gawk nawk awk
1159 do
1160 # Extract the first word of "$ac_prog", so it can be a program name with args.
1161 set dummy $ac_prog; ac_word=$2
1162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1163 echo "configure:1164: checking for $ac_word" >&5
1164 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   if test -n "$AWK"; then
1168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1169 else
1170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1171   ac_dummy="$PATH"
1172   for ac_dir in $ac_dummy; do
1173     test -z "$ac_dir" && ac_dir=.
1174     if test -f $ac_dir/$ac_word; then
1175       ac_cv_prog_AWK="$ac_prog"
1176       break
1177     fi
1178   done
1179   IFS="$ac_save_ifs"
1180 fi
1181 fi
1182 AWK="$ac_cv_prog_AWK"
1183 if test -n "$AWK"; then
1184   echo "$ac_t""$AWK" 1>&6
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189 test -n "$AWK" && break
1190 done
1191
1192 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether ${MAKE-make} sets \${MAKE}" >&5
1194 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1195 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftestmake <<\EOF
1199 all:
1200         @echo 'ac_maketemp="${MAKE}"'
1201 EOF
1202 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1203 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1204 if test -n "$ac_maketemp"; then
1205   eval ac_cv_prog_make_${ac_make}_set=yes
1206 else
1207   eval ac_cv_prog_make_${ac_make}_set=no
1208 fi
1209 rm -f conftestmake
1210 fi
1211 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1212   echo "$ac_t""yes" 1>&6
1213   SET_MAKE=
1214 else
1215   echo "$ac_t""no" 1>&6
1216   SET_MAKE="MAKE=${MAKE-make}"
1217 fi
1218
1219
1220
1221 PACKAGE=$OL_PACKAGE
1222
1223 VERSION=$OL_VERSION
1224
1225 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1226   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1227 fi
1228
1229
1230
1231 missing_dir=`cd $ac_aux_dir && pwd`
1232 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1233 echo "configure:1234: checking for working aclocal" >&5
1234 # Run test in a subshell; some versions of sh will print an error if
1235 # an executable is not found, even if stderr is redirected.
1236 # Redirect stdin to placate older versions of autoconf.  Sigh.
1237 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1238    ACLOCAL=aclocal
1239    echo "$ac_t""found" 1>&6
1240 else
1241    ACLOCAL="$missing_dir/missing aclocal"
1242    echo "$ac_t""missing" 1>&6
1243 fi
1244
1245 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working autoconf" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1251    AUTOCONF=autoconf
1252    echo "$ac_t""found" 1>&6
1253 else
1254    AUTOCONF="$missing_dir/missing autoconf"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working automake" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (automake --version) < /dev/null > /dev/null 2>&1; then
1264    AUTOMAKE=automake
1265    echo "$ac_t""found" 1>&6
1266 else
1267    AUTOMAKE="$missing_dir/missing automake"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1272 echo "configure:1273: checking for working autoheader" >&5
1273 # Run test in a subshell; some versions of sh will print an error if
1274 # an executable is not found, even if stderr is redirected.
1275 # Redirect stdin to placate older versions of autoconf.  Sigh.
1276 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1277    AUTOHEADER=autoheader
1278    echo "$ac_t""found" 1>&6
1279 else
1280    AUTOHEADER="$missing_dir/missing autoheader"
1281    echo "$ac_t""missing" 1>&6
1282 fi
1283
1284 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1285 echo "configure:1286: checking for working makeinfo" >&5
1286 # Run test in a subshell; some versions of sh will print an error if
1287 # an executable is not found, even if stderr is redirected.
1288 # Redirect stdin to placate older versions of autoconf.  Sigh.
1289 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1290    MAKEINFO=makeinfo
1291    echo "$ac_t""found" 1>&6
1292 else
1293    MAKEINFO="$missing_dir/missing makeinfo"
1294    echo "$ac_t""missing" 1>&6
1295 fi
1296
1297 install_sh="$missing_dir/install-sh"
1298 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1299
1300 for ac_prog in gnutar gtar tar
1301 do
1302 # Extract the first word of "$ac_prog", so it can be a program name with args.
1303 set dummy $ac_prog; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$AMTAR"; then
1310   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   ac_dummy="$PATH"
1314   for ac_dir in $ac_dummy; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f $ac_dir/$ac_word; then
1317       ac_cv_prog_AMTAR="$ac_prog"
1318       break
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322 fi
1323 fi
1324 AMTAR="$ac_cv_prog_AMTAR"
1325 if test -n "$AMTAR"; then
1326   echo "$ac_t""$AMTAR" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331 test -n "$AMTAR" && break
1332 done
1333
1334
1335 AMTARFLAGS=
1336 if test -n "$AMTAR"; then
1337   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1338         AMTARFLAGS=o
1339   fi
1340 fi
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_PACKAGE "$PACKAGE"
1344 EOF
1345
1346 cat >> confdefs.h <<EOF
1347 #define OPENLDAP_VERSION "$VERSION"
1348 EOF
1349
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION $OL_API_INC
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1361 EOF
1362
1363 cat >> confdefs.h <<EOF
1364 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1365 EOF
1366
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB
1369
1370 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1371
1372
1373
1374 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1375 echo "configure:1376: checking configure arguments" >&5
1376
1377
1378 top_builddir=`pwd`
1379
1380 ldap_subdir="/openldap"
1381
1382 # Check whether --with-subdir or --without-subdir was given.
1383 if test "${with_subdir+set}" = set; then
1384   withval="$with_subdir"
1385   case "$withval" in
1386         no) ldap_subdir=""
1387                 ;;
1388         yes)
1389                 ;;
1390         /*|\\*)
1391                 ldap_subdir="$withval"
1392                 ;;
1393         *)
1394                 ldap_subdir="/$withval"
1395                 ;;
1396 esac
1397
1398 fi
1399
1400
1401 # OpenLDAP --enable-debug
1402         # Check whether --enable-debug or --disable-debug was given.
1403 if test "${enable_debug+set}" = set; then
1404   enableval="$enable_debug"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no ; do
1408                 if test "$enableval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1414         fi
1415         ol_enable_debug="$ol_arg"
1416
1417 else
1418         ol_enable_debug="yes"
1419 fi
1420 # end --enable-debug
1421 # OpenLDAP --enable-dynamic
1422         # Check whether --enable-dynamic or --disable-dynamic was given.
1423 if test "${enable_dynamic+set}" = set; then
1424   enableval="$enable_dynamic"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1434         fi
1435         ol_enable_dynamic="$ol_arg"
1436
1437 else
1438         ol_enable_dynamic="no"
1439 fi
1440 # end --enable-dynamic
1441 # OpenLDAP --enable-syslog
1442         # Check whether --enable-syslog or --disable-syslog was given.
1443 if test "${enable_syslog+set}" = set; then
1444   enableval="$enable_syslog"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1454         fi
1455         ol_enable_syslog="$ol_arg"
1456
1457 else
1458         ol_enable_syslog="auto"
1459 fi
1460 # end --enable-syslog
1461 # OpenLDAP --enable-proctitle
1462         # Check whether --enable-proctitle or --disable-proctitle was given.
1463 if test "${enable_proctitle+set}" = set; then
1464   enableval="$enable_proctitle"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1474         fi
1475         ol_enable_proctitle="$ol_arg"
1476
1477 else
1478         ol_enable_proctitle="yes"
1479 fi
1480 # end --enable-proctitle
1481 ol_enable_referrals=${ol_enable_referrals-no}
1482 ol_enable_kbind=${ol_enable_kbind-no}
1483 # OpenLDAP --enable-ipv6
1484         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1485 if test "${enable_ipv6+set}" = set; then
1486   enableval="$enable_ipv6"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1496         fi
1497         ol_enable_ipv6="$ol_arg"
1498
1499 else
1500         ol_enable_ipv6="auto"
1501 fi
1502 # end --enable-ipv6
1503 # OpenLDAP --enable-local
1504         # Check whether --enable-local or --disable-local was given.
1505 if test "${enable_local+set}" = set; then
1506   enableval="$enable_local"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1516         fi
1517         ol_enable_local="$ol_arg"
1518
1519 else
1520         ol_enable_local="auto"
1521 fi
1522 # end --enable-local
1523 # OpenLDAP --enable-x_compile
1524         # Check whether --enable-x_compile or --disable-x_compile was given.
1525 if test "${enable_x_compile+set}" = set; then
1526   enableval="$enable_x_compile"
1527   
1528         ol_arg=invalid
1529         for ol_val in yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1536         fi
1537         ol_enable_x_compile="$ol_arg"
1538
1539 else
1540         ol_enable_x_compile="no"
1541 fi
1542 # end --enable-x_compile
1543
1544
1545 # OpenLDAP --with-cyrus_sasl
1546         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1547 if test "${with_cyrus_sasl+set}" = set; then
1548   withval="$with_cyrus_sasl"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1558         fi
1559         ol_with_cyrus_sasl="$ol_arg"
1560
1561 else
1562         ol_with_cyrus_sasl="auto"
1563 fi
1564 # end --with-cyrus_sasl
1565
1566 # OpenLDAP --with-fetch
1567         # Check whether --with-fetch or --without-fetch was given.
1568 if test "${with_fetch+set}" = set; then
1569   withval="$with_fetch"
1570   
1571         ol_arg=invalid
1572         for ol_val in auto yes no  ; do
1573                 if test "$withval" = "$ol_val" ; then
1574                         ol_arg="$ol_val"
1575                 fi
1576         done
1577         if test "$ol_arg" = "invalid" ; then
1578                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1579         fi
1580         ol_with_fetch="$ol_arg"
1581
1582 else
1583         ol_with_fetch="auto"
1584 fi
1585 # end --with-fetch
1586
1587 # OpenLDAP --with-kerberos
1588         # Check whether --with-kerberos or --without-kerberos was given.
1589 if test "${with_kerberos+set}" = set; then
1590   withval="$with_kerberos"
1591   
1592         ol_arg=invalid
1593         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1594                 if test "$withval" = "$ol_val" ; then
1595                         ol_arg="$ol_val"
1596                 fi
1597         done
1598         if test "$ol_arg" = "invalid" ; then
1599                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1600         fi
1601         ol_with_kerberos="$ol_arg"
1602
1603 else
1604         ol_with_kerberos="auto"
1605 fi
1606 # end --with-kerberos
1607
1608 # OpenLDAP --with-readline
1609         # Check whether --with-readline or --without-readline was given.
1610 if test "${with_readline+set}" = set; then
1611   withval="$with_readline"
1612   
1613         ol_arg=invalid
1614         for ol_val in auto yes no  ; do
1615                 if test "$withval" = "$ol_val" ; then
1616                         ol_arg="$ol_val"
1617                 fi
1618         done
1619         if test "$ol_arg" = "invalid" ; then
1620                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1621         fi
1622         ol_with_readline="$ol_arg"
1623
1624 else
1625         ol_with_readline="auto"
1626 fi
1627 # end --with-readline
1628
1629 # OpenLDAP --with-threads
1630         # Check whether --with-threads or --without-threads was given.
1631 if test "${with_threads+set}" = set; then
1632   withval="$with_threads"
1633   
1634         ol_arg=invalid
1635         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1636                 if test "$withval" = "$ol_val" ; then
1637                         ol_arg="$ol_val"
1638                 fi
1639         done
1640         if test "$ol_arg" = "invalid" ; then
1641                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1642         fi
1643         ol_with_threads="$ol_arg"
1644
1645 else
1646         ol_with_threads="auto"
1647 fi
1648 # end --with-threads
1649
1650 # OpenLDAP --with-tls
1651         # Check whether --with-tls or --without-tls was given.
1652 if test "${with_tls+set}" = set; then
1653   withval="$with_tls"
1654   
1655         ol_arg=invalid
1656         for ol_val in auto ssleay openssl yes no  ; do
1657                 if test "$withval" = "$ol_val" ; then
1658                         ol_arg="$ol_val"
1659                 fi
1660         done
1661         if test "$ol_arg" = "invalid" ; then
1662                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1663         fi
1664         ol_with_tls="$ol_arg"
1665
1666 else
1667         ol_with_tls="auto"
1668 fi
1669 # end --with-tls
1670
1671 # OpenLDAP --with-yielding_select
1672         # Check whether --with-yielding_select or --without-yielding_select was given.
1673 if test "${with_yielding_select+set}" = set; then
1674   withval="$with_yielding_select"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no manual  ; do
1678                 if test "$withval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1684         fi
1685         ol_with_yielding_select="$ol_arg"
1686
1687 else
1688         ol_with_yielding_select="auto"
1689 fi
1690 # end --with-yielding_select
1691
1692
1693
1694 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1695 if test "${with_xxslapdoptions+set}" = set; then
1696   withval="$with_xxslapdoptions"
1697   :
1698 fi
1699
1700 # OpenLDAP --enable-slapd
1701         # Check whether --enable-slapd or --disable-slapd was given.
1702 if test "${enable_slapd+set}" = set; then
1703   enableval="$enable_slapd"
1704   
1705         ol_arg=invalid
1706         for ol_val in auto yes no ; do
1707                 if test "$enableval" = "$ol_val" ; then
1708                         ol_arg="$ol_val"
1709                 fi
1710         done
1711         if test "$ol_arg" = "invalid" ; then
1712                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1713         fi
1714         ol_enable_slapd="$ol_arg"
1715
1716 else
1717         ol_enable_slapd="yes"
1718 fi
1719 # end --enable-slapd
1720 # OpenLDAP --enable-aci
1721         # Check whether --enable-aci or --disable-aci was given.
1722 if test "${enable_aci+set}" = set; then
1723   enableval="$enable_aci"
1724   
1725         ol_arg=invalid
1726         for ol_val in auto yes no ; do
1727                 if test "$enableval" = "$ol_val" ; then
1728                         ol_arg="$ol_val"
1729                 fi
1730         done
1731         if test "$ol_arg" = "invalid" ; then
1732                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1733         fi
1734         ol_enable_aci="$ol_arg"
1735
1736 else
1737         ol_enable_aci="no"
1738 fi
1739 # end --enable-aci
1740 # OpenLDAP --enable-cleartext
1741         # Check whether --enable-cleartext or --disable-cleartext was given.
1742 if test "${enable_cleartext+set}" = set; then
1743   enableval="$enable_cleartext"
1744   
1745         ol_arg=invalid
1746         for ol_val in auto yes no ; do
1747                 if test "$enableval" = "$ol_val" ; then
1748                         ol_arg="$ol_val"
1749                 fi
1750         done
1751         if test "$ol_arg" = "invalid" ; then
1752                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1753         fi
1754         ol_enable_cleartext="$ol_arg"
1755
1756 else
1757         ol_enable_cleartext="yes"
1758 fi
1759 # end --enable-cleartext
1760 # OpenLDAP --enable-crypt
1761         # Check whether --enable-crypt or --disable-crypt was given.
1762 if test "${enable_crypt+set}" = set; then
1763   enableval="$enable_crypt"
1764   
1765         ol_arg=invalid
1766         for ol_val in auto yes no ; do
1767                 if test "$enableval" = "$ol_val" ; then
1768                         ol_arg="$ol_val"
1769                 fi
1770         done
1771         if test "$ol_arg" = "invalid" ; then
1772                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1773         fi
1774         ol_enable_crypt="$ol_arg"
1775
1776 else
1777         ol_enable_crypt="no"
1778 fi
1779 # end --enable-crypt
1780 # OpenLDAP --enable-kpasswd
1781         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1782 if test "${enable_kpasswd+set}" = set; then
1783   enableval="$enable_kpasswd"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1793         fi
1794         ol_enable_kpasswd="$ol_arg"
1795
1796 else
1797         ol_enable_kpasswd="no"
1798 fi
1799 # end --enable-kpasswd
1800 # OpenLDAP --enable-lmpasswd
1801         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1802 if test "${enable_lmpasswd+set}" = set; then
1803   enableval="$enable_lmpasswd"
1804   
1805         ol_arg=invalid
1806         for ol_val in auto yes no ; do
1807                 if test "$enableval" = "$ol_val" ; then
1808                         ol_arg="$ol_val"
1809                 fi
1810         done
1811         if test "$ol_arg" = "invalid" ; then
1812                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1813         fi
1814         ol_enable_lmpasswd="$ol_arg"
1815
1816 else
1817         ol_enable_lmpasswd="no"
1818 fi
1819 # end --enable-lmpasswd
1820 # OpenLDAP --enable-spasswd
1821         # Check whether --enable-spasswd or --disable-spasswd was given.
1822 if test "${enable_spasswd+set}" = set; then
1823   enableval="$enable_spasswd"
1824   
1825         ol_arg=invalid
1826         for ol_val in auto yes no ; do
1827                 if test "$enableval" = "$ol_val" ; then
1828                         ol_arg="$ol_val"
1829                 fi
1830         done
1831         if test "$ol_arg" = "invalid" ; then
1832                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1833         fi
1834         ol_enable_spasswd="$ol_arg"
1835
1836 else
1837         ol_enable_spasswd="no"
1838 fi
1839 # end --enable-spasswd
1840 # OpenLDAP --enable-modules
1841         # Check whether --enable-modules or --disable-modules was given.
1842 if test "${enable_modules+set}" = set; then
1843   enableval="$enable_modules"
1844   
1845         ol_arg=invalid
1846         for ol_val in auto yes no ; do
1847                 if test "$enableval" = "$ol_val" ; then
1848                         ol_arg="$ol_val"
1849                 fi
1850         done
1851         if test "$ol_arg" = "invalid" ; then
1852                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1853         fi
1854         ol_enable_modules="$ol_arg"
1855
1856 else
1857         ol_enable_modules="no"
1858 fi
1859 # end --enable-modules
1860 ol_enable_multimaster=${ol_enable_multimaster-no}
1861 # OpenLDAP --enable-phonetic
1862         # Check whether --enable-phonetic or --disable-phonetic was given.
1863 if test "${enable_phonetic+set}" = set; then
1864   enableval="$enable_phonetic"
1865   
1866         ol_arg=invalid
1867         for ol_val in auto yes no ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1874         fi
1875         ol_enable_phonetic="$ol_arg"
1876
1877 else
1878         ol_enable_phonetic="no"
1879 fi
1880 # end --enable-phonetic
1881 # OpenLDAP --enable-rewrite
1882         # Check whether --enable-rewrite or --disable-rewrite was given.
1883 if test "${enable_rewrite+set}" = set; then
1884   enableval="$enable_rewrite"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1894         fi
1895         ol_enable_rewrite="$ol_arg"
1896
1897 else
1898         ol_enable_rewrite="no"
1899 fi
1900 # end --enable-rewrite
1901 # OpenLDAP --enable-rlookups
1902         # Check whether --enable-rlookups or --disable-rlookups was given.
1903 if test "${enable_rlookups+set}" = set; then
1904   enableval="$enable_rlookups"
1905   
1906         ol_arg=invalid
1907         for ol_val in auto yes no ; do
1908                 if test "$enableval" = "$ol_val" ; then
1909                         ol_arg="$ol_val"
1910                 fi
1911         done
1912         if test "$ol_arg" = "invalid" ; then
1913                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1914         fi
1915         ol_enable_rlookups="$ol_arg"
1916
1917 else
1918         ol_enable_rlookups="no"
1919 fi
1920 # end --enable-rlookups
1921 # OpenLDAP --enable-slapi
1922         # Check whether --enable-slapi or --disable-slapi was given.
1923 if test "${enable_slapi+set}" = set; then
1924   enableval="$enable_slapi"
1925   
1926         ol_arg=invalid
1927         for ol_val in auto yes no ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1934         fi
1935         ol_enable_slapi="$ol_arg"
1936
1937 else
1938         ol_enable_slapi="no"
1939 fi
1940 # end --enable-slapi
1941 # OpenLDAP --enable-slp
1942         # Check whether --enable-slp or --disable-slp was given.
1943 if test "${enable_slp+set}" = set; then
1944   enableval="$enable_slp"
1945   
1946         ol_arg=invalid
1947         for ol_val in auto yes no ; do
1948                 if test "$enableval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1954         fi
1955         ol_enable_slp="$ol_arg"
1956
1957 else
1958         ol_enable_slp="no"
1959 fi
1960 # end --enable-slp
1961 # OpenLDAP --enable-wrappers
1962         # Check whether --enable-wrappers or --disable-wrappers was given.
1963 if test "${enable_wrappers+set}" = set; then
1964   enableval="$enable_wrappers"
1965   
1966         ol_arg=invalid
1967         for ol_val in auto yes no ; do
1968                 if test "$enableval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1974         fi
1975         ol_enable_wrappers="$ol_arg"
1976
1977 else
1978         ol_enable_wrappers="no"
1979 fi
1980 # end --enable-wrappers
1981
1982
1983 # OpenLDAP --enable-bdb
1984         # Check whether --enable-bdb or --disable-bdb was given.
1985 if test "${enable_bdb+set}" = set; then
1986   enableval="$enable_bdb"
1987   
1988         ol_arg=invalid
1989         for ol_val in auto yes no ; do
1990                 if test "$enableval" = "$ol_val" ; then
1991                         ol_arg="$ol_val"
1992                 fi
1993         done
1994         if test "$ol_arg" = "invalid" ; then
1995                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1996         fi
1997         ol_enable_bdb="$ol_arg"
1998
1999 else
2000         ol_enable_bdb="yes"
2001 fi
2002 # end --enable-bdb
2003 # OpenLDAP --with-bdb_module
2004         # Check whether --with-bdb_module or --without-bdb_module was given.
2005 if test "${with_bdb_module+set}" = set; then
2006   withval="$with_bdb_module"
2007   
2008         ol_arg=invalid
2009         for ol_val in static dynamic ; do
2010                 if test "$withval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2016         fi
2017         ol_with_bdb_module="$ol_arg"
2018
2019 else
2020         ol_with_bdb_module="static"
2021 fi
2022 # end --with-bdb_module
2023
2024 # OpenLDAP --enable-dnssrv
2025         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2026 if test "${enable_dnssrv+set}" = set; then
2027   enableval="$enable_dnssrv"
2028   
2029         ol_arg=invalid
2030         for ol_val in auto yes no ; do
2031                 if test "$enableval" = "$ol_val" ; then
2032                         ol_arg="$ol_val"
2033                 fi
2034         done
2035         if test "$ol_arg" = "invalid" ; then
2036                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2037         fi
2038         ol_enable_dnssrv="$ol_arg"
2039
2040 else
2041         ol_enable_dnssrv="no"
2042 fi
2043 # end --enable-dnssrv
2044 # OpenLDAP --with-dnssrv_module
2045         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2046 if test "${with_dnssrv_module+set}" = set; then
2047   withval="$with_dnssrv_module"
2048   
2049         ol_arg=invalid
2050         for ol_val in static dynamic ; do
2051                 if test "$withval" = "$ol_val" ; then
2052                         ol_arg="$ol_val"
2053                 fi
2054         done
2055         if test "$ol_arg" = "invalid" ; then
2056                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2057         fi
2058         ol_with_dnssrv_module="$ol_arg"
2059
2060 else
2061         ol_with_dnssrv_module="static"
2062 fi
2063 # end --with-dnssrv_module
2064
2065 # OpenLDAP --enable-hdb
2066         # Check whether --enable-hdb or --disable-hdb was given.
2067 if test "${enable_hdb+set}" = set; then
2068   enableval="$enable_hdb"
2069   
2070         ol_arg=invalid
2071         for ol_val in auto yes no ; do
2072                 if test "$enableval" = "$ol_val" ; then
2073                         ol_arg="$ol_val"
2074                 fi
2075         done
2076         if test "$ol_arg" = "invalid" ; then
2077                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2078         fi
2079         ol_enable_hdb="$ol_arg"
2080
2081 else
2082         ol_enable_hdb="no"
2083 fi
2084 # end --enable-hdb
2085 # OpenLDAP --with-hdb_module
2086         # Check whether --with-hdb_module or --without-hdb_module was given.
2087 if test "${with_hdb_module+set}" = set; then
2088   withval="$with_hdb_module"
2089   
2090         ol_arg=invalid
2091         for ol_val in static dynamic ; do
2092                 if test "$withval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2098         fi
2099         ol_with_hdb_module="$ol_arg"
2100
2101 else
2102         ol_with_hdb_module="static"
2103 fi
2104 # end --with-hdb_module
2105
2106 # OpenLDAP --enable-ldap
2107         # Check whether --enable-ldap or --disable-ldap was given.
2108 if test "${enable_ldap+set}" = set; then
2109   enableval="$enable_ldap"
2110   
2111         ol_arg=invalid
2112         for ol_val in auto yes no ; do
2113                 if test "$enableval" = "$ol_val" ; then
2114                         ol_arg="$ol_val"
2115                 fi
2116         done
2117         if test "$ol_arg" = "invalid" ; then
2118                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2119         fi
2120         ol_enable_ldap="$ol_arg"
2121
2122 else
2123         ol_enable_ldap="no"
2124 fi
2125 # end --enable-ldap
2126 # OpenLDAP --with-ldap_module
2127         # Check whether --with-ldap_module or --without-ldap_module was given.
2128 if test "${with_ldap_module+set}" = set; then
2129   withval="$with_ldap_module"
2130   
2131         ol_arg=invalid
2132         for ol_val in static dynamic ; do
2133                 if test "$withval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2139         fi
2140         ol_with_ldap_module="$ol_arg"
2141
2142 else
2143         ol_with_ldap_module="static"
2144 fi
2145 # end --with-ldap_module
2146
2147 # OpenLDAP --enable-ldbm
2148         # Check whether --enable-ldbm or --disable-ldbm was given.
2149 if test "${enable_ldbm+set}" = set; then
2150   enableval="$enable_ldbm"
2151   
2152         ol_arg=invalid
2153         for ol_val in auto yes no ; do
2154                 if test "$enableval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2160         fi
2161         ol_enable_ldbm="$ol_arg"
2162
2163 else
2164         ol_enable_ldbm="no"
2165 fi
2166 # end --enable-ldbm
2167 # OpenLDAP --with-ldbm_api
2168         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2169 if test "${with_ldbm_api+set}" = set; then
2170   withval="$with_ldbm_api"
2171   
2172         ol_arg=invalid
2173         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2174                 if test "$withval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2180         fi
2181         ol_with_ldbm_api="$ol_arg"
2182
2183 else
2184         ol_with_ldbm_api="auto"
2185 fi
2186 # end --with-ldbm_api
2187
2188 # OpenLDAP --with-ldbm_module
2189         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2190 if test "${with_ldbm_module+set}" = set; then
2191   withval="$with_ldbm_module"
2192   
2193         ol_arg=invalid
2194         for ol_val in static dynamic ; do
2195                 if test "$withval" = "$ol_val" ; then
2196                         ol_arg="$ol_val"
2197                 fi
2198         done
2199         if test "$ol_arg" = "invalid" ; then
2200                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2201         fi
2202         ol_with_ldbm_module="$ol_arg"
2203
2204 else
2205         ol_with_ldbm_module="static"
2206 fi
2207 # end --with-ldbm_module
2208
2209 # OpenLDAP --with-ldbm_type
2210         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2211 if test "${with_ldbm_type+set}" = set; then
2212   withval="$with_ldbm_type"
2213   
2214         ol_arg=invalid
2215         for ol_val in auto btree hash ; do
2216                 if test "$withval" = "$ol_val" ; then
2217                         ol_arg="$ol_val"
2218                 fi
2219         done
2220         if test "$ol_arg" = "invalid" ; then
2221                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2222         fi
2223         ol_with_ldbm_type="$ol_arg"
2224
2225 else
2226         ol_with_ldbm_type="auto"
2227 fi
2228 # end --with-ldbm_type
2229
2230 # OpenLDAP --enable-meta
2231         # Check whether --enable-meta or --disable-meta was given.
2232 if test "${enable_meta+set}" = set; then
2233   enableval="$enable_meta"
2234   
2235         ol_arg=invalid
2236         for ol_val in auto yes no ; do
2237                 if test "$enableval" = "$ol_val" ; then
2238                         ol_arg="$ol_val"
2239                 fi
2240         done
2241         if test "$ol_arg" = "invalid" ; then
2242                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2243         fi
2244         ol_enable_meta="$ol_arg"
2245
2246 else
2247         ol_enable_meta="no"
2248 fi
2249 # end --enable-meta
2250 # OpenLDAP --with-meta_module
2251         # Check whether --with-meta_module or --without-meta_module was given.
2252 if test "${with_meta_module+set}" = set; then
2253   withval="$with_meta_module"
2254   
2255         ol_arg=invalid
2256         for ol_val in static dynamic ; do
2257                 if test "$withval" = "$ol_val" ; then
2258                         ol_arg="$ol_val"
2259                 fi
2260         done
2261         if test "$ol_arg" = "invalid" ; then
2262                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2263         fi
2264         ol_with_meta_module="$ol_arg"
2265
2266 else
2267         ol_with_meta_module="static"
2268 fi
2269 # end --with-meta_module
2270
2271 # OpenLDAP --enable-monitor
2272         # Check whether --enable-monitor or --disable-monitor was given.
2273 if test "${enable_monitor+set}" = set; then
2274   enableval="$enable_monitor"
2275   
2276         ol_arg=invalid
2277         for ol_val in auto yes no ; do
2278                 if test "$enableval" = "$ol_val" ; then
2279                         ol_arg="$ol_val"
2280                 fi
2281         done
2282         if test "$ol_arg" = "invalid" ; then
2283                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2284         fi
2285         ol_enable_monitor="$ol_arg"
2286
2287 else
2288         ol_enable_monitor="no"
2289 fi
2290 # end --enable-monitor
2291 # OpenLDAP --with-monitor_module
2292         # Check whether --with-monitor_module or --without-monitor_module was given.
2293 if test "${with_monitor_module+set}" = set; then
2294   withval="$with_monitor_module"
2295   
2296         ol_arg=invalid
2297         for ol_val in static dynamic ; do
2298                 if test "$withval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2304         fi
2305         ol_with_monitor_module="$ol_arg"
2306
2307 else
2308         ol_with_monitor_module="static"
2309 fi
2310 # end --with-monitor_module
2311
2312 # OpenLDAP --enable-null
2313         # Check whether --enable-null or --disable-null was given.
2314 if test "${enable_null+set}" = set; then
2315   enableval="$enable_null"
2316   
2317         ol_arg=invalid
2318         for ol_val in auto yes no ; do
2319                 if test "$enableval" = "$ol_val" ; then
2320                         ol_arg="$ol_val"
2321                 fi
2322         done
2323         if test "$ol_arg" = "invalid" ; then
2324                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2325         fi
2326         ol_enable_null="$ol_arg"
2327
2328 else
2329         ol_enable_null="no"
2330 fi
2331 # end --enable-null
2332 # OpenLDAP --with-null_module
2333         # Check whether --with-null_module or --without-null_module was given.
2334 if test "${with_null_module+set}" = set; then
2335   withval="$with_null_module"
2336   
2337         ol_arg=invalid
2338         for ol_val in static dynamic ; do
2339                 if test "$withval" = "$ol_val" ; then
2340                         ol_arg="$ol_val"
2341                 fi
2342         done
2343         if test "$ol_arg" = "invalid" ; then
2344                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2345         fi
2346         ol_with_null_module="$ol_arg"
2347
2348 else
2349         ol_with_null_module="static"
2350 fi
2351 # end --with-null_module
2352
2353 # OpenLDAP --enable-passwd
2354         # Check whether --enable-passwd or --disable-passwd was given.
2355 if test "${enable_passwd+set}" = set; then
2356   enableval="$enable_passwd"
2357   
2358         ol_arg=invalid
2359         for ol_val in auto yes no ; do
2360                 if test "$enableval" = "$ol_val" ; then
2361                         ol_arg="$ol_val"
2362                 fi
2363         done
2364         if test "$ol_arg" = "invalid" ; then
2365                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2366         fi
2367         ol_enable_passwd="$ol_arg"
2368
2369 else
2370         ol_enable_passwd="no"
2371 fi
2372 # end --enable-passwd
2373 # OpenLDAP --with-passwd_module
2374         # Check whether --with-passwd_module or --without-passwd_module was given.
2375 if test "${with_passwd_module+set}" = set; then
2376   withval="$with_passwd_module"
2377   
2378         ol_arg=invalid
2379         for ol_val in static dynamic ; do
2380                 if test "$withval" = "$ol_val" ; then
2381                         ol_arg="$ol_val"
2382                 fi
2383         done
2384         if test "$ol_arg" = "invalid" ; then
2385                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2386         fi
2387         ol_with_passwd_module="$ol_arg"
2388
2389 else
2390         ol_with_passwd_module="static"
2391 fi
2392 # end --with-passwd_module
2393
2394 # OpenLDAP --enable-perl
2395         # Check whether --enable-perl or --disable-perl was given.
2396 if test "${enable_perl+set}" = set; then
2397   enableval="$enable_perl"
2398   
2399         ol_arg=invalid
2400         for ol_val in auto yes no ; do
2401                 if test "$enableval" = "$ol_val" ; then
2402                         ol_arg="$ol_val"
2403                 fi
2404         done
2405         if test "$ol_arg" = "invalid" ; then
2406                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2407         fi
2408         ol_enable_perl="$ol_arg"
2409
2410 else
2411         ol_enable_perl="no"
2412 fi
2413 # end --enable-perl
2414 # OpenLDAP --with-perl_module
2415         # Check whether --with-perl_module or --without-perl_module was given.
2416 if test "${with_perl_module+set}" = set; then
2417   withval="$with_perl_module"
2418   
2419         ol_arg=invalid
2420         for ol_val in static dynamic ; do
2421                 if test "$withval" = "$ol_val" ; then
2422                         ol_arg="$ol_val"
2423                 fi
2424         done
2425         if test "$ol_arg" = "invalid" ; then
2426                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2427         fi
2428         ol_with_perl_module="$ol_arg"
2429
2430 else
2431         ol_with_perl_module="static"
2432 fi
2433 # end --with-perl_module
2434
2435 # OpenLDAP --enable-shell
2436         # Check whether --enable-shell or --disable-shell was given.
2437 if test "${enable_shell+set}" = set; then
2438   enableval="$enable_shell"
2439   
2440         ol_arg=invalid
2441         for ol_val in auto yes no ; do
2442                 if test "$enableval" = "$ol_val" ; then
2443                         ol_arg="$ol_val"
2444                 fi
2445         done
2446         if test "$ol_arg" = "invalid" ; then
2447                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2448         fi
2449         ol_enable_shell="$ol_arg"
2450
2451 else
2452         ol_enable_shell="no"
2453 fi
2454 # end --enable-shell
2455 # OpenLDAP --with-shell_module
2456         # Check whether --with-shell_module or --without-shell_module was given.
2457 if test "${with_shell_module+set}" = set; then
2458   withval="$with_shell_module"
2459   
2460         ol_arg=invalid
2461         for ol_val in static dynamic ; do
2462                 if test "$withval" = "$ol_val" ; then
2463                         ol_arg="$ol_val"
2464                 fi
2465         done
2466         if test "$ol_arg" = "invalid" ; then
2467                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2468         fi
2469         ol_with_shell_module="$ol_arg"
2470
2471 else
2472         ol_with_shell_module="static"
2473 fi
2474 # end --with-shell_module
2475
2476 # OpenLDAP --enable-sql
2477         # Check whether --enable-sql or --disable-sql was given.
2478 if test "${enable_sql+set}" = set; then
2479   enableval="$enable_sql"
2480   
2481         ol_arg=invalid
2482         for ol_val in auto yes no ; do
2483                 if test "$enableval" = "$ol_val" ; then
2484                         ol_arg="$ol_val"
2485                 fi
2486         done
2487         if test "$ol_arg" = "invalid" ; then
2488                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2489         fi
2490         ol_enable_sql="$ol_arg"
2491
2492 else
2493         ol_enable_sql="no"
2494 fi
2495 # end --enable-sql
2496 # OpenLDAP --with-sql_module
2497         # Check whether --with-sql_module or --without-sql_module was given.
2498 if test "${with_sql_module+set}" = set; then
2499   withval="$with_sql_module"
2500   
2501         ol_arg=invalid
2502         for ol_val in static dynamic ; do
2503                 if test "$withval" = "$ol_val" ; then
2504                         ol_arg="$ol_val"
2505                 fi
2506         done
2507         if test "$ol_arg" = "invalid" ; then
2508                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2509         fi
2510         ol_with_sql_module="$ol_arg"
2511
2512 else
2513         ol_with_sql_module="static"
2514 fi
2515 # end --with-sql_module
2516
2517 # OpenLDAP --enable-tcl
2518         # Check whether --enable-tcl or --disable-tcl was given.
2519 if test "${enable_tcl+set}" = set; then
2520   enableval="$enable_tcl"
2521   
2522         ol_arg=invalid
2523         for ol_val in auto yes no ; do
2524                 if test "$enableval" = "$ol_val" ; then
2525                         ol_arg="$ol_val"
2526                 fi
2527         done
2528         if test "$ol_arg" = "invalid" ; then
2529                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2530         fi
2531         ol_enable_tcl="$ol_arg"
2532
2533 else
2534         ol_enable_tcl="no"
2535 fi
2536 # end --enable-tcl
2537 # OpenLDAP --with-tcl_module
2538         # Check whether --with-tcl_module or --without-tcl_module was given.
2539 if test "${with_tcl_module+set}" = set; then
2540   withval="$with_tcl_module"
2541   
2542         ol_arg=invalid
2543         for ol_val in static dynamic ; do
2544                 if test "$withval" = "$ol_val" ; then
2545                         ol_arg="$ol_val"
2546                 fi
2547         done
2548         if test "$ol_arg" = "invalid" ; then
2549                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2550         fi
2551         ol_with_tcl_module="$ol_arg"
2552
2553 else
2554         ol_with_tcl_module="static"
2555 fi
2556 # end --with-tcl_module
2557
2558
2559 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2560 if test "${with_xxslurpdoptions+set}" = set; then
2561   withval="$with_xxslurpdoptions"
2562   :
2563 fi
2564
2565 # OpenLDAP --enable-slurpd
2566         # Check whether --enable-slurpd or --disable-slurpd was given.
2567 if test "${enable_slurpd+set}" = set; then
2568   enableval="$enable_slurpd"
2569   
2570         ol_arg=invalid
2571         for ol_val in auto yes no ; do
2572                 if test "$enableval" = "$ol_val" ; then
2573                         ol_arg="$ol_val"
2574                 fi
2575         done
2576         if test "$ol_arg" = "invalid" ; then
2577                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2578         fi
2579         ol_enable_slurpd="$ol_arg"
2580
2581 else
2582         ol_enable_slurpd="auto"
2583 fi
2584 # end --enable-slurpd
2585
2586 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2587 if test "${with_xxliboptions+set}" = set; then
2588   withval="$with_xxliboptions"
2589   :
2590 fi
2591
2592 # Check whether --enable-static or --disable-static was given.
2593 if test "${enable_static+set}" = set; then
2594   enableval="$enable_static"
2595   p=${PACKAGE-default}
2596 case $enableval in
2597 yes) enable_static=yes ;;
2598 no) enable_static=no ;;
2599 *)
2600   enable_static=no
2601   # Look at the argument we got.  We use all the common list separators.
2602   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2603   for pkg in $enableval; do
2604     if test "X$pkg" = "X$p"; then
2605       enable_static=yes
2606     fi
2607   done
2608   IFS="$ac_save_ifs"
2609   ;;
2610 esac
2611 else
2612   enable_static=yes
2613 fi
2614
2615 # Check whether --enable-shared or --disable-shared was given.
2616 if test "${enable_shared+set}" = set; then
2617   enableval="$enable_shared"
2618   p=${PACKAGE-default}
2619 case $enableval in
2620 yes) enable_shared=yes ;;
2621 no) enable_shared=no ;;
2622 *)
2623   enable_shared=no
2624   # Look at the argument we got.  We use all the common list separators.
2625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2626   for pkg in $enableval; do
2627     if test "X$pkg" = "X$p"; then
2628       enable_shared=yes
2629     fi
2630   done
2631   IFS="$ac_save_ifs"
2632   ;;
2633 esac
2634 else
2635   enable_shared=yes
2636 fi
2637
2638
2639
2640 # validate options
2641 if test $ol_enable_slapd = no ; then
2642                 if test $ol_enable_slapi = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2644         fi
2645         if test $ol_enable_bdb = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2647         fi
2648         if test $ol_enable_dnssrv = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2650         fi
2651         if test $ol_enable_hdb = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2653         fi
2654         if test $ol_enable_ldap = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2656         fi
2657         if test $ol_enable_ldbm = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2659         fi
2660         if test $ol_enable_meta = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2662         fi
2663         if test $ol_enable_monitor = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2665         fi
2666         if test $ol_enable_null = yes ; then
2667                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2668         fi
2669         if test $ol_enable_passwd = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2671         fi
2672         if test $ol_enable_perl = yes ; then
2673                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2674         fi
2675         if test $ol_enable_shell = yes ; then
2676                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2677         fi
2678         if test $ol_enable_tcl = yes ; then
2679                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2680         fi
2681         if test $ol_enable_sql = yes ; then
2682                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2683         fi
2684         if test $ol_enable_modules = yes ; then
2685                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2686         fi
2687         if test $ol_enable_multimaster = yes ; then
2688                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2689         fi
2690         if test $ol_enable_wrappers = yes ; then
2691                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2692         fi
2693         if test $ol_enable_phonetic = yes ; then
2694                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2695         fi
2696         if test $ol_enable_rlookups = yes ; then
2697                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2698         fi
2699         if test $ol_enable_aci = yes ; then
2700                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2701         fi
2702         if test $ol_with_ldbm_api != auto ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2704         fi
2705         if test $ol_with_ldbm_type != auto ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2707         fi
2708         if test $ol_with_bdb_module != static ; then
2709                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2710         fi
2711         if test $ol_with_dnssrv_module != static ; then
2712                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2713         fi
2714         if test $ol_with_hdb_module != static ; then
2715                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2716         fi
2717         if test $ol_with_ldap_module != static ; then
2718                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2719         fi
2720         if test $ol_with_ldbm_module != static ; then
2721                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2722         fi
2723         if test $ol_with_meta_module != static ; then
2724                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2725         fi
2726         if test $ol_with_monitor_module != static ; then
2727                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2728         fi
2729         if test $ol_with_null_module != static ; then
2730                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2731         fi
2732         if test $ol_with_passwd_module != static ; then
2733                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2734         fi
2735         if test $ol_with_perl_module != static ; then
2736                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2737         fi
2738         if test $ol_with_shell_module != static ; then
2739                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2740         fi
2741         if test $ol_with_tcl_module != static ; then
2742                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2743         fi
2744         if test $ol_with_sql_module != static ; then
2745                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2746         fi
2747         if test $ol_enable_slurpd = yes ; then
2748                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2749         fi
2750         if test $ol_enable_rewrite = yes ; then
2751                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2752         fi
2753
2754         # force settings to no
2755         ol_enable_slapi=no
2756         ol_enable_bdb=no
2757         ol_enable_dnssrv=no
2758         ol_enable_hdb=no
2759         ol_enable_ldap=no
2760         ol_enable_ldbm=no
2761         ol_enable_meta=no
2762         ol_enable_monitor=no
2763         ol_enable_null=no
2764         ol_enable_passwd=no
2765         ol_enable_perl=no
2766         ol_enable_shell=no
2767         ol_enable_tcl=no
2768         ol_enable_sql=no
2769
2770         ol_enable_modules=no
2771         ol_enable_multimaster=no
2772         ol_enable_phonetic=no
2773         ol_enable_rlookups=no
2774         ol_enable_aci=no
2775         ol_enable_wrappers=no
2776         ol_enable_dynamic=no
2777
2778         ol_with_ldbm_api=no
2779         ol_with_ldbm_type=no
2780
2781         ol_with_bdb_module=static
2782         ol_with_dnssrv_module=static
2783         ol_with_hdb_module=static
2784         ol_with_ldap_module=static
2785         ol_with_ldbm_module=static
2786         ol_with_meta_module=static
2787         ol_with_monitor_module=static
2788         ol_with_null_module=static
2789         ol_with_passwd_module=static
2790         ol_with_perl_module=static
2791         ol_with_shell_module=static
2792         ol_with_tcl_module=static
2793         ol_with_sql_module=static
2794
2795         ol_enable_slurpd=no
2796
2797         ol_enable_rewrite=no
2798
2799 elif test $ol_enable_ldbm = no ; then
2800         
2801         if test $ol_with_ldbm_api != auto ; then
2802                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2803         fi
2804
2805         if test $ol_with_ldbm_type != auto ; then
2806                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2807         fi
2808
2809         if test $ol_with_ldbm_module != static ; then
2810                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2811         fi
2812
2813         if test $ol_enable_modules != yes -a \
2814                 $ol_enable_bdb = no -a \
2815                 $ol_enable_dnssrv = no -a \
2816                 $ol_enable_hdb = no -a \
2817                 $ol_enable_ldap = no -a \
2818                 $ol_enable_meta = no -a \
2819                 $ol_enable_monitor = no -a \
2820                 $ol_enable_null = no -a \
2821                 $ol_enable_passwd = no -a \
2822                 $ol_enable_perl = no -a \
2823                 $ol_enable_shell = no -a \
2824                 $ol_enable_sql = no -a \
2825                 $ol_enable_tcl = no ; then
2826
2827                 if test $ol_enable_slapd = yes ; then
2828                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2829                 else
2830                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2831                         ol_enable_slapd=no
2832                 fi
2833         fi
2834
2835         ol_with_ldbm_api=no
2836         ol_with_ldbm_type=no
2837         ol_with_ldbm_module=static
2838
2839         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2840                 ol_with_ldbm_api=berkeley
2841         fi
2842
2843 else
2844                 if test $ol_with_ldbm_api = gdbm -a \
2845                 $ol_with_ldbm_type = btree ; then
2846                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2847         fi
2848         if test $ol_with_ldbm_api = mdbm -a \
2849                 $ol_with_ldbm_type = btree ; then
2850                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2851         fi
2852         if test $ol_with_ldbm_api = ndbm -a \
2853                 $ol_with_ldbm_type = btree ; then
2854                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2855         fi
2856
2857         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2858                 if test $ol_with_ldbm_api = auto ; then
2859                         ol_with_ldbm_api=berkeley
2860                 elif test $ol_with_ldbm_api != berkeley ; then
2861                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2862                 fi
2863
2864         elif test $ol_enable_bdb = auto ; then
2865                 if test $ol_with_ldbm_api != berkeley \
2866                         -o $ol_with_ldbm_api != auto ; then
2867                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2868                         ol_enable_bdb=no
2869                 fi
2870         fi
2871 fi
2872
2873 if test $ol_enable_slurpd = yes ; then
2874                 if test $ol_with_threads = no ; then
2875                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2876         fi
2877 fi
2878
2879 if test $ol_enable_lmpasswd = yes ; then
2880         if test $ol_with_tls = no ; then
2881                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2882         fi
2883 fi
2884
2885 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2886         if test $ol_with_kerberos = no ; then
2887                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2888         elif test $ol_with_kerberos = auto ; then
2889                 ol_with_kerberos=yes
2890         fi
2891
2892 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2893         if test $ol_with_kerberos = auto ; then
2894                 ol_with_kerberos=no
2895         elif test $ol_with_kerberos != no ; then
2896                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2897                 ol_with_kerberos=no
2898         fi
2899 fi
2900
2901 if test $ol_enable_spasswd = yes ; then
2902         if test $ol_with_cyrus_sasl = no ; then
2903                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2904         fi
2905         ol_with_cyrus_sasl=yes
2906 fi
2907
2908 echo "$ac_t""done" 1>&6
2909
2910 LDAP_LIBS=
2911 LDIF_LIBS=
2912 LDBM_LIBS=
2913 LTHREAD_LIBS=
2914 LUTIL_LIBS=
2915
2916 SLAPD_LIBS=
2917 SLURPD_LIBS=
2918
2919 BUILD_SLAPD=no
2920 BUILD_SLURPD=no
2921
2922 BUILD_THREAD=no
2923
2924 BUILD_SLAPI=no
2925 SLAPD_SLAPI_DEPEND=
2926
2927 BUILD_BDB=no
2928 BUILD_DNSSRV=no
2929 BUILD_HDB=no
2930 BUILD_LDAP=no
2931 BUILD_LDBM=no
2932 BUILD_META=no
2933 BUILD_MONITOR=no
2934 BUILD_NULL=no
2935 BUILD_PASSWD=no
2936 BUILD_PERL=no
2937 BUILD_SHELL=no
2938 BUILD_SQL=no
2939 BUILD_TCL=no
2940
2941 BUILD_BDB_DYNAMIC=static
2942 BUILD_DNSSRV_DYNAMIC=static
2943 BUILD_HDB_DYNAMIC=static
2944 BUILD_LDAP_DYNAMIC=static
2945 BUILD_LDBM_DYNAMIC=static
2946 BUILD_META_DYNAMIC=static
2947 BUILD_MONITOR_DYNAMIC=static
2948 BUILD_NULL_DYNAMIC=static
2949 BUILD_PASSWD_DYNAMIC=static
2950 BUILD_PERL_DYNAMIC=static
2951 BUILD_SHELL_DYNAMIC=static
2952 BUILD_TCL_DYNAMIC=static
2953 BUILD_SQL_DYNAMIC=static
2954
2955 SLAPD_MODULES_LDFLAGS=
2956 SLAPD_MODULES_CPPFLAGS=
2957
2958 SLAPD_STATIC_BACKENDS=
2959 SLAPD_DYNAMIC_BACKENDS=
2960
2961 SLAPD_PERL_LDFLAGS=
2962 MOD_PERL_LDFLAGS=
2963 PERL_CPPFLAGS=
2964
2965 SLAPD_SQL_LDFLAGS=
2966 SLAPD_SQL_LIBS=
2967 SLAPD_SQL_INCLUDES=
2968
2969 MOD_TCL_LIB=
2970 KRB4_LIBS=
2971 KRB5_LIBS=
2972 READLINE_LIBS=
2973 SASL_LIBS=
2974 TERMCAP_LIBS=
2975 TLS_LIBS=
2976 MODULES_LIBS=
2977 SLAPI_LIBS=
2978 LIBSLAPI=
2979 LIBSLAPITOOLS=
2980 AUTH_LIBS=
2981
2982 SLAPD_SLP_LIBS=
2983
2984
2985 # Find a good install program.  We prefer a C program (faster),
2986 # so one script is as good as another.  But avoid the broken or
2987 # incompatible versions:
2988 # SysV /etc/install, /usr/sbin/install
2989 # SunOS /usr/etc/install
2990 # IRIX /sbin/install
2991 # AIX /bin/install
2992 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2993 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2994 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2995 # ./install, which can be erroneously created by make from ./install.sh.
2996 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2997 echo "configure:2998: checking for a BSD compatible install" >&5
2998 if test -z "$INSTALL"; then
2999 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3000   echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3003   for ac_dir in $PATH; do
3004     # Account for people who put trailing slashes in PATH elements.
3005     case "$ac_dir/" in
3006     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3007     *)
3008       # OSF1 and SCO ODT 3.0 have their own names for install.
3009       # Don't use installbsd from OSF since it installs stuff as root
3010       # by default.
3011       for ac_prog in ginstall scoinst install; do
3012         if test -f $ac_dir/$ac_prog; then
3013           if test $ac_prog = install &&
3014             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3015             # AIX install.  It has an incompatible calling convention.
3016             :
3017           elif test $ac_prog = install &&
3018             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3019             # program-specific install script used by HP pwplus--don't use.
3020             :
3021           else
3022             ac_cv_path_install="$ac_dir/$ac_prog -c"
3023             break 2
3024           fi
3025         fi
3026       done
3027       ;;
3028     esac
3029   done
3030   IFS="$ac_save_IFS"
3031
3032 fi
3033   if test "${ac_cv_path_install+set}" = set; then
3034     INSTALL="$ac_cv_path_install"
3035   else
3036     # As a last resort, use the slow shell script.  We don't cache a
3037     # path for INSTALL within a source directory, because that will
3038     # break other packages using the cache if that directory is
3039     # removed, or if the path is relative.
3040     INSTALL="$ac_install_sh"
3041   fi
3042 fi
3043 echo "$ac_t""$INSTALL" 1>&6
3044
3045 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3046 # It thinks the first close brace ends the variable substitution.
3047 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3048
3049 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3050
3051 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3052
3053
3054 cat >> confdefs.h <<\EOF
3055 #define HAVE_MKVERSION 1
3056 EOF
3057
3058
3059
3060
3061 ol_aix_threads=no
3062 case "$target" in
3063 *-*-aix*)       if test -z "$CC" ; then
3064                 case "$ol_with_threads" in
3065                 auto | yes |  posix) ol_aix_threads=yes ;;
3066                 esac
3067         fi
3068 ;;
3069 esac
3070
3071 if test $ol_aix_threads = yes ; then
3072         if test -z "${CC}" ; then
3073                 for ac_prog in cc_r xlc_r cc
3074 do
3075 # Extract the first word of "$ac_prog", so it can be a program name with args.
3076 set dummy $ac_prog; ac_word=$2
3077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3078 echo "configure:3079: checking for $ac_word" >&5
3079 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   if test -n "$CC"; then
3083   ac_cv_prog_CC="$CC" # Let the user override the test.
3084 else
3085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3086   ac_dummy="$PATH"
3087   for ac_dir in $ac_dummy; do
3088     test -z "$ac_dir" && ac_dir=.
3089     if test -f $ac_dir/$ac_word; then
3090       ac_cv_prog_CC="$ac_prog"
3091       break
3092     fi
3093   done
3094   IFS="$ac_save_ifs"
3095 fi
3096 fi
3097 CC="$ac_cv_prog_CC"
3098 if test -n "$CC"; then
3099   echo "$ac_t""$CC" 1>&6
3100 else
3101   echo "$ac_t""no" 1>&6
3102 fi
3103
3104 test -n "$CC" && break
3105 done
3106
3107
3108                 if test "$CC" = cc ; then
3109                                                 if test $ol_with_threads != auto ; then
3110                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3111                         else
3112                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3113                         fi
3114                         ol_with_threads=no
3115                 fi
3116         fi
3117
3118         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3119                 ol_with_threads=posix
3120                 ol_cv_pthread_create=yes
3121         fi
3122 fi
3123
3124 if test -z "${CC}"; then
3125         for ac_prog in cc gcc
3126 do
3127 # Extract the first word of "$ac_prog", so it can be a program name with args.
3128 set dummy $ac_prog; ac_word=$2
3129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3130 echo "configure:3131: checking for $ac_word" >&5
3131 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   if test -n "$CC"; then
3135   ac_cv_prog_CC="$CC" # Let the user override the test.
3136 else
3137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3138   ac_dummy="$PATH"
3139   for ac_dir in $ac_dummy; do
3140     test -z "$ac_dir" && ac_dir=.
3141     if test -f $ac_dir/$ac_word; then
3142       ac_cv_prog_CC="$ac_prog"
3143       break
3144     fi
3145   done
3146   IFS="$ac_save_ifs"
3147 fi
3148 fi
3149 CC="$ac_cv_prog_CC"
3150 if test -n "$CC"; then
3151   echo "$ac_t""$CC" 1>&6
3152 else
3153   echo "$ac_t""no" 1>&6
3154 fi
3155
3156 test -n "$CC" && break
3157 done
3158 test -n "$CC" || CC="missing"
3159
3160
3161         if test "${CC}" = "missing" ; then
3162                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3163         fi
3164 fi
3165
3166 if test -z "${AR}"; then
3167         for ac_prog in ar gar
3168 do
3169 # Extract the first word of "$ac_prog", so it can be a program name with args.
3170 set dummy $ac_prog; ac_word=$2
3171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172 echo "configure:3173: checking for $ac_word" >&5
3173 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   if test -n "$AR"; then
3177   ac_cv_prog_AR="$AR" # Let the user override the test.
3178 else
3179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3180   ac_dummy="$PATH"
3181   for ac_dir in $ac_dummy; do
3182     test -z "$ac_dir" && ac_dir=.
3183     if test -f $ac_dir/$ac_word; then
3184       ac_cv_prog_AR="$ac_prog"
3185       break
3186     fi
3187   done
3188   IFS="$ac_save_ifs"
3189 fi
3190 fi
3191 AR="$ac_cv_prog_AR"
3192 if test -n "$AR"; then
3193   echo "$ac_t""$AR" 1>&6
3194 else
3195   echo "$ac_t""no" 1>&6
3196 fi
3197
3198 test -n "$AR" && break
3199 done
3200 test -n "$AR" || AR="missing"
3201
3202
3203         if test "${AR}" = "missing" ; then
3204                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3205         fi
3206 fi
3207
3208
3209
3210 # Find the correct PATH separator.  Usually this is `:', but
3211 # DJGPP uses `;' like DOS.
3212 if test "X${PATH_SEPARATOR+set}" != Xset; then
3213   UNAME=${UNAME-`uname 2>/dev/null`}
3214   case X$UNAME in
3215     *-DOS) lt_cv_sys_path_separator=';' ;;
3216     *)     lt_cv_sys_path_separator=':' ;;
3217   esac
3218   PATH_SEPARATOR=$lt_cv_sys_path_separator
3219 fi
3220
3221 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3222 echo "configure:3223: checking for Cygwin environment" >&5
3223 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3224   echo $ac_n "(cached) $ac_c" 1>&6
3225 else
3226   cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229
3230 int main() {
3231
3232 #ifndef __CYGWIN__
3233 #define __CYGWIN__ __CYGWIN32__
3234 #endif
3235 return __CYGWIN__;
3236 ; return 0; }
3237 EOF
3238 if { (eval echo configure:3239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3239   rm -rf conftest*
3240   ac_cv_cygwin=yes
3241 else
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   ac_cv_cygwin=no
3246 fi
3247 rm -f conftest*
3248 fi
3249
3250 echo "$ac_t""$ac_cv_cygwin" 1>&6
3251 CYGWIN=
3252 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3253 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3254 echo "configure:3255: checking for mingw32 environment" >&5
3255 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3256   echo $ac_n "(cached) $ac_c" 1>&6
3257 else
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261
3262 int main() {
3263 return __MINGW32__;
3264 ; return 0; }
3265 EOF
3266 if { (eval echo configure:3267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3267   rm -rf conftest*
3268   ac_cv_mingw32=yes
3269 else
3270   echo "configure: failed program was:" >&5
3271   cat conftest.$ac_ext >&5
3272   rm -rf conftest*
3273   ac_cv_mingw32=no
3274 fi
3275 rm -f conftest*
3276 fi
3277
3278 echo "$ac_t""$ac_cv_mingw32" 1>&6
3279 MINGW32=
3280 test "$ac_cv_mingw32" = yes && MINGW32=yes
3281 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3282 echo "configure:3283: checking for EMX OS/2 environment" >&5
3283 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3284   echo $ac_n "(cached) $ac_c" 1>&6
3285 else
3286   cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289
3290 int main() {
3291 return __EMX__;
3292 ; return 0; }
3293 EOF
3294 if { (eval echo configure:3295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3295   rm -rf conftest*
3296   ac_cv_emxos2=yes
3297 else
3298   echo "configure: failed program was:" >&5
3299   cat conftest.$ac_ext >&5
3300   rm -rf conftest*
3301   ac_cv_emxos2=no
3302 fi
3303 rm -f conftest*
3304 fi
3305
3306 echo "$ac_t""$ac_cv_emxos2" 1>&6
3307 EMXOS2=
3308 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3309 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3310 echo "configure:3311: checking how to run the C preprocessor" >&5
3311 # On Suns, sometimes $CPP names a directory.
3312 if test -n "$CPP" && test -d "$CPP"; then
3313   CPP=
3314 fi
3315 if test -z "$CPP"; then
3316 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319     # This must be in double quotes, not single quotes, because CPP may get
3320   # substituted into the Makefile and "${CC-cc}" will confuse make.
3321   CPP="${CC-cc} -E"
3322   # On the NeXT, cc -E runs the code through the compiler's parser,
3323   # not just through cpp.
3324   cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <assert.h>
3328 Syntax Error
3329 EOF
3330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3331 { (eval echo configure:3332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3333 if test -z "$ac_err"; then
3334   :
3335 else
3336   echo "$ac_err" >&5
3337   echo "configure: failed program was:" >&5
3338   cat conftest.$ac_ext >&5
3339   rm -rf conftest*
3340   CPP="${CC-cc} -E -traditional-cpp"
3341   cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <assert.h>
3345 Syntax Error
3346 EOF
3347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3348 { (eval echo configure:3349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3350 if test -z "$ac_err"; then
3351   :
3352 else
3353   echo "$ac_err" >&5
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   CPP="${CC-cc} -nologo -E"
3358   cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361 #include <assert.h>
3362 Syntax Error
3363 EOF
3364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3365 { (eval echo configure:3366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3367 if test -z "$ac_err"; then
3368   :
3369 else
3370   echo "$ac_err" >&5
3371   echo "configure: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   rm -rf conftest*
3374   CPP=/lib/cpp
3375 fi
3376 rm -f conftest*
3377 fi
3378 rm -f conftest*
3379 fi
3380 rm -f conftest*
3381   ac_cv_prog_CPP="$CPP"
3382 fi
3383   CPP="$ac_cv_prog_CPP"
3384 else
3385   ac_cv_prog_CPP="$CPP"
3386 fi
3387 echo "$ac_t""$CPP" 1>&6
3388
3389 # Check whether --enable-fast-install or --disable-fast-install was given.
3390 if test "${enable_fast_install+set}" = set; then
3391   enableval="$enable_fast_install"
3392   p=${PACKAGE-default}
3393 case $enableval in
3394 yes) enable_fast_install=yes ;;
3395 no) enable_fast_install=no ;;
3396 *)
3397   enable_fast_install=no
3398   # Look at the argument we got.  We use all the common list separators.
3399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3400   for pkg in $enableval; do
3401     if test "X$pkg" = "X$p"; then
3402       enable_fast_install=yes
3403     fi
3404   done
3405   IFS="$ac_save_ifs"
3406   ;;
3407 esac
3408 else
3409   enable_fast_install=yes
3410 fi
3411
3412 # Extract the first word of "gcc", so it can be a program name with args.
3413 set dummy gcc; ac_word=$2
3414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3415 echo "configure:3416: checking for $ac_word" >&5
3416 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3417   echo $ac_n "(cached) $ac_c" 1>&6
3418 else
3419   if test -n "$CC"; then
3420   ac_cv_prog_CC="$CC" # Let the user override the test.
3421 else
3422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3423   ac_dummy="$PATH"
3424   for ac_dir in $ac_dummy; do
3425     test -z "$ac_dir" && ac_dir=.
3426     if test -f $ac_dir/$ac_word; then
3427       ac_cv_prog_CC="gcc"
3428       break
3429     fi
3430   done
3431   IFS="$ac_save_ifs"
3432 fi
3433 fi
3434 CC="$ac_cv_prog_CC"
3435 if test -n "$CC"; then
3436   echo "$ac_t""$CC" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440
3441 if test -z "$CC"; then
3442   # Extract the first word of "cc", so it can be a program name with args.
3443 set dummy cc; ac_word=$2
3444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_word" >&5
3446 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3447   echo $ac_n "(cached) $ac_c" 1>&6
3448 else
3449   if test -n "$CC"; then
3450   ac_cv_prog_CC="$CC" # Let the user override the test.
3451 else
3452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3453   ac_prog_rejected=no
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3459         ac_prog_rejected=yes
3460         continue
3461       fi
3462       ac_cv_prog_CC="cc"
3463       break
3464     fi
3465   done
3466   IFS="$ac_save_ifs"
3467 if test $ac_prog_rejected = yes; then
3468   # We found a bogon in the path, so make sure we never use it.
3469   set dummy $ac_cv_prog_CC
3470   shift
3471   if test $# -gt 0; then
3472     # We chose a different compiler from the bogus one.
3473     # However, it has the same basename, so the bogon will be chosen
3474     # first if we set CC to just the basename; use the full file name.
3475     shift
3476     set dummy "$ac_dir/$ac_word" "$@"
3477     shift
3478     ac_cv_prog_CC="$@"
3479   fi
3480 fi
3481 fi
3482 fi
3483 CC="$ac_cv_prog_CC"
3484 if test -n "$CC"; then
3485   echo "$ac_t""$CC" 1>&6
3486 else
3487   echo "$ac_t""no" 1>&6
3488 fi
3489
3490   if test -z "$CC"; then
3491     case "`uname -s`" in
3492     *win32* | *WIN32* | *CYGWIN*)
3493       # Extract the first word of "cl", so it can be a program name with args.
3494 set dummy cl; ac_word=$2
3495 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3496 echo "configure:3497: checking for $ac_word" >&5
3497 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   if test -n "$CC"; then
3501   ac_cv_prog_CC="$CC" # Let the user override the test.
3502 else
3503   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3504   ac_dummy="$PATH"
3505   for ac_dir in $ac_dummy; do
3506     test -z "$ac_dir" && ac_dir=.
3507     if test -f $ac_dir/$ac_word; then
3508       ac_cv_prog_CC="cl"
3509       break
3510     fi
3511   done
3512   IFS="$ac_save_ifs"
3513 fi
3514 fi
3515 CC="$ac_cv_prog_CC"
3516 if test -n "$CC"; then
3517   echo "$ac_t""$CC" 1>&6
3518 else
3519   echo "$ac_t""no" 1>&6
3520 fi
3521  ;;
3522     esac
3523   fi
3524   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3525 fi
3526
3527 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3528 echo "configure:3529: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3529
3530 ac_ext=c
3531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3532 ac_cpp='$CPP $CPPFLAGS'
3533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3535 cross_compiling=$ac_cv_prog_cc_cross
3536
3537 cat > conftest.$ac_ext << EOF
3538
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541
3542 main(){return(0);}
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3545   ac_cv_prog_cc_works=yes
3546   # If we can't run a trivial program, we are probably using a cross compiler.
3547   if (./conftest; exit) 2>/dev/null; then
3548     ac_cv_prog_cc_cross=no
3549   else
3550     ac_cv_prog_cc_cross=yes
3551   fi
3552 else
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   ac_cv_prog_cc_works=no
3556 fi
3557 rm -fr conftest*
3558 ac_ext=c
3559 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3560 ac_cpp='$CPP $CPPFLAGS'
3561 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3562 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3563 cross_compiling=$ac_cv_prog_cc_cross
3564
3565 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3566 if test $ac_cv_prog_cc_works = no; then
3567   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3568 fi
3569 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3570 echo "configure:3571: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3571 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3572 cross_compiling=$ac_cv_prog_cc_cross
3573
3574 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3575 echo "configure:3576: checking whether we are using GNU C" >&5
3576 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3577   echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579   cat > conftest.c <<EOF
3580 #ifdef __GNUC__
3581   yes;
3582 #endif
3583 EOF
3584 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3585   ac_cv_prog_gcc=yes
3586 else
3587   ac_cv_prog_gcc=no
3588 fi
3589 fi
3590
3591 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3592
3593 if test $ac_cv_prog_gcc = yes; then
3594   GCC=yes
3595 else
3596   GCC=
3597 fi
3598
3599 ac_test_CFLAGS="${CFLAGS+set}"
3600 ac_save_CFLAGS="$CFLAGS"
3601 CFLAGS=
3602 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3603 echo "configure:3604: checking whether ${CC-cc} accepts -g" >&5
3604 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   echo 'void f(){}' > conftest.c
3608 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3609   ac_cv_prog_cc_g=yes
3610 else
3611   ac_cv_prog_cc_g=no
3612 fi
3613 rm -f conftest*
3614
3615 fi
3616
3617 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3618 if test "$ac_test_CFLAGS" = set; then
3619   CFLAGS="$ac_save_CFLAGS"
3620 elif test $ac_cv_prog_cc_g = yes; then
3621   if test "$GCC" = yes; then
3622     CFLAGS="-g -O2"
3623   else
3624     CFLAGS="-g"
3625   fi
3626 else
3627   if test "$GCC" = yes; then
3628     CFLAGS="-O2"
3629   else
3630     CFLAGS=
3631   fi
3632 fi
3633
3634 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3635 if test "${with_gnu_ld+set}" = set; then
3636   withval="$with_gnu_ld"
3637   test "$withval" = no || with_gnu_ld=yes
3638 else
3639   with_gnu_ld=no
3640 fi
3641
3642 ac_prog=ld
3643 if test "$GCC" = yes; then
3644   # Check if gcc -print-prog-name=ld gives a path.
3645   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3646 echo "configure:3647: checking for ld used by GCC" >&5
3647   case $host in
3648   *-*-mingw*)
3649     # gcc leaves a trailing carriage return which upsets mingw
3650     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3651   *)
3652     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3653   esac
3654   case $ac_prog in
3655     # Accept absolute paths.
3656     [\\/]* | [A-Za-z]:[\\/]*)
3657       re_direlt='/[^/][^/]*/\.\./'
3658       # Canonicalize the path of ld
3659       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3660       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3661         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3662       done
3663       test -z "$LD" && LD="$ac_prog"
3664       ;;
3665   "")
3666     # If it fails, then pretend we aren't using GCC.
3667     ac_prog=ld
3668     ;;
3669   *)
3670     # If it is relative, then search for the first ld in PATH.
3671     with_gnu_ld=unknown
3672     ;;
3673   esac
3674 elif test "$with_gnu_ld" = yes; then
3675   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3676 echo "configure:3677: checking for GNU ld" >&5
3677 else
3678   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3679 echo "configure:3680: checking for non-GNU ld" >&5
3680 fi
3681 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   if test -z "$LD"; then
3685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3686   for ac_dir in $PATH; do
3687     test -z "$ac_dir" && ac_dir=.
3688     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3689       lt_cv_path_LD="$ac_dir/$ac_prog"
3690       # Check to see if the program is GNU ld.  I'd rather use --version,
3691       # but apparently some GNU ld's only accept -v.
3692       # Break only if it was the GNU/non-GNU ld that we prefer.
3693       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3694         test "$with_gnu_ld" != no && break
3695       else
3696         test "$with_gnu_ld" != yes && break
3697       fi
3698     fi
3699   done
3700   IFS="$ac_save_ifs"
3701 else
3702   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3703 fi
3704 fi
3705
3706 LD="$lt_cv_path_LD"
3707 if test -n "$LD"; then
3708   echo "$ac_t""$LD" 1>&6
3709 else
3710   echo "$ac_t""no" 1>&6
3711 fi
3712 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3713 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3714 echo "configure:3715: checking if the linker ($LD) is GNU ld" >&5
3715 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3719 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3720   lt_cv_prog_gnu_ld=yes
3721 else
3722   lt_cv_prog_gnu_ld=no
3723 fi
3724 fi
3725
3726 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3727 with_gnu_ld=$lt_cv_prog_gnu_ld
3728
3729
3730 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3731 echo "configure:3732: checking for $LD option to reload object files" >&5
3732 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   lt_cv_ld_reload_flag='-r'
3736 fi
3737
3738 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3739 reload_flag=$lt_cv_ld_reload_flag
3740 test -n "$reload_flag" && reload_flag=" $reload_flag"
3741
3742 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3743 echo "configure:3744: checking for BSD-compatible nm" >&5
3744 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3745   echo $ac_n "(cached) $ac_c" 1>&6
3746 else
3747   if test -n "$NM"; then
3748   # Let the user override the test.
3749   lt_cv_path_NM="$NM"
3750 else
3751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3752   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3753     test -z "$ac_dir" && ac_dir=.
3754     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3755     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3756       # Check to see if the nm accepts a BSD-compat flag.
3757       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3758       #   nm: unknown option "B" ignored
3759       # Tru64's nm complains that /dev/null is an invalid object file
3760       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3761         lt_cv_path_NM="$tmp_nm -B"
3762         break
3763       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3764         lt_cv_path_NM="$tmp_nm -p"
3765         break
3766       else
3767         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3768         continue # so that we can try to find one that supports BSD flags
3769       fi
3770     fi
3771   done
3772   IFS="$ac_save_ifs"
3773   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3774 fi
3775 fi
3776
3777 NM="$lt_cv_path_NM"
3778 echo "$ac_t""$NM" 1>&6
3779
3780 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3781 echo "configure:3782: checking for a sed that does not truncate output" >&5
3782 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3783   echo $ac_n "(cached) $ac_c" 1>&6
3784 else
3785   # Loop through the user's path and test for sed and gsed.
3786 # Then use that list of sed's as ones to test for truncation.
3787 as_executable_p="test -f"
3788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789 for as_dir in $PATH
3790 do
3791   IFS=$as_save_IFS
3792   test -z "$as_dir" && as_dir=.
3793   for ac_prog in sed gsed; do
3794     for ac_exec_ext in '' $ac_executable_extensions; do
3795       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3796         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3797       fi
3798     done
3799   done
3800 done
3801
3802   # Create a temporary directory, and hook for its removal unless debugging.
3803 $debug ||
3804 {
3805   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3806   trap '{ (exit 1); exit 1; }' 1 2 13 15
3807 }
3808
3809 # Create a (secure) tmp directory for tmp files.
3810 : ${TMPDIR=/tmp}
3811 {
3812   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3813   test -n "$tmp" && test -d "$tmp"
3814 }  ||
3815 {
3816   tmp=$TMPDIR/sed$$-$RANDOM
3817   (umask 077 && mkdir $tmp)
3818 } ||
3819 {
3820    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3821    { (exit 1); exit 1; }
3822 }
3823   _max=0
3824   _count=0
3825   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3826   # along with /bin/sed that truncates output.
3827   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3828     test ! -f ${_sed} && break
3829     cat /dev/null > "$tmp/sed.in"
3830     _count=0
3831     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3832     # Check for GNU sed and select it if it is found.
3833     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3834       lt_cv_path_SED=${_sed}
3835       break
3836     fi
3837     while true; do
3838       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3839       mv "$tmp/sed.tmp" "$tmp/sed.in"
3840       cp "$tmp/sed.in" "$tmp/sed.nl"
3841       echo >>"$tmp/sed.nl"
3842       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3843       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3844       # 40000 chars as input seems more than enough
3845       test $_count -gt 10 && break
3846       _count=`expr $_count + 1`
3847       if test $_count -gt $_max; then
3848         _max=$_count
3849         lt_cv_path_SED=$_sed
3850       fi
3851     done
3852   done
3853   rm -rf "$tmp"
3854
3855 fi
3856
3857 if test "X$SED" != "X"; then
3858   lt_cv_path_SED=$SED
3859 else
3860   SED=$lt_cv_path_SED
3861 fi
3862 echo "$ac_t""$SED" 1>&6
3863
3864 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3865 echo "configure:3866: checking whether ln -s works" >&5
3866 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3867   echo $ac_n "(cached) $ac_c" 1>&6
3868 else
3869   rm -f conftestdata
3870 if ln -s X conftestdata 2>/dev/null
3871 then
3872   rm -f conftestdata
3873   ac_cv_prog_LN_S="ln -s"
3874 else
3875   ac_cv_prog_LN_S=ln
3876 fi
3877 fi
3878 LN_S="$ac_cv_prog_LN_S"
3879 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3880   echo "$ac_t""yes" 1>&6
3881 else
3882   echo "$ac_t""no" 1>&6
3883 fi
3884
3885 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3886 echo "configure:3887: checking how to recognise dependent libraries" >&5
3887 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3888   echo $ac_n "(cached) $ac_c" 1>&6
3889 else
3890   lt_cv_file_magic_cmd='$MAGIC_CMD'
3891 lt_cv_file_magic_test_file=
3892 lt_cv_deplibs_check_method='unknown'
3893 # Need to set the preceding variable on all platforms that support
3894 # interlibrary dependencies.
3895 # 'none' -- dependencies not supported.
3896 # `unknown' -- same as none, but documents that we really don't know.
3897 # 'pass_all' -- all dependencies passed with no checks.
3898 # 'test_compile' -- check by making test program.
3899 # 'file_magic [[regex]]' -- check by looking for files in library path
3900 # which responds to the $file_magic_cmd with a given egrep regex.
3901 # If you have `file' or equivalent on your system and you're not sure
3902 # whether `pass_all' will *always* work, you probably want this one.
3903
3904 case $host_os in
3905 aix4* | aix5*)
3906   lt_cv_deplibs_check_method=pass_all
3907   ;;
3908
3909 beos*)
3910   lt_cv_deplibs_check_method=pass_all
3911   ;;
3912
3913 bsdi4*)
3914   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3915   lt_cv_file_magic_cmd='/usr/bin/file -L'
3916   lt_cv_file_magic_test_file=/shlib/libc.so
3917   ;;
3918
3919 cygwin* | mingw* | pw32*)
3920   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3921   lt_cv_file_magic_cmd='$OBJDUMP -f'
3922   ;;
3923
3924 darwin* | rhapsody*)
3925   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3926   lt_cv_file_magic_cmd='/usr/bin/file -L'
3927   case "$host_os" in
3928   rhapsody* | darwin1.[012])
3929     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3930     ;;
3931   *) # Darwin 1.3 on
3932     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3933     ;;
3934   esac
3935   ;;
3936
3937 freebsd*)
3938   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3939     case $host_cpu in
3940     i*86 )
3941       # Not sure whether the presence of OpenBSD here was a mistake.
3942       # Let's accept both of them until this is cleared up.
3943       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3944       lt_cv_file_magic_cmd=/usr/bin/file
3945       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3946       ;;
3947     esac
3948   else
3949     lt_cv_deplibs_check_method=pass_all
3950   fi
3951   ;;
3952
3953 gnu*)
3954   lt_cv_deplibs_check_method=pass_all
3955   ;;
3956
3957 hpux10.20*|hpux11*)
3958   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3959   lt_cv_file_magic_cmd=/usr/bin/file
3960   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3961   ;;
3962
3963 irix5* | irix6* | nonstopux*)
3964   case $host_os in
3965   irix5* | nonstopux*)
3966     # this will be overridden with pass_all, but let us keep it just in case
3967     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3968     ;;
3969   *)
3970     case $LD in
3971     *-32|*"-32 ") libmagic=32-bit;;
3972     *-n32|*"-n32 ") libmagic=N32;;
3973     *-64|*"-64 ") libmagic=64-bit;;
3974     *) libmagic=never-match;;
3975     esac
3976     # this will be overridden with pass_all, but let us keep it just in case
3977     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3978     ;;
3979   esac
3980   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3981   lt_cv_deplibs_check_method=pass_all
3982   ;;
3983
3984 # This must be Linux ELF.
3985 linux-gnu*)
3986   case $host_cpu in
3987   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3988     lt_cv_deplibs_check_method=pass_all ;;
3989   *)
3990     # glibc up to 2.1.1 does not perform some relocations on ARM
3991     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3992   esac
3993   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3994   ;;
3995
3996 netbsd*)
3997   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3998     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3999   else
4000     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4001   fi
4002   ;;
4003
4004 newos6*)
4005   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4006   lt_cv_file_magic_cmd=/usr/bin/file
4007   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4008   ;;
4009
4010 openbsd*)
4011   lt_cv_file_magic_cmd=/usr/bin/file
4012   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4013   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4014     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4015   else
4016     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4017   fi
4018   ;;
4019
4020 osf3* | osf4* | osf5*)
4021   # this will be overridden with pass_all, but let us keep it just in case
4022   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4023   lt_cv_file_magic_test_file=/shlib/libc.so
4024   lt_cv_deplibs_check_method=pass_all
4025   ;;
4026
4027 sco3.2v5*)
4028   lt_cv_deplibs_check_method=pass_all
4029   ;;
4030
4031 solaris*)
4032   lt_cv_deplibs_check_method=pass_all
4033   lt_cv_file_magic_test_file=/lib/libc.so
4034   ;;
4035
4036 sysv5uw[78]* | sysv4*uw2*)
4037   lt_cv_deplibs_check_method=pass_all
4038   ;;
4039
4040 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4041   case $host_vendor in
4042   motorola)
4043     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]'
4044     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4045     ;;
4046   ncr)
4047     lt_cv_deplibs_check_method=pass_all
4048     ;;
4049   sequent)
4050     lt_cv_file_magic_cmd='/bin/file'
4051     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4052     ;;
4053   sni)
4054     lt_cv_file_magic_cmd='/bin/file'
4055     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4056     lt_cv_file_magic_test_file=/lib/libc.so
4057     ;;
4058   siemens)
4059     lt_cv_deplibs_check_method=pass_all
4060     ;;
4061   esac
4062   ;;
4063 esac
4064
4065 fi
4066
4067 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4068 file_magic_cmd=$lt_cv_file_magic_cmd
4069 deplibs_check_method=$lt_cv_deplibs_check_method
4070
4071 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4072 echo "configure:4073: checking for object suffix" >&5
4073 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   rm -f conftest*
4077 echo 'int i = 1;' > conftest.$ac_ext
4078 if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4079   for ac_file in conftest.*; do
4080     case $ac_file in
4081     *.c) ;;
4082     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4083     esac
4084   done
4085 else
4086   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4087 fi
4088 rm -f conftest*
4089 fi
4090
4091 echo "$ac_t""$ac_cv_objext" 1>&6
4092 OBJEXT=$ac_cv_objext
4093 ac_objext=$ac_cv_objext
4094
4095
4096
4097
4098 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4099 echo "configure:4100: checking for executable suffix" >&5
4100 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4104   ac_cv_exeext=.exe
4105 else
4106   rm -f conftest*
4107   echo 'int main () { return 0; }' > conftest.$ac_ext
4108   ac_cv_exeext=
4109   if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4110     for file in conftest.*; do
4111       case $file in
4112       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4113       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4114       esac
4115     done
4116   else
4117     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4118   fi
4119   rm -f conftest*
4120   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4121 fi
4122 fi
4123
4124 EXEEXT=""
4125 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4126 echo "$ac_t""${ac_cv_exeext}" 1>&6
4127 ac_exeext=$EXEEXT
4128
4129 if test $host != $build; then
4130   ac_tool_prefix=${host_alias}-
4131 else
4132   ac_tool_prefix=
4133 fi
4134
4135
4136
4137
4138 # Check for command to grab the raw symbol name followed by C symbol from nm.
4139 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4140 echo "configure:4141: checking command to parse $NM output" >&5
4141 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4142   echo $ac_n "(cached) $ac_c" 1>&6
4143 else
4144   
4145 # These are sane defaults that work on at least a few old systems.
4146 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4147
4148 # Character class describing NM global symbol codes.
4149 symcode='[BCDEGRST]'
4150
4151 # Regexp to match symbols that can be accessed directly from C.
4152 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4153
4154 # Transform the above into a raw symbol and a C symbol.
4155 symxfrm='\1 \2\3 \3'
4156
4157 # Transform an extracted symbol line into a proper C declaration
4158 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4159
4160 # Transform an extracted symbol line into symbol name and symbol address
4161 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'"
4162
4163 # Define system-specific variables.
4164 case $host_os in
4165 aix*)
4166   symcode='[BCDT]'
4167   ;;
4168 cygwin* | mingw* | pw32*)
4169   symcode='[ABCDGISTW]'
4170   ;;
4171 hpux*) # Its linker distinguishes data from code symbols
4172   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4173   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'"
4174   ;;
4175 irix* | nonstopux*)
4176   symcode='[BCDEGRST]'
4177   ;;
4178 osf*)
4179   symcode='[BCDEGQRST]'
4180   ;;
4181 solaris* | sysv5*)
4182   symcode='[BDT]'
4183   ;;
4184 sysv4)
4185   symcode='[DFNSTU]'
4186   ;;
4187 esac
4188
4189 # Handle CRLF in mingw tool chain
4190 opt_cr=
4191 case $host_os in
4192 mingw*)
4193   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4194   ;;
4195 esac
4196
4197 # If we're using GNU nm, then use its standard symbol codes.
4198 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4199   symcode='[ABCDGISTW]'
4200 fi
4201
4202 # Try without a prefix undercore, then with it.
4203 for ac_symprfx in "" "_"; do
4204
4205   # Write the raw and C identifiers.
4206 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4207
4208   # Check to see that the pipe works correctly.
4209   pipe_works=no
4210   rm -f conftest*
4211   cat > conftest.$ac_ext <<EOF
4212 #ifdef __cplusplus
4213 extern "C" {
4214 #endif
4215 char nm_test_var;
4216 void nm_test_func(){}
4217 #ifdef __cplusplus
4218 }
4219 #endif
4220 int main(){nm_test_var='a';nm_test_func();return(0);}
4221 EOF
4222
4223   if { (eval echo configure:4224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4224     # Now try to grab the symbols.
4225     nlist=conftest.nm
4226     if { (eval echo configure:4227: \"$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
4227       # Try sorting and uniquifying the output.
4228       if sort "$nlist" | uniq > "$nlist"T; then
4229         mv -f "$nlist"T "$nlist"
4230       else
4231         rm -f "$nlist"T
4232       fi
4233
4234       # Make sure that we snagged all the symbols we need.
4235       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4236         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4237           cat <<EOF > conftest.$ac_ext
4238 #ifdef __cplusplus
4239 extern "C" {
4240 #endif
4241
4242 EOF
4243           # Now generate the symbol file.
4244           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4245
4246           cat <<EOF >> conftest.$ac_ext
4247 #if defined (__STDC__) && __STDC__
4248 # define lt_ptr void *
4249 #else
4250 # define lt_ptr char *
4251 # define const
4252 #endif
4253
4254 /* The mapping between symbol names and symbols. */
4255 const struct {
4256   const char *name;
4257   lt_ptr address;
4258 }
4259 lt_preloaded_symbols[] =
4260 {
4261 EOF
4262           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4263           cat <<\EOF >> conftest.$ac_ext
4264   {0, (lt_ptr) 0}
4265 };
4266
4267 #ifdef __cplusplus
4268 }
4269 #endif
4270 EOF
4271           # Now try linking the two files.
4272           mv conftest.$ac_objext conftstm.$ac_objext
4273           save_LIBS="$LIBS"
4274           save_CFLAGS="$CFLAGS"
4275           LIBS="conftstm.$ac_objext"
4276           CFLAGS="$CFLAGS$no_builtin_flag"
4277           if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4278             pipe_works=yes
4279           fi
4280           LIBS="$save_LIBS"
4281           CFLAGS="$save_CFLAGS"
4282         else
4283           echo "cannot find nm_test_func in $nlist" >&5
4284         fi
4285       else
4286         echo "cannot find nm_test_var in $nlist" >&5
4287       fi
4288     else
4289       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4290     fi
4291   else
4292     echo "$progname: failed program was:" >&5
4293     cat conftest.$ac_ext >&5
4294   fi
4295   rm -f conftest* conftst*
4296
4297   # Do not use the global_symbol_pipe unless it works.
4298   if test "$pipe_works" = yes; then
4299     break
4300   else
4301     lt_cv_sys_global_symbol_pipe=
4302   fi
4303 done
4304
4305 fi
4306
4307 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4308 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4309   global_symbol_to_cdecl=
4310   global_symbol_to_c_name_address=
4311 else
4312   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4313   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4314 fi
4315 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4316 then
4317   echo "$ac_t""failed" 1>&6
4318 else
4319   echo "$ac_t""ok" 1>&6
4320 fi
4321
4322 for ac_hdr in dlfcn.h
4323 do
4324 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4325 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4326 echo "configure:4327: checking for $ac_hdr" >&5
4327 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   cat > conftest.$ac_ext <<EOF
4331 #line 4332 "configure"
4332 #include "confdefs.h"
4333 #include <$ac_hdr>
4334 EOF
4335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4336 { (eval echo configure:4337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4338 if test -z "$ac_err"; then
4339   rm -rf conftest*
4340   eval "ac_cv_header_$ac_safe=yes"
4341 else
4342   echo "$ac_err" >&5
4343   echo "configure: failed program was:" >&5
4344   cat conftest.$ac_ext >&5
4345   rm -rf conftest*
4346   eval "ac_cv_header_$ac_safe=no"
4347 fi
4348 rm -f conftest*
4349 fi
4350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4351   echo "$ac_t""yes" 1>&6
4352     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4353   cat >> confdefs.h <<EOF
4354 #define $ac_tr_hdr 1
4355 EOF
4356  
4357 else
4358   echo "$ac_t""no" 1>&6
4359 fi
4360 done
4361
4362
4363
4364
4365
4366
4367 # Only perform the check for file, if the check method requires it
4368 case $deplibs_check_method in
4369 file_magic*)
4370   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4371     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4372 echo "configure:4373: checking for ${ac_tool_prefix}file" >&5
4373 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   case $MAGIC_CMD in
4377   /*)
4378   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4379   ;;
4380   ?:/*)
4381   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4382   ;;
4383   *)
4384   ac_save_MAGIC_CMD="$MAGIC_CMD"
4385   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4386   ac_dummy="/usr/bin:$PATH"
4387   for ac_dir in $ac_dummy; do
4388     test -z "$ac_dir" && ac_dir=.
4389     if test -f $ac_dir/${ac_tool_prefix}file; then
4390       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4391       if test -n "$file_magic_test_file"; then
4392         case $deplibs_check_method in
4393         "file_magic "*)
4394           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4395           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4396           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4397             egrep "$file_magic_regex" > /dev/null; then
4398             :
4399           else
4400             cat <<EOF 1>&2
4401
4402 *** Warning: the command libtool uses to detect shared libraries,
4403 *** $file_magic_cmd, produces output that libtool cannot recognize.
4404 *** The result is that libtool may fail to recognize shared libraries
4405 *** as such.  This will affect the creation of libtool libraries that
4406 *** depend on shared libraries, but programs linked with such libtool
4407 *** libraries will work regardless of this problem.  Nevertheless, you
4408 *** may want to report the problem to your system manager and/or to
4409 *** bug-libtool@gnu.org
4410
4411 EOF
4412           fi ;;
4413         esac
4414       fi
4415       break
4416     fi
4417   done
4418   IFS="$ac_save_ifs"
4419   MAGIC_CMD="$ac_save_MAGIC_CMD"
4420   ;;
4421 esac
4422 fi
4423
4424 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4425 if test -n "$MAGIC_CMD"; then
4426   echo "$ac_t""$MAGIC_CMD" 1>&6
4427 else
4428   echo "$ac_t""no" 1>&6
4429 fi
4430
4431 if test -z "$lt_cv_path_MAGIC_CMD"; then
4432   if test -n "$ac_tool_prefix"; then
4433     echo $ac_n "checking for file""... $ac_c" 1>&6
4434 echo "configure:4435: checking for file" >&5
4435 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4436   echo $ac_n "(cached) $ac_c" 1>&6
4437 else
4438   case $MAGIC_CMD in
4439   /*)
4440   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4441   ;;
4442   ?:/*)
4443   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4444   ;;
4445   *)
4446   ac_save_MAGIC_CMD="$MAGIC_CMD"
4447   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4448   ac_dummy="/usr/bin:$PATH"
4449   for ac_dir in $ac_dummy; do
4450     test -z "$ac_dir" && ac_dir=.
4451     if test -f $ac_dir/file; then
4452       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4453       if test -n "$file_magic_test_file"; then
4454         case $deplibs_check_method in
4455         "file_magic "*)
4456           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4457           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4458           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4459             egrep "$file_magic_regex" > /dev/null; then
4460             :
4461           else
4462             cat <<EOF 1>&2
4463
4464 *** Warning: the command libtool uses to detect shared libraries,
4465 *** $file_magic_cmd, produces output that libtool cannot recognize.
4466 *** The result is that libtool may fail to recognize shared libraries
4467 *** as such.  This will affect the creation of libtool libraries that
4468 *** depend on shared libraries, but programs linked with such libtool
4469 *** libraries will work regardless of this problem.  Nevertheless, you
4470 *** may want to report the problem to your system manager and/or to
4471 *** bug-libtool@gnu.org
4472
4473 EOF
4474           fi ;;
4475         esac
4476       fi
4477       break
4478     fi
4479   done
4480   IFS="$ac_save_ifs"
4481   MAGIC_CMD="$ac_save_MAGIC_CMD"
4482   ;;
4483 esac
4484 fi
4485
4486 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4487 if test -n "$MAGIC_CMD"; then
4488   echo "$ac_t""$MAGIC_CMD" 1>&6
4489 else
4490   echo "$ac_t""no" 1>&6
4491 fi
4492
4493   else
4494     MAGIC_CMD=:
4495   fi
4496 fi
4497
4498   fi
4499   ;;
4500 esac
4501
4502 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4503 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4505 echo "configure:4506: checking for $ac_word" >&5
4506 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4507   echo $ac_n "(cached) $ac_c" 1>&6
4508 else
4509   if test -n "$RANLIB"; then
4510   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4511 else
4512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4513   ac_dummy="$PATH"
4514   for ac_dir in $ac_dummy; do
4515     test -z "$ac_dir" && ac_dir=.
4516     if test -f $ac_dir/$ac_word; then
4517       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4518       break
4519     fi
4520   done
4521   IFS="$ac_save_ifs"
4522 fi
4523 fi
4524 RANLIB="$ac_cv_prog_RANLIB"
4525 if test -n "$RANLIB"; then
4526   echo "$ac_t""$RANLIB" 1>&6
4527 else
4528   echo "$ac_t""no" 1>&6
4529 fi
4530
4531
4532 if test -z "$ac_cv_prog_RANLIB"; then
4533 if test -n "$ac_tool_prefix"; then
4534   # Extract the first word of "ranlib", so it can be a program name with args.
4535 set dummy ranlib; ac_word=$2
4536 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4537 echo "configure:4538: checking for $ac_word" >&5
4538 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4539   echo $ac_n "(cached) $ac_c" 1>&6
4540 else
4541   if test -n "$RANLIB"; then
4542   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4543 else
4544   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4545   ac_dummy="$PATH"
4546   for ac_dir in $ac_dummy; do
4547     test -z "$ac_dir" && ac_dir=.
4548     if test -f $ac_dir/$ac_word; then
4549       ac_cv_prog_RANLIB="ranlib"
4550       break
4551     fi
4552   done
4553   IFS="$ac_save_ifs"
4554   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4555 fi
4556 fi
4557 RANLIB="$ac_cv_prog_RANLIB"
4558 if test -n "$RANLIB"; then
4559   echo "$ac_t""$RANLIB" 1>&6
4560 else
4561   echo "$ac_t""no" 1>&6
4562 fi
4563
4564 else
4565   RANLIB=":"
4566 fi
4567 fi
4568
4569 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4570 set dummy ${ac_tool_prefix}strip; ac_word=$2
4571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4572 echo "configure:4573: checking for $ac_word" >&5
4573 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4574   echo $ac_n "(cached) $ac_c" 1>&6
4575 else
4576   if test -n "$STRIP"; then
4577   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4578 else
4579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4580   ac_dummy="$PATH"
4581   for ac_dir in $ac_dummy; do
4582     test -z "$ac_dir" && ac_dir=.
4583     if test -f $ac_dir/$ac_word; then
4584       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4585       break
4586     fi
4587   done
4588   IFS="$ac_save_ifs"
4589 fi
4590 fi
4591 STRIP="$ac_cv_prog_STRIP"
4592 if test -n "$STRIP"; then
4593   echo "$ac_t""$STRIP" 1>&6
4594 else
4595   echo "$ac_t""no" 1>&6
4596 fi
4597
4598
4599 if test -z "$ac_cv_prog_STRIP"; then
4600 if test -n "$ac_tool_prefix"; then
4601   # Extract the first word of "strip", so it can be a program name with args.
4602 set dummy strip; ac_word=$2
4603 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4604 echo "configure:4605: checking for $ac_word" >&5
4605 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4606   echo $ac_n "(cached) $ac_c" 1>&6
4607 else
4608   if test -n "$STRIP"; then
4609   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4610 else
4611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4612   ac_dummy="$PATH"
4613   for ac_dir in $ac_dummy; do
4614     test -z "$ac_dir" && ac_dir=.
4615     if test -f $ac_dir/$ac_word; then
4616       ac_cv_prog_STRIP="strip"
4617       break
4618     fi
4619   done
4620   IFS="$ac_save_ifs"
4621   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4622 fi
4623 fi
4624 STRIP="$ac_cv_prog_STRIP"
4625 if test -n "$STRIP"; then
4626   echo "$ac_t""$STRIP" 1>&6
4627 else
4628   echo "$ac_t""no" 1>&6
4629 fi
4630
4631 else
4632   STRIP=":"
4633 fi
4634 fi
4635
4636
4637 enable_dlopen=yes
4638 enable_win32_dll=yes
4639
4640 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4641 if test "${enable_libtool_lock+set}" = set; then
4642   enableval="$enable_libtool_lock"
4643   :
4644 fi
4645
4646 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4647
4648 # Some flags need to be propagated to the compiler or linker for good
4649 # libtool support.
4650 case $host in
4651 *-*-irix6*)
4652   # Find out which ABI we are using.
4653   echo '#line 4654 "configure"' > conftest.$ac_ext
4654   if { (eval echo configure:4655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4655     case `/usr/bin/file conftest.$ac_objext` in
4656     *32-bit*)
4657       LD="${LD-ld} -32"
4658       ;;
4659     *N32*)
4660       LD="${LD-ld} -n32"
4661       ;;
4662     *64-bit*)
4663       LD="${LD-ld} -64"
4664       ;;
4665     esac
4666   fi
4667   rm -rf conftest*
4668   ;;
4669
4670 *-*-sco3.2v5*)
4671   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4672   SAVE_CFLAGS="$CFLAGS"
4673   CFLAGS="$CFLAGS -belf"
4674   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4675 echo "configure:4676: checking whether the C compiler needs -belf" >&5
4676 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   
4680      ac_ext=c
4681 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4682 ac_cpp='$CPP $CPPFLAGS'
4683 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4684 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4685 cross_compiling=$ac_cv_prog_cc_cross
4686
4687      cat > conftest.$ac_ext <<EOF
4688 #line 4689 "configure"
4689 #include "confdefs.h"
4690
4691 int main() {
4692
4693 ; return 0; }
4694 EOF
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696   rm -rf conftest*
4697   lt_cv_cc_needs_belf=yes
4698 else
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   lt_cv_cc_needs_belf=no
4703 fi
4704 rm -f conftest*
4705      ac_ext=c
4706 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4707 ac_cpp='$CPP $CPPFLAGS'
4708 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4709 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4710 cross_compiling=$ac_cv_prog_cc_cross
4711
4712 fi
4713
4714 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4715   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4716     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4717     CFLAGS="$SAVE_CFLAGS"
4718   fi
4719   ;;
4720
4721 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4722   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4723 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4724 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4725 echo "configure:4726: checking for $ac_word" >&5
4726 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729   if test -n "$DLLTOOL"; then
4730   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4731 else
4732   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4733   ac_dummy="$PATH"
4734   for ac_dir in $ac_dummy; do
4735     test -z "$ac_dir" && ac_dir=.
4736     if test -f $ac_dir/$ac_word; then
4737       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4738       break
4739     fi
4740   done
4741   IFS="$ac_save_ifs"
4742 fi
4743 fi
4744 DLLTOOL="$ac_cv_prog_DLLTOOL"
4745 if test -n "$DLLTOOL"; then
4746   echo "$ac_t""$DLLTOOL" 1>&6
4747 else
4748   echo "$ac_t""no" 1>&6
4749 fi
4750
4751
4752 if test -z "$ac_cv_prog_DLLTOOL"; then
4753 if test -n "$ac_tool_prefix"; then
4754   # Extract the first word of "dlltool", so it can be a program name with args.
4755 set dummy dlltool; ac_word=$2
4756 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4757 echo "configure:4758: checking for $ac_word" >&5
4758 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4759   echo $ac_n "(cached) $ac_c" 1>&6
4760 else
4761   if test -n "$DLLTOOL"; then
4762   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4763 else
4764   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4765   ac_dummy="$PATH"
4766   for ac_dir in $ac_dummy; do
4767     test -z "$ac_dir" && ac_dir=.
4768     if test -f $ac_dir/$ac_word; then
4769       ac_cv_prog_DLLTOOL="dlltool"
4770       break
4771     fi
4772   done
4773   IFS="$ac_save_ifs"
4774   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4775 fi
4776 fi
4777 DLLTOOL="$ac_cv_prog_DLLTOOL"
4778 if test -n "$DLLTOOL"; then
4779   echo "$ac_t""$DLLTOOL" 1>&6
4780 else
4781   echo "$ac_t""no" 1>&6
4782 fi
4783
4784 else
4785   DLLTOOL="false"
4786 fi
4787 fi
4788
4789   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4790 set dummy ${ac_tool_prefix}as; ac_word=$2
4791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4792 echo "configure:4793: checking for $ac_word" >&5
4793 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4794   echo $ac_n "(cached) $ac_c" 1>&6
4795 else
4796   if test -n "$AS"; then
4797   ac_cv_prog_AS="$AS" # Let the user override the test.
4798 else
4799   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4800   ac_dummy="$PATH"
4801   for ac_dir in $ac_dummy; do
4802     test -z "$ac_dir" && ac_dir=.
4803     if test -f $ac_dir/$ac_word; then
4804       ac_cv_prog_AS="${ac_tool_prefix}as"
4805       break
4806     fi
4807   done
4808   IFS="$ac_save_ifs"
4809 fi
4810 fi
4811 AS="$ac_cv_prog_AS"
4812 if test -n "$AS"; then
4813   echo "$ac_t""$AS" 1>&6
4814 else
4815   echo "$ac_t""no" 1>&6
4816 fi
4817
4818
4819 if test -z "$ac_cv_prog_AS"; then
4820 if test -n "$ac_tool_prefix"; then
4821   # Extract the first word of "as", so it can be a program name with args.
4822 set dummy as; ac_word=$2
4823 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4824 echo "configure:4825: checking for $ac_word" >&5
4825 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   if test -n "$AS"; then
4829   ac_cv_prog_AS="$AS" # Let the user override the test.
4830 else
4831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4832   ac_dummy="$PATH"
4833   for ac_dir in $ac_dummy; do
4834     test -z "$ac_dir" && ac_dir=.
4835     if test -f $ac_dir/$ac_word; then
4836       ac_cv_prog_AS="as"
4837       break
4838     fi
4839   done
4840   IFS="$ac_save_ifs"
4841   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4842 fi
4843 fi
4844 AS="$ac_cv_prog_AS"
4845 if test -n "$AS"; then
4846   echo "$ac_t""$AS" 1>&6
4847 else
4848   echo "$ac_t""no" 1>&6
4849 fi
4850
4851 else
4852   AS="false"
4853 fi
4854 fi
4855
4856   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4857 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4859 echo "configure:4860: checking for $ac_word" >&5
4860 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4861   echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863   if test -n "$OBJDUMP"; then
4864   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4865 else
4866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4867   ac_dummy="$PATH"
4868   for ac_dir in $ac_dummy; do
4869     test -z "$ac_dir" && ac_dir=.
4870     if test -f $ac_dir/$ac_word; then
4871       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4872       break
4873     fi
4874   done
4875   IFS="$ac_save_ifs"
4876 fi
4877 fi
4878 OBJDUMP="$ac_cv_prog_OBJDUMP"
4879 if test -n "$OBJDUMP"; then
4880   echo "$ac_t""$OBJDUMP" 1>&6
4881 else
4882   echo "$ac_t""no" 1>&6
4883 fi
4884
4885
4886 if test -z "$ac_cv_prog_OBJDUMP"; then
4887 if test -n "$ac_tool_prefix"; then
4888   # Extract the first word of "objdump", so it can be a program name with args.
4889 set dummy objdump; ac_word=$2
4890 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4891 echo "configure:4892: checking for $ac_word" >&5
4892 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4893   echo $ac_n "(cached) $ac_c" 1>&6
4894 else
4895   if test -n "$OBJDUMP"; then
4896   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4897 else
4898   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4899   ac_dummy="$PATH"
4900   for ac_dir in $ac_dummy; do
4901     test -z "$ac_dir" && ac_dir=.
4902     if test -f $ac_dir/$ac_word; then
4903       ac_cv_prog_OBJDUMP="objdump"
4904       break
4905     fi
4906   done
4907   IFS="$ac_save_ifs"
4908   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4909 fi
4910 fi
4911 OBJDUMP="$ac_cv_prog_OBJDUMP"
4912 if test -n "$OBJDUMP"; then
4913   echo "$ac_t""$OBJDUMP" 1>&6
4914 else
4915   echo "$ac_t""no" 1>&6
4916 fi
4917
4918 else
4919   OBJDUMP="false"
4920 fi
4921 fi
4922
4923
4924   # recent cygwin and mingw systems supply a stub DllMain which the user
4925   # can override, but on older systems we have to supply one
4926   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4927 echo "configure:4928: checking if libtool should supply DllMain function" >&5
4928 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4929   echo $ac_n "(cached) $ac_c" 1>&6
4930 else
4931   cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934
4935 int main() {
4936 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4937       DllMain (0, 0, 0);
4938 ; return 0; }
4939 EOF
4940 if { (eval echo configure:4941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4941   rm -rf conftest*
4942   lt_cv_need_dllmain=no
4943 else
4944   echo "configure: failed program was:" >&5
4945   cat conftest.$ac_ext >&5
4946   rm -rf conftest*
4947   lt_cv_need_dllmain=yes
4948 fi
4949 rm -f conftest*
4950 fi
4951
4952 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4953
4954   case $host/$CC in
4955   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4956     # old mingw systems require "-dll" to link a DLL, while more recent ones
4957     # require "-mdll"
4958     SAVE_CFLAGS="$CFLAGS"
4959     CFLAGS="$CFLAGS -mdll"
4960     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4961 echo "configure:4962: checking how to link DLLs" >&5
4962 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4963   echo $ac_n "(cached) $ac_c" 1>&6
4964 else
4965   cat > conftest.$ac_ext <<EOF
4966 #line 4967 "configure"
4967 #include "confdefs.h"
4968
4969 int main() {
4970
4971 ; return 0; }
4972 EOF
4973 if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4974   rm -rf conftest*
4975   lt_cv_cc_dll_switch=-mdll
4976 else
4977   echo "configure: failed program was:" >&5
4978   cat conftest.$ac_ext >&5
4979   rm -rf conftest*
4980   lt_cv_cc_dll_switch=-dll
4981 fi
4982 rm -f conftest*
4983 fi
4984
4985 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4986     CFLAGS="$SAVE_CFLAGS" ;;
4987   *-*-cygwin* | *-*-pw32*)
4988     # cygwin systems need to pass --dll to the linker, and not link
4989     # crt.o which will require a WinMain@16 definition.
4990     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4991   esac
4992   ;;
4993   
4994 esac
4995
4996 # Sed substitution that helps us do robust quoting.  It backslashifies
4997 # metacharacters that are still active within double-quoted strings.
4998 Xsed='sed -e s/^X//'
4999 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5000
5001 # Same as above, but do not quote variable references.
5002 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5003
5004 # Sed substitution to delay expansion of an escaped shell variable in a
5005 # double_quote_subst'ed string.
5006 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5007
5008 # Constants:
5009 rm="rm -f"
5010
5011 # Global variables:
5012 default_ofile=libtool
5013 can_build_shared=yes
5014
5015 # All known linkers require a `.a' archive for static linking (except M$VC,
5016 # which needs '.lib').
5017 libext=a
5018 ltmain="$ac_aux_dir/ltmain.sh"
5019 ofile="$default_ofile"
5020 with_gnu_ld="$lt_cv_prog_gnu_ld"
5021 need_locks="$enable_libtool_lock"
5022
5023 old_CC="$CC"
5024 old_CFLAGS="$CFLAGS"
5025
5026 # Set sane defaults for various variables
5027 test -z "$AR" && AR=ar
5028 test -z "$AR_FLAGS" && AR_FLAGS=cru
5029 test -z "$AS" && AS=as
5030 test -z "$CC" && CC=cc
5031 test -z "$DLLTOOL" && DLLTOOL=dlltool
5032 test -z "$LD" && LD=ld
5033 test -z "$LN_S" && LN_S="ln -s"
5034 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5035 test -z "$NM" && NM=nm
5036 test -z "$OBJDUMP" && OBJDUMP=objdump
5037 test -z "$RANLIB" && RANLIB=:
5038 test -z "$STRIP" && STRIP=:
5039 test -z "$ac_objext" && ac_objext=o
5040
5041 if test x"$host" != x"$build"; then
5042   ac_tool_prefix=${host_alias}-
5043 else
5044   ac_tool_prefix=
5045 fi
5046
5047 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5048 case $host_os in
5049 linux-gnu*) ;;
5050 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5051 esac
5052
5053 case $host_os in
5054 aix3*)
5055   # AIX sometimes has problems with the GCC collect2 program.  For some
5056   # reason, if we set the COLLECT_NAMES environment variable, the problems
5057   # vanish in a puff of smoke.
5058   if test "X${COLLECT_NAMES+set}" != Xset; then
5059     COLLECT_NAMES=
5060     export COLLECT_NAMES
5061   fi
5062   ;;
5063 esac
5064
5065 # Determine commands to create old-style static archives.
5066 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5067 old_postinstall_cmds='chmod 644 $oldlib'
5068 old_postuninstall_cmds=
5069
5070 if test -n "$RANLIB"; then
5071   case $host_os in
5072   openbsd*)
5073     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5074     ;;
5075   *)
5076     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5077     ;;
5078   esac
5079   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5080 fi
5081
5082 # Allow CC to be a program name with arguments.
5083 set dummy $CC
5084 compiler="$2"
5085
5086 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5087 echo "configure:5088: checking for objdir" >&5
5088 rm -f .libs 2>/dev/null
5089 mkdir .libs 2>/dev/null
5090 if test -d .libs; then
5091   objdir=.libs
5092 else
5093   # MS-DOS does not allow filenames that begin with a dot.
5094   objdir=_libs
5095 fi
5096 rmdir .libs 2>/dev/null
5097 echo "$ac_t""$objdir" 1>&6
5098
5099
5100 # Check whether --with-pic or --without-pic was given.
5101 if test "${with_pic+set}" = set; then
5102   withval="$with_pic"
5103   pic_mode="$withval"
5104 else
5105   pic_mode=default
5106 fi
5107
5108 test -z "$pic_mode" && pic_mode=default
5109
5110 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5111 # in isolation, and that seeing it set (from the cache) indicates that
5112 # the associated values are set (in the cache) correctly too.
5113 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5114 echo "configure:5115: checking for $compiler option to produce PIC" >&5
5115 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118    lt_cv_prog_cc_pic=
5119   lt_cv_prog_cc_shlib=
5120   lt_cv_prog_cc_wl=
5121   lt_cv_prog_cc_static=
5122   lt_cv_prog_cc_no_builtin=
5123   lt_cv_prog_cc_can_build_shared=$can_build_shared
5124
5125   if test "$GCC" = yes; then
5126     lt_cv_prog_cc_wl='-Wl,'
5127     lt_cv_prog_cc_static='-static'
5128
5129     case $host_os in
5130     aix*)
5131       # Below there is a dirty hack to force normal static linking with -ldl
5132       # The problem is because libdl dynamically linked with both libc and
5133       # libC (AIX C++ library), which obviously doesn't included in libraries
5134       # list by gcc. This cause undefined symbols with -static flags.
5135       # This hack allows C programs to be linked with "-static -ldl", but
5136       # not sure about C++ programs.
5137       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5138       ;;
5139     amigaos*)
5140       # FIXME: we need at least 68020 code to build shared libraries, but
5141       # adding the `-m68020' flag to GCC prevents building anything better,
5142       # like `-m68040'.
5143       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5144       ;;
5145     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5146       # PIC is the default for these OSes.
5147       ;;
5148     darwin* | rhapsody*)
5149       # PIC is the default on this platform
5150       # Common symbols not allowed in MH_DYLIB files
5151       lt_cv_prog_cc_pic='-fno-common'
5152       ;;
5153     cygwin* | mingw* | pw32* | os2*)
5154       # This hack is so that the source file can tell whether it is being
5155       # built for inclusion in a dll (and should export symbols for example).
5156       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5157       ;;
5158     sysv4*MP*)
5159       if test -d /usr/nec; then
5160          lt_cv_prog_cc_pic=-Kconform_pic
5161       fi
5162       ;;
5163     *)
5164       lt_cv_prog_cc_pic='-fPIC'
5165       ;;
5166     esac
5167   else
5168     # PORTME Check for PIC flags for the system compiler.
5169     case $host_os in
5170     aix3* | aix4* | aix5*)
5171       lt_cv_prog_cc_wl='-Wl,'
5172       # All AIX code is PIC.
5173       if test "$host_cpu" = ia64; then
5174         # AIX 5 now supports IA64 processor
5175         lt_cv_prog_cc_static='-Bstatic'
5176       else
5177         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5178       fi
5179       ;;
5180
5181     hpux9* | hpux10* | hpux11*)
5182       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5183       lt_cv_prog_cc_wl='-Wl,'
5184       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5185       lt_cv_prog_cc_pic='+Z'
5186       ;;
5187
5188     irix5* | irix6* | nonstopux*)
5189       lt_cv_prog_cc_wl='-Wl,'
5190       lt_cv_prog_cc_static='-non_shared'
5191       # PIC (with -KPIC) is the default.
5192       ;;
5193
5194     cygwin* | mingw* | pw32* | os2*)
5195       # This hack is so that the source file can tell whether it is being
5196       # built for inclusion in a dll (and should export symbols for example).
5197       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5198       ;;
5199
5200     newsos6)
5201       lt_cv_prog_cc_pic='-KPIC'
5202       lt_cv_prog_cc_static='-Bstatic'
5203       ;;
5204
5205     osf3* | osf4* | osf5*)
5206       # All OSF/1 code is PIC.
5207       lt_cv_prog_cc_wl='-Wl,'
5208       lt_cv_prog_cc_static='-non_shared'
5209       ;;
5210
5211     sco3.2v5*)
5212       lt_cv_prog_cc_pic='-Kpic'
5213       lt_cv_prog_cc_static='-dn'
5214       lt_cv_prog_cc_shlib='-belf'
5215       ;;
5216
5217     solaris*)
5218       lt_cv_prog_cc_pic='-KPIC'
5219       lt_cv_prog_cc_static='-Bstatic'
5220       lt_cv_prog_cc_wl='-Wl,'
5221       ;;
5222
5223     sunos4*)
5224       lt_cv_prog_cc_pic='-PIC'
5225       lt_cv_prog_cc_static='-Bstatic'
5226       lt_cv_prog_cc_wl='-Qoption ld '
5227       ;;
5228
5229     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5230       lt_cv_prog_cc_pic='-KPIC'
5231       lt_cv_prog_cc_static='-Bstatic'
5232       lt_cv_prog_cc_wl='-Wl,'
5233       ;;
5234
5235     uts4*)
5236       lt_cv_prog_cc_pic='-pic'
5237       lt_cv_prog_cc_static='-Bstatic'
5238       ;;
5239
5240     sysv4*MP*)
5241       if test -d /usr/nec ;then
5242         lt_cv_prog_cc_pic='-Kconform_pic'
5243         lt_cv_prog_cc_static='-Bstatic'
5244       fi
5245       ;;
5246
5247     *)
5248       lt_cv_prog_cc_can_build_shared=no
5249       ;;
5250     esac
5251   fi
5252
5253 fi
5254
5255 if test -z "$lt_cv_prog_cc_pic"; then
5256   echo "$ac_t""none" 1>&6
5257 else
5258   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5259
5260   # Check to make sure the pic_flag actually works.
5261   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5262 echo "configure:5263: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5263   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266       save_CFLAGS="$CFLAGS"
5267     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5268     cat > conftest.$ac_ext <<EOF
5269 #line 5270 "configure"
5270 #include "confdefs.h"
5271
5272 int main() {
5273
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5277   rm -rf conftest*
5278         case $host_os in
5279       hpux9* | hpux10* | hpux11*)
5280         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5281         # they create non-PIC objects.  So, if there were any warnings, we
5282         # assume that PIC is not supported.
5283         if test -s conftest.err; then
5284           lt_cv_prog_cc_pic_works=no
5285         else
5286           lt_cv_prog_cc_pic_works=yes
5287         fi
5288         ;;
5289       *)
5290         lt_cv_prog_cc_pic_works=yes
5291         ;;
5292       esac
5293     
5294 else
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297   rm -rf conftest*
5298         lt_cv_prog_cc_pic_works=no
5299     
5300 fi
5301 rm -f conftest*
5302     CFLAGS="$save_CFLAGS"
5303   
5304 fi
5305
5306
5307   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5308     lt_cv_prog_cc_pic=
5309     lt_cv_prog_cc_can_build_shared=no
5310   else
5311     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5312   fi
5313
5314   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5315 fi
5316
5317 # Check for any special shared library compilation flags.
5318 if test -n "$lt_cv_prog_cc_shlib"; then
5319   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5320   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5321   else
5322    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5323     lt_cv_prog_cc_can_build_shared=no
5324   fi
5325 fi
5326
5327 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5329 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332     lt_cv_prog_cc_static_works=no
5333   save_LDFLAGS="$LDFLAGS"
5334   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5335   cat > conftest.$ac_ext <<EOF
5336 #line 5337 "configure"
5337 #include "confdefs.h"
5338
5339 int main() {
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   lt_cv_prog_cc_static_works=yes
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349 fi
5350 rm -f conftest*
5351   LDFLAGS="$save_LDFLAGS"
5352
5353 fi
5354
5355
5356 # Belt *and* braces to stop my trousers falling down:
5357 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5358 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5359
5360 pic_flag="$lt_cv_prog_cc_pic"
5361 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5362 wl="$lt_cv_prog_cc_wl"
5363 link_static_flag="$lt_cv_prog_cc_static"
5364 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5365 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5366
5367
5368 # Check to see if options -o and -c are simultaneously supported by compiler
5369 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5370 echo "configure:5371: checking if $compiler supports -c -o file.$ac_objext" >&5
5371 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5372   echo $ac_n "(cached) $ac_c" 1>&6
5373 else
5374   
5375 $rm -r conftest 2>/dev/null
5376 mkdir conftest
5377 cd conftest
5378 echo "int some_variable = 0;" > conftest.$ac_ext
5379 mkdir out
5380 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5381 # that will create temporary files in the current directory regardless of
5382 # the output directory.  Thus, making CWD read-only will cause this test
5383 # to fail, enabling locking or at least warning the user not to do parallel
5384 # builds.
5385 chmod -w .
5386 save_CFLAGS="$CFLAGS"
5387 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5388 compiler_c_o=no
5389 if { (eval echo configure:5390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5390   # The compiler can only warn and ignore the option if not recognized
5391   # So say no if there are warnings
5392   if test -s out/conftest.err; then
5393     lt_cv_compiler_c_o=no
5394   else
5395     lt_cv_compiler_c_o=yes
5396   fi
5397 else
5398   # Append any errors to the config.log.
5399   cat out/conftest.err 1>&5
5400   lt_cv_compiler_c_o=no
5401 fi
5402 CFLAGS="$save_CFLAGS"
5403 chmod u+w .
5404 $rm conftest* out/*
5405 rmdir out
5406 cd ..
5407 rmdir conftest
5408 $rm -r conftest 2>/dev/null
5409
5410 fi
5411
5412 compiler_c_o=$lt_cv_compiler_c_o
5413 echo "$ac_t""$compiler_c_o" 1>&6
5414
5415 if test x"$compiler_c_o" = x"yes"; then
5416   # Check to see if we can write to a .lo
5417   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5418 echo "configure:5419: checking if $compiler supports -c -o file.lo" >&5
5419   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5420   echo $ac_n "(cached) $ac_c" 1>&6
5421 else
5422   
5423   lt_cv_compiler_o_lo=no
5424   save_CFLAGS="$CFLAGS"
5425   CFLAGS="$CFLAGS -c -o conftest.lo"
5426   save_objext="$ac_objext"
5427   ac_objext=lo
5428   cat > conftest.$ac_ext <<EOF
5429 #line 5430 "configure"
5430 #include "confdefs.h"
5431
5432 int main() {
5433 int some_variable = 0;
5434 ; return 0; }
5435 EOF
5436 if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5437   rm -rf conftest*
5438       # The compiler can only warn and ignore the option if not recognized
5439     # So say no if there are warnings
5440     if test -s conftest.err; then
5441       lt_cv_compiler_o_lo=no
5442     else
5443       lt_cv_compiler_o_lo=yes
5444     fi
5445   
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449 fi
5450 rm -f conftest*
5451   ac_objext="$save_objext"
5452   CFLAGS="$save_CFLAGS"
5453   
5454 fi
5455
5456   compiler_o_lo=$lt_cv_compiler_o_lo
5457   echo "$ac_t""$compiler_o_lo" 1>&6
5458 else
5459   compiler_o_lo=no
5460 fi
5461
5462 # Check to see if we can do hard links to lock some files if needed
5463 hard_links="nottested"
5464 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5465   # do not overwrite the value of need_locks provided by the user
5466   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5467 echo "configure:5468: checking if we can lock with hard links" >&5
5468   hard_links=yes
5469   $rm conftest*
5470   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5471   touch conftest.a
5472   ln conftest.a conftest.b 2>&5 || hard_links=no
5473   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5474   echo "$ac_t""$hard_links" 1>&6
5475   if test "$hard_links" = no; then
5476     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5477     need_locks=warn
5478   fi
5479 else
5480   need_locks=no
5481 fi
5482
5483 if test "$GCC" = yes; then
5484   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5485   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5486 echo "configure:5487: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5487   echo "int some_variable = 0;" > conftest.$ac_ext
5488   save_CFLAGS="$CFLAGS"
5489   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5490   compiler_rtti_exceptions=no
5491   cat > conftest.$ac_ext <<EOF
5492 #line 5493 "configure"
5493 #include "confdefs.h"
5494
5495 int main() {
5496 int some_variable = 0;
5497 ; return 0; }
5498 EOF
5499 if { (eval echo configure:5500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5500   rm -rf conftest*
5501       # The compiler can only warn and ignore the option if not recognized
5502     # So say no if there are warnings
5503     if test -s conftest.err; then
5504       compiler_rtti_exceptions=no
5505     else
5506       compiler_rtti_exceptions=yes
5507     fi
5508   
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512 fi
5513 rm -f conftest*
5514   CFLAGS="$save_CFLAGS"
5515   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5516
5517   if test "$compiler_rtti_exceptions" = "yes"; then
5518     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5519   else
5520     no_builtin_flag=' -fno-builtin'
5521   fi
5522 fi
5523
5524 # See if the linker supports building shared libraries.
5525 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5526 echo "configure:5527: checking whether the linker ($LD) supports shared libraries" >&5
5527
5528 allow_undefined_flag=
5529 no_undefined_flag=
5530 need_lib_prefix=unknown
5531 need_version=unknown
5532 # when you set need_version to no, make sure it does not cause -set_version
5533 # flags to be left without arguments
5534 archive_cmds=
5535 archive_expsym_cmds=
5536 old_archive_from_new_cmds=
5537 old_archive_from_expsyms_cmds=
5538 export_dynamic_flag_spec=
5539 whole_archive_flag_spec=
5540 thread_safe_flag_spec=
5541 hardcode_into_libs=no
5542 hardcode_libdir_flag_spec=
5543 hardcode_libdir_separator=
5544 hardcode_direct=no
5545 hardcode_minus_L=no
5546 hardcode_shlibpath_var=unsupported
5547 runpath_var=
5548 link_all_deplibs=unknown
5549 always_export_symbols=no
5550 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5551 # include_expsyms should be a list of space-separated symbols to be *always*
5552 # included in the symbol list
5553 include_expsyms=
5554 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5555 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5556 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5557 # as well as any symbol that contains `d'.
5558 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5559 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5560 # platforms (ab)use it in PIC code, but their linkers get confused if
5561 # the symbol is explicitly referenced.  Since portable code cannot
5562 # rely on this symbol name, it's probably fine to never include it in
5563 # preloaded symbol tables.
5564 extract_expsyms_cmds=
5565
5566 case $host_os in
5567 cygwin* | mingw* | pw32*)
5568   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5569   # When not using gcc, we currently assume that we are using
5570   # Microsoft Visual C++.
5571   if test "$GCC" != yes; then
5572     with_gnu_ld=no
5573   fi
5574   ;;
5575 openbsd*)
5576   with_gnu_ld=no
5577   ;;
5578 esac
5579
5580 ld_shlibs=yes
5581 if test "$with_gnu_ld" = yes; then
5582   # If archive_cmds runs LD, not CC, wlarc should be empty
5583   wlarc='${wl}'
5584
5585   # See if GNU ld supports shared libraries.
5586   case $host_os in
5587   aix3* | aix4* | aix5*)
5588     # On AIX, the GNU linker is very broken
5589     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5590     ld_shlibs=no
5591     cat <<EOF 1>&2
5592
5593 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5594 *** to be unable to reliably create shared libraries on AIX.
5595 *** Therefore, libtool is disabling shared libraries support.  If you
5596 *** really care for shared libraries, you may want to modify your PATH
5597 *** so that a non-GNU linker is found, and then restart.
5598
5599 EOF
5600     ;;
5601
5602   amigaos*)
5603     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)'
5604     hardcode_libdir_flag_spec='-L$libdir'
5605     hardcode_minus_L=yes
5606
5607     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5608     # that the semantics of dynamic libraries on AmigaOS, at least up
5609     # to version 4, is to share data among multiple programs linked
5610     # with the same dynamic library.  Since this doesn't match the
5611     # behavior of shared libraries on other platforms, we can use
5612     # them.
5613     ld_shlibs=no
5614     ;;
5615
5616   beos*)
5617     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5618       allow_undefined_flag=unsupported
5619       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5620       # support --undefined.  This deserves some investigation.  FIXME
5621       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5622     else
5623       ld_shlibs=no
5624     fi
5625     ;;
5626
5627   cygwin* | mingw* | pw32*)
5628     # hardcode_libdir_flag_spec is actually meaningless, as there is
5629     # no search path for DLLs.
5630     hardcode_libdir_flag_spec='-L$libdir'
5631     allow_undefined_flag=unsupported
5632     always_export_symbols=yes
5633
5634     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5635       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5636       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5637       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5638       else $CC -o impgen impgen.c ; fi)~
5639       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5640
5641     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5642
5643     # cygwin and mingw dlls have different entry points and sets of symbols
5644     # to exclude.
5645     # FIXME: what about values for MSVC?
5646     dll_entry=__cygwin_dll_entry@12
5647     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5648     case $host_os in
5649     mingw*)
5650       # mingw values
5651       dll_entry=_DllMainCRTStartup@12
5652       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5653       ;;
5654     esac
5655
5656     # mingw and cygwin differ, and it's simplest to just exclude the union
5657     # of the two symbol sets.
5658     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5659
5660     # recent cygwin and mingw systems supply a stub DllMain which the user
5661     # can override, but on older systems we have to supply one (in ltdll.c)
5662     if test "x$lt_cv_need_dllmain" = "xyes"; then
5663       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5664       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~
5665         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5666     else
5667       ltdll_obj=
5668       ltdll_cmds=
5669     fi
5670
5671     # Extract the symbol export list from an `--export-all' def file,
5672     # then regenerate the def file from the symbol export list, so that
5673     # the compiled dll only exports the symbol export list.
5674     # Be careful not to strip the DATA tag left be newer dlltools.
5675     export_symbols_cmds="$ltdll_cmds"'
5676       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5677       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5678
5679     # If the export-symbols file already is a .def file (1st line
5680     # is EXPORTS), use it as is.
5681     # If DATA tags from a recent dlltool are present, honour them!
5682     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5683         cp $export_symbols $output_objdir/$soname-def;
5684       else
5685         echo EXPORTS > $output_objdir/$soname-def;
5686         _lt_hint=1;
5687         cat $export_symbols | while read symbol; do
5688          set dummy \$symbol;
5689          case \$# in
5690            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5691            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5692            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5693          esac;
5694          _lt_hint=`expr 1 + \$_lt_hint`;
5695         done;
5696       fi~
5697       '"$ltdll_cmds"'
5698       $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~
5699       $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~
5700       $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~
5701       $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~
5702       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5703     ;;
5704
5705   netbsd*)
5706     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5707       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5708       wlarc=
5709     else
5710       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5711       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5712     fi
5713     ;;
5714
5715   solaris* | sysv5*)
5716     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5717       ld_shlibs=no
5718       cat <<EOF 1>&2
5719
5720 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5721 *** create shared libraries on Solaris systems.  Therefore, libtool
5722 *** is disabling shared libraries support.  We urge you to upgrade GNU
5723 *** binutils to release 2.9.1 or newer.  Another option is to modify
5724 *** your PATH or compiler configuration so that the native linker is
5725 *** used, and then restart.
5726
5727 EOF
5728     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5729       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5730       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5731     else
5732       ld_shlibs=no
5733     fi
5734     ;;
5735
5736   sunos4*)
5737     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5738     wlarc=
5739     hardcode_direct=yes
5740     hardcode_shlibpath_var=no
5741     ;;
5742
5743   *)
5744     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5745       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5746       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5747     else
5748       ld_shlibs=no
5749     fi
5750     ;;
5751   esac
5752
5753   if test "$ld_shlibs" = yes; then
5754     runpath_var=LD_RUN_PATH
5755     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5756     export_dynamic_flag_spec='${wl}--export-dynamic'
5757     case $host_os in
5758     cygwin* | mingw* | pw32*)
5759       # dlltool doesn't understand --whole-archive et. al.
5760       whole_archive_flag_spec=
5761       ;;
5762     *)
5763       # ancient GNU ld didn't support --whole-archive et. al.
5764       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5765         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5766       else
5767         whole_archive_flag_spec=
5768       fi
5769       ;;
5770     esac
5771   fi
5772 else
5773   # PORTME fill in a description of your system's linker (not GNU ld)
5774   case $host_os in
5775   aix3*)
5776     allow_undefined_flag=unsupported
5777     always_export_symbols=yes
5778     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'
5779     # Note: this linker hardcodes the directories in LIBPATH if there
5780     # are no directories specified by -L.
5781     hardcode_minus_L=yes
5782     if test "$GCC" = yes && test -z "$link_static_flag"; then
5783       # Neither direct hardcoding nor static linking is supported with a
5784       # broken collect2.
5785       hardcode_direct=unsupported
5786     fi
5787     ;;
5788
5789   aix4* | aix5*)
5790     if test "$host_cpu" = ia64; then
5791       # On IA64, the linker does run time linking by default, so we don't
5792       # have to do anything special.
5793       aix_use_runtimelinking=no
5794       exp_sym_flag='-Bexport'
5795       no_entry_flag=""
5796     else
5797       aix_use_runtimelinking=no
5798
5799       # Test if we are trying to use run time linking or normal
5800       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5801       # need to do runtime linking.
5802       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5803         for ld_flag in $LDFLAGS; do
5804           case $ld_flag in
5805           *-brtl*)
5806             aix_use_runtimelinking=yes
5807             break
5808           ;;
5809           esac
5810         done
5811       esac
5812
5813       exp_sym_flag='-bexport'
5814       no_entry_flag='-bnoentry'
5815     fi
5816
5817     # When large executables or shared objects are built, AIX ld can
5818     # have problems creating the table of contents.  If linking a library
5819     # or program results in "error TOC overflow" add -mminimal-toc to
5820     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5821     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5822
5823     hardcode_direct=yes
5824     archive_cmds=''
5825     hardcode_libdir_separator=':'
5826     if test "$GCC" = yes; then
5827       case $host_os in aix4.[012]|aix4.[012].*)
5828         collect2name=`${CC} -print-prog-name=collect2`
5829         if test -f "$collect2name" && \
5830           strings "$collect2name" | grep resolve_lib_name >/dev/null
5831         then
5832           # We have reworked collect2
5833           hardcode_direct=yes
5834         else
5835           # We have old collect2
5836           hardcode_direct=unsupported
5837           # It fails to find uninstalled libraries when the uninstalled
5838           # path is not listed in the libpath.  Setting hardcode_minus_L
5839           # to unsupported forces relinking
5840           hardcode_minus_L=yes
5841           hardcode_libdir_flag_spec='-L$libdir'
5842           hardcode_libdir_separator=
5843         fi
5844       esac
5845
5846       shared_flag='-shared'
5847     else
5848       # not using gcc
5849       if test "$host_cpu" = ia64; then
5850         shared_flag='${wl}-G'
5851       else
5852         if test "$aix_use_runtimelinking" = yes; then
5853           shared_flag='${wl}-G'
5854         else
5855           shared_flag='${wl}-bM:SRE'
5856         fi
5857       fi
5858     fi
5859
5860     # It seems that -bexpall can do strange things, so it is better to
5861     # generate a list of symbols to export.
5862     always_export_symbols=yes
5863     if test "$aix_use_runtimelinking" = yes; then
5864       # Warning - without using the other runtime loading flags (-brtl),
5865       # -berok will link without error, but may produce a broken library.
5866       allow_undefined_flag='-berok'
5867       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5868       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"
5869     else
5870       if test "$host_cpu" = ia64; then
5871         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5872         allow_undefined_flag="-z nodefs"
5873         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"
5874       else
5875         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5876         # Warning - without using the other run time loading flags,
5877         # -berok will link without error, but may produce a broken library.
5878         allow_undefined_flag='${wl}-berok'
5879         # This is a bit strange, but is similar to how AIX traditionally builds
5880         # it's shared libraries.
5881         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'
5882       fi
5883     fi
5884     ;;
5885
5886   amigaos*)
5887     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)'
5888     hardcode_libdir_flag_spec='-L$libdir'
5889     hardcode_minus_L=yes
5890     # see comment about different semantics on the GNU ld section
5891     ld_shlibs=no
5892     ;;
5893
5894   cygwin* | mingw* | pw32*)
5895     # When not using gcc, we currently assume that we are using
5896     # Microsoft Visual C++.
5897     # hardcode_libdir_flag_spec is actually meaningless, as there is
5898     # no search path for DLLs.
5899     hardcode_libdir_flag_spec=' '
5900     allow_undefined_flag=unsupported
5901     # Tell ltmain to make .lib files, not .a files.
5902     libext=lib
5903     # FIXME: Setting linknames here is a bad hack.
5904     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5905     # The linker will automatically build a .lib file if we build a DLL.
5906     old_archive_from_new_cmds='true'
5907     # FIXME: Should let the user specify the lib program.
5908     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5909     fix_srcfile_path='`cygpath -w "$srcfile"`'
5910     ;;
5911
5912   darwin* | rhapsody*)
5913     case "$host_os" in
5914     rhapsody* | darwin1.[012])
5915       allow_undefined_flag='-undefined suppress'
5916       ;;
5917     *) # Darwin 1.3 on
5918       allow_undefined_flag='-flat_namespace -undefined suppress'
5919       ;;
5920     esac
5921     # FIXME: Relying on posixy $() will cause problems for
5922     #        cross-compilation, but unfortunately the echo tests do not
5923     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5924     #        `"' quotes if we put them in here... so don't!
5925     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
5926     # We need to add '_' to the symbols in $export_symbols first
5927     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5928     hardcode_direct=yes
5929     hardcode_shlibpath_var=no
5930     whole_archive_flag_spec='-all_load $convenience'
5931     ;;
5932
5933   freebsd1*)
5934     ld_shlibs=no
5935     ;;
5936
5937   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5938   # support.  Future versions do this automatically, but an explicit c++rt0.o
5939   # does not break anything, and helps significantly (at the cost of a little
5940   # extra space).
5941   freebsd2.2*)
5942     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5943     hardcode_libdir_flag_spec='-R$libdir'
5944     hardcode_direct=yes
5945     hardcode_shlibpath_var=no
5946     ;;
5947
5948   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5949   freebsd2*)
5950     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5951     hardcode_direct=yes
5952     hardcode_minus_L=yes
5953     hardcode_shlibpath_var=no
5954     ;;
5955
5956   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5957   freebsd*)
5958     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5959     hardcode_libdir_flag_spec='-R$libdir'
5960     hardcode_direct=yes
5961     hardcode_shlibpath_var=no
5962     ;;
5963
5964   hpux9* | hpux10* | hpux11*)
5965     case $host_os in
5966     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' ;;
5967     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5968     esac
5969     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5970     hardcode_libdir_separator=:
5971     hardcode_direct=yes
5972     hardcode_minus_L=yes # Not in the search PATH, but as the default
5973                          # location of the library.
5974     export_dynamic_flag_spec='${wl}-E'
5975     ;;
5976
5977   irix5* | irix6* | nonstopux*)
5978     if test "$GCC" = yes; then
5979       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'
5980       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5981     else
5982       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'
5983       hardcode_libdir_flag_spec='-rpath $libdir'
5984     fi
5985     hardcode_libdir_separator=:
5986     link_all_deplibs=yes
5987     ;;
5988
5989   netbsd*)
5990     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5991       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5992     else
5993       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5994     fi
5995     hardcode_libdir_flag_spec='-R$libdir'
5996     hardcode_direct=yes
5997     hardcode_shlibpath_var=no
5998     ;;
5999
6000   newsos6)
6001     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002     hardcode_direct=yes
6003     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6004     hardcode_libdir_separator=:
6005     hardcode_shlibpath_var=no
6006     ;;
6007
6008   openbsd*)
6009     hardcode_direct=yes
6010     hardcode_shlibpath_var=no
6011     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6012       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6013       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6014       export_dynamic_flag_spec='${wl}-E'
6015     else
6016       case "$host_os" in
6017       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6018         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6019         hardcode_libdir_flag_spec='-R$libdir'
6020         ;;
6021       *)
6022         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6023         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6024         ;;
6025       esac
6026     fi
6027     ;;
6028
6029   os2*)
6030     hardcode_libdir_flag_spec='-L$libdir'
6031     hardcode_minus_L=yes
6032     allow_undefined_flag=unsupported
6033     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'
6034     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6035     ;;
6036
6037   osf3*)
6038     if test "$GCC" = yes; then
6039       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6040       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'
6041     else
6042       allow_undefined_flag=' -expect_unresolved \*'
6043       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'
6044     fi
6045     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6046     hardcode_libdir_separator=:
6047     ;;
6048
6049   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6050     if test "$GCC" = yes; then
6051       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6052       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'
6053       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6054     else
6055       allow_undefined_flag=' -expect_unresolved \*'
6056       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'
6057       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6058       $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'
6059
6060       #Both c and cxx compiler support -rpath directly
6061       hardcode_libdir_flag_spec='-rpath $libdir'
6062     fi
6063     hardcode_libdir_separator=:
6064     ;;
6065
6066   sco3.2v5*)
6067     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068     hardcode_shlibpath_var=no
6069     runpath_var=LD_RUN_PATH
6070     hardcode_runpath_var=yes
6071     export_dynamic_flag_spec='${wl}-Bexport'
6072     ;;
6073
6074   solaris*)
6075     # gcc --version < 3.0 without binutils cannot create self contained
6076     # shared libraries reliably, requiring libgcc.a to resolve some of
6077     # the object symbols generated in some cases.  Libraries that use
6078     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6079     # a copy of libgcc.a into every shared library to guarantee resolving
6080     # such symbols causes other problems:  According to Tim Van Holder
6081     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6082     # (to the application) exception stack for one thing.
6083     no_undefined_flag=' -z defs'
6084     if test "$GCC" = yes; then
6085       case `$CC --version 2>/dev/null` in
6086       [12].*)
6087         cat <<EOF 1>&2
6088
6089 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6090 *** create self contained shared libraries on Solaris systems, without
6091 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6092 *** -no-undefined support, which will at least allow you to build shared
6093 *** libraries.  However, you may find that when you link such libraries
6094 *** into an application without using GCC, you have to manually add
6095 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6096 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6097 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6098
6099 EOF
6100         no_undefined_flag=
6101         ;;
6102       esac
6103     fi
6104     # $CC -shared without GNU ld will not create a library from C++
6105     # object files and a static libstdc++, better avoid it by now
6106     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6107     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6108                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6109     hardcode_libdir_flag_spec='-R$libdir'
6110     hardcode_shlibpath_var=no
6111     case $host_os in
6112     solaris2.[0-5] | solaris2.[0-5].*) ;;
6113     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6114       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6115     esac
6116     link_all_deplibs=yes
6117     ;;
6118
6119   sunos4*)
6120     if test "x$host_vendor" = xsequent; then
6121       # Use $CC to link under sequent, because it throws in some extra .o
6122       # files that make .init and .fini sections work.
6123       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6124     else
6125       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6126     fi
6127     hardcode_libdir_flag_spec='-L$libdir'
6128     hardcode_direct=yes
6129     hardcode_minus_L=yes
6130     hardcode_shlibpath_var=no
6131     ;;
6132
6133   sysv4)
6134     case $host_vendor in
6135       sni)
6136         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6137         hardcode_direct=yes # is this really true???
6138         ;;
6139       siemens)
6140         ## LD is ld it makes a PLAMLIB
6141         ## CC just makes a GrossModule.
6142         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6143         reload_cmds='$CC -r -o $output$reload_objs'
6144         hardcode_direct=no
6145         ;;
6146       motorola)
6147         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6148         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6149         ;;
6150     esac
6151     runpath_var='LD_RUN_PATH'
6152     hardcode_shlibpath_var=no
6153     ;;
6154
6155   sysv4.3*)
6156     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6157     hardcode_shlibpath_var=no
6158     export_dynamic_flag_spec='-Bexport'
6159     ;;
6160
6161   sysv5*)
6162     no_undefined_flag=' -z text'
6163     # $CC -shared without GNU ld will not create a library from C++
6164     # object files and a static libstdc++, better avoid it by now
6165     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6166     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6167                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6168     hardcode_libdir_flag_spec=
6169     hardcode_shlibpath_var=no
6170     runpath_var='LD_RUN_PATH'
6171     ;;
6172
6173   uts4*)
6174     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6175     hardcode_libdir_flag_spec='-L$libdir'
6176     hardcode_shlibpath_var=no
6177     ;;
6178
6179   dgux*)
6180     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6181     hardcode_libdir_flag_spec='-L$libdir'
6182     hardcode_shlibpath_var=no
6183     ;;
6184
6185   sysv4*MP*)
6186     if test -d /usr/nec; then
6187       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6188       hardcode_shlibpath_var=no
6189       runpath_var=LD_RUN_PATH
6190       hardcode_runpath_var=yes
6191       ld_shlibs=yes
6192     fi
6193     ;;
6194
6195   sysv4.2uw2*)
6196     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6197     hardcode_direct=yes
6198     hardcode_minus_L=no
6199     hardcode_shlibpath_var=no
6200     hardcode_runpath_var=yes
6201     runpath_var=LD_RUN_PATH
6202     ;;
6203
6204   sysv5uw7* | unixware7*)
6205     no_undefined_flag='${wl}-z ${wl}text'
6206     if test "$GCC" = yes; then
6207       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6208     else
6209       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6210     fi
6211     runpath_var='LD_RUN_PATH'
6212     hardcode_shlibpath_var=no
6213     ;;
6214
6215   *)
6216     ld_shlibs=no
6217     ;;
6218   esac
6219 fi
6220 echo "$ac_t""$ld_shlibs" 1>&6
6221 test "$ld_shlibs" = no && can_build_shared=no
6222
6223 # Check hardcoding attributes.
6224 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6225 echo "configure:6226: checking how to hardcode library paths into programs" >&5
6226 hardcode_action=
6227 if test -n "$hardcode_libdir_flag_spec" || \
6228    test -n "$runpath_var"; then
6229
6230   # We can hardcode non-existant directories.
6231   if test "$hardcode_direct" != no &&
6232      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6233      # have to relink, otherwise we might link with an installed library
6234      # when we should be linking with a yet-to-be-installed one
6235      ## test "$hardcode_shlibpath_var" != no &&
6236      test "$hardcode_minus_L" != no; then
6237     # Linking always hardcodes the temporary library directory.
6238     hardcode_action=relink
6239   else
6240     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6241     hardcode_action=immediate
6242   fi
6243 else
6244   # We cannot hardcode anything, or else we can only hardcode existing
6245   # directories.
6246   hardcode_action=unsupported
6247 fi
6248 echo "$ac_t""$hardcode_action" 1>&6
6249
6250 striplib=
6251 old_striplib=
6252 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6253 echo "configure:6254: checking whether stripping libraries is possible" >&5
6254 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6255   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6256   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6257   echo "$ac_t""yes" 1>&6
6258 else
6259   echo "$ac_t""no" 1>&6
6260 fi
6261
6262 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6263 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6264
6265 # PORTME Fill in your ld.so characteristics
6266 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6267 echo "configure:6268: checking dynamic linker characteristics" >&5
6268 library_names_spec=
6269 libname_spec='lib$name'
6270 soname_spec=
6271 postinstall_cmds=
6272 postuninstall_cmds=
6273 finish_cmds=
6274 finish_eval=
6275 shlibpath_var=
6276 shlibpath_overrides_runpath=unknown
6277 version_type=none
6278 dynamic_linker="$host_os ld.so"
6279 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6280 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6281
6282 case $host_os in
6283 aix3*)
6284   version_type=linux
6285   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6286   shlibpath_var=LIBPATH
6287
6288   # AIX has no versioning support, so we append a major version to the name.
6289   soname_spec='${libname}${release}.so$major'
6290   ;;
6291
6292 aix4* | aix5*)
6293   version_type=linux
6294   need_lib_prefix=no
6295   need_version=no
6296   hardcode_into_libs=yes
6297   if test "$host_cpu" = ia64; then
6298     # AIX 5 supports IA64
6299     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6300     shlibpath_var=LD_LIBRARY_PATH
6301   else
6302     # With GCC up to 2.95.x, collect2 would create an import file
6303     # for dependence libraries.  The import file would start with
6304     # the line `#! .'.  This would cause the generated library to
6305     # depend on `.', always an invalid library.  This was fixed in
6306     # development snapshots of GCC prior to 3.0.
6307     case $host_os in
6308       aix4 | aix4.[01] | aix4.[01].*)
6309         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6310              echo ' yes '
6311              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6312           :
6313         else
6314           can_build_shared=no
6315         fi
6316         ;;
6317     esac
6318     # AIX (on Power*) has no versioning support, so currently we can
6319     # not hardcode correct soname into executable. Probably we can
6320     # add versioning support to collect2, so additional links can
6321     # be useful in future.
6322     if test "$aix_use_runtimelinking" = yes; then
6323       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6324       # instead of lib<name>.a to let people know that these are not
6325       # typical AIX shared libraries.
6326       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6327     else
6328       # We preserve .a as extension for shared libraries through AIX4.2
6329       # and later when we are not doing run time linking.
6330       library_names_spec='${libname}${release}.a $libname.a'
6331       soname_spec='${libname}${release}.so$major'
6332     fi
6333     shlibpath_var=LIBPATH
6334   fi
6335   hardcode_into_libs=yes
6336   ;;
6337
6338 amigaos*)
6339   library_names_spec='$libname.ixlibrary $libname.a'
6340   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6341   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'
6342   ;;
6343
6344 beos*)
6345   library_names_spec='${libname}.so'
6346   dynamic_linker="$host_os ld.so"
6347   shlibpath_var=LIBRARY_PATH
6348   ;;
6349
6350 bsdi4*)
6351   version_type=linux
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6354   soname_spec='${libname}${release}.so$major'
6355   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6356   shlibpath_var=LD_LIBRARY_PATH
6357   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6358   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6359   export_dynamic_flag_spec=-rdynamic
6360   # the default ld.so.conf also contains /usr/contrib/lib and
6361   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6362   # libtool to hard-code these into programs
6363   ;;
6364
6365 cygwin* | mingw* | pw32*)
6366   version_type=windows
6367   need_version=no
6368   need_lib_prefix=no
6369   case $GCC,$host_os in
6370   yes,cygwin*)
6371     library_names_spec='$libname.dll.a'
6372     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6373     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6374       dldir=$destdir/`dirname \$dlpath`~
6375       test -d \$dldir || mkdir -p \$dldir~
6376       $install_prog .libs/$dlname \$dldir/$dlname'
6377     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6378       dlpath=$dir/\$dldll~
6379        $rm \$dlpath'
6380     ;;
6381   yes,mingw*)
6382     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6383     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6384     ;;
6385   yes,pw32*)
6386     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6387     ;;
6388   *)
6389     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6390     ;;
6391   esac
6392   dynamic_linker='Win32 ld.exe'
6393   # FIXME: first we should search . and the directory the executable is in
6394   shlibpath_var=PATH
6395   ;;
6396
6397 darwin* | rhapsody*)
6398   dynamic_linker="$host_os dyld"
6399   version_type=darwin
6400   need_lib_prefix=no
6401   need_version=no
6402   # FIXME: Relying on posixy $() will cause problems for
6403   #        cross-compilation, but unfortunately the echo tests do not
6404   #        yet detect zsh echo's removal of \ escapes.
6405   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)'
6406   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6407   shlibpath_overrides_runpath=yes
6408   shlibpath_var=DYLD_LIBRARY_PATH
6409   ;;
6410
6411 freebsd1*)
6412   dynamic_linker=no
6413   ;;
6414
6415 freebsd*)
6416   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6417   version_type=freebsd-$objformat
6418   case $version_type in
6419     freebsd-elf*)
6420       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6421       need_version=no
6422       need_lib_prefix=no
6423       ;;
6424     freebsd-*)
6425       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6426       need_version=yes
6427       ;;
6428   esac
6429   shlibpath_var=LD_LIBRARY_PATH
6430   case $host_os in
6431   freebsd2*)
6432     shlibpath_overrides_runpath=yes
6433     ;;
6434   *)
6435     shlibpath_overrides_runpath=no
6436     hardcode_into_libs=yes
6437     ;;
6438   esac
6439   ;;
6440
6441 gnu*)
6442   version_type=linux
6443   need_lib_prefix=no
6444   need_version=no
6445   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6446   soname_spec='${libname}${release}.so$major'
6447   shlibpath_var=LD_LIBRARY_PATH
6448   hardcode_into_libs=yes
6449   ;;
6450
6451 hpux9* | hpux10* | hpux11*)
6452   # Give a soname corresponding to the major version so that dld.sl refuses to
6453   # link against other versions.
6454   dynamic_linker="$host_os dld.sl"
6455   version_type=sunos
6456   need_lib_prefix=no
6457   need_version=no
6458   shlibpath_var=SHLIB_PATH
6459   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6460   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6461   soname_spec='${libname}${release}.sl$major'
6462   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6463   postinstall_cmds='chmod 555 $lib'
6464   ;;
6465
6466 irix5* | irix6* | nonstopux*)
6467   case $host_os in
6468     nonstopux*) version_type=nonstopux ;;
6469     *)          version_type=irix ;;
6470   esac
6471   need_lib_prefix=no
6472   need_version=no
6473   soname_spec='${libname}${release}.so$major'
6474   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6475   case $host_os in
6476   irix5* | nonstopux*)
6477     libsuff= shlibsuff=
6478     ;;
6479   *)
6480     case $LD in # libtool.m4 will add one of these switches to LD
6481     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6482     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6483     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6484     *) libsuff= shlibsuff= libmagic=never-match;;
6485     esac
6486     ;;
6487   esac
6488   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6489   shlibpath_overrides_runpath=no
6490   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6491   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6492   ;;
6493
6494 # No shared lib support for Linux oldld, aout, or coff.
6495 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6496   dynamic_linker=no
6497   ;;
6498
6499 # This must be Linux ELF.
6500 linux-gnu*)
6501   version_type=linux
6502   need_lib_prefix=no
6503   need_version=no
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6505   soname_spec='${libname}${release}.so$major'
6506   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6507   shlibpath_var=LD_LIBRARY_PATH
6508   shlibpath_overrides_runpath=no
6509   # This implies no fast_install, which is unacceptable.
6510   # Some rework will be needed to allow for fast_install
6511   # before this can be enabled.
6512   hardcode_into_libs=yes
6513
6514   # We used to test for /lib/ld.so.1 and disable shared libraries on
6515   # powerpc, because MkLinux only supported shared libraries with the
6516   # GNU dynamic linker.  Since this was broken with cross compilers,
6517   # most powerpc-linux boxes support dynamic linking these days and
6518   # people can always --disable-shared, the test was removed, and we
6519   # assume the GNU/Linux dynamic linker is in use.
6520   dynamic_linker='GNU/Linux ld.so'
6521   ;;
6522
6523 netbsd*)
6524   version_type=sunos
6525   need_lib_prefix=no
6526   need_version=no
6527   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6528     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6529     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6530     dynamic_linker='NetBSD (a.out) ld.so'
6531   else
6532     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6533     soname_spec='${libname}${release}.so$major'
6534     dynamic_linker='NetBSD ld.elf_so'
6535   fi
6536   shlibpath_var=LD_LIBRARY_PATH
6537   shlibpath_overrides_runpath=yes
6538   hardcode_into_libs=yes
6539   ;;
6540
6541 newsos6)
6542   version_type=linux
6543   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6544   shlibpath_var=LD_LIBRARY_PATH
6545   shlibpath_overrides_runpath=yes
6546   ;;
6547
6548 openbsd*)
6549   version_type=sunos
6550   need_lib_prefix=no
6551   need_version=no
6552   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6553     case "$host_os" in
6554     openbsd2.[89] | openbsd2.[89].*)
6555       shlibpath_overrides_runpath=no
6556       ;;
6557     *)
6558       shlibpath_overrides_runpath=yes
6559       ;;
6560     esac
6561   else
6562     shlibpath_overrides_runpath=yes
6563   fi
6564   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6565   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6566   shlibpath_var=LD_LIBRARY_PATH
6567   ;;
6568
6569 os2*)
6570   libname_spec='$name'
6571   need_lib_prefix=no
6572   library_names_spec='$libname.dll $libname.a'
6573   dynamic_linker='OS/2 ld.exe'
6574   shlibpath_var=LIBPATH
6575   ;;
6576
6577 osf3* | osf4* | osf5*)
6578   version_type=osf
6579   need_version=no
6580   soname_spec='${libname}${release}.so$major'
6581   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6582   shlibpath_var=LD_LIBRARY_PATH
6583   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6584   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6585   hardcode_into_libs=yes
6586   ;;
6587
6588 sco3.2v5*)
6589   version_type=osf
6590   soname_spec='${libname}${release}.so$major'
6591   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6592   shlibpath_var=LD_LIBRARY_PATH
6593   ;;
6594
6595 solaris*)
6596   version_type=linux
6597   need_lib_prefix=no
6598   need_version=no
6599   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6600   soname_spec='${libname}${release}.so$major'
6601   shlibpath_var=LD_LIBRARY_PATH
6602   shlibpath_overrides_runpath=yes
6603   hardcode_into_libs=yes
6604   # ldd complains unless libraries are executable
6605   postinstall_cmds='chmod +x $lib'
6606   ;;
6607
6608 sunos4*)
6609   version_type=sunos
6610   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6611   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6612   shlibpath_var=LD_LIBRARY_PATH
6613   shlibpath_overrides_runpath=yes
6614   if test "$with_gnu_ld" = yes; then
6615     need_lib_prefix=no
6616   fi
6617   need_version=yes
6618   ;;
6619
6620 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6621   version_type=linux
6622   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6623   soname_spec='${libname}${release}.so$major'
6624   shlibpath_var=LD_LIBRARY_PATH
6625   case $host_vendor in
6626     sni)
6627       shlibpath_overrides_runpath=no
6628       need_lib_prefix=no
6629       export_dynamic_flag_spec='${wl}-Blargedynsym'
6630       runpath_var=LD_RUN_PATH
6631       ;;
6632     siemens)
6633       need_lib_prefix=no
6634       ;;
6635     motorola)
6636       need_lib_prefix=no
6637       need_version=no
6638       shlibpath_overrides_runpath=no
6639       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6640       ;;
6641   esac
6642   ;;
6643
6644 uts4*)
6645   version_type=linux
6646   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6647   soname_spec='${libname}${release}.so$major'
6648   shlibpath_var=LD_LIBRARY_PATH
6649   ;;
6650
6651 dgux*)
6652   version_type=linux
6653   need_lib_prefix=no
6654   need_version=no
6655   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6656   soname_spec='${libname}${release}.so$major'
6657   shlibpath_var=LD_LIBRARY_PATH
6658   ;;
6659
6660 sysv4*MP*)
6661   if test -d /usr/nec ;then
6662     version_type=linux
6663     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6664     soname_spec='$libname.so.$major'
6665     shlibpath_var=LD_LIBRARY_PATH
6666   fi
6667   ;;
6668
6669 *)
6670   dynamic_linker=no
6671   ;;
6672 esac
6673 echo "$ac_t""$dynamic_linker" 1>&6
6674 test "$dynamic_linker" = no && can_build_shared=no
6675
6676 # Report the final consequences.
6677 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6678 echo "configure:6679: checking if libtool supports shared libraries" >&5
6679 echo "$ac_t""$can_build_shared" 1>&6
6680
6681 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6682 echo "configure:6683: checking whether to build shared libraries" >&5
6683 test "$can_build_shared" = "no" && enable_shared=no
6684
6685 # On AIX, shared libraries and static libraries use the same namespace, and
6686 # are all built from PIC.
6687 case "$host_os" in
6688 aix3*)
6689   test "$enable_shared" = yes && enable_static=no
6690   if test -n "$RANLIB"; then
6691     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6692     postinstall_cmds='$RANLIB $lib'
6693   fi
6694   ;;
6695
6696 aix4*)
6697   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6698     test "$enable_shared" = yes && enable_static=no
6699   fi
6700   ;;
6701 esac
6702 echo "$ac_t""$enable_shared" 1>&6
6703
6704 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6705 echo "configure:6706: checking whether to build static libraries" >&5
6706 # Make sure either enable_shared or enable_static is yes.
6707 test "$enable_shared" = yes || enable_static=yes
6708 echo "$ac_t""$enable_static" 1>&6
6709
6710 if test "$hardcode_action" = relink; then
6711   # Fast installation is not supported
6712   enable_fast_install=no
6713 elif test "$shlibpath_overrides_runpath" = yes ||
6714      test "$enable_shared" = no; then
6715   # Fast installation is not necessary
6716   enable_fast_install=needless
6717 fi
6718
6719 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6720 if test "$GCC" = yes; then
6721   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6722 fi
6723
6724 if test "x$enable_dlopen" != xyes; then
6725   enable_dlopen=unknown
6726   enable_dlopen_self=unknown
6727   enable_dlopen_self_static=unknown
6728 else
6729   lt_cv_dlopen=no
6730   lt_cv_dlopen_libs=
6731
6732   case $host_os in
6733   beos*)
6734     lt_cv_dlopen="load_add_on"
6735     lt_cv_dlopen_libs=
6736     lt_cv_dlopen_self=yes
6737     ;;
6738
6739   cygwin* | mingw* | pw32*)
6740     lt_cv_dlopen="LoadLibrary"
6741     lt_cv_dlopen_libs=
6742    ;;
6743
6744   *)
6745     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6746 echo "configure:6747: checking for shl_load" >&5
6747 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6748   echo $ac_n "(cached) $ac_c" 1>&6
6749 else
6750   cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* System header to define __stub macros and hopefully few prototypes,
6754     which can conflict with char shl_load(); below.  */
6755 #include <assert.h>
6756 /* Override any gcc2 internal prototype to avoid an error.  */
6757 /* We use char because int might match the return type of a gcc2
6758     builtin and then its argument prototype would still apply.  */
6759 char shl_load();
6760 char (*f)();
6761
6762 int main() {
6763
6764 /* The GNU C library defines this for functions which it implements
6765     to always fail with ENOSYS.  Some functions are actually named
6766     something starting with __ and the normal name is an alias.  */
6767 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6768 choke me
6769 #else
6770 f = shl_load;
6771 #endif
6772
6773 ; return 0; }
6774 EOF
6775 if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6776   rm -rf conftest*
6777   eval "ac_cv_func_shl_load=yes"
6778 else
6779   echo "configure: failed program was:" >&5
6780   cat conftest.$ac_ext >&5
6781   rm -rf conftest*
6782   eval "ac_cv_func_shl_load=no"
6783 fi
6784 rm -f conftest*
6785 fi
6786
6787 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789   lt_cv_dlopen="shl_load"
6790 else
6791   echo "$ac_t""no" 1>&6
6792 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6793 echo "configure:6794: checking for shl_load in -ldld" >&5
6794 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6796   echo $ac_n "(cached) $ac_c" 1>&6
6797 else
6798   ac_save_LIBS="$LIBS"
6799 LIBS="-ldld  $LIBS"
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char shl_load();
6807
6808 int main() {
6809 shl_load()
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=no"
6820 fi
6821 rm -f conftest*
6822 LIBS="$ac_save_LIBS"
6823
6824 fi
6825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6826   echo "$ac_t""yes" 1>&6
6827   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6828 else
6829   echo "$ac_t""no" 1>&6
6830 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6831 echo "configure:6832: checking for dlopen" >&5
6832 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6833   echo $ac_n "(cached) $ac_c" 1>&6
6834 else
6835   cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* System header to define __stub macros and hopefully few prototypes,
6839     which can conflict with char dlopen(); below.  */
6840 #include <assert.h>
6841 /* Override any gcc2 internal prototype to avoid an error.  */
6842 /* We use char because int might match the return type of a gcc2
6843     builtin and then its argument prototype would still apply.  */
6844 char dlopen();
6845 char (*f)();
6846
6847 int main() {
6848
6849 /* The GNU C library defines this for functions which it implements
6850     to always fail with ENOSYS.  Some functions are actually named
6851     something starting with __ and the normal name is an alias.  */
6852 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6853 choke me
6854 #else
6855 f = dlopen;
6856 #endif
6857
6858 ; return 0; }
6859 EOF
6860 if { (eval echo configure:6861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6861   rm -rf conftest*
6862   eval "ac_cv_func_dlopen=yes"
6863 else
6864   echo "configure: failed program was:" >&5
6865   cat conftest.$ac_ext >&5
6866   rm -rf conftest*
6867   eval "ac_cv_func_dlopen=no"
6868 fi
6869 rm -f conftest*
6870 fi
6871
6872 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6873   echo "$ac_t""yes" 1>&6
6874   lt_cv_dlopen="dlopen"
6875 else
6876   echo "$ac_t""no" 1>&6
6877 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6878 echo "configure:6879: checking for dlopen in -ldl" >&5
6879 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6881   echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883   ac_save_LIBS="$LIBS"
6884 LIBS="-ldl  $LIBS"
6885 cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 /* We use char because int might match the return type of a gcc2
6890     builtin and then its argument prototype would still apply.  */
6891 char dlopen();
6892
6893 int main() {
6894 dlopen()
6895 ; return 0; }
6896 EOF
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6898   rm -rf conftest*
6899   eval "ac_cv_lib_$ac_lib_var=yes"
6900 else
6901   echo "configure: failed program was:" >&5
6902   cat conftest.$ac_ext >&5
6903   rm -rf conftest*
6904   eval "ac_cv_lib_$ac_lib_var=no"
6905 fi
6906 rm -f conftest*
6907 LIBS="$ac_save_LIBS"
6908
6909 fi
6910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6911   echo "$ac_t""yes" 1>&6
6912   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6913 else
6914   echo "$ac_t""no" 1>&6
6915 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6916 echo "configure:6917: checking for dlopen in -lsvld" >&5
6917 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6919   echo $ac_n "(cached) $ac_c" 1>&6
6920 else
6921   ac_save_LIBS="$LIBS"
6922 LIBS="-lsvld  $LIBS"
6923 cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926 /* Override any gcc2 internal prototype to avoid an error.  */
6927 /* We use char because int might match the return type of a gcc2
6928     builtin and then its argument prototype would still apply.  */
6929 char dlopen();
6930
6931 int main() {
6932 dlopen()
6933 ; return 0; }
6934 EOF
6935 if { (eval echo configure:6936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6936   rm -rf conftest*
6937   eval "ac_cv_lib_$ac_lib_var=yes"
6938 else
6939   echo "configure: failed program was:" >&5
6940   cat conftest.$ac_ext >&5
6941   rm -rf conftest*
6942   eval "ac_cv_lib_$ac_lib_var=no"
6943 fi
6944 rm -f conftest*
6945 LIBS="$ac_save_LIBS"
6946
6947 fi
6948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6949   echo "$ac_t""yes" 1>&6
6950   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6951 else
6952   echo "$ac_t""no" 1>&6
6953 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6954 echo "configure:6955: checking for dld_link in -ldld" >&5
6955 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6957   echo $ac_n "(cached) $ac_c" 1>&6
6958 else
6959   ac_save_LIBS="$LIBS"
6960 LIBS="-ldld  $LIBS"
6961 cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964 /* Override any gcc2 internal prototype to avoid an error.  */
6965 /* We use char because int might match the return type of a gcc2
6966     builtin and then its argument prototype would still apply.  */
6967 char dld_link();
6968
6969 int main() {
6970 dld_link()
6971 ; return 0; }
6972 EOF
6973 if { (eval echo configure:6974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6974   rm -rf conftest*
6975   eval "ac_cv_lib_$ac_lib_var=yes"
6976 else
6977   echo "configure: failed program was:" >&5
6978   cat conftest.$ac_ext >&5
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=no"
6981 fi
6982 rm -f conftest*
6983 LIBS="$ac_save_LIBS"
6984
6985 fi
6986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6987   echo "$ac_t""yes" 1>&6
6988   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6989 else
6990   echo "$ac_t""no" 1>&6
6991 fi
6992
6993               
6994 fi
6995
6996             
6997 fi
6998
6999           
7000 fi
7001
7002         
7003 fi
7004
7005       
7006 fi
7007
7008     ;;
7009   esac
7010
7011   if test "x$lt_cv_dlopen" != xno; then
7012     enable_dlopen=yes
7013   else
7014     enable_dlopen=no
7015   fi
7016
7017   case $lt_cv_dlopen in
7018   dlopen)
7019     save_CPPFLAGS="$CPPFLAGS"
7020         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7021
7022     save_LDFLAGS="$LDFLAGS"
7023     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7024
7025     save_LIBS="$LIBS"
7026     LIBS="$lt_cv_dlopen_libs $LIBS"
7027
7028     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7029 echo "configure:7030: checking whether a program can dlopen itself" >&5
7030 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033           if test "$cross_compiling" = yes; then :
7034   lt_cv_dlopen_self=cross
7035 else
7036     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7037   lt_status=$lt_dlunknown
7038   cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041
7042 #if HAVE_DLFCN_H
7043 #include <dlfcn.h>
7044 #endif
7045
7046 #include <stdio.h>
7047
7048 #ifdef RTLD_GLOBAL
7049 #  define LT_DLGLOBAL           RTLD_GLOBAL
7050 #else
7051 #  ifdef DL_GLOBAL
7052 #    define LT_DLGLOBAL         DL_GLOBAL
7053 #  else
7054 #    define LT_DLGLOBAL         0
7055 #  endif
7056 #endif
7057
7058 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7059    find out it does not work in some platform. */
7060 #ifndef LT_DLLAZY_OR_NOW
7061 #  ifdef RTLD_LAZY
7062 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7063 #  else
7064 #    ifdef DL_LAZY
7065 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7066 #    else
7067 #      ifdef RTLD_NOW
7068 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7069 #      else
7070 #        ifdef DL_NOW
7071 #          define LT_DLLAZY_OR_NOW      DL_NOW
7072 #        else
7073 #          define LT_DLLAZY_OR_NOW      0
7074 #        endif
7075 #      endif
7076 #    endif
7077 #  endif
7078 #endif
7079
7080 #ifdef __cplusplus
7081 extern "C" void exit (int);
7082 #endif
7083
7084 void fnord() { int i=42;}
7085 int main ()
7086 {
7087   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7088   int status = $lt_dlunknown;
7089
7090   if (self)
7091     {
7092       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7093       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7094       /* dlclose (self); */
7095     }
7096
7097     exit (status);
7098 }
7099 EOF
7100   if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7101     (./conftest; exit; ) 2>/dev/null
7102     lt_status=$?
7103     case x$lt_status in
7104       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7105       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7106       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7107     esac
7108   else :
7109     # compilation failed
7110     lt_cv_dlopen_self=no
7111   fi
7112 fi
7113 rm -fr conftest*
7114
7115     
7116 fi
7117
7118 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7119
7120     if test "x$lt_cv_dlopen_self" = xyes; then
7121       LDFLAGS="$LDFLAGS $link_static_flag"
7122       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7123 echo "configure:7124: checking whether a statically linked program can dlopen itself" >&5
7124 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7125   echo $ac_n "(cached) $ac_c" 1>&6
7126 else
7127           if test "$cross_compiling" = yes; then :
7128   lt_cv_dlopen_self_static=cross
7129 else
7130     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7131   lt_status=$lt_dlunknown
7132   cat > conftest.$ac_ext <<EOF
7133 #line 7134 "configure"
7134 #include "confdefs.h"
7135
7136 #if HAVE_DLFCN_H
7137 #include <dlfcn.h>
7138 #endif
7139
7140 #include <stdio.h>
7141
7142 #ifdef RTLD_GLOBAL
7143 #  define LT_DLGLOBAL           RTLD_GLOBAL
7144 #else
7145 #  ifdef DL_GLOBAL
7146 #    define LT_DLGLOBAL         DL_GLOBAL
7147 #  else
7148 #    define LT_DLGLOBAL         0
7149 #  endif
7150 #endif
7151
7152 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7153    find out it does not work in some platform. */
7154 #ifndef LT_DLLAZY_OR_NOW
7155 #  ifdef RTLD_LAZY
7156 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7157 #  else
7158 #    ifdef DL_LAZY
7159 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7160 #    else
7161 #      ifdef RTLD_NOW
7162 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7163 #      else
7164 #        ifdef DL_NOW
7165 #          define LT_DLLAZY_OR_NOW      DL_NOW
7166 #        else
7167 #          define LT_DLLAZY_OR_NOW      0
7168 #        endif
7169 #      endif
7170 #    endif
7171 #  endif
7172 #endif
7173
7174 #ifdef __cplusplus
7175 extern "C" void exit (int);
7176 #endif
7177
7178 void fnord() { int i=42;}
7179 int main ()
7180 {
7181   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7182   int status = $lt_dlunknown;
7183
7184   if (self)
7185     {
7186       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7187       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7188       /* dlclose (self); */
7189     }
7190
7191     exit (status);
7192 }
7193 EOF
7194   if { (eval echo configure:7195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7195     (./conftest; exit; ) 2>/dev/null
7196     lt_status=$?
7197     case x$lt_status in
7198       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7199       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7200       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7201     esac
7202   else :
7203     # compilation failed
7204     lt_cv_dlopen_self_static=no
7205   fi
7206 fi
7207 rm -fr conftest*
7208
7209       
7210 fi
7211
7212 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7213     fi
7214
7215     CPPFLAGS="$save_CPPFLAGS"
7216     LDFLAGS="$save_LDFLAGS"
7217     LIBS="$save_LIBS"
7218     ;;
7219   esac
7220
7221   case $lt_cv_dlopen_self in
7222   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7223   *) enable_dlopen_self=unknown ;;
7224   esac
7225
7226   case $lt_cv_dlopen_self_static in
7227   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7228   *) enable_dlopen_self_static=unknown ;;
7229   esac
7230 fi
7231
7232
7233 if test "$enable_shared" = yes && test "$GCC" = yes; then
7234   case $archive_cmds in
7235   *'~'*)
7236     # FIXME: we may have to deal with multi-command sequences.
7237     ;;
7238   '$CC '*)
7239     # Test whether the compiler implicitly links with -lc since on some
7240     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7241     # to ld, don't add -lc before -lgcc.
7242     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7243 echo "configure:7244: checking whether -lc should be explicitly linked in" >&5
7244     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7245   echo $ac_n "(cached) $ac_c" 1>&6
7246 else
7247   $rm conftest*
7248     echo 'static int dummy;' > conftest.$ac_ext
7249
7250     if { (eval echo configure:7251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7251       soname=conftest
7252       lib=conftest
7253       libobjs=conftest.$ac_objext
7254       deplibs=
7255       wl=$lt_cv_prog_cc_wl
7256       compiler_flags=-v
7257       linker_flags=-v
7258       verstring=
7259       output_objdir=.
7260       libname=conftest
7261       save_allow_undefined_flag=$allow_undefined_flag
7262       allow_undefined_flag=
7263       if { (eval echo configure:7264: \"$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; }
7264       then
7265         lt_cv_archive_cmds_need_lc=no
7266       else
7267         lt_cv_archive_cmds_need_lc=yes
7268       fi
7269       allow_undefined_flag=$save_allow_undefined_flag
7270     else
7271       cat conftest.err 1>&5
7272     fi
7273 fi
7274
7275     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7276     ;;
7277   esac
7278 fi
7279 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7280
7281 # The second clause should only fire when bootstrapping the
7282 # libtool distribution, otherwise you forgot to ship ltmain.sh
7283 # with your package, and you will get complaints that there are
7284 # no rules to generate ltmain.sh.
7285 if test -f "$ltmain"; then
7286   :
7287 else
7288   # If there is no Makefile yet, we rely on a make rule to execute
7289   # `config.status --recheck' to rerun these tests and create the
7290   # libtool script then.
7291   test -f Makefile && make "$ltmain"
7292 fi
7293
7294 if test -f "$ltmain"; then
7295   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7296   $rm -f "${ofile}T"
7297
7298   echo creating $ofile
7299
7300   # Now quote all the things that may contain metacharacters while being
7301   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7302   # variables and quote the copies for generation of the libtool script.
7303   for var in echo old_CC old_CFLAGS SED \
7304     AR AR_FLAGS CC LD LN_S NM SHELL \
7305     reload_flag reload_cmds wl \
7306     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7307     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7308     library_names_spec soname_spec \
7309     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7310     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7311     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7312     old_striplib striplib file_magic_cmd export_symbols_cmds \
7313     deplibs_check_method allow_undefined_flag no_undefined_flag \
7314     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7315     global_symbol_to_c_name_address \
7316     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7317     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7318     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7319
7320     case $var in
7321     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7322     old_postinstall_cmds | old_postuninstall_cmds | \
7323     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7324     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7325     postinstall_cmds | postuninstall_cmds | \
7326     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7327       # Double-quote double-evaled strings.
7328       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7329       ;;
7330     *)
7331       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7332       ;;
7333     esac
7334   done
7335
7336   cat <<__EOF__ > "${ofile}T"
7337 #! $SHELL
7338
7339 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7340 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7341 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7342 #
7343 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7344 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7345 #
7346 # This program is free software; you can redistribute it and/or modify
7347 # it under the terms of the GNU General Public License as published by
7348 # the Free Software Foundation; either version 2 of the License, or
7349 # (at your option) any later version.
7350 #
7351 # This program is distributed in the hope that it will be useful, but
7352 # WITHOUT ANY WARRANTY; without even the implied warranty of
7353 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7354 # General Public License for more details.
7355 #
7356 # You should have received a copy of the GNU General Public License
7357 # along with this program; if not, write to the Free Software
7358 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7359 #
7360 # As a special exception to the GNU General Public License, if you
7361 # distribute this file as part of a program that contains a
7362 # configuration script generated by Autoconf, you may include it under
7363 # the same distribution terms that you use for the rest of that program.
7364
7365 # A sed that does not truncate output.
7366 SED=$lt_SED
7367
7368 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7369 Xsed="${SED} -e s/^X//"
7370
7371 # The HP-UX ksh and POSIX shell print the target directory to stdout
7372 # if CDPATH is set.
7373 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7374
7375 # ### BEGIN LIBTOOL CONFIG
7376
7377 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7378
7379 # Shell to use when invoking shell scripts.
7380 SHELL=$lt_SHELL
7381
7382 # Whether or not to build shared libraries.
7383 build_libtool_libs=$enable_shared
7384
7385 # Whether or not to build static libraries.
7386 build_old_libs=$enable_static
7387
7388 # Whether or not to add -lc for building shared libraries.
7389 build_libtool_need_lc=$need_lc
7390
7391 # Whether or not to optimize for fast installation.
7392 fast_install=$enable_fast_install
7393
7394 # The host system.
7395 host_alias=$host_alias
7396 host=$host
7397
7398 # An echo program that does not interpret backslashes.
7399 echo=$lt_echo
7400
7401 # The archiver.
7402 AR=$lt_AR
7403 AR_FLAGS=$lt_AR_FLAGS
7404
7405 # The default C compiler.
7406 CC=$lt_CC
7407
7408 # Is the compiler the GNU C compiler?
7409 with_gcc=$GCC
7410
7411 # The linker used to build libraries.
7412 LD=$lt_LD
7413
7414 # Whether we need hard or soft links.
7415 LN_S=$lt_LN_S
7416
7417 # A BSD-compatible nm program.
7418 NM=$lt_NM
7419
7420 # A symbol stripping program
7421 STRIP=$STRIP
7422
7423 # Used to examine libraries when file_magic_cmd begins "file"
7424 MAGIC_CMD=$MAGIC_CMD
7425
7426 # Used on cygwin: DLL creation program.
7427 DLLTOOL="$DLLTOOL"
7428
7429 # Used on cygwin: object dumper.
7430 OBJDUMP="$OBJDUMP"
7431
7432 # Used on cygwin: assembler.
7433 AS="$AS"
7434
7435 # The name of the directory that contains temporary libtool files.
7436 objdir=$objdir
7437
7438 # How to create reloadable object files.
7439 reload_flag=$lt_reload_flag
7440 reload_cmds=$lt_reload_cmds
7441
7442 # How to pass a linker flag through the compiler.
7443 wl=$lt_wl
7444
7445 # Object file suffix (normally "o").
7446 objext="$ac_objext"
7447
7448 # Old archive suffix (normally "a").
7449 libext="$libext"
7450
7451 # Executable file suffix (normally "").
7452 exeext="$exeext"
7453
7454 # Additional compiler flags for building library objects.
7455 pic_flag=$lt_pic_flag
7456 pic_mode=$pic_mode
7457
7458 # Does compiler simultaneously support -c and -o options?
7459 compiler_c_o=$lt_compiler_c_o
7460
7461 # Can we write directly to a .lo ?
7462 compiler_o_lo=$lt_compiler_o_lo
7463
7464 # Must we lock files when doing compilation ?
7465 need_locks=$lt_need_locks
7466
7467 # Do we need the lib prefix for modules?
7468 need_lib_prefix=$need_lib_prefix
7469
7470 # Do we need a version for libraries?
7471 need_version=$need_version
7472
7473 # Whether dlopen is supported.
7474 dlopen_support=$enable_dlopen
7475
7476 # Whether dlopen of programs is supported.
7477 dlopen_self=$enable_dlopen_self
7478
7479 # Whether dlopen of statically linked programs is supported.
7480 dlopen_self_static=$enable_dlopen_self_static
7481
7482 # Compiler flag to prevent dynamic linking.
7483 link_static_flag=$lt_link_static_flag
7484
7485 # Compiler flag to turn off builtin functions.
7486 no_builtin_flag=$lt_no_builtin_flag
7487
7488 # Compiler flag to allow reflexive dlopens.
7489 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7490
7491 # Compiler flag to generate shared objects directly from archives.
7492 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7493
7494 # Compiler flag to generate thread-safe objects.
7495 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7496
7497 # Library versioning type.
7498 version_type=$version_type
7499
7500 # Format of library name prefix.
7501 libname_spec=$lt_libname_spec
7502
7503 # List of archive names.  First name is the real one, the rest are links.
7504 # The last name is the one that the linker finds with -lNAME.
7505 library_names_spec=$lt_library_names_spec
7506
7507 # The coded name of the library, if different from the real name.
7508 soname_spec=$lt_soname_spec
7509
7510 # Commands used to build and install an old-style archive.
7511 RANLIB=$lt_RANLIB
7512 old_archive_cmds=$lt_old_archive_cmds
7513 old_postinstall_cmds=$lt_old_postinstall_cmds
7514 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7515
7516 # Create an old-style archive from a shared archive.
7517 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7518
7519 # Create a temporary old-style archive to link instead of a shared archive.
7520 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7521
7522 # Commands used to build and install a shared archive.
7523 archive_cmds=$lt_archive_cmds
7524 archive_expsym_cmds=$lt_archive_expsym_cmds
7525 postinstall_cmds=$lt_postinstall_cmds
7526 postuninstall_cmds=$lt_postuninstall_cmds
7527
7528 # Commands to strip libraries.
7529 old_striplib=$lt_old_striplib
7530 striplib=$lt_striplib
7531
7532 # Method to check whether dependent libraries are shared objects.
7533 deplibs_check_method=$lt_deplibs_check_method
7534
7535 # Command to use when deplibs_check_method == file_magic.
7536 file_magic_cmd=$lt_file_magic_cmd
7537
7538 # Flag that allows shared libraries with undefined symbols to be built.
7539 allow_undefined_flag=$lt_allow_undefined_flag
7540
7541 # Flag that forces no undefined symbols.
7542 no_undefined_flag=$lt_no_undefined_flag
7543
7544 # Commands used to finish a libtool library installation in a directory.
7545 finish_cmds=$lt_finish_cmds
7546
7547 # Same as above, but a single script fragment to be evaled but not shown.
7548 finish_eval=$lt_finish_eval
7549
7550 # Take the output of nm and produce a listing of raw symbols and C names.
7551 global_symbol_pipe=$lt_global_symbol_pipe
7552
7553 # Transform the output of nm in a proper C declaration
7554 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7555
7556 # Transform the output of nm in a C name address pair
7557 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7558
7559 # This is the shared library runtime path variable.
7560 runpath_var=$runpath_var
7561
7562 # This is the shared library path variable.
7563 shlibpath_var=$shlibpath_var
7564
7565 # Is shlibpath searched before the hard-coded library search path?
7566 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7567
7568 # How to hardcode a shared library path into an executable.
7569 hardcode_action=$hardcode_action
7570
7571 # Whether we should hardcode library paths into libraries.
7572 hardcode_into_libs=$hardcode_into_libs
7573
7574 # Flag to hardcode \$libdir into a binary during linking.
7575 # This must work even if \$libdir does not exist.
7576 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7577
7578 # Whether we need a single -rpath flag with a separated argument.
7579 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7580
7581 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7582 # resulting binary.
7583 hardcode_direct=$hardcode_direct
7584
7585 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7586 # resulting binary.
7587 hardcode_minus_L=$hardcode_minus_L
7588
7589 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7590 # the resulting binary.
7591 hardcode_shlibpath_var=$hardcode_shlibpath_var
7592
7593 # Variables whose values should be saved in libtool wrapper scripts and
7594 # restored at relink time.
7595 variables_saved_for_relink="$variables_saved_for_relink"
7596
7597 # Whether libtool must link a program against all its dependency libraries.
7598 link_all_deplibs=$link_all_deplibs
7599
7600 # Compile-time system search path for libraries
7601 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7602
7603 # Run-time system search path for libraries
7604 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7605
7606 # Fix the shell variable \$srcfile for the compiler.
7607 fix_srcfile_path="$fix_srcfile_path"
7608
7609 # Set to yes if exported symbols are required.
7610 always_export_symbols=$always_export_symbols
7611
7612 # The commands to list exported symbols.
7613 export_symbols_cmds=$lt_export_symbols_cmds
7614
7615 # The commands to extract the exported symbol list from a shared archive.
7616 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7617
7618 # Symbols that should not be listed in the preloaded symbols.
7619 exclude_expsyms=$lt_exclude_expsyms
7620
7621 # Symbols that must always be exported.
7622 include_expsyms=$lt_include_expsyms
7623
7624 # ### END LIBTOOL CONFIG
7625
7626 __EOF__
7627
7628   case $host_os in
7629   aix3*)
7630     cat <<\EOF >> "${ofile}T"
7631
7632 # AIX sometimes has problems with the GCC collect2 program.  For some
7633 # reason, if we set the COLLECT_NAMES environment variable, the problems
7634 # vanish in a puff of smoke.
7635 if test "X${COLLECT_NAMES+set}" != Xset; then
7636   COLLECT_NAMES=
7637   export COLLECT_NAMES
7638 fi
7639 EOF
7640     ;;
7641   esac
7642
7643   case $host_os in
7644   cygwin* | mingw* | pw32* | os2*)
7645     cat <<'EOF' >> "${ofile}T"
7646       # This is a source program that is used to create dlls on Windows
7647       # Don't remove nor modify the starting and closing comments
7648 # /* ltdll.c starts here */
7649 # #define WIN32_LEAN_AND_MEAN
7650 # #include <windows.h>
7651 # #undef WIN32_LEAN_AND_MEAN
7652 # #include <stdio.h>
7653 #
7654 # #ifndef __CYGWIN__
7655 # #  ifdef __CYGWIN32__
7656 # #    define __CYGWIN__ __CYGWIN32__
7657 # #  endif
7658 # #endif
7659 #
7660 # #ifdef __cplusplus
7661 # extern "C" {
7662 # #endif
7663 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7664 # #ifdef __cplusplus
7665 # }
7666 # #endif
7667 #
7668 # #ifdef __CYGWIN__
7669 # #include <cygwin/cygwin_dll.h>
7670 # DECLARE_CYGWIN_DLL( DllMain );
7671 # #endif
7672 # HINSTANCE __hDllInstance_base;
7673 #
7674 # BOOL APIENTRY
7675 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7676 # {
7677 #   __hDllInstance_base = hInst;
7678 #   return TRUE;
7679 # }
7680 # /* ltdll.c ends here */
7681         # This is a source program that is used to create import libraries
7682         # on Windows for dlls which lack them. Don't remove nor modify the
7683         # starting and closing comments
7684 # /* impgen.c starts here */
7685 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7686 #
7687 #  This file is part of GNU libtool.
7688 #
7689 #  This program is free software; you can redistribute it and/or modify
7690 #  it under the terms of the GNU General Public License as published by
7691 #  the Free Software Foundation; either version 2 of the License, or
7692 #  (at your option) any later version.
7693 #
7694 #  This program is distributed in the hope that it will be useful,
7695 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7696 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7697 #  GNU General Public License for more details.
7698 #
7699 #  You should have received a copy of the GNU General Public License
7700 #  along with this program; if not, write to the Free Software
7701 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7702 #  */
7703 #
7704 # #include <stdio.h>            /* for printf() */
7705 # #include <unistd.h>           /* for open(), lseek(), read() */
7706 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7707 # #include <string.h>           /* for strdup() */
7708 #
7709 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7710 # #ifndef O_BINARY
7711 # #define O_BINARY 0
7712 # #endif
7713 #
7714 # static unsigned int
7715 # pe_get16 (fd, offset)
7716 #      int fd;
7717 #      int offset;
7718 # {
7719 #   unsigned char b[2];
7720 #   lseek (fd, offset, SEEK_SET);
7721 #   read (fd, b, 2);
7722 #   return b[0] + (b[1]<<8);
7723 # }
7724 #
7725 # static unsigned int
7726 # pe_get32 (fd, offset)
7727 #     int fd;
7728 #     int offset;
7729 # {
7730 #   unsigned char b[4];
7731 #   lseek (fd, offset, SEEK_SET);
7732 #   read (fd, b, 4);
7733 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7734 # }
7735 #
7736 # static unsigned int
7737 # pe_as32 (ptr)
7738 #      void *ptr;
7739 # {
7740 #   unsigned char *b = ptr;
7741 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7742 # }
7743 #
7744 # int
7745 # main (argc, argv)
7746 #     int argc;
7747 #     char *argv[];
7748 # {
7749 #     int dll;
7750 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7751 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7752 #     unsigned long name_rvas, nexp;
7753 #     unsigned char *expdata, *erva;
7754 #     char *filename, *dll_name;
7755 #
7756 #     filename = argv[1];
7757 #
7758 #     dll = open(filename, O_RDONLY|O_BINARY);
7759 #     if (dll < 1)
7760 #       return 1;
7761 #
7762 #     dll_name = filename;
7763 #
7764 #     for (i=0; filename[i]; i++)
7765 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7766 #           dll_name = filename + i +1;
7767 #
7768 #     pe_header_offset = pe_get32 (dll, 0x3c);
7769 #     opthdr_ofs = pe_header_offset + 4 + 20;
7770 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7771 #
7772 #     if (num_entries < 1) /* no exports */
7773 #       return 1;
7774 #
7775 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7776 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7777 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7778 #     secptr = (pe_header_offset + 4 + 20 +
7779 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7780 #
7781 #     expptr = 0;
7782 #     for (i = 0; i < nsections; i++)
7783 #     {
7784 #       char sname[8];
7785 #       unsigned long secptr1 = secptr + 40 * i;
7786 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7787 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7788 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7789 #       lseek(dll, secptr1, SEEK_SET);
7790 #       read(dll, sname, 8);
7791 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7792 #       {
7793 #           expptr = fptr + (export_rva - vaddr);
7794 #           if (export_rva + export_size > vaddr + vsize)
7795 #               export_size = vsize - (export_rva - vaddr);
7796 #           break;
7797 #       }
7798 #     }
7799 #
7800 #     expdata = (unsigned char*)malloc(export_size);
7801 #     lseek (dll, expptr, SEEK_SET);
7802 #     read (dll, expdata, export_size);
7803 #     erva = expdata - export_rva;
7804 #
7805 #     nexp = pe_as32 (expdata+24);
7806 #     name_rvas = pe_as32 (expdata+32);
7807 #
7808 #     printf ("EXPORTS\n");
7809 #     for (i = 0; i<nexp; i++)
7810 #     {
7811 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7812 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7813 #     }
7814 #
7815 #     return 0;
7816 # }
7817 # /* impgen.c ends here */
7818
7819 EOF
7820     ;;
7821   esac
7822
7823   # We use sed instead of cat because bash on DJGPP gets confused if
7824   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7825   # text mode, it properly converts lines to CR/LF.  This bash problem
7826   # is reportedly fixed, but why not run on old versions too?
7827   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7828
7829   mv -f "${ofile}T" "$ofile" || \
7830     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7831   chmod +x "$ofile"
7832 fi
7833
7834
7835
7836
7837
7838 # This can be used to rebuild libtool when needed
7839 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7840
7841 # Always use our own libtool.
7842 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7843
7844 # Prevent multiple expansion
7845
7846
7847
7848 # test for ln hardlink support
7849 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7850 echo "configure:7851: checking whether ln works" >&5
7851 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   rm -f conftest.src conftest.dst
7855 echo "conftest" > conftest.src
7856 if ln conftest.src conftest.dst 2>/dev/null
7857 then
7858   ol_cv_prog_LN_H="ln"
7859 else
7860   ol_cv_prog_LN_H="cp"
7861 fi
7862 rm -f conftest.src conftest.dst
7863
7864 fi
7865 LN_H="$ol_cv_prog_LN_H"
7866 if test "$ol_cv_prog_LN_H" = "ln"; then
7867         echo "$ac_t""yes" 1>&6
7868 else
7869         echo "$ac_t""no" 1>&6
7870 fi
7871
7872 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7873 echo "configure:7874: checking whether ln -s works" >&5
7874 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7875   echo $ac_n "(cached) $ac_c" 1>&6
7876 else
7877   rm -f conftestdata
7878 if ln -s X conftestdata 2>/dev/null
7879 then
7880   rm -f conftestdata
7881   ac_cv_prog_LN_S="ln -s"
7882 else
7883   ac_cv_prog_LN_S=ln
7884 fi
7885 fi
7886 LN_S="$ac_cv_prog_LN_S"
7887 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7888   echo "$ac_t""yes" 1>&6
7889 else
7890   echo "$ac_t""no" 1>&6
7891 fi
7892
7893
7894 ol_link_perl=no
7895 if test $ol_enable_perl != no ; then
7896         # Extract the first word of "perl", so it can be a program name with args.
7897 set dummy perl; ac_word=$2
7898 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7899 echo "configure:7900: checking for $ac_word" >&5
7900 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7901   echo $ac_n "(cached) $ac_c" 1>&6
7902 else
7903   case "$PERLBIN" in
7904   /*)
7905   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7906   ;;
7907   ?:/*)
7908   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7909   ;;
7910   *)
7911   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7912   ac_dummy="$PATH"
7913   for ac_dir in $ac_dummy; do 
7914     test -z "$ac_dir" && ac_dir=.
7915     if test -f $ac_dir/$ac_word; then
7916       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7917       break
7918     fi
7919   done
7920   IFS="$ac_save_ifs"
7921   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7922   ;;
7923 esac
7924 fi
7925 PERLBIN="$ac_cv_path_PERLBIN"
7926 if test -n "$PERLBIN"; then
7927   echo "$ac_t""$PERLBIN" 1>&6
7928 else
7929   echo "$ac_t""no" 1>&6
7930 fi
7931
7932
7933         if test "no$PERLBIN" = "no" ; then
7934                 if test $ol_enable_perl = yes ; then
7935                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7936                 fi
7937
7938         else
7939                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7940                 if test x"$ol_with_perl_module" = "xstatic" ; then
7941                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7942                 else
7943                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7944                 fi
7945                                 ol_link_perl=yes
7946         fi
7947 fi
7948
7949 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7950 echo "configure:7951: checking how to run the C preprocessor" >&5
7951 # On Suns, sometimes $CPP names a directory.
7952 if test -n "$CPP" && test -d "$CPP"; then
7953   CPP=
7954 fi
7955 if test -z "$CPP"; then
7956 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959     # This must be in double quotes, not single quotes, because CPP may get
7960   # substituted into the Makefile and "${CC-cc}" will confuse make.
7961   CPP="${CC-cc} -E"
7962   # On the NeXT, cc -E runs the code through the compiler's parser,
7963   # not just through cpp.
7964   cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 #include <assert.h>
7968 Syntax Error
7969 EOF
7970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7971 { (eval echo configure:7972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7973 if test -z "$ac_err"; then
7974   :
7975 else
7976   echo "$ac_err" >&5
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   CPP="${CC-cc} -E -traditional-cpp"
7981   cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 #include <assert.h>
7985 Syntax Error
7986 EOF
7987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7988 { (eval echo configure:7989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7990 if test -z "$ac_err"; then
7991   :
7992 else
7993   echo "$ac_err" >&5
7994   echo "configure: failed program was:" >&5
7995   cat conftest.$ac_ext >&5
7996   rm -rf conftest*
7997   CPP="${CC-cc} -nologo -E"
7998   cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 #include <assert.h>
8002 Syntax Error
8003 EOF
8004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8005 { (eval echo configure:8006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8007 if test -z "$ac_err"; then
8008   :
8009 else
8010   echo "$ac_err" >&5
8011   echo "configure: failed program was:" >&5
8012   cat conftest.$ac_ext >&5
8013   rm -rf conftest*
8014   CPP=/lib/cpp
8015 fi
8016 rm -f conftest*
8017 fi
8018 rm -f conftest*
8019 fi
8020 rm -f conftest*
8021   ac_cv_prog_CPP="$CPP"
8022 fi
8023   CPP="$ac_cv_prog_CPP"
8024 else
8025   ac_cv_prog_CPP="$CPP"
8026 fi
8027 echo "$ac_t""$CPP" 1>&6
8028
8029
8030 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8031         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8032
8033 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8034         echo "configure: warning: programs compiled here do run here..." 1>&2
8035         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8036
8037 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8038         echo "configure: warning: programs compiled here do not run here..." 1>&2
8039         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8040 fi
8041
8042
8043 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8044 echo "configure:8045: checking for Cygwin environment" >&5
8045 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8046   echo $ac_n "(cached) $ac_c" 1>&6
8047 else
8048   cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051
8052 int main() {
8053
8054 #ifndef __CYGWIN__
8055 #define __CYGWIN__ __CYGWIN32__
8056 #endif
8057 return __CYGWIN__;
8058 ; return 0; }
8059 EOF
8060 if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8061   rm -rf conftest*
8062   ac_cv_cygwin=yes
8063 else
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   ac_cv_cygwin=no
8068 fi
8069 rm -f conftest*
8070 fi
8071
8072 echo "$ac_t""$ac_cv_cygwin" 1>&6
8073 CYGWIN=
8074 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8075 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8076 echo "configure:8077: checking for mingw32 environment" >&5
8077 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083
8084 int main() {
8085 return __MINGW32__;
8086 ; return 0; }
8087 EOF
8088 if { (eval echo configure:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8089   rm -rf conftest*
8090   ac_cv_mingw32=yes
8091 else
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   ac_cv_mingw32=no
8096 fi
8097 rm -f conftest*
8098 fi
8099
8100 echo "$ac_t""$ac_cv_mingw32" 1>&6
8101 MINGW32=
8102 test "$ac_cv_mingw32" = yes && MINGW32=yes
8103
8104
8105
8106 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8107 echo "configure:8108: checking for executable suffix" >&5
8108 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8109   echo $ac_n "(cached) $ac_c" 1>&6
8110 else
8111   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8112   ac_cv_exeext=.exe
8113 else
8114   rm -f conftest*
8115   echo 'int main () { return 0; }' > conftest.$ac_ext
8116   ac_cv_exeext=
8117   if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8118     for file in conftest.*; do
8119       case $file in
8120       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8121       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8122       esac
8123     done
8124   else
8125     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8126   fi
8127   rm -f conftest*
8128   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8129 fi
8130 fi
8131
8132 EXEEXT=""
8133 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8134 echo "$ac_t""${ac_cv_exeext}" 1>&6
8135 ac_exeext=$EXEEXT
8136
8137 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8138 echo "configure:8139: checking for object suffix" >&5
8139 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8140   echo $ac_n "(cached) $ac_c" 1>&6
8141 else
8142   rm -f conftest*
8143 echo 'int i = 1;' > conftest.$ac_ext
8144 if { (eval echo configure:8145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8145   for ac_file in conftest.*; do
8146     case $ac_file in
8147     *.c) ;;
8148     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8149     esac
8150   done
8151 else
8152   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8153 fi
8154 rm -f conftest*
8155 fi
8156
8157 echo "$ac_t""$ac_cv_objext" 1>&6
8158 OBJEXT=$ac_cv_objext
8159 ac_objext=$ac_cv_objext
8160
8161
8162 cat >> confdefs.h <<EOF
8163 #define EXEEXT "${EXEEXT}"
8164 EOF
8165
8166
8167 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8168 echo "configure:8169: checking for be_app in -lbe" >&5
8169 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8170 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8171   echo $ac_n "(cached) $ac_c" 1>&6
8172 else
8173   ac_save_LIBS="$LIBS"
8174 LIBS="-lbe -lroot -lnet $LIBS"
8175 cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 /* Override any gcc2 internal prototype to avoid an error.  */
8179 /* We use char because int might match the return type of a gcc2
8180     builtin and then its argument prototype would still apply.  */
8181 char be_app();
8182
8183 int main() {
8184 be_app()
8185 ; return 0; }
8186 EOF
8187 if { (eval echo configure:8188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8188   rm -rf conftest*
8189   eval "ac_cv_lib_$ac_lib_var=yes"
8190 else
8191   echo "configure: failed program was:" >&5
8192   cat conftest.$ac_ext >&5
8193   rm -rf conftest*
8194   eval "ac_cv_lib_$ac_lib_var=no"
8195 fi
8196 rm -f conftest*
8197 LIBS="$ac_save_LIBS"
8198
8199 fi
8200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8201   echo "$ac_t""yes" 1>&6
8202   LIBS="$LIBS -lbe -lroot -lnet"
8203 else
8204   echo "$ac_t""no" 1>&6
8205 :
8206 fi
8207
8208
8209
8210
8211
8212 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8213 echo "configure:8214: checking for ${CC-cc} option to accept ANSI C" >&5
8214 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8215   echo $ac_n "(cached) $ac_c" 1>&6
8216 else
8217   am_cv_prog_cc_stdc=no
8218 ac_save_CC="$CC"
8219 # Don't try gcc -ansi; that turns off useful extensions and
8220 # breaks some systems' header files.
8221 # AIX                   -qlanglvl=ansi
8222 # Ultrix and OSF/1      -std1
8223 # HP-UX 10.20 and later -Ae
8224 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8225 # SVR4                  -Xc -D__EXTENSIONS__
8226 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8227 do
8228   CC="$ac_save_CC $ac_arg"
8229   cat > conftest.$ac_ext <<EOF
8230 #line 8231 "configure"
8231 #include "confdefs.h"
8232 #include <stdarg.h>
8233 #include <stdio.h>
8234 #include <sys/types.h>
8235 #include <sys/stat.h>
8236 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8237 struct buf { int x; };
8238 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8239 static char *e (p, i)
8240      char **p;
8241      int i;
8242 {
8243   return p[i];
8244 }
8245 static char *f (char * (*g) (char **, int), char **p, ...)
8246 {
8247   char *s;
8248   va_list v;
8249   va_start (v,p);
8250   s = g (p, va_arg (v,int));
8251   va_end (v);
8252   return s;
8253 }
8254 int test (int i, double x);
8255 struct s1 {int (*f) (int a);};
8256 struct s2 {int (*f) (double a);};
8257 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8258 int argc;
8259 char **argv;
8260
8261 int main() {
8262
8263 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8264
8265 ; return 0; }
8266 EOF
8267 if { (eval echo configure:8268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8268   rm -rf conftest*
8269   am_cv_prog_cc_stdc="$ac_arg"; break
8270 else
8271   echo "configure: failed program was:" >&5
8272   cat conftest.$ac_ext >&5
8273 fi
8274 rm -f conftest*
8275 done
8276 CC="$ac_save_CC"
8277
8278 fi
8279
8280 if test -z "$am_cv_prog_cc_stdc"; then
8281   echo "$ac_t""none needed" 1>&6
8282 else
8283   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8284 fi
8285 case "x$am_cv_prog_cc_stdc" in
8286   x|xno) ;;
8287   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8288 esac
8289
8290 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8291         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8292 fi
8293
8294 # test for make depend flag
8295 OL_MKDEP=
8296 OL_MKDEP_FLAGS=
8297 if test -z "${MKDEP}"; then
8298         OL_MKDEP="${CC-cc}"
8299         if test -z "${MKDEP_FLAGS}"; then
8300                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8301 echo "configure:8302: checking for ${OL_MKDEP} depend flag" >&5
8302 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8303   echo $ac_n "(cached) $ac_c" 1>&6
8304 else
8305   
8306                         ol_cv_mkdep=no
8307                         for flag in "-M" "-xM"; do
8308                                 cat > conftest.c <<EOF
8309  noCode;
8310 EOF
8311                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8312                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8313                                 then
8314                                         if test ! -f conftest."${ac_object}" ; then
8315                                                 ol_cv_mkdep=$flag
8316                                                 OL_MKDEP_FLAGS="$flag"
8317                                                 break
8318                                         fi
8319                                 fi
8320                         done
8321                         rm -f conftest*
8322                 
8323 fi
8324
8325 echo "$ac_t""$ol_cv_mkdep" 1>&6
8326         else
8327                 cc_cv_mkdep=yes
8328                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8329         fi
8330 else
8331         cc_cv_mkdep=yes
8332         OL_MKDEP="${MKDEP}"
8333         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8334 fi
8335
8336
8337
8338 if test "${ol_cv_mkdep}" = no ; then
8339         # this will soon become an error
8340         echo "configure: warning: do not know how to generate dependencies" 1>&2
8341 fi
8342
8343 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8344 echo "configure:8345: checking for afopen in -ls" >&5
8345 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8347   echo $ac_n "(cached) $ac_c" 1>&6
8348 else
8349   ac_save_LIBS="$LIBS"
8350 LIBS="-ls  $LIBS"
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 /* Override any gcc2 internal prototype to avoid an error.  */
8355 /* We use char because int might match the return type of a gcc2
8356     builtin and then its argument prototype would still apply.  */
8357 char afopen();
8358
8359 int main() {
8360 afopen()
8361 ; return 0; }
8362 EOF
8363 if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8364   rm -rf conftest*
8365   eval "ac_cv_lib_$ac_lib_var=yes"
8366 else
8367   echo "configure: failed program was:" >&5
8368   cat conftest.$ac_ext >&5
8369   rm -rf conftest*
8370   eval "ac_cv_lib_$ac_lib_var=no"
8371 fi
8372 rm -f conftest*
8373 LIBS="$ac_save_LIBS"
8374
8375 fi
8376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8377   echo "$ac_t""yes" 1>&6
8378   
8379         AUTH_LIBS=-ls
8380         cat >> confdefs.h <<\EOF
8381 #define HAVE_AIX_SECURITY 1
8382 EOF
8383
8384
8385 else
8386   echo "$ac_t""no" 1>&6
8387 fi
8388
8389
8390 case "$target" in
8391 *-ibm-openedition)
8392         ac_cv_func_getopt=no
8393         cat >> confdefs.h <<\EOF
8394 #define BOTH_STRINGS_H 1
8395 EOF
8396
8397         ;;
8398 esac
8399
8400 ol_link_modules=no
8401 if test $ol_enable_modules != no ; then
8402         for ac_hdr in ltdl.h
8403 do
8404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8406 echo "configure:8407: checking for $ac_hdr" >&5
8407 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8408   echo $ac_n "(cached) $ac_c" 1>&6
8409 else
8410   cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413 #include <$ac_hdr>
8414 EOF
8415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8416 { (eval echo configure:8417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8418 if test -z "$ac_err"; then
8419   rm -rf conftest*
8420   eval "ac_cv_header_$ac_safe=yes"
8421 else
8422   echo "$ac_err" >&5
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   eval "ac_cv_header_$ac_safe=no"
8427 fi
8428 rm -f conftest*
8429 fi
8430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8431   echo "$ac_t""yes" 1>&6
8432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8433   cat >> confdefs.h <<EOF
8434 #define $ac_tr_hdr 1
8435 EOF
8436  
8437 else
8438   echo "$ac_t""no" 1>&6
8439 fi
8440 done
8441
8442
8443         if test $ac_cv_header_ltdl_h = no ; then
8444                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8445         fi
8446
8447         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8448 echo "configure:8449: checking for lt_dlinit in -lltdl" >&5
8449 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   ac_save_LIBS="$LIBS"
8454 LIBS="-lltdl  $LIBS"
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 /* Override any gcc2 internal prototype to avoid an error.  */
8459 /* We use char because int might match the return type of a gcc2
8460     builtin and then its argument prototype would still apply.  */
8461 char lt_dlinit();
8462
8463 int main() {
8464 lt_dlinit()
8465 ; return 0; }
8466 EOF
8467 if { (eval echo configure:8468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8468   rm -rf conftest*
8469   eval "ac_cv_lib_$ac_lib_var=yes"
8470 else
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -rf conftest*
8474   eval "ac_cv_lib_$ac_lib_var=no"
8475 fi
8476 rm -f conftest*
8477 LIBS="$ac_save_LIBS"
8478
8479 fi
8480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8481   echo "$ac_t""yes" 1>&6
8482   
8483                 MODULES_LIBS=-lltdl
8484                 cat >> confdefs.h <<\EOF
8485 #define HAVE_LIBLTDL 1
8486 EOF
8487
8488         
8489 else
8490   echo "$ac_t""no" 1>&6
8491 fi
8492
8493
8494         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8495                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8496         fi
8497         ol_link_modules=yes
8498 else
8499         ol_with_bdb_module=static
8500         ol_with_dnssrv_module=static
8501         ol_with_hdb_module=static
8502         ol_with_ldap_module=static
8503         ol_with_ldbm_module=static
8504         ol_with_meta_module=static
8505         ol_with_monitor_module=static
8506         ol_with_null_module=static
8507         ol_with_passwd_module=static
8508         ol_with_perl_module=static
8509         ol_with_shell_module=static
8510         ol_with_tcl_module=static
8511         ol_with_sql_module=static
8512 fi
8513
8514 # test for EBCDIC
8515 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8516 echo "configure:8517: checking for EBCDIC" >&5
8517 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8518   echo $ac_n "(cached) $ac_c" 1>&6
8519 else
8520   
8521         cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8524
8525 #if !('M' == 0xd4)
8526 #include <__ASCII__/generate_error.h>
8527 #endif
8528
8529 EOF
8530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8531 { (eval echo configure:8532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8533 if test -z "$ac_err"; then
8534   rm -rf conftest*
8535   ol_cv_cpp_ebcdic=yes
8536 else
8537   echo "$ac_err" >&5
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -rf conftest*
8541   ol_cv_cpp_ebcdic=no
8542 fi
8543 rm -f conftest*
8544 fi
8545
8546 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8547 if test $ol_cv_cpp_ebcdic = yes ; then
8548         cat >> confdefs.h <<\EOF
8549 #define HAVE_EBCDIC 1
8550 EOF
8551
8552 fi
8553
8554 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8555 echo "configure:8556: checking for ANSI C header files" >&5
8556 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8557   echo $ac_n "(cached) $ac_c" 1>&6
8558 else
8559   cat > conftest.$ac_ext <<EOF
8560 #line 8561 "configure"
8561 #include "confdefs.h"
8562 #include <stdlib.h>
8563 #include <stdarg.h>
8564 #include <string.h>
8565 #include <float.h>
8566 EOF
8567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8568 { (eval echo configure:8569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8570 if test -z "$ac_err"; then
8571   rm -rf conftest*
8572   ol_cv_header_stdc=yes
8573 else
8574   echo "$ac_err" >&5
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   ol_cv_header_stdc=no
8579 fi
8580 rm -f conftest*
8581
8582 if test $ol_cv_header_stdc = yes; then
8583   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8584 cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8587 #include <string.h>
8588 EOF
8589 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8590   egrep "memchr" >/dev/null 2>&1; then
8591   :
8592 else
8593   rm -rf conftest*
8594   ol_cv_header_stdc=no
8595 fi
8596 rm -f conftest*
8597
8598 fi
8599
8600 if test $ol_cv_header_stdc = yes; then
8601   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8602 cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 #include <stdlib.h>
8606 EOF
8607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8608   egrep "free" >/dev/null 2>&1; then
8609   :
8610 else
8611   rm -rf conftest*
8612   ol_cv_header_stdc=no
8613 fi
8614 rm -f conftest*
8615
8616 fi
8617
8618 if test $ol_cv_header_stdc = yes; then
8619   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8620 if test "$cross_compiling" = yes; then
8621   :
8622 else
8623   cat > conftest.$ac_ext <<EOF
8624 #line 8625 "configure"
8625 #include "confdefs.h"
8626 #include <ctype.h>
8627 #ifndef HAVE_EBCDIC
8628 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8629 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8630 #else
8631 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8632                 || ('j' <= (c) && (c) <= 'r') \
8633                 || ('s' <= (c) && (c) <= 'z'))
8634 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8635 #endif
8636 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8637 int main () { int i; for (i = 0; i < 256; i++)
8638 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8639 exit (0); }
8640
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8643 then
8644   :
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -fr conftest*
8649   ol_cv_header_stdc=no
8650 fi
8651 rm -fr conftest*
8652 fi
8653
8654 fi
8655 fi
8656
8657 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8658 if test $ol_cv_header_stdc = yes; then
8659   cat >> confdefs.h <<\EOF
8660 #define STDC_HEADERS 1
8661 EOF
8662
8663 fi
8664 ac_cv_header_stdc=disable
8665
8666
8667 if test $ol_cv_header_stdc != yes; then
8668         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8669 fi
8670
8671 ac_header_dirent=no
8672 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8673 do
8674 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8675 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8676 echo "configure:8677: checking for $ac_hdr that defines DIR" >&5
8677 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8678   echo $ac_n "(cached) $ac_c" 1>&6
8679 else
8680   cat > conftest.$ac_ext <<EOF
8681 #line 8682 "configure"
8682 #include "confdefs.h"
8683 #include <sys/types.h>
8684 #include <$ac_hdr>
8685 int main() {
8686 DIR *dirp = 0;
8687 ; return 0; }
8688 EOF
8689 if { (eval echo configure:8690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8690   rm -rf conftest*
8691   eval "ac_cv_header_dirent_$ac_safe=yes"
8692 else
8693   echo "configure: failed program was:" >&5
8694   cat conftest.$ac_ext >&5
8695   rm -rf conftest*
8696   eval "ac_cv_header_dirent_$ac_safe=no"
8697 fi
8698 rm -f conftest*
8699 fi
8700 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8701   echo "$ac_t""yes" 1>&6
8702     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8703   cat >> confdefs.h <<EOF
8704 #define $ac_tr_hdr 1
8705 EOF
8706  ac_header_dirent=$ac_hdr; break
8707 else
8708   echo "$ac_t""no" 1>&6
8709 fi
8710 done
8711 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8712 if test $ac_header_dirent = dirent.h; then
8713 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8714 echo "configure:8715: checking for opendir in -ldir" >&5
8715 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8717   echo $ac_n "(cached) $ac_c" 1>&6
8718 else
8719   ac_save_LIBS="$LIBS"
8720 LIBS="-ldir  $LIBS"
8721 cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8724 /* Override any gcc2 internal prototype to avoid an error.  */
8725 /* We use char because int might match the return type of a gcc2
8726     builtin and then its argument prototype would still apply.  */
8727 char opendir();
8728
8729 int main() {
8730 opendir()
8731 ; return 0; }
8732 EOF
8733 if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8734   rm -rf conftest*
8735   eval "ac_cv_lib_$ac_lib_var=yes"
8736 else
8737   echo "configure: failed program was:" >&5
8738   cat conftest.$ac_ext >&5
8739   rm -rf conftest*
8740   eval "ac_cv_lib_$ac_lib_var=no"
8741 fi
8742 rm -f conftest*
8743 LIBS="$ac_save_LIBS"
8744
8745 fi
8746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8747   echo "$ac_t""yes" 1>&6
8748   LIBS="$LIBS -ldir"
8749 else
8750   echo "$ac_t""no" 1>&6
8751 fi
8752
8753 else
8754 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8755 echo "configure:8756: checking for opendir in -lx" >&5
8756 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8758   echo $ac_n "(cached) $ac_c" 1>&6
8759 else
8760   ac_save_LIBS="$LIBS"
8761 LIBS="-lx  $LIBS"
8762 cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 /* Override any gcc2 internal prototype to avoid an error.  */
8766 /* We use char because int might match the return type of a gcc2
8767     builtin and then its argument prototype would still apply.  */
8768 char opendir();
8769
8770 int main() {
8771 opendir()
8772 ; return 0; }
8773 EOF
8774 if { (eval echo configure:8775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8775   rm -rf conftest*
8776   eval "ac_cv_lib_$ac_lib_var=yes"
8777 else
8778   echo "configure: failed program was:" >&5
8779   cat conftest.$ac_ext >&5
8780   rm -rf conftest*
8781   eval "ac_cv_lib_$ac_lib_var=no"
8782 fi
8783 rm -f conftest*
8784 LIBS="$ac_save_LIBS"
8785
8786 fi
8787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8788   echo "$ac_t""yes" 1>&6
8789   LIBS="$LIBS -lx"
8790 else
8791   echo "$ac_t""no" 1>&6
8792 fi
8793
8794 fi
8795
8796 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8797 echo "configure:8798: checking for sys/wait.h that is POSIX.1 compatible" >&5
8798 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8799   echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801   cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804 #include <sys/types.h>
8805 #include <sys/wait.h>
8806 #ifndef WEXITSTATUS
8807 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8808 #endif
8809 #ifndef WIFEXITED
8810 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8811 #endif
8812 int main() {
8813 int s;
8814 wait (&s);
8815 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8816 ; return 0; }
8817 EOF
8818 if { (eval echo configure:8819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8819   rm -rf conftest*
8820   ac_cv_header_sys_wait_h=yes
8821 else
8822   echo "configure: failed program was:" >&5
8823   cat conftest.$ac_ext >&5
8824   rm -rf conftest*
8825   ac_cv_header_sys_wait_h=no
8826 fi
8827 rm -f conftest*
8828 fi
8829
8830 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8831 if test $ac_cv_header_sys_wait_h = yes; then
8832   cat >> confdefs.h <<\EOF
8833 #define HAVE_SYS_WAIT_H 1
8834 EOF
8835
8836 fi
8837
8838 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8839 echo "configure:8840: checking POSIX termios" >&5
8840 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   cat > conftest.$ac_ext <<EOF
8844 #line 8845 "configure"
8845 #include "confdefs.h"
8846 #include <sys/types.h>
8847 #include <unistd.h>
8848 #include <termios.h>
8849 int main() {
8850 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8851    tcgetattr(0, 0);
8852 ; return 0; }
8853 EOF
8854 if { (eval echo configure:8855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8855   rm -rf conftest*
8856   am_cv_sys_posix_termios=yes
8857 else
8858   echo "configure: failed program was:" >&5
8859   cat conftest.$ac_ext >&5
8860   rm -rf conftest*
8861   am_cv_sys_posix_termios=no
8862 fi
8863 rm -f conftest*
8864 fi
8865
8866 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8867
8868
8869  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8870 echo "configure:8871: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8871 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8872   echo $ac_n "(cached) $ac_c" 1>&6
8873 else
8874   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8875
8876   gwinsz_in_termios_h=no
8877   if test $am_cv_sys_posix_termios = yes; then
8878     cat > conftest.$ac_ext <<EOF
8879 #line 8880 "configure"
8880 #include "confdefs.h"
8881 #include <sys/types.h>
8882 #     include <termios.h>
8883 #     ifdef TIOCGWINSZ
8884         yes
8885 #     endif
8886     
8887 EOF
8888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8889   egrep "yes" >/dev/null 2>&1; then
8890   rm -rf conftest*
8891   gwinsz_in_termios_h=yes
8892 fi
8893 rm -f conftest*
8894
8895   fi
8896
8897   if test $gwinsz_in_termios_h = no; then
8898     cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 #include <sys/types.h>
8902 #     include <sys/ioctl.h>
8903 #     ifdef TIOCGWINSZ
8904         yes
8905 #     endif
8906     
8907 EOF
8908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8909   egrep "yes" >/dev/null 2>&1; then
8910   rm -rf conftest*
8911   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8912 fi
8913 rm -f conftest*
8914
8915   fi
8916   
8917 fi
8918
8919 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8920   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8921     cat >> confdefs.h <<\EOF
8922 #define GWINSZ_IN_SYS_IOCTL 1
8923 EOF
8924
8925   fi
8926
8927 if test $am_cv_sys_posix_termios = yes ; then
8928         cat >> confdefs.h <<\EOF
8929 #define HAVE_POSIX_TERMIOS 1
8930 EOF
8931
8932 fi
8933
8934 for ac_hdr in \
8935         arpa/inet.h             \
8936         arpa/nameser.h  \
8937         assert.h                \
8938         conio.h                 \
8939         crypt.h                 \
8940         direct.h                \
8941         errno.h                 \
8942         fcntl.h                 \
8943         filio.h                 \
8944         getopt.h                \
8945         grp.h                   \
8946         io.h                    \
8947         libutil.h               \
8948         limits.h                \
8949         locale.h                \
8950         netinet/tcp.h   \
8951         malloc.h                \
8952         memory.h                \
8953         psap.h                  \
8954         pwd.h                   \
8955         process.h               \
8956         resolv.h                \
8957         sgtty.h                 \
8958         shadow.h                \
8959         stddef.h                \
8960         string.h                \
8961         strings.h               \
8962         sysexits.h              \
8963         sys/file.h              \
8964         sys/filio.h             \
8965         sys/errno.h             \
8966         sys/ioctl.h             \
8967         sys/param.h             \
8968         sys/resource.h  \
8969         sys/select.h    \
8970         sys/socket.h    \
8971         sys/stat.h              \
8972         sys/syslog.h    \
8973         sys/time.h              \
8974         sys/types.h             \
8975         sys/ucred.h             \
8976         sys/uio.h               \
8977         syslog.h                \
8978         termios.h               \
8979         unistd.h                \
8980         winsock.h               \
8981         winsock2.h              \
8982
8983 do
8984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8986 echo "configure:8987: checking for $ac_hdr" >&5
8987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8988   echo $ac_n "(cached) $ac_c" 1>&6
8989 else
8990   cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 #include <$ac_hdr>
8994 EOF
8995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8996 { (eval echo configure:8997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8998 if test -z "$ac_err"; then
8999   rm -rf conftest*
9000   eval "ac_cv_header_$ac_safe=yes"
9001 else
9002   echo "$ac_err" >&5
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -rf conftest*
9006   eval "ac_cv_header_$ac_safe=no"
9007 fi
9008 rm -f conftest*
9009 fi
9010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9011   echo "$ac_t""yes" 1>&6
9012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9013   cat >> confdefs.h <<EOF
9014 #define $ac_tr_hdr 1
9015 EOF
9016  
9017 else
9018   echo "$ac_t""no" 1>&6
9019 fi
9020 done
9021
9022
9023
9024
9025 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
9026 echo "configure:9027: checking for dlopen" >&5
9027 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
9028   echo $ac_n "(cached) $ac_c" 1>&6
9029 else
9030   cat > conftest.$ac_ext <<EOF
9031 #line 9032 "configure"
9032 #include "confdefs.h"
9033 /* System header to define __stub macros and hopefully few prototypes,
9034     which can conflict with char dlopen(); below.  */
9035 #include <assert.h>
9036 /* Override any gcc2 internal prototype to avoid an error.  */
9037 /* We use char because int might match the return type of a gcc2
9038     builtin and then its argument prototype would still apply.  */
9039 char dlopen();
9040 char (*f)();
9041
9042 int main() {
9043
9044 /* The GNU C library defines this for functions which it implements
9045     to always fail with ENOSYS.  Some functions are actually named
9046     something starting with __ and the normal name is an alias.  */
9047 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9048 choke me
9049 #else
9050 f = dlopen;
9051 #endif
9052
9053 ; return 0; }
9054 EOF
9055 if { (eval echo configure:9056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9056   rm -rf conftest*
9057   eval "ac_cv_func_dlopen=yes"
9058 else
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -rf conftest*
9062   eval "ac_cv_func_dlopen=no"
9063 fi
9064 rm -f conftest*
9065 fi
9066
9067 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9068   echo "$ac_t""yes" 1>&6
9069   :
9070 else
9071   echo "$ac_t""no" 1>&6
9072 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9073 echo "configure:9074: checking for dlopen in -ldl" >&5
9074 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9076   echo $ac_n "(cached) $ac_c" 1>&6
9077 else
9078   ac_save_LIBS="$LIBS"
9079 LIBS="-ldl  $LIBS"
9080 cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 /* Override any gcc2 internal prototype to avoid an error.  */
9084 /* We use char because int might match the return type of a gcc2
9085     builtin and then its argument prototype would still apply.  */
9086 char dlopen();
9087
9088 int main() {
9089 dlopen()
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9093   rm -rf conftest*
9094   eval "ac_cv_lib_$ac_lib_var=yes"
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_lib_$ac_lib_var=no"
9100 fi
9101 rm -f conftest*
9102 LIBS="$ac_save_LIBS"
9103
9104 fi
9105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9106   echo "$ac_t""yes" 1>&6
9107     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9109   cat >> confdefs.h <<EOF
9110 #define $ac_tr_lib 1
9111 EOF
9112
9113   LIBS="-ldl $LIBS"
9114
9115 else
9116   echo "$ac_t""no" 1>&6
9117 fi
9118
9119 fi
9120
9121
9122 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9123 echo "configure:9124: checking for sigset in -lV3" >&5
9124 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9126   echo $ac_n "(cached) $ac_c" 1>&6
9127 else
9128   ac_save_LIBS="$LIBS"
9129 LIBS="-lV3  $LIBS"
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 /* Override any gcc2 internal prototype to avoid an error.  */
9134 /* We use char because int might match the return type of a gcc2
9135     builtin and then its argument prototype would still apply.  */
9136 char sigset();
9137
9138 int main() {
9139 sigset()
9140 ; return 0; }
9141 EOF
9142 if { (eval echo configure:9143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9143   rm -rf conftest*
9144   eval "ac_cv_lib_$ac_lib_var=yes"
9145 else
9146   echo "configure: failed program was:" >&5
9147   cat conftest.$ac_ext >&5
9148   rm -rf conftest*
9149   eval "ac_cv_lib_$ac_lib_var=no"
9150 fi
9151 rm -f conftest*
9152 LIBS="$ac_save_LIBS"
9153
9154 fi
9155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9156   echo "$ac_t""yes" 1>&6
9157     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9158     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9159   cat >> confdefs.h <<EOF
9160 #define $ac_tr_lib 1
9161 EOF
9162
9163   LIBS="-lV3 $LIBS"
9164
9165 else
9166   echo "$ac_t""no" 1>&6
9167 fi
9168
9169
9170 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9171 echo "configure:9172: checking for winsock" >&5
9172 save_LIBS="$LIBS"
9173 for curlib in ws2_32 wsock32; do
9174         LIBS="$LIBS -l$curlib"
9175         cat > conftest.$ac_ext <<EOF
9176 #line 9177 "configure"
9177 #include "confdefs.h"
9178
9179                         char socket@12();
9180                         char select@20();
9181                         char closesocket@4();
9182                         char gethostname@8();
9183                         
9184 int main() {
9185
9186                         socket@12();
9187                         select@20();
9188                         closesocket@4();
9189                         gethostname@8();
9190                         
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194   rm -rf conftest*
9195   have_winsock=yes
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   have_winsock=no
9201 fi
9202 rm -f conftest*
9203
9204         if test $have_winsock = yes; then
9205                 cat >> confdefs.h <<\EOF
9206 #define HAVE_WINSOCK 1
9207 EOF
9208
9209                 ac_cv_func_socket=yes
9210                 ac_cv_func_select=yes
9211                 ac_cv_func_closesocket=yes
9212                 ac_cv_func_gethostname=yes
9213                 if test $curlib = ws2_32; then
9214                         have_winsock=winsock2
9215                         cat >> confdefs.h <<\EOF
9216 #define HAVE_WINSOCK2 1
9217 EOF
9218
9219                 fi
9220                 break
9221         fi
9222         LIBS="$save_LIBS"
9223 done
9224 echo "$ac_t""$have_winsock" 1>&6
9225
9226
9227 echo $ac_n "checking for socket""... $ac_c" 1>&6
9228 echo "configure:9229: checking for socket" >&5
9229 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235 /* System header to define __stub macros and hopefully few prototypes,
9236     which can conflict with char socket(); below.  */
9237 #include <assert.h>
9238 /* Override any gcc2 internal prototype to avoid an error.  */
9239 /* We use char because int might match the return type of a gcc2
9240     builtin and then its argument prototype would still apply.  */
9241 char socket();
9242 char (*f)();
9243
9244 int main() {
9245
9246 /* The GNU C library defines this for functions which it implements
9247     to always fail with ENOSYS.  Some functions are actually named
9248     something starting with __ and the normal name is an alias.  */
9249 #if defined (__stub_socket) || defined (__stub___socket)
9250 choke me
9251 #else
9252 f = socket;
9253 #endif
9254
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_func_socket=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_func_socket=no"
9265 fi
9266 rm -f conftest*
9267 fi
9268
9269 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9270   echo "$ac_t""yes" 1>&6
9271   :
9272 else
9273   echo "$ac_t""no" 1>&6
9274         
9275         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9276 echo "configure:9277: checking for main in -lsocket" >&5
9277 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   ac_save_LIBS="$LIBS"
9282 LIBS="-lsocket  $LIBS"
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286
9287 int main() {
9288 main()
9289 ; return 0; }
9290 EOF
9291 if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=yes"
9294 else
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297   rm -rf conftest*
9298   eval "ac_cv_lib_$ac_lib_var=no"
9299 fi
9300 rm -f conftest*
9301 LIBS="$ac_save_LIBS"
9302
9303 fi
9304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9305   echo "$ac_t""yes" 1>&6
9306     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9308   cat >> confdefs.h <<EOF
9309 #define $ac_tr_lib 1
9310 EOF
9311
9312   LIBS="-lsocket $LIBS"
9313
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9319 echo "configure:9320: checking for main in -lnet" >&5
9320 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   ac_save_LIBS="$LIBS"
9325 LIBS="-lnet  $LIBS"
9326 cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329
9330 int main() {
9331 main()
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=no"
9342 fi
9343 rm -f conftest*
9344 LIBS="$ac_save_LIBS"
9345
9346 fi
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9348   echo "$ac_t""yes" 1>&6
9349     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9351   cat >> confdefs.h <<EOF
9352 #define $ac_tr_lib 1
9353 EOF
9354
9355   LIBS="-lnet $LIBS"
9356
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360
9361         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9362 echo "configure:9363: checking for main in -lnsl_s" >&5
9363 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   ac_save_LIBS="$LIBS"
9368 LIBS="-lnsl_s  $LIBS"
9369 cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372
9373 int main() {
9374 main()
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   eval "ac_cv_lib_$ac_lib_var=yes"
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=no"
9385 fi
9386 rm -f conftest*
9387 LIBS="$ac_save_LIBS"
9388
9389 fi
9390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9394   cat >> confdefs.h <<EOF
9395 #define $ac_tr_lib 1
9396 EOF
9397
9398   LIBS="-lnsl_s $LIBS"
9399
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9405 echo "configure:9406: checking for main in -lnsl" >&5
9406 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   ac_save_LIBS="$LIBS"
9411 LIBS="-lnsl  $LIBS"
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 int main() {
9417 main()
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   eval "ac_cv_lib_$ac_lib_var=yes"
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   eval "ac_cv_lib_$ac_lib_var=no"
9428 fi
9429 rm -f conftest*
9430 LIBS="$ac_save_LIBS"
9431
9432 fi
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9434   echo "$ac_t""yes" 1>&6
9435     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_lib 1
9439 EOF
9440
9441   LIBS="-lnsl $LIBS"
9442
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446
9447         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9448 echo "configure:9449: checking for socket in -linet" >&5
9449 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   ac_save_LIBS="$LIBS"
9454 LIBS="-linet  $LIBS"
9455 cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 /* Override any gcc2 internal prototype to avoid an error.  */
9459 /* We use char because int might match the return type of a gcc2
9460     builtin and then its argument prototype would still apply.  */
9461 char socket();
9462
9463 int main() {
9464 socket()
9465 ; return 0; }
9466 EOF
9467 if { (eval echo configure:9468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9468   rm -rf conftest*
9469   eval "ac_cv_lib_$ac_lib_var=yes"
9470 else
9471   echo "configure: failed program was:" >&5
9472   cat conftest.$ac_ext >&5
9473   rm -rf conftest*
9474   eval "ac_cv_lib_$ac_lib_var=no"
9475 fi
9476 rm -f conftest*
9477 LIBS="$ac_save_LIBS"
9478
9479 fi
9480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9481   echo "$ac_t""yes" 1>&6
9482     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9483     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9484   cat >> confdefs.h <<EOF
9485 #define $ac_tr_lib 1
9486 EOF
9487
9488   LIBS="-linet $LIBS"
9489
9490 else
9491   echo "$ac_t""no" 1>&6
9492 fi
9493
9494         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9495 echo "configure:9496: checking for main in -lgen" >&5
9496 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9497 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   ac_save_LIBS="$LIBS"
9501 LIBS="-lgen  $LIBS"
9502 cat > conftest.$ac_ext <<EOF
9503 #line 9504 "configure"
9504 #include "confdefs.h"
9505
9506 int main() {
9507 main()
9508 ; return 0; }
9509 EOF
9510 if { (eval echo configure:9511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9511   rm -rf conftest*
9512   eval "ac_cv_lib_$ac_lib_var=yes"
9513 else
9514   echo "configure: failed program was:" >&5
9515   cat conftest.$ac_ext >&5
9516   rm -rf conftest*
9517   eval "ac_cv_lib_$ac_lib_var=no"
9518 fi
9519 rm -f conftest*
9520 LIBS="$ac_save_LIBS"
9521
9522 fi
9523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9524   echo "$ac_t""yes" 1>&6
9525     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9526     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9527   cat >> confdefs.h <<EOF
9528 #define $ac_tr_lib 1
9529 EOF
9530
9531   LIBS="-lgen $LIBS"
9532
9533 else
9534   echo "$ac_t""no" 1>&6
9535 fi
9536
9537
9538 fi
9539
9540
9541 echo $ac_n "checking for select""... $ac_c" 1>&6
9542 echo "configure:9543: checking for select" >&5
9543 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9544   echo $ac_n "(cached) $ac_c" 1>&6
9545 else
9546   cat > conftest.$ac_ext <<EOF
9547 #line 9548 "configure"
9548 #include "confdefs.h"
9549 /* System header to define __stub macros and hopefully few prototypes,
9550     which can conflict with char select(); below.  */
9551 #include <assert.h>
9552 /* Override any gcc2 internal prototype to avoid an error.  */
9553 /* We use char because int might match the return type of a gcc2
9554     builtin and then its argument prototype would still apply.  */
9555 char select();
9556 char (*f)();
9557
9558 int main() {
9559
9560 /* The GNU C library defines this for functions which it implements
9561     to always fail with ENOSYS.  Some functions are actually named
9562     something starting with __ and the normal name is an alias.  */
9563 #if defined (__stub_select) || defined (__stub___select)
9564 choke me
9565 #else
9566 f = select;
9567 #endif
9568
9569 ; return 0; }
9570 EOF
9571 if { (eval echo configure:9572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9572   rm -rf conftest*
9573   eval "ac_cv_func_select=yes"
9574 else
9575   echo "configure: failed program was:" >&5
9576   cat conftest.$ac_ext >&5
9577   rm -rf conftest*
9578   eval "ac_cv_func_select=no"
9579 fi
9580 rm -f conftest*
9581 fi
9582
9583 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9584   echo "$ac_t""yes" 1>&6
9585   :
9586 else
9587   echo "$ac_t""no" 1>&6
9588 { echo "configure: error: select() required." 1>&2; exit 1; }
9589 fi
9590
9591
9592 if test "${ac_cv_header_winsock_h}" != yes; then
9593                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9594 echo "configure:9595: checking types of arguments for select()" >&5
9595  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9596   echo $ac_n "(cached) $ac_c" 1>&6
9597 else
9598    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9605      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9606       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9607        cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 #ifdef HAVE_SYS_TYPES_H
9611 #include <sys/types.h>
9612 #endif
9613 #ifdef HAVE_SYS_TIME_H
9614 #include <sys/time.h>
9615 #endif
9616 #ifdef HAVE_SYS_SELECT_H
9617 #include <sys/select.h>
9618 #endif
9619 #ifdef HAVE_SYS_SOCKET_H
9620 #include <sys/socket.h>
9621 #endif
9622 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);
9623 int main() {
9624
9625 ; return 0; }
9626 EOF
9627 if { (eval echo configure:9628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9628   rm -rf conftest*
9629           ac_not_found=no ; break 3
9630 else
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   ac_not_found=yes
9635 fi
9636 rm -f conftest*
9637       done
9638      done
9639     done
9640    
9641 fi
9642   
9643 fi
9644  
9645 fi
9646  if test "$ac_not_found" = yes; then
9647   ac_cv_func_select_arg1=int 
9648   ac_cv_func_select_arg234='int *' 
9649   ac_cv_func_select_arg5='struct timeval *'
9650  fi
9651  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9652  cat >> confdefs.h <<EOF
9653 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9654 EOF
9655
9656  cat >> confdefs.h <<EOF
9657 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9658 EOF
9659
9660  cat >> confdefs.h <<EOF
9661 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9662 EOF
9663
9664
9665 fi
9666
9667
9668 for ac_hdr in regex.h 
9669 do
9670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9672 echo "configure:9673: checking for $ac_hdr" >&5
9673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9674   echo $ac_n "(cached) $ac_c" 1>&6
9675 else
9676   cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 #include <$ac_hdr>
9680 EOF
9681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9682 { (eval echo configure:9683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9684 if test -z "$ac_err"; then
9685   rm -rf conftest*
9686   eval "ac_cv_header_$ac_safe=yes"
9687 else
9688   echo "$ac_err" >&5
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691   rm -rf conftest*
9692   eval "ac_cv_header_$ac_safe=no"
9693 fi
9694 rm -f conftest*
9695 fi
9696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9697   echo "$ac_t""yes" 1>&6
9698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9699   cat >> confdefs.h <<EOF
9700 #define $ac_tr_hdr 1
9701 EOF
9702  
9703 else
9704   echo "$ac_t""no" 1>&6
9705 fi
9706 done
9707
9708 if test "$ac_cv_header_regex_h" != yes ; then
9709         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9710 fi
9711
9712 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9713 echo "configure:9714: checking for library containing regfree" >&5
9714 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9715   echo $ac_n "(cached) $ac_c" 1>&6
9716 else
9717   ac_func_search_save_LIBS="$LIBS"
9718 ac_cv_search_regfree="no"
9719 cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722 /* Override any gcc2 internal prototype to avoid an error.  */
9723 /* We use char because int might match the return type of a gcc2
9724     builtin and then its argument prototype would still apply.  */
9725 char regfree();
9726
9727 int main() {
9728 regfree()
9729 ; return 0; }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9732   rm -rf conftest*
9733   ac_cv_search_regfree="none required"
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737 fi
9738 rm -f conftest*
9739 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9740 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 /* Override any gcc2 internal prototype to avoid an error.  */
9745 /* We use char because int might match the return type of a gcc2
9746     builtin and then its argument prototype would still apply.  */
9747 char regfree();
9748
9749 int main() {
9750 regfree()
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   ac_cv_search_regfree="-l$ac_lib"
9756 break
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760 fi
9761 rm -f conftest*
9762 done
9763 LIBS="$ac_func_search_save_LIBS"
9764 fi
9765
9766 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9767 if test "$ac_cv_search_regfree" != "no"; then
9768   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9769   :
9770 else :
9771   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9772 fi
9773
9774
9775 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9776 echo "configure:9777: checking for compatible POSIX regex" >&5
9777 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9778   echo $ac_n "(cached) $ac_c" 1>&6
9779 else
9780   
9781         if test "$cross_compiling" = yes; then
9782   ol_cv_c_posix_regex=cross
9783 else
9784   cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787
9788 #include <sys/types.h>
9789 #include <regex.h>
9790 static char *pattern, *string;
9791 main()
9792 {
9793         int rc;
9794         regex_t re;
9795
9796         pattern = "^A";
9797
9798         if(regcomp(&re, pattern, 0)) {
9799                 return -1;
9800         }
9801         
9802         string = "ALL MATCH";
9803         
9804         rc = regexec(&re, string, 0, (void*)0, 0);
9805
9806         regfree(&re);
9807
9808         return rc;
9809 }
9810 EOF
9811 if { (eval echo configure:9812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9812 then
9813   ol_cv_c_posix_regex=yes
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817   rm -fr conftest*
9818   ol_cv_c_posix_regex=no
9819 fi
9820 rm -fr conftest*
9821 fi
9822
9823 fi
9824
9825 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9826
9827 if test "$ol_cv_c_posix_regex" = no ; then
9828         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9829 fi
9830
9831
9832 have_uuid=no
9833 for ac_hdr in sys/uuid.h
9834 do
9835 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9836 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9837 echo "configure:9838: checking for $ac_hdr" >&5
9838 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9839   echo $ac_n "(cached) $ac_c" 1>&6
9840 else
9841   cat > conftest.$ac_ext <<EOF
9842 #line 9843 "configure"
9843 #include "confdefs.h"
9844 #include <$ac_hdr>
9845 EOF
9846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9847 { (eval echo configure:9848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9849 if test -z "$ac_err"; then
9850   rm -rf conftest*
9851   eval "ac_cv_header_$ac_safe=yes"
9852 else
9853   echo "$ac_err" >&5
9854   echo "configure: failed program was:" >&5
9855   cat conftest.$ac_ext >&5
9856   rm -rf conftest*
9857   eval "ac_cv_header_$ac_safe=no"
9858 fi
9859 rm -f conftest*
9860 fi
9861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9862   echo "$ac_t""yes" 1>&6
9863     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9864   cat >> confdefs.h <<EOF
9865 #define $ac_tr_hdr 1
9866 EOF
9867  
9868 else
9869   echo "$ac_t""no" 1>&6
9870 fi
9871 done
9872
9873 if test $ac_cv_header_sys_uuid_h = yes ; then
9874         save_LIBS="$LIBS"
9875         
9876 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9877 echo "configure:9878: checking for library containing uuid_to_str" >&5
9878 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9879   echo $ac_n "(cached) $ac_c" 1>&6
9880 else
9881   ac_func_search_save_LIBS="$LIBS"
9882 ac_cv_search_uuid_to_str="no"
9883 cat > conftest.$ac_ext <<EOF
9884 #line 9885 "configure"
9885 #include "confdefs.h"
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 /* We use char because int might match the return type of a gcc2
9888     builtin and then its argument prototype would still apply.  */
9889 char uuid_to_str();
9890
9891 int main() {
9892 uuid_to_str()
9893 ; return 0; }
9894 EOF
9895 if { (eval echo configure:9896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9896   rm -rf conftest*
9897   ac_cv_search_uuid_to_str="none required"
9898 else
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901 fi
9902 rm -f conftest*
9903 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9904 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9905 cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 /* Override any gcc2 internal prototype to avoid an error.  */
9909 /* We use char because int might match the return type of a gcc2
9910     builtin and then its argument prototype would still apply.  */
9911 char uuid_to_str();
9912
9913 int main() {
9914 uuid_to_str()
9915 ; return 0; }
9916 EOF
9917 if { (eval echo configure:9918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9918   rm -rf conftest*
9919   ac_cv_search_uuid_to_str="-l$ac_lib"
9920 break
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924 fi
9925 rm -f conftest*
9926 done
9927 LIBS="$ac_func_search_save_LIBS"
9928 fi
9929
9930 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9931 if test "$ac_cv_search_uuid_to_str" != "no"; then
9932   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9933   have_uuid=yes
9934 else :
9935   :
9936 fi
9937         LIBS="$save_LIBS"
9938
9939         if test have_uuid = yes ; then
9940                 cat >> confdefs.h <<\EOF
9941 #define HAVE_UUID_TO_STR 1
9942 EOF
9943
9944
9945                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9946                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9947         fi
9948 fi
9949
9950 if test $have_uuid = no ; then
9951         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9952 echo "configure:9953: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9953         save_LIBS="$LIBS"
9954         LIBS="$LIBS -lrpcrt4"
9955         cat > conftest.$ac_ext <<EOF
9956 #line 9957 "configure"
9957 #include "confdefs.h"
9958
9959                 char UuidCreate@4();
9960                 char UuidToStringA@8();
9961                 
9962 int main() {
9963
9964                 UuidCreate@4();
9965                 UuidToStringA@8();
9966                 
9967 ; return 0; }
9968 EOF
9969 if { (eval echo configure:9970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9970   rm -rf conftest*
9971   need_rpcrt=yes
9972 else
9973   echo "configure: failed program was:" >&5
9974   cat conftest.$ac_ext >&5
9975   rm -rf conftest*
9976   need_rpcrt=no
9977 fi
9978 rm -f conftest*
9979         if test $need_rpcrt = yes; then
9980                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9981         fi
9982         LIBS="$save_LIBS"
9983         echo "$ac_t""$need_rpcrt" 1>&6
9984 fi
9985
9986 ol_link_dnssrv=no
9987 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9988 echo "configure:9989: checking for res_query" >&5
9989 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9990   echo $ac_n "(cached) $ac_c" 1>&6
9991 else
9992   cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995 /* System header to define __stub macros and hopefully few prototypes,
9996     which can conflict with char res_query(); below.  */
9997 #include <assert.h>
9998 /* Override any gcc2 internal prototype to avoid an error.  */
9999 /* We use char because int might match the return type of a gcc2
10000     builtin and then its argument prototype would still apply.  */
10001 char res_query();
10002 char (*f)();
10003
10004 int main() {
10005
10006 /* The GNU C library defines this for functions which it implements
10007     to always fail with ENOSYS.  Some functions are actually named
10008     something starting with __ and the normal name is an alias.  */
10009 #if defined (__stub_res_query) || defined (__stub___res_query)
10010 choke me
10011 #else
10012 f = res_query;
10013 #endif
10014
10015 ; return 0; }
10016 EOF
10017 if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10018   rm -rf conftest*
10019   eval "ac_cv_func_res_query=yes"
10020 else
10021   echo "configure: failed program was:" >&5
10022   cat conftest.$ac_ext >&5
10023   rm -rf conftest*
10024   eval "ac_cv_func_res_query=no"
10025 fi
10026 rm -f conftest*
10027 fi
10028
10029 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10030   echo "$ac_t""yes" 1>&6
10031   :
10032 else
10033   echo "$ac_t""no" 1>&6
10034 fi
10035
10036 if test $ac_cv_func_res_query = no ; then 
10037         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10038 echo "configure:10039: checking for __res_query" >&5
10039 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10040   echo $ac_n "(cached) $ac_c" 1>&6
10041 else
10042   cat > conftest.$ac_ext <<EOF
10043 #line 10044 "configure"
10044 #include "confdefs.h"
10045 /* System header to define __stub macros and hopefully few prototypes,
10046     which can conflict with char __res_query(); below.  */
10047 #include <assert.h>
10048 /* Override any gcc2 internal prototype to avoid an error.  */
10049 /* We use char because int might match the return type of a gcc2
10050     builtin and then its argument prototype would still apply.  */
10051 char __res_query();
10052 char (*f)();
10053
10054 int main() {
10055
10056 /* The GNU C library defines this for functions which it implements
10057     to always fail with ENOSYS.  Some functions are actually named
10058     something starting with __ and the normal name is an alias.  */
10059 #if defined (__stub___res_query) || defined (__stub_____res_query)
10060 choke me
10061 #else
10062 f = __res_query;
10063 #endif
10064
10065 ; return 0; }
10066 EOF
10067 if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10068   rm -rf conftest*
10069   eval "ac_cv_func___res_query=yes"
10070 else
10071   echo "configure: failed program was:" >&5
10072   cat conftest.$ac_ext >&5
10073   rm -rf conftest*
10074   eval "ac_cv_func___res_query=no"
10075 fi
10076 rm -f conftest*
10077 fi
10078
10079 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10080   echo "$ac_t""yes" 1>&6
10081   :
10082 else
10083   echo "$ac_t""no" 1>&6
10084 fi
10085
10086         ac_cv_func_res_query=$ac_cv_func___res_query
10087 fi
10088
10089 if test $ac_cv_func_res_query = no ; then 
10090         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10091 echo "configure:10092: checking for res_query in -lbind" >&5
10092 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10094   echo $ac_n "(cached) $ac_c" 1>&6
10095 else
10096   ac_save_LIBS="$LIBS"
10097 LIBS="-lbind  $LIBS"
10098 cat > conftest.$ac_ext <<EOF
10099 #line 10100 "configure"
10100 #include "confdefs.h"
10101 /* Override any gcc2 internal prototype to avoid an error.  */
10102 /* We use char because int might match the return type of a gcc2
10103     builtin and then its argument prototype would still apply.  */
10104 char res_query();
10105
10106 int main() {
10107 res_query()
10108 ; return 0; }
10109 EOF
10110 if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10111   rm -rf conftest*
10112   eval "ac_cv_lib_$ac_lib_var=yes"
10113 else
10114   echo "configure: failed program was:" >&5
10115   cat conftest.$ac_ext >&5
10116   rm -rf conftest*
10117   eval "ac_cv_lib_$ac_lib_var=no"
10118 fi
10119 rm -f conftest*
10120 LIBS="$ac_save_LIBS"
10121
10122 fi
10123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10124   echo "$ac_t""yes" 1>&6
10125     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10127   cat >> confdefs.h <<EOF
10128 #define $ac_tr_lib 1
10129 EOF
10130
10131   LIBS="-lbind $LIBS"
10132
10133 else
10134   echo "$ac_t""no" 1>&6
10135 fi
10136
10137         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10138 fi
10139
10140 if test $ac_cv_func_res_query = no ; then 
10141         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10142 echo "configure:10143: checking for __res_query in -lbind" >&5
10143 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10145   echo $ac_n "(cached) $ac_c" 1>&6
10146 else
10147   ac_save_LIBS="$LIBS"
10148 LIBS="-lbind  $LIBS"
10149 cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10152 /* Override any gcc2 internal prototype to avoid an error.  */
10153 /* We use char because int might match the return type of a gcc2
10154     builtin and then its argument prototype would still apply.  */
10155 char __res_query();
10156
10157 int main() {
10158 __res_query()
10159 ; return 0; }
10160 EOF
10161 if { (eval echo configure:10162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=yes"
10164 else
10165   echo "configure: failed program was:" >&5
10166   cat conftest.$ac_ext >&5
10167   rm -rf conftest*
10168   eval "ac_cv_lib_$ac_lib_var=no"
10169 fi
10170 rm -f conftest*
10171 LIBS="$ac_save_LIBS"
10172
10173 fi
10174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10175   echo "$ac_t""yes" 1>&6
10176     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10177     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10178   cat >> confdefs.h <<EOF
10179 #define $ac_tr_lib 1
10180 EOF
10181
10182   LIBS="-lbind $LIBS"
10183
10184 else
10185   echo "$ac_t""no" 1>&6
10186 fi
10187
10188         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10189 fi
10190
10191 if test $ac_cv_func_res_query = no ; then 
10192         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10193 echo "configure:10194: checking for res_query in -lresolv" >&5
10194 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10196   echo $ac_n "(cached) $ac_c" 1>&6
10197 else
10198   ac_save_LIBS="$LIBS"
10199 LIBS="-lresolv  $LIBS"
10200 cat > conftest.$ac_ext <<EOF
10201 #line 10202 "configure"
10202 #include "confdefs.h"
10203 /* Override any gcc2 internal prototype to avoid an error.  */
10204 /* We use char because int might match the return type of a gcc2
10205     builtin and then its argument prototype would still apply.  */
10206 char res_query();
10207
10208 int main() {
10209 res_query()
10210 ; return 0; }
10211 EOF
10212 if { (eval echo configure:10213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10213   rm -rf conftest*
10214   eval "ac_cv_lib_$ac_lib_var=yes"
10215 else
10216   echo "configure: failed program was:" >&5
10217   cat conftest.$ac_ext >&5
10218   rm -rf conftest*
10219   eval "ac_cv_lib_$ac_lib_var=no"
10220 fi
10221 rm -f conftest*
10222 LIBS="$ac_save_LIBS"
10223
10224 fi
10225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10228     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10229   cat >> confdefs.h <<EOF
10230 #define $ac_tr_lib 1
10231 EOF
10232
10233   LIBS="-lresolv $LIBS"
10234
10235 else
10236   echo "$ac_t""no" 1>&6
10237 fi
10238
10239         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10240 fi
10241
10242 if test $ac_cv_func_res_query = no ; then 
10243         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10244 echo "configure:10245: checking for __res_query in -lresolv" >&5
10245 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10247   echo $ac_n "(cached) $ac_c" 1>&6
10248 else
10249   ac_save_LIBS="$LIBS"
10250 LIBS="-lresolv  $LIBS"
10251 cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 /* Override any gcc2 internal prototype to avoid an error.  */
10255 /* We use char because int might match the return type of a gcc2
10256     builtin and then its argument prototype would still apply.  */
10257 char __res_query();
10258
10259 int main() {
10260 __res_query()
10261 ; return 0; }
10262 EOF
10263 if { (eval echo configure:10264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10264   rm -rf conftest*
10265   eval "ac_cv_lib_$ac_lib_var=yes"
10266 else
10267   echo "configure: failed program was:" >&5
10268   cat conftest.$ac_ext >&5
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=no"
10271 fi
10272 rm -f conftest*
10273 LIBS="$ac_save_LIBS"
10274
10275 fi
10276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10277   echo "$ac_t""yes" 1>&6
10278     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10279     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10280   cat >> confdefs.h <<EOF
10281 #define $ac_tr_lib 1
10282 EOF
10283
10284   LIBS="-lresolv $LIBS"
10285
10286 else
10287   echo "$ac_t""no" 1>&6
10288 fi
10289
10290         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10291 fi
10292
10293 if test "$ac_cv_func_res_query" = yes ; then
10294         cat >> confdefs.h <<\EOF
10295 #define HAVE_RES_QUERY 1
10296 EOF
10297
10298
10299         if test $ol_enable_dnssrv != no ; then
10300                 ol_link_dnssrv=yes
10301         fi
10302 fi
10303
10304 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10305         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10306 fi
10307
10308 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10309 do
10310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10311 echo "configure:10312: checking for $ac_func" >&5
10312 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315   cat > conftest.$ac_ext <<EOF
10316 #line 10317 "configure"
10317 #include "confdefs.h"
10318 /* System header to define __stub macros and hopefully few prototypes,
10319     which can conflict with char $ac_func(); below.  */
10320 #include <assert.h>
10321 /* Override any gcc2 internal prototype to avoid an error.  */
10322 /* We use char because int might match the return type of a gcc2
10323     builtin and then its argument prototype would still apply.  */
10324 char $ac_func();
10325 char (*f)();
10326
10327 int main() {
10328
10329 /* The GNU C library defines this for functions which it implements
10330     to always fail with ENOSYS.  Some functions are actually named
10331     something starting with __ and the normal name is an alias.  */
10332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10333 choke me
10334 #else
10335 f = $ac_func;
10336 #endif
10337
10338 ; return 0; }
10339 EOF
10340 if { (eval echo configure:10341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10341   rm -rf conftest*
10342   eval "ac_cv_func_$ac_func=yes"
10343 else
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   eval "ac_cv_func_$ac_func=no"
10348 fi
10349 rm -f conftest*
10350 fi
10351
10352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10353   echo "$ac_t""yes" 1>&6
10354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10355   cat >> confdefs.h <<EOF
10356 #define $ac_tr_func 1
10357 EOF
10358  
10359 else
10360   echo "$ac_t""no" 1>&6
10361 fi
10362 done
10363
10364
10365 ol_link_ipv6=no
10366 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10367         if test $ol_enable_ipv6 = yes ; then
10368                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10369         fi
10370 elif test $ol_enable_ipv6 != no ; then
10371         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10372 echo "configure:10373: checking INET6_ADDRSTRLEN" >&5
10373 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10374   echo $ac_n "(cached) $ac_c" 1>&6
10375 else
10376   
10377                 cat > conftest.$ac_ext <<EOF
10378 #line 10379 "configure"
10379 #include "confdefs.h"
10380
10381 #                       include <netinet/in.h>
10382 #                       ifdef INET6_ADDRSTRLEN
10383                                 __has_inet6_addrstrlen__;
10384 #                       endif
10385                 
10386 EOF
10387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10388   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10389   rm -rf conftest*
10390   ol_cv_inet6_addrstrlen=yes
10391 else
10392   rm -rf conftest*
10393   ol_cv_inet6_addrstrlen=no
10394 fi
10395 rm -f conftest*
10396
10397 fi
10398
10399 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10400
10401
10402         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10403 echo "configure:10404: checking struct sockaddr_storage" >&5
10404 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10405   echo $ac_n "(cached) $ac_c" 1>&6
10406 else
10407   
10408                 cat > conftest.$ac_ext <<EOF
10409 #line 10410 "configure"
10410 #include "confdefs.h"
10411
10412 #include <sys/types.h>
10413 #include <sys/socket.h>
10414
10415 int main() {
10416
10417                         struct sockaddr_storage ss;
10418
10419 ; return 0; }
10420 EOF
10421 if { (eval echo configure:10422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10422   rm -rf conftest*
10423   ol_cv_struct_sockaddr_storage=yes
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   ol_cv_struct_sockaddr_storage=no
10429 fi
10430 rm -f conftest*
10431 fi
10432
10433 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10434
10435         if test $ol_cv_inet6_addrstrlen = yes \
10436                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10437                 ol_link_ipv6=yes
10438         elif test $ol_enable_ipv6 = yes \
10439                         -a $ol_cv_inet6_addrstrlen = no ; then
10440                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10441         elif test $ol_enable_ipv6 = yes \
10442                         -a $ol_cv_struct_sockaddr_storage = no ; then
10443                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10444         fi
10445 fi
10446
10447 if test $ol_enable_local != no ; then
10448         for ac_hdr in sys/un.h 
10449 do
10450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10452 echo "configure:10453: checking for $ac_hdr" >&5
10453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10454   echo $ac_n "(cached) $ac_c" 1>&6
10455 else
10456   cat > conftest.$ac_ext <<EOF
10457 #line 10458 "configure"
10458 #include "confdefs.h"
10459 #include <$ac_hdr>
10460 EOF
10461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10462 { (eval echo configure:10463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10464 if test -z "$ac_err"; then
10465   rm -rf conftest*
10466   eval "ac_cv_header_$ac_safe=yes"
10467 else
10468   echo "$ac_err" >&5
10469   echo "configure: failed program was:" >&5
10470   cat conftest.$ac_ext >&5
10471   rm -rf conftest*
10472   eval "ac_cv_header_$ac_safe=no"
10473 fi
10474 rm -f conftest*
10475 fi
10476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10477   echo "$ac_t""yes" 1>&6
10478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10479   cat >> confdefs.h <<EOF
10480 #define $ac_tr_hdr 1
10481 EOF
10482  
10483 else
10484   echo "$ac_t""no" 1>&6
10485 fi
10486 done
10487
10488
10489         if test $ol_enable_local = auto ; then
10490                 ol_enable_local=$ac_cv_header_sys_un_h
10491         elif test $ac_cv_header_sys_un_h = no ; then
10492                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10493         fi
10494 fi
10495
10496 ol_link_kbind=no
10497 ol_link_kpasswd=no
10498 ol_link_krb5=no
10499 ol_link_krb4=no
10500
10501 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10502         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10503         -o $ol_with_kerberos = k425 ; then
10504
10505         for ac_hdr in krb5.h
10506 do
10507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10509 echo "configure:10510: checking for $ac_hdr" >&5
10510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10511   echo $ac_n "(cached) $ac_c" 1>&6
10512 else
10513   cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516 #include <$ac_hdr>
10517 EOF
10518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10519 { (eval echo configure:10520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10521 if test -z "$ac_err"; then
10522   rm -rf conftest*
10523   eval "ac_cv_header_$ac_safe=yes"
10524 else
10525   echo "$ac_err" >&5
10526   echo "configure: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=no"
10530 fi
10531 rm -f conftest*
10532 fi
10533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10536   cat >> confdefs.h <<EOF
10537 #define $ac_tr_hdr 1
10538 EOF
10539  
10540 else
10541   echo "$ac_t""no" 1>&6
10542 fi
10543 done
10544
10545
10546         if test $ac_cv_header_krb5_h = yes ; then
10547                                 for ac_hdr in heim_err.h
10548 do
10549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10551 echo "configure:10552: checking for $ac_hdr" >&5
10552 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10553   echo $ac_n "(cached) $ac_c" 1>&6
10554 else
10555   cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558 #include <$ac_hdr>
10559 EOF
10560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10561 { (eval echo configure:10562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10563 if test -z "$ac_err"; then
10564   rm -rf conftest*
10565   eval "ac_cv_header_$ac_safe=yes"
10566 else
10567   echo "$ac_err" >&5
10568   echo "configure: failed program was:" >&5
10569   cat conftest.$ac_ext >&5
10570   rm -rf conftest*
10571   eval "ac_cv_header_$ac_safe=no"
10572 fi
10573 rm -f conftest*
10574 fi
10575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10576   echo "$ac_t""yes" 1>&6
10577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10578   cat >> confdefs.h <<EOF
10579 #define $ac_tr_hdr 1
10580 EOF
10581  
10582 else
10583   echo "$ac_t""no" 1>&6
10584 fi
10585 done
10586
10587                 if test $ac_cv_header_heim_err_h = yes ; then
10588                         krb5_impl=heimdal
10589                 else
10590                         krb5_impl=mit
10591                 fi
10592
10593                 if test $krb5_impl = mit; then
10594                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10595 echo "configure:10596: checking for main in -lk5crypto" >&5
10596 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10598   echo $ac_n "(cached) $ac_c" 1>&6
10599 else
10600   ac_save_LIBS="$LIBS"
10601 LIBS="-lk5crypto  $LIBS"
10602 cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605
10606 int main() {
10607 main()
10608 ; return 0; }
10609 EOF
10610 if { (eval echo configure:10611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=yes"
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=no"
10618 fi
10619 rm -f conftest*
10620 LIBS="$ac_save_LIBS"
10621
10622 fi
10623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10624   echo "$ac_t""yes" 1>&6
10625   krb5crypto=k5crypto
10626 else
10627   echo "$ac_t""no" 1>&6
10628 krb5crypto=crypto
10629 fi
10630
10631
10632                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10633 echo "configure:10634: checking for main in -lkrb5" >&5
10634 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10636   echo $ac_n "(cached) $ac_c" 1>&6
10637 else
10638   ac_save_LIBS="$LIBS"
10639 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10640 cat > conftest.$ac_ext <<EOF
10641 #line 10642 "configure"
10642 #include "confdefs.h"
10643
10644 int main() {
10645 main()
10646 ; return 0; }
10647 EOF
10648 if { (eval echo configure:10649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10649   rm -rf conftest*
10650   eval "ac_cv_lib_$ac_lib_var=yes"
10651 else
10652   echo "configure: failed program was:" >&5
10653   cat conftest.$ac_ext >&5
10654   rm -rf conftest*
10655   eval "ac_cv_lib_$ac_lib_var=no"
10656 fi
10657 rm -f conftest*
10658 LIBS="$ac_save_LIBS"
10659
10660 fi
10661 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10662   echo "$ac_t""yes" 1>&6
10663   have_krb5=yes
10664                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10665 else
10666   echo "$ac_t""no" 1>&6
10667 have_krb5=no
10668 fi
10669
10670
10671                 elif test $krb5_impl = heimdal; then
10672                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10673 echo "configure:10674: checking for main in -ldes" >&5
10674 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10675 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10676   echo $ac_n "(cached) $ac_c" 1>&6
10677 else
10678   ac_save_LIBS="$LIBS"
10679 LIBS="-ldes  $LIBS"
10680 cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683
10684 int main() {
10685 main()
10686 ; return 0; }
10687 EOF
10688 if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10689   rm -rf conftest*
10690   eval "ac_cv_lib_$ac_lib_var=yes"
10691 else
10692   echo "configure: failed program was:" >&5
10693   cat conftest.$ac_ext >&5
10694   rm -rf conftest*
10695   eval "ac_cv_lib_$ac_lib_var=no"
10696 fi
10697 rm -f conftest*
10698 LIBS="$ac_save_LIBS"
10699
10700 fi
10701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10702   echo "$ac_t""yes" 1>&6
10703   krb5crypto=des
10704 else
10705   echo "$ac_t""no" 1>&6
10706 krb5crypto=crypto
10707 fi
10708
10709
10710                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10711 echo "configure:10712: checking for main in -lkrb5" >&5
10712 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10713 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10714   echo $ac_n "(cached) $ac_c" 1>&6
10715 else
10716   ac_save_LIBS="$LIBS"
10717 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10718 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721
10722 int main() {
10723 main()
10724 ; return 0; }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=yes"
10729 else
10730   echo "configure: failed program was:" >&5
10731   cat conftest.$ac_ext >&5
10732   rm -rf conftest*
10733   eval "ac_cv_lib_$ac_lib_var=no"
10734 fi
10735 rm -f conftest*
10736 LIBS="$ac_save_LIBS"
10737
10738 fi
10739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10740   echo "$ac_t""yes" 1>&6
10741   have_krb5=yes
10742                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10743 else
10744   echo "$ac_t""no" 1>&6
10745 have_krb5=no
10746 fi
10747
10748
10749                         cat >> confdefs.h <<\EOF
10750 #define HAVE_HEIMDAL_KERBEROS 1
10751 EOF
10752
10753
10754                 else
10755                         have_krb5=no
10756                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10757                 fi
10758
10759                 if test $have_krb5 = yes ; then
10760                         ol_link_krb5=yes
10761
10762                         cat >> confdefs.h <<\EOF
10763 #define HAVE_KRB5 1
10764 EOF
10765
10766
10767                         if test $ol_enable_kpasswd != no ; then
10768                                 ol_link_kpasswd=yes;
10769                         fi
10770
10771                         if test $ol_with_kerberos = k5only ; then
10772                                 ol_with_kerberos=found
10773                         fi
10774
10775                 elif test $ol_with_kerberos != auto ; then
10776                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10777                 fi
10778
10779         fi
10780 fi
10781
10782 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10783         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10784
10785         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10786 do
10787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10789 echo "configure:10790: checking for $ac_hdr" >&5
10790 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10791   echo $ac_n "(cached) $ac_c" 1>&6
10792 else
10793   cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796 #include <$ac_hdr>
10797 EOF
10798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10799 { (eval echo configure:10800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10801 if test -z "$ac_err"; then
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=yes"
10804 else
10805   echo "$ac_err" >&5
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=no"
10810 fi
10811 rm -f conftest*
10812 fi
10813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10814   echo "$ac_t""yes" 1>&6
10815     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10816   cat >> confdefs.h <<EOF
10817 #define $ac_tr_hdr 1
10818 EOF
10819  
10820 else
10821   echo "$ac_t""no" 1>&6
10822 fi
10823 done
10824
10825
10826         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10827                 if test $krb5_impl = mit; then
10828                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10829 echo "configure:10830: checking for main in -lkrb4" >&5
10830 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10832   echo $ac_n "(cached) $ac_c" 1>&6
10833 else
10834   ac_save_LIBS="$LIBS"
10835 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10836 cat > conftest.$ac_ext <<EOF
10837 #line 10838 "configure"
10838 #include "confdefs.h"
10839
10840 int main() {
10841 main()
10842 ; return 0; }
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10845   rm -rf conftest*
10846   eval "ac_cv_lib_$ac_lib_var=yes"
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -rf conftest*
10851   eval "ac_cv_lib_$ac_lib_var=no"
10852 fi
10853 rm -f conftest*
10854 LIBS="$ac_save_LIBS"
10855
10856 fi
10857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859   have_k425=yes
10860                                 KRB4_LIBS="-lkrb4 -ldes425"
10861 else
10862   echo "$ac_t""no" 1>&6
10863 have_k425=no
10864 fi
10865
10866
10867                 elif test $krb5_impl = heimdal; then
10868                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10869 echo "configure:10870: checking for main in -lkrb4" >&5
10870 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10871 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10872   echo $ac_n "(cached) $ac_c" 1>&6
10873 else
10874   ac_save_LIBS="$LIBS"
10875 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10876 cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879
10880 int main() {
10881 main()
10882 ; return 0; }
10883 EOF
10884 if { (eval echo configure:10885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10885   rm -rf conftest*
10886   eval "ac_cv_lib_$ac_lib_var=yes"
10887 else
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_lib_$ac_lib_var=no"
10892 fi
10893 rm -f conftest*
10894 LIBS="$ac_save_LIBS"
10895
10896 fi
10897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899   have_k425=yes
10900                                 KRB4_LIBS="-lkrb4"
10901 else
10902   echo "$ac_t""no" 1>&6
10903 have_k425=no
10904 fi
10905
10906
10907                 else
10908                         have_425=no
10909                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10910                 fi
10911
10912                 if test $have_k425 = yes ; then
10913                         ol_with_kerberos=found
10914                         ol_link_krb4=yes
10915
10916                         cat >> confdefs.h <<\EOF
10917 #define HAVE_KRB425 1
10918 EOF
10919
10920                         cat >> confdefs.h <<\EOF
10921 #define HAVE_KRB4 1
10922 EOF
10923
10924
10925                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10926 echo "configure:10927: checking for des_debug in Kerberos libraries" >&5
10927 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10928   echo $ac_n "(cached) $ac_c" 1>&6
10929 else
10930   
10931                                                                 save_LIBS="$LIBS"
10932                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10933                                 cat > conftest.$ac_ext <<EOF
10934 #line 10935 "configure"
10935 #include "confdefs.h"
10936
10937 #include <kerberosIV/krb.h>
10938 #include <kerberosIV/des.h>
10939 extern int des_debug;
10940
10941 int main() {
10942
10943 des_debug = 1;
10944
10945 ; return 0; }
10946 EOF
10947 if { (eval echo configure:10948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10948   rm -rf conftest*
10949   ol_cv_var_des_debug=yes
10950 else
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -rf conftest*
10954   ol_cv_var_des_debug=no
10955 fi
10956 rm -f conftest*
10957                                                                 LIBS="$save_LIBS"
10958                         
10959 fi
10960
10961 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10962
10963                         if test $ol_cv_var_des_debug = yes ; then
10964                                 cat >> confdefs.h <<\EOF
10965 #define HAVE_DES_DEBUG 1
10966 EOF
10967
10968                         fi
10969
10970                         LIBS="$save_LIBS"
10971                 fi
10972         fi
10973 fi
10974
10975 if test $ol_link_krb5 = yes ; then
10976         ol_with_kerberos=found
10977 fi
10978
10979 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10980         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10981
10982         for ac_hdr in krb.h des.h krb-archaeology.h 
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   cat > conftest.$ac_ext <<EOF
10991 #line 10992 "configure"
10992 #include "confdefs.h"
10993 #include <$ac_hdr>
10994 EOF
10995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10996 { (eval echo configure:10997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10998 if test -z "$ac_err"; then
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=yes"
11001 else
11002   echo "$ac_err" >&5
11003   echo "configure: failed program was:" >&5
11004   cat conftest.$ac_ext >&5
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=no"
11007 fi
11008 rm -f conftest*
11009 fi
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016  
11017 else
11018   echo "$ac_t""no" 1>&6
11019 fi
11020 done
11021
11022
11023         if test $ac_cv_header_krb_h = yes ; then
11024                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11025 echo "configure:11026: checking for main in -lkrb" >&5
11026 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11027 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   ac_save_LIBS="$LIBS"
11031 LIBS="-lkrb -ldes $LIBS"
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035
11036 int main() {
11037 main()
11038 ; return 0; }
11039 EOF
11040 if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=yes"
11043 else
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=no"
11048 fi
11049 rm -f conftest*
11050 LIBS="$ac_save_LIBS"
11051
11052 fi
11053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055   have_k4=yes
11056 else
11057   echo "$ac_t""no" 1>&6
11058 have_k4=no
11059 fi
11060
11061
11062                 if test $have_k4 = yes ; then
11063                         ol_with_kerberos=found
11064                         ol_link_krb4=yes
11065
11066                         cat >> confdefs.h <<\EOF
11067 #define HAVE_KRB4 1
11068 EOF
11069
11070
11071                         KRB4_LIBS="-lkrb -ldes"
11072
11073                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11074                                 cat >> confdefs.h <<\EOF
11075 #define HAVE_KTH_KERBEROS 1
11076 EOF
11077
11078                         fi
11079                 fi
11080         fi
11081 fi
11082
11083 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11084         ol_link_kpasswd=yes
11085 fi
11086
11087 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11088         ol_link_kbind=yes
11089
11090 elif test $ol_enable_kbind = yes ; then
11091         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11092 fi
11093
11094 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11095         cat >> confdefs.h <<\EOF
11096 #define HAVE_KERBEROS 1
11097 EOF
11098
11099
11100 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11101         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11102 fi
11103
11104 ol_link_tls=no
11105 if test $ol_with_tls != no ; then
11106         for ac_hdr in openssl/ssl.h ssl.h
11107 do
11108 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11109 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11110 echo "configure:11111: checking for $ac_hdr" >&5
11111 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 #include <$ac_hdr>
11118 EOF
11119 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11120 { (eval echo configure:11121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11121 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11122 if test -z "$ac_err"; then
11123   rm -rf conftest*
11124   eval "ac_cv_header_$ac_safe=yes"
11125 else
11126   echo "$ac_err" >&5
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_header_$ac_safe=no"
11131 fi
11132 rm -f conftest*
11133 fi
11134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11137   cat >> confdefs.h <<EOF
11138 #define $ac_tr_hdr 1
11139 EOF
11140  
11141 else
11142   echo "$ac_t""no" 1>&6
11143 fi
11144 done
11145
11146         
11147         if test $ac_cv_header_openssl_ssl_h = yes \
11148                 -o $ac_cv_header_ssl_h = yes ; then
11149                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11150 echo "configure:11151: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11151 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11153   echo $ac_n "(cached) $ac_c" 1>&6
11154 else
11155   ac_save_LIBS="$LIBS"
11156 LIBS="-lssl -lcrypto $LIBS"
11157 cat > conftest.$ac_ext <<EOF
11158 #line 11159 "configure"
11159 #include "confdefs.h"
11160 /* Override any gcc2 internal prototype to avoid an error.  */
11161 /* We use char because int might match the return type of a gcc2
11162     builtin and then its argument prototype would still apply.  */
11163 char SSLeay_add_ssl_algorithms();
11164
11165 int main() {
11166 SSLeay_add_ssl_algorithms()
11167 ; return 0; }
11168 EOF
11169 if { (eval echo configure:11170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11170   rm -rf conftest*
11171   eval "ac_cv_lib_$ac_lib_var=yes"
11172 else
11173   echo "configure: failed program was:" >&5
11174   cat conftest.$ac_ext >&5
11175   rm -rf conftest*
11176   eval "ac_cv_lib_$ac_lib_var=no"
11177 fi
11178 rm -f conftest*
11179 LIBS="$ac_save_LIBS"
11180
11181 fi
11182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11183   echo "$ac_t""yes" 1>&6
11184   have_ssleay=yes
11185                         need_rsaref=no
11186 else
11187   echo "$ac_t""no" 1>&6
11188 have_ssleay=no
11189 fi
11190
11191                         
11192                 if test $have_ssleay = no ; then
11193                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11194 echo "configure:11195: checking for SSL_library_init in -lssl" >&5
11195 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11197   echo $ac_n "(cached) $ac_c" 1>&6
11198 else
11199   ac_save_LIBS="$LIBS"
11200 LIBS="-lssl -lcrypto $LIBS"
11201 cat > conftest.$ac_ext <<EOF
11202 #line 11203 "configure"
11203 #include "confdefs.h"
11204 /* Override any gcc2 internal prototype to avoid an error.  */
11205 /* We use char because int might match the return type of a gcc2
11206     builtin and then its argument prototype would still apply.  */
11207 char SSL_library_init();
11208
11209 int main() {
11210 SSL_library_init()
11211 ; return 0; }
11212 EOF
11213 if { (eval echo configure:11214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11214   rm -rf conftest*
11215   eval "ac_cv_lib_$ac_lib_var=yes"
11216 else
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_lib_$ac_lib_var=no"
11221 fi
11222 rm -f conftest*
11223 LIBS="$ac_save_LIBS"
11224
11225 fi
11226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11227   echo "$ac_t""yes" 1>&6
11228   have_ssleay=yes
11229                                 need_rsaref=no
11230 else
11231   echo "$ac_t""no" 1>&6
11232 have_ssleay=no
11233 fi
11234
11235                 fi
11236
11237                 if test $have_ssleay = no ; then
11238                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11239 echo "configure:11240: checking for ssl3_accept in -lssl" >&5
11240 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11241 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11242   echo $ac_n "(cached) $ac_c" 1>&6
11243 else
11244   ac_save_LIBS="$LIBS"
11245 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11246 cat > conftest.$ac_ext <<EOF
11247 #line 11248 "configure"
11248 #include "confdefs.h"
11249 /* Override any gcc2 internal prototype to avoid an error.  */
11250 /* We use char because int might match the return type of a gcc2
11251     builtin and then its argument prototype would still apply.  */
11252 char ssl3_accept();
11253
11254 int main() {
11255 ssl3_accept()
11256 ; return 0; }
11257 EOF
11258 if { (eval echo configure:11259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11259   rm -rf conftest*
11260   eval "ac_cv_lib_$ac_lib_var=yes"
11261 else
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_lib_$ac_lib_var=no"
11266 fi
11267 rm -f conftest*
11268 LIBS="$ac_save_LIBS"
11269
11270 fi
11271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11272   echo "$ac_t""yes" 1>&6
11273   have_ssleay=yes
11274                                 need_rsaref=yes
11275 else
11276   echo "$ac_t""no" 1>&6
11277 have_ssleay=no
11278 fi
11279
11280                 fi
11281
11282                 if test $have_ssleay = yes ; then
11283                         ol_with_tls=found
11284                         ol_link_tls=yes
11285
11286                         cat >> confdefs.h <<\EOF
11287 #define HAVE_SSLEAY 1
11288 EOF
11289
11290
11291                         if test $need_rsaref = yes; then
11292                                 cat >> confdefs.h <<\EOF
11293 #define HAVE_RSAREF 1
11294 EOF
11295
11296
11297                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11298                         else
11299                                 TLS_LIBS="-lssl -lcrypto"
11300                         fi
11301                 fi
11302         fi
11303
11304 else
11305         echo "configure: warning: TLS data protection not supported!" 1>&2
11306 fi
11307
11308 if test $ol_link_tls = yes ; then
11309         cat >> confdefs.h <<\EOF
11310 #define HAVE_TLS 1
11311 EOF
11312
11313
11314 elif test $ol_with_tls = auto ; then
11315         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11316         echo "configure: warning: TLS data protection not supported!" 1>&2
11317
11318 elif test $ol_with_tls != no ; then
11319         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11320 fi
11321
11322 if test $ol_enable_lmpasswd != no; then
11323         if test $ol_link_tls != yes ; then
11324                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11325         fi
11326
11327         cat >> confdefs.h <<\EOF
11328 #define SLAPD_LMHASH 1
11329 EOF
11330
11331 fi
11332
11333 ol_link_threads=no
11334
11335 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11336         -o $ol_with_threads = nt ; then
11337
11338         
11339         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11340 echo "configure:11341: checking for _beginthread" >&5
11341 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11342   echo $ac_n "(cached) $ac_c" 1>&6
11343 else
11344   cat > conftest.$ac_ext <<EOF
11345 #line 11346 "configure"
11346 #include "confdefs.h"
11347 /* System header to define __stub macros and hopefully few prototypes,
11348     which can conflict with char _beginthread(); below.  */
11349 #include <assert.h>
11350 /* Override any gcc2 internal prototype to avoid an error.  */
11351 /* We use char because int might match the return type of a gcc2
11352     builtin and then its argument prototype would still apply.  */
11353 char _beginthread();
11354 char (*f)();
11355
11356 int main() {
11357
11358 /* The GNU C library defines this for functions which it implements
11359     to always fail with ENOSYS.  Some functions are actually named
11360     something starting with __ and the normal name is an alias.  */
11361 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11362 choke me
11363 #else
11364 f = _beginthread;
11365 #endif
11366
11367 ; return 0; }
11368 EOF
11369 if { (eval echo configure:11370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11370   rm -rf conftest*
11371   eval "ac_cv_func__beginthread=yes"
11372 else
11373   echo "configure: failed program was:" >&5
11374   cat conftest.$ac_ext >&5
11375   rm -rf conftest*
11376   eval "ac_cv_func__beginthread=no"
11377 fi
11378 rm -f conftest*
11379 fi
11380
11381 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11382   echo "$ac_t""yes" 1>&6
11383   :
11384 else
11385   echo "$ac_t""no" 1>&6
11386 fi
11387
11388
11389         if test $ac_cv_func__beginthread = yes ; then
11390                 cat >> confdefs.h <<\EOF
11391 #define HAVE_NT_THREADS 1
11392 EOF
11393
11394                 ol_cv_nt_threads=yes
11395         fi
11396
11397
11398         if test "$ol_cv_nt_threads" = yes ; then
11399                 ol_link_threads=nt
11400                 ol_with_threads=found
11401                 ol_with_yielding_select=yes
11402
11403                 cat >> confdefs.h <<\EOF
11404 #define HAVE_NT_SERVICE_MANAGER 1
11405 EOF
11406
11407                 cat >> confdefs.h <<\EOF
11408 #define HAVE_NT_EVENT_LOG 1
11409 EOF
11410
11411         fi
11412
11413         if test $ol_with_threads = nt ; then
11414                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11415         fi
11416 fi
11417
11418 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11419         -o $ol_with_threads = posix ; then
11420
11421         for ac_hdr in pthread.h
11422 do
11423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11425 echo "configure:11426: checking for $ac_hdr" >&5
11426 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11427   echo $ac_n "(cached) $ac_c" 1>&6
11428 else
11429   cat > conftest.$ac_ext <<EOF
11430 #line 11431 "configure"
11431 #include "confdefs.h"
11432 #include <$ac_hdr>
11433 EOF
11434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11435 { (eval echo configure:11436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11437 if test -z "$ac_err"; then
11438   rm -rf conftest*
11439   eval "ac_cv_header_$ac_safe=yes"
11440 else
11441   echo "$ac_err" >&5
11442   echo "configure: failed program was:" >&5
11443   cat conftest.$ac_ext >&5
11444   rm -rf conftest*
11445   eval "ac_cv_header_$ac_safe=no"
11446 fi
11447 rm -f conftest*
11448 fi
11449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11450   echo "$ac_t""yes" 1>&6
11451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11452   cat >> confdefs.h <<EOF
11453 #define $ac_tr_hdr 1
11454 EOF
11455  
11456 else
11457   echo "$ac_t""no" 1>&6
11458 fi
11459 done
11460
11461
11462         if test $ac_cv_header_pthread_h = yes ; then
11463                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11464 echo "configure:11465: checking POSIX thread version" >&5
11465 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11466   echo $ac_n "(cached) $ac_c" 1>&6
11467 else
11468   
11469         cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472
11473 #               include <pthread.h>
11474         
11475 int main() {
11476
11477                 int i = PTHREAD_CREATE_JOINABLE;
11478         
11479 ; return 0; }
11480 EOF
11481 if { (eval echo configure:11482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11482   rm -rf conftest*
11483   
11484         cat > conftest.$ac_ext <<EOF
11485 #line 11486 "configure"
11486 #include "confdefs.h"
11487 #include <pthread.h>
11488 EOF
11489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11490   egrep "pthread_detach" >/dev/null 2>&1; then
11491   rm -rf conftest*
11492   ol_cv_pthread_version=10
11493 else
11494   rm -rf conftest*
11495   ol_cv_pthread_version=8
11496 fi
11497 rm -f conftest*
11498
11499 else
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   
11504         cat > conftest.$ac_ext <<EOF
11505 #line 11506 "configure"
11506 #include "confdefs.h"
11507
11508 #               include <pthread.h>
11509 #               ifdef PTHREAD_CREATE_UNDETACHED
11510                 draft7
11511 #               endif
11512         
11513 EOF
11514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11515   egrep "draft7" >/dev/null 2>&1; then
11516   rm -rf conftest*
11517   ol_cv_pthread_version=7
11518 else
11519   rm -rf conftest*
11520   
11521         cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 #include <pthread.h>
11525 EOF
11526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11527   egrep "pthread_attr_init" >/dev/null 2>&1; then
11528   rm -rf conftest*
11529   ol_cv_pthread_version=6
11530 else
11531   rm -rf conftest*
11532   
11533         cat > conftest.$ac_ext <<EOF
11534 #line 11535 "configure"
11535 #include "confdefs.h"
11536
11537 #               include <pthread.h>
11538 #ifdef          PTHREAD_MUTEX_INITIALIZER
11539                 draft5
11540 #endif
11541         
11542 EOF
11543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11544   egrep "draft5" >/dev/null 2>&1; then
11545   rm -rf conftest*
11546   ol_cv_pthread_version=5
11547 else
11548   rm -rf conftest*
11549   ol_cv_pthread_version=4
11550 fi
11551 rm -f conftest*
11552  
11553 fi
11554 rm -f conftest*
11555  
11556 fi
11557 rm -f conftest*
11558  
11559 fi
11560 rm -f conftest*
11561
11562 fi
11563
11564 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11565
11566
11567                 if test $ol_cv_pthread_version != 0 ; then
11568                         cat >> confdefs.h <<EOF
11569 #define HAVE_PTHREADS $ol_cv_pthread_version
11570 EOF
11571
11572                 else
11573                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11574                 fi
11575
11576                 # consider threads found
11577                 ol_with_threads=found
11578
11579                 
11580         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11581 echo "configure:11582: checking for LinuxThreads pthread.h" >&5
11582 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11583   echo $ac_n "(cached) $ac_c" 1>&6
11584 else
11585   cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 #include <pthread.h>
11589 EOF
11590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11591   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11592   rm -rf conftest*
11593   ol_cv_header_linux_threads=yes
11594 else
11595   rm -rf conftest*
11596   ol_cv_header_linux_threads=no
11597 fi
11598 rm -f conftest*
11599
11600                 
11601 fi
11602
11603 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11604         if test $ol_cv_header_linux_threads = yes; then
11605                 cat >> confdefs.h <<\EOF
11606 #define HAVE_LINUX_THREADS 1
11607 EOF
11608
11609         fi
11610
11611                 
11612         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11613 echo "configure:11614: checking for GNU Pth pthread.h" >&5
11614 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11615   echo $ac_n "(cached) $ac_c" 1>&6
11616 else
11617   cat > conftest.$ac_ext <<EOF
11618 #line 11619 "configure"
11619 #include "confdefs.h"
11620 #include <pthread.h>
11621 #ifdef _POSIX_THREAD_IS_GNU_PTH
11622         __gnu_pth__;
11623 #endif
11624
11625 EOF
11626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11627   egrep "__gnu_pth__" >/dev/null 2>&1; then
11628   rm -rf conftest*
11629   ol_cv_header_gnu_pth_pthread_h=yes
11630 else
11631   rm -rf conftest*
11632   ol_cv_header_gnu_pth_pthread_h=no
11633 fi
11634 rm -f conftest*
11635
11636                 
11637 fi
11638
11639 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11640
11641
11642                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11643                         for ac_hdr in sched.h
11644 do
11645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11647 echo "configure:11648: checking for $ac_hdr" >&5
11648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11649   echo $ac_n "(cached) $ac_c" 1>&6
11650 else
11651   cat > conftest.$ac_ext <<EOF
11652 #line 11653 "configure"
11653 #include "confdefs.h"
11654 #include <$ac_hdr>
11655 EOF
11656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11657 { (eval echo configure:11658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11659 if test -z "$ac_err"; then
11660   rm -rf conftest*
11661   eval "ac_cv_header_$ac_safe=yes"
11662 else
11663   echo "$ac_err" >&5
11664   echo "configure: failed program was:" >&5
11665   cat conftest.$ac_ext >&5
11666   rm -rf conftest*
11667   eval "ac_cv_header_$ac_safe=no"
11668 fi
11669 rm -f conftest*
11670 fi
11671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11672   echo "$ac_t""yes" 1>&6
11673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11674   cat >> confdefs.h <<EOF
11675 #define $ac_tr_hdr 1
11676 EOF
11677  
11678 else
11679   echo "$ac_t""no" 1>&6
11680 fi
11681 done
11682
11683                 fi
11684
11685                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11686                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11687 echo "configure:11688: checking for pthread_create in default libraries" >&5
11688 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11689   echo $ac_n "(cached) $ac_c" 1>&6
11690 else
11691   
11692                 if test "$cross_compiling" = yes; then
11693   cat > conftest.$ac_ext <<EOF
11694 #line 11695 "configure"
11695 #include "confdefs.h"
11696 /* pthread test headers */
11697 #include <pthread.h>
11698 #if HAVE_PTHREADS < 7
11699 #include <errno.h>
11700 #endif
11701 #ifndef NULL
11702 #define NULL (void*)0
11703 #endif
11704
11705 static void *task(p)
11706         void *p;
11707 {
11708         return (void *) (p == NULL);
11709 }
11710
11711 int main() {
11712
11713         /* pthread test function */
11714 #ifndef PTHREAD_CREATE_DETACHED
11715 #define PTHREAD_CREATE_DETACHED 1
11716 #endif
11717         pthread_t t;
11718         int status;
11719         int detach = PTHREAD_CREATE_DETACHED;
11720
11721 #if HAVE_PTHREADS > 4
11722         /* Final pthreads */
11723         pthread_attr_t attr;
11724
11725         status = pthread_attr_init(&attr);
11726         if( status ) return status;
11727
11728 #if HAVE_PTHREADS < 7
11729         status = pthread_attr_setdetachstate(&attr, &detach);
11730         if( status < 0 ) status = errno;
11731 #else
11732         status = pthread_attr_setdetachstate(&attr, detach);
11733 #endif
11734         if( status ) return status;
11735         status = pthread_create( &t, &attr, task, NULL );
11736 #if HAVE_PTHREADS < 7
11737         if( status < 0 ) status = errno;
11738 #endif
11739         if( status ) return status;
11740 #else
11741         /* Draft 4 pthreads */
11742         status = pthread_create( &t, pthread_attr_default, task, NULL );
11743         if( status ) return errno;
11744
11745         /* give thread a chance to complete */
11746         /* it should remain joinable and hence detachable */
11747         sleep( 1 );
11748
11749         status = pthread_detach( &t );
11750         if( status ) return errno;
11751 #endif
11752
11753 #ifdef HAVE_LINUX_THREADS
11754         pthread_kill_other_threads_np();
11755 #endif
11756
11757         return 0;
11758
11759 ; return 0; }
11760 EOF
11761 if { (eval echo configure:11762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11762   rm -rf conftest*
11763   ol_cv_pthread_create=yes
11764 else
11765   echo "configure: failed program was:" >&5
11766   cat conftest.$ac_ext >&5
11767   rm -rf conftest*
11768   ol_cv_pthread_create=no
11769 fi
11770 rm -f conftest*
11771 else
11772   cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11775 /* pthread test headers */
11776 #include <pthread.h>
11777 #if HAVE_PTHREADS < 7
11778 #include <errno.h>
11779 #endif
11780 #ifndef NULL
11781 #define NULL (void*)0
11782 #endif
11783
11784 static void *task(p)
11785         void *p;
11786 {
11787         return (void *) (p == NULL);
11788 }
11789
11790
11791 int main(argc, argv)
11792         int argc;
11793         char **argv;
11794 {
11795
11796         /* pthread test function */
11797 #ifndef PTHREAD_CREATE_DETACHED
11798 #define PTHREAD_CREATE_DETACHED 1
11799 #endif
11800         pthread_t t;
11801         int status;
11802         int detach = PTHREAD_CREATE_DETACHED;
11803
11804 #if HAVE_PTHREADS > 4
11805         /* Final pthreads */
11806         pthread_attr_t attr;
11807
11808         status = pthread_attr_init(&attr);
11809         if( status ) return status;
11810
11811 #if HAVE_PTHREADS < 7
11812         status = pthread_attr_setdetachstate(&attr, &detach);
11813         if( status < 0 ) status = errno;
11814 #else
11815         status = pthread_attr_setdetachstate(&attr, detach);
11816 #endif
11817         if( status ) return status;
11818         status = pthread_create( &t, &attr, task, NULL );
11819 #if HAVE_PTHREADS < 7
11820         if( status < 0 ) status = errno;
11821 #endif
11822         if( status ) return status;
11823 #else
11824         /* Draft 4 pthreads */
11825         status = pthread_create( &t, pthread_attr_default, task, NULL );
11826         if( status ) return errno;
11827
11828         /* give thread a chance to complete */
11829         /* it should remain joinable and hence detachable */
11830         sleep( 1 );
11831
11832         status = pthread_detach( &t );
11833         if( status ) return errno;
11834 #endif
11835
11836 #ifdef HAVE_LINUX_THREADS
11837         pthread_kill_other_threads_np();
11838 #endif
11839
11840         return 0;
11841
11842 }
11843
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11846 then
11847   ol_cv_pthread_create=yes
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -fr conftest*
11852   ol_cv_pthread_create=no
11853 fi
11854 rm -fr conftest*
11855 fi
11856
11857 fi
11858
11859 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11860
11861                 if test $ol_cv_pthread_create != no ; then
11862                         ol_link_threads=posix
11863                         ol_link_pthreads=""
11864                 fi
11865                 
11866                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11867 if test "$ol_link_threads" = no ; then
11868         # try -kthread
11869         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11870 echo "configure:11871: checking for pthread link with -kthread" >&5
11871 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   
11875                 # save the flags
11876                 ol_LIBS="$LIBS"
11877                 LIBS="-kthread $LIBS"
11878
11879                 if test "$cross_compiling" = yes; then
11880   cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883 /* pthread test headers */
11884 #include <pthread.h>
11885 #if HAVE_PTHREADS < 7
11886 #include <errno.h>
11887 #endif
11888 #ifndef NULL
11889 #define NULL (void*)0
11890 #endif
11891
11892 static void *task(p)
11893         void *p;
11894 {
11895         return (void *) (p == NULL);
11896 }
11897
11898 int main() {
11899
11900         /* pthread test function */
11901 #ifndef PTHREAD_CREATE_DETACHED
11902 #define PTHREAD_CREATE_DETACHED 1
11903 #endif
11904         pthread_t t;
11905         int status;
11906         int detach = PTHREAD_CREATE_DETACHED;
11907
11908 #if HAVE_PTHREADS > 4
11909         /* Final pthreads */
11910         pthread_attr_t attr;
11911
11912         status = pthread_attr_init(&attr);
11913         if( status ) return status;
11914
11915 #if HAVE_PTHREADS < 7
11916         status = pthread_attr_setdetachstate(&attr, &detach);
11917         if( status < 0 ) status = errno;
11918 #else
11919         status = pthread_attr_setdetachstate(&attr, detach);
11920 #endif
11921         if( status ) return status;
11922         status = pthread_create( &t, &attr, task, NULL );
11923 #if HAVE_PTHREADS < 7
11924         if( status < 0 ) status = errno;
11925 #endif
11926         if( status ) return status;
11927 #else
11928         /* Draft 4 pthreads */
11929         status = pthread_create( &t, pthread_attr_default, task, NULL );
11930         if( status ) return errno;
11931
11932         /* give thread a chance to complete */
11933         /* it should remain joinable and hence detachable */
11934         sleep( 1 );
11935
11936         status = pthread_detach( &t );
11937         if( status ) return errno;
11938 #endif
11939
11940 #ifdef HAVE_LINUX_THREADS
11941         pthread_kill_other_threads_np();
11942 #endif
11943
11944         return 0;
11945
11946 ; return 0; }
11947 EOF
11948 if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11949   rm -rf conftest*
11950   ol_cv_pthread_kthread=yes
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -rf conftest*
11955   ol_cv_pthread_kthread=no
11956 fi
11957 rm -f conftest*
11958 else
11959   cat > conftest.$ac_ext <<EOF
11960 #line 11961 "configure"
11961 #include "confdefs.h"
11962 /* pthread test headers */
11963 #include <pthread.h>
11964 #if HAVE_PTHREADS < 7
11965 #include <errno.h>
11966 #endif
11967 #ifndef NULL
11968 #define NULL (void*)0
11969 #endif
11970
11971 static void *task(p)
11972         void *p;
11973 {
11974         return (void *) (p == NULL);
11975 }
11976
11977
11978 int main(argc, argv)
11979         int argc;
11980         char **argv;
11981 {
11982
11983         /* pthread test function */
11984 #ifndef PTHREAD_CREATE_DETACHED
11985 #define PTHREAD_CREATE_DETACHED 1
11986 #endif
11987         pthread_t t;
11988         int status;
11989         int detach = PTHREAD_CREATE_DETACHED;
11990
11991 #if HAVE_PTHREADS > 4
11992         /* Final pthreads */
11993         pthread_attr_t attr;
11994
11995         status = pthread_attr_init(&attr);
11996         if( status ) return status;
11997
11998 #if HAVE_PTHREADS < 7
11999         status = pthread_attr_setdetachstate(&attr, &detach);
12000         if( status < 0 ) status = errno;
12001 #else
12002         status = pthread_attr_setdetachstate(&attr, detach);
12003 #endif
12004         if( status ) return status;
12005         status = pthread_create( &t, &attr, task, NULL );
12006 #if HAVE_PTHREADS < 7
12007         if( status < 0 ) status = errno;
12008 #endif
12009         if( status ) return status;
12010 #else
12011         /* Draft 4 pthreads */
12012         status = pthread_create( &t, pthread_attr_default, task, NULL );
12013         if( status ) return errno;
12014
12015         /* give thread a chance to complete */
12016         /* it should remain joinable and hence detachable */
12017         sleep( 1 );
12018
12019         status = pthread_detach( &t );
12020         if( status ) return errno;
12021 #endif
12022
12023 #ifdef HAVE_LINUX_THREADS
12024         pthread_kill_other_threads_np();
12025 #endif
12026
12027         return 0;
12028
12029 }
12030
12031 EOF
12032 if { (eval echo configure:12033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12033 then
12034   ol_cv_pthread_kthread=yes
12035 else
12036   echo "configure: failed program was:" >&5
12037   cat conftest.$ac_ext >&5
12038   rm -fr conftest*
12039   ol_cv_pthread_kthread=no
12040 fi
12041 rm -fr conftest*
12042 fi
12043
12044
12045                 # restore the LIBS
12046                 LIBS="$ol_LIBS"
12047         
12048 fi
12049
12050 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12051
12052         if test $ol_cv_pthread_kthread = yes ; then
12053                 ol_link_pthreads="-kthread"
12054                 ol_link_threads=posix
12055         fi
12056 fi
12057
12058                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12059 if test "$ol_link_threads" = no ; then
12060         # try -pthread
12061         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12062 echo "configure:12063: checking for pthread link with -pthread" >&5
12063 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12064   echo $ac_n "(cached) $ac_c" 1>&6
12065 else
12066   
12067                 # save the flags
12068                 ol_LIBS="$LIBS"
12069                 LIBS="-pthread $LIBS"
12070
12071                 if test "$cross_compiling" = yes; then
12072   cat > conftest.$ac_ext <<EOF
12073 #line 12074 "configure"
12074 #include "confdefs.h"
12075 /* pthread test headers */
12076 #include <pthread.h>
12077 #if HAVE_PTHREADS < 7
12078 #include <errno.h>
12079 #endif
12080 #ifndef NULL
12081 #define NULL (void*)0
12082 #endif
12083
12084 static void *task(p)
12085         void *p;
12086 {
12087         return (void *) (p == NULL);
12088 }
12089
12090 int main() {
12091
12092         /* pthread test function */
12093 #ifndef PTHREAD_CREATE_DETACHED
12094 #define PTHREAD_CREATE_DETACHED 1
12095 #endif
12096         pthread_t t;
12097         int status;
12098         int detach = PTHREAD_CREATE_DETACHED;
12099
12100 #if HAVE_PTHREADS > 4
12101         /* Final pthreads */
12102         pthread_attr_t attr;
12103
12104         status = pthread_attr_init(&attr);
12105         if( status ) return status;
12106
12107 #if HAVE_PTHREADS < 7
12108         status = pthread_attr_setdetachstate(&attr, &detach);
12109         if( status < 0 ) status = errno;
12110 #else
12111         status = pthread_attr_setdetachstate(&attr, detach);
12112 #endif
12113         if( status ) return status;
12114         status = pthread_create( &t, &attr, task, NULL );
12115 #if HAVE_PTHREADS < 7
12116         if( status < 0 ) status = errno;
12117 #endif
12118         if( status ) return status;
12119 #else
12120         /* Draft 4 pthreads */
12121         status = pthread_create( &t, pthread_attr_default, task, NULL );
12122         if( status ) return errno;
12123
12124         /* give thread a chance to complete */
12125         /* it should remain joinable and hence detachable */
12126         sleep( 1 );
12127
12128         status = pthread_detach( &t );
12129         if( status ) return errno;
12130 #endif
12131
12132 #ifdef HAVE_LINUX_THREADS
12133         pthread_kill_other_threads_np();
12134 #endif
12135
12136         return 0;
12137
12138 ; return 0; }
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12141   rm -rf conftest*
12142   ol_cv_pthread_pthread=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -rf conftest*
12147   ol_cv_pthread_pthread=no
12148 fi
12149 rm -f conftest*
12150 else
12151   cat > conftest.$ac_ext <<EOF
12152 #line 12153 "configure"
12153 #include "confdefs.h"
12154 /* pthread test headers */
12155 #include <pthread.h>
12156 #if HAVE_PTHREADS < 7
12157 #include <errno.h>
12158 #endif
12159 #ifndef NULL
12160 #define NULL (void*)0
12161 #endif
12162
12163 static void *task(p)
12164         void *p;
12165 {
12166         return (void *) (p == NULL);
12167 }
12168
12169
12170 int main(argc, argv)
12171         int argc;
12172         char **argv;
12173 {
12174
12175         /* pthread test function */
12176 #ifndef PTHREAD_CREATE_DETACHED
12177 #define PTHREAD_CREATE_DETACHED 1
12178 #endif
12179         pthread_t t;
12180         int status;
12181         int detach = PTHREAD_CREATE_DETACHED;
12182
12183 #if HAVE_PTHREADS > 4
12184         /* Final pthreads */
12185         pthread_attr_t attr;
12186
12187         status = pthread_attr_init(&attr);
12188         if( status ) return status;
12189
12190 #if HAVE_PTHREADS < 7
12191         status = pthread_attr_setdetachstate(&attr, &detach);
12192         if( status < 0 ) status = errno;
12193 #else
12194         status = pthread_attr_setdetachstate(&attr, detach);
12195 #endif
12196         if( status ) return status;
12197         status = pthread_create( &t, &attr, task, NULL );
12198 #if HAVE_PTHREADS < 7
12199         if( status < 0 ) status = errno;
12200 #endif
12201         if( status ) return status;
12202 #else
12203         /* Draft 4 pthreads */
12204         status = pthread_create( &t, pthread_attr_default, task, NULL );
12205         if( status ) return errno;
12206
12207         /* give thread a chance to complete */
12208         /* it should remain joinable and hence detachable */
12209         sleep( 1 );
12210
12211         status = pthread_detach( &t );
12212         if( status ) return errno;
12213 #endif
12214
12215 #ifdef HAVE_LINUX_THREADS
12216         pthread_kill_other_threads_np();
12217 #endif
12218
12219         return 0;
12220
12221 }
12222
12223 EOF
12224 if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12225 then
12226   ol_cv_pthread_pthread=yes
12227 else
12228   echo "configure: failed program was:" >&5
12229   cat conftest.$ac_ext >&5
12230   rm -fr conftest*
12231   ol_cv_pthread_pthread=no
12232 fi
12233 rm -fr conftest*
12234 fi
12235
12236
12237                 # restore the LIBS
12238                 LIBS="$ol_LIBS"
12239         
12240 fi
12241
12242 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12243
12244         if test $ol_cv_pthread_pthread = yes ; then
12245                 ol_link_pthreads="-pthread"
12246                 ol_link_threads=posix
12247         fi
12248 fi
12249
12250                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12251 if test "$ol_link_threads" = no ; then
12252         # try -pthreads
12253         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12254 echo "configure:12255: checking for pthread link with -pthreads" >&5
12255 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12256   echo $ac_n "(cached) $ac_c" 1>&6
12257 else
12258   
12259                 # save the flags
12260                 ol_LIBS="$LIBS"
12261                 LIBS="-pthreads $LIBS"
12262
12263                 if test "$cross_compiling" = yes; then
12264   cat > conftest.$ac_ext <<EOF
12265 #line 12266 "configure"
12266 #include "confdefs.h"
12267 /* pthread test headers */
12268 #include <pthread.h>
12269 #if HAVE_PTHREADS < 7
12270 #include <errno.h>
12271 #endif
12272 #ifndef NULL
12273 #define NULL (void*)0
12274 #endif
12275
12276 static void *task(p)
12277         void *p;
12278 {
12279         return (void *) (p == NULL);
12280 }
12281
12282 int main() {
12283
12284         /* pthread test function */
12285 #ifndef PTHREAD_CREATE_DETACHED
12286 #define PTHREAD_CREATE_DETACHED 1
12287 #endif
12288         pthread_t t;
12289         int status;
12290         int detach = PTHREAD_CREATE_DETACHED;
12291
12292 #if HAVE_PTHREADS > 4
12293         /* Final pthreads */
12294         pthread_attr_t attr;
12295
12296         status = pthread_attr_init(&attr);
12297         if( status ) return status;
12298
12299 #if HAVE_PTHREADS < 7
12300         status = pthread_attr_setdetachstate(&attr, &detach);
12301         if( status < 0 ) status = errno;
12302 #else
12303         status = pthread_attr_setdetachstate(&attr, detach);
12304 #endif
12305         if( status ) return status;
12306         status = pthread_create( &t, &attr, task, NULL );
12307 #if HAVE_PTHREADS < 7
12308         if( status < 0 ) status = errno;
12309 #endif
12310         if( status ) return status;
12311 #else
12312         /* Draft 4 pthreads */
12313         status = pthread_create( &t, pthread_attr_default, task, NULL );
12314         if( status ) return errno;
12315
12316         /* give thread a chance to complete */
12317         /* it should remain joinable and hence detachable */
12318         sleep( 1 );
12319
12320         status = pthread_detach( &t );
12321         if( status ) return errno;
12322 #endif
12323
12324 #ifdef HAVE_LINUX_THREADS
12325         pthread_kill_other_threads_np();
12326 #endif
12327
12328         return 0;
12329
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   ol_cv_pthread_pthreads=yes
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   ol_cv_pthread_pthreads=no
12340 fi
12341 rm -f conftest*
12342 else
12343   cat > conftest.$ac_ext <<EOF
12344 #line 12345 "configure"
12345 #include "confdefs.h"
12346 /* pthread test headers */
12347 #include <pthread.h>
12348 #if HAVE_PTHREADS < 7
12349 #include <errno.h>
12350 #endif
12351 #ifndef NULL
12352 #define NULL (void*)0
12353 #endif
12354
12355 static void *task(p)
12356         void *p;
12357 {
12358         return (void *) (p == NULL);
12359 }
12360
12361
12362 int main(argc, argv)
12363         int argc;
12364         char **argv;
12365 {
12366
12367         /* pthread test function */
12368 #ifndef PTHREAD_CREATE_DETACHED
12369 #define PTHREAD_CREATE_DETACHED 1
12370 #endif
12371         pthread_t t;
12372         int status;
12373         int detach = PTHREAD_CREATE_DETACHED;
12374
12375 #if HAVE_PTHREADS > 4
12376         /* Final pthreads */
12377         pthread_attr_t attr;
12378
12379         status = pthread_attr_init(&attr);
12380         if( status ) return status;
12381
12382 #if HAVE_PTHREADS < 7
12383         status = pthread_attr_setdetachstate(&attr, &detach);
12384         if( status < 0 ) status = errno;
12385 #else
12386         status = pthread_attr_setdetachstate(&attr, detach);
12387 #endif
12388         if( status ) return status;
12389         status = pthread_create( &t, &attr, task, NULL );
12390 #if HAVE_PTHREADS < 7
12391         if( status < 0 ) status = errno;
12392 #endif
12393         if( status ) return status;
12394 #else
12395         /* Draft 4 pthreads */
12396         status = pthread_create( &t, pthread_attr_default, task, NULL );
12397         if( status ) return errno;
12398
12399         /* give thread a chance to complete */
12400         /* it should remain joinable and hence detachable */
12401         sleep( 1 );
12402
12403         status = pthread_detach( &t );
12404         if( status ) return errno;
12405 #endif
12406
12407 #ifdef HAVE_LINUX_THREADS
12408         pthread_kill_other_threads_np();
12409 #endif
12410
12411         return 0;
12412
12413 }
12414
12415 EOF
12416 if { (eval echo configure:12417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12417 then
12418   ol_cv_pthread_pthreads=yes
12419 else
12420   echo "configure: failed program was:" >&5
12421   cat conftest.$ac_ext >&5
12422   rm -fr conftest*
12423   ol_cv_pthread_pthreads=no
12424 fi
12425 rm -fr conftest*
12426 fi
12427
12428
12429                 # restore the LIBS
12430                 LIBS="$ol_LIBS"
12431         
12432 fi
12433
12434 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12435
12436         if test $ol_cv_pthread_pthreads = yes ; then
12437                 ol_link_pthreads="-pthreads"
12438                 ol_link_threads=posix
12439         fi
12440 fi
12441
12442                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12443 if test "$ol_link_threads" = no ; then
12444         # try -mthreads
12445         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12446 echo "configure:12447: checking for pthread link with -mthreads" >&5
12447 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12448   echo $ac_n "(cached) $ac_c" 1>&6
12449 else
12450   
12451                 # save the flags
12452                 ol_LIBS="$LIBS"
12453                 LIBS="-mthreads $LIBS"
12454
12455                 if test "$cross_compiling" = yes; then
12456   cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 /* pthread test headers */
12460 #include <pthread.h>
12461 #if HAVE_PTHREADS < 7
12462 #include <errno.h>
12463 #endif
12464 #ifndef NULL
12465 #define NULL (void*)0
12466 #endif
12467
12468 static void *task(p)
12469         void *p;
12470 {
12471         return (void *) (p == NULL);
12472 }
12473
12474 int main() {
12475
12476         /* pthread test function */
12477 #ifndef PTHREAD_CREATE_DETACHED
12478 #define PTHREAD_CREATE_DETACHED 1
12479 #endif
12480         pthread_t t;
12481         int status;
12482         int detach = PTHREAD_CREATE_DETACHED;
12483
12484 #if HAVE_PTHREADS > 4
12485         /* Final pthreads */
12486         pthread_attr_t attr;
12487
12488         status = pthread_attr_init(&attr);
12489         if( status ) return status;
12490
12491 #if HAVE_PTHREADS < 7
12492         status = pthread_attr_setdetachstate(&attr, &detach);
12493         if( status < 0 ) status = errno;
12494 #else
12495         status = pthread_attr_setdetachstate(&attr, detach);
12496 #endif
12497         if( status ) return status;
12498         status = pthread_create( &t, &attr, task, NULL );
12499 #if HAVE_PTHREADS < 7
12500         if( status < 0 ) status = errno;
12501 #endif
12502         if( status ) return status;
12503 #else
12504         /* Draft 4 pthreads */
12505         status = pthread_create( &t, pthread_attr_default, task, NULL );
12506         if( status ) return errno;
12507
12508         /* give thread a chance to complete */
12509         /* it should remain joinable and hence detachable */
12510         sleep( 1 );
12511
12512         status = pthread_detach( &t );
12513         if( status ) return errno;
12514 #endif
12515
12516 #ifdef HAVE_LINUX_THREADS
12517         pthread_kill_other_threads_np();
12518 #endif
12519
12520         return 0;
12521
12522 ; return 0; }
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12525   rm -rf conftest*
12526   ol_cv_pthread_mthreads=yes
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   ol_cv_pthread_mthreads=no
12532 fi
12533 rm -f conftest*
12534 else
12535   cat > conftest.$ac_ext <<EOF
12536 #line 12537 "configure"
12537 #include "confdefs.h"
12538 /* pthread test headers */
12539 #include <pthread.h>
12540 #if HAVE_PTHREADS < 7
12541 #include <errno.h>
12542 #endif
12543 #ifndef NULL
12544 #define NULL (void*)0
12545 #endif
12546
12547 static void *task(p)
12548         void *p;
12549 {
12550         return (void *) (p == NULL);
12551 }
12552
12553
12554 int main(argc, argv)
12555         int argc;
12556         char **argv;
12557 {
12558
12559         /* pthread test function */
12560 #ifndef PTHREAD_CREATE_DETACHED
12561 #define PTHREAD_CREATE_DETACHED 1
12562 #endif
12563         pthread_t t;
12564         int status;
12565         int detach = PTHREAD_CREATE_DETACHED;
12566
12567 #if HAVE_PTHREADS > 4
12568         /* Final pthreads */
12569         pthread_attr_t attr;
12570
12571         status = pthread_attr_init(&attr);
12572         if( status ) return status;
12573
12574 #if HAVE_PTHREADS < 7
12575         status = pthread_attr_setdetachstate(&attr, &detach);
12576         if( status < 0 ) status = errno;
12577 #else
12578         status = pthread_attr_setdetachstate(&attr, detach);
12579 #endif
12580         if( status ) return status;
12581         status = pthread_create( &t, &attr, task, NULL );
12582 #if HAVE_PTHREADS < 7
12583         if( status < 0 ) status = errno;
12584 #endif
12585         if( status ) return status;
12586 #else
12587         /* Draft 4 pthreads */
12588         status = pthread_create( &t, pthread_attr_default, task, NULL );
12589         if( status ) return errno;
12590
12591         /* give thread a chance to complete */
12592         /* it should remain joinable and hence detachable */
12593         sleep( 1 );
12594
12595         status = pthread_detach( &t );
12596         if( status ) return errno;
12597 #endif
12598
12599 #ifdef HAVE_LINUX_THREADS
12600         pthread_kill_other_threads_np();
12601 #endif
12602
12603         return 0;
12604
12605 }
12606
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12609 then
12610   ol_cv_pthread_mthreads=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -fr conftest*
12615   ol_cv_pthread_mthreads=no
12616 fi
12617 rm -fr conftest*
12618 fi
12619
12620
12621                 # restore the LIBS
12622                 LIBS="$ol_LIBS"
12623         
12624 fi
12625
12626 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12627
12628         if test $ol_cv_pthread_mthreads = yes ; then
12629                 ol_link_pthreads="-mthreads"
12630                 ol_link_threads=posix
12631         fi
12632 fi
12633
12634                 # Pthread try link: -thread (ol_cv_pthread_thread)
12635 if test "$ol_link_threads" = no ; then
12636         # try -thread
12637         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12638 echo "configure:12639: checking for pthread link with -thread" >&5
12639 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12640   echo $ac_n "(cached) $ac_c" 1>&6
12641 else
12642   
12643                 # save the flags
12644                 ol_LIBS="$LIBS"
12645                 LIBS="-thread $LIBS"
12646
12647                 if test "$cross_compiling" = yes; then
12648   cat > conftest.$ac_ext <<EOF
12649 #line 12650 "configure"
12650 #include "confdefs.h"
12651 /* pthread test headers */
12652 #include <pthread.h>
12653 #if HAVE_PTHREADS < 7
12654 #include <errno.h>
12655 #endif
12656 #ifndef NULL
12657 #define NULL (void*)0
12658 #endif
12659
12660 static void *task(p)
12661         void *p;
12662 {
12663         return (void *) (p == NULL);
12664 }
12665
12666 int main() {
12667
12668         /* pthread test function */
12669 #ifndef PTHREAD_CREATE_DETACHED
12670 #define PTHREAD_CREATE_DETACHED 1
12671 #endif
12672         pthread_t t;
12673         int status;
12674         int detach = PTHREAD_CREATE_DETACHED;
12675
12676 #if HAVE_PTHREADS > 4
12677         /* Final pthreads */
12678         pthread_attr_t attr;
12679
12680         status = pthread_attr_init(&attr);
12681         if( status ) return status;
12682
12683 #if HAVE_PTHREADS < 7
12684         status = pthread_attr_setdetachstate(&attr, &detach);
12685         if( status < 0 ) status = errno;
12686 #else
12687         status = pthread_attr_setdetachstate(&attr, detach);
12688 #endif
12689         if( status ) return status;
12690         status = pthread_create( &t, &attr, task, NULL );
12691 #if HAVE_PTHREADS < 7
12692         if( status < 0 ) status = errno;
12693 #endif
12694         if( status ) return status;
12695 #else
12696         /* Draft 4 pthreads */
12697         status = pthread_create( &t, pthread_attr_default, task, NULL );
12698         if( status ) return errno;
12699
12700         /* give thread a chance to complete */
12701         /* it should remain joinable and hence detachable */
12702         sleep( 1 );
12703
12704         status = pthread_detach( &t );
12705         if( status ) return errno;
12706 #endif
12707
12708 #ifdef HAVE_LINUX_THREADS
12709         pthread_kill_other_threads_np();
12710 #endif
12711
12712         return 0;
12713
12714 ; return 0; }
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12717   rm -rf conftest*
12718   ol_cv_pthread_thread=yes
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   ol_cv_pthread_thread=no
12724 fi
12725 rm -f conftest*
12726 else
12727   cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 /* pthread test headers */
12731 #include <pthread.h>
12732 #if HAVE_PTHREADS < 7
12733 #include <errno.h>
12734 #endif
12735 #ifndef NULL
12736 #define NULL (void*)0
12737 #endif
12738
12739 static void *task(p)
12740         void *p;
12741 {
12742         return (void *) (p == NULL);
12743 }
12744
12745
12746 int main(argc, argv)
12747         int argc;
12748         char **argv;
12749 {
12750
12751         /* pthread test function */
12752 #ifndef PTHREAD_CREATE_DETACHED
12753 #define PTHREAD_CREATE_DETACHED 1
12754 #endif
12755         pthread_t t;
12756         int status;
12757         int detach = PTHREAD_CREATE_DETACHED;
12758
12759 #if HAVE_PTHREADS > 4
12760         /* Final pthreads */
12761         pthread_attr_t attr;
12762
12763         status = pthread_attr_init(&attr);
12764         if( status ) return status;
12765
12766 #if HAVE_PTHREADS < 7
12767         status = pthread_attr_setdetachstate(&attr, &detach);
12768         if( status < 0 ) status = errno;
12769 #else
12770         status = pthread_attr_setdetachstate(&attr, detach);
12771 #endif
12772         if( status ) return status;
12773         status = pthread_create( &t, &attr, task, NULL );
12774 #if HAVE_PTHREADS < 7
12775         if( status < 0 ) status = errno;
12776 #endif
12777         if( status ) return status;
12778 #else
12779         /* Draft 4 pthreads */
12780         status = pthread_create( &t, pthread_attr_default, task, NULL );
12781         if( status ) return errno;
12782
12783         /* give thread a chance to complete */
12784         /* it should remain joinable and hence detachable */
12785         sleep( 1 );
12786
12787         status = pthread_detach( &t );
12788         if( status ) return errno;
12789 #endif
12790
12791 #ifdef HAVE_LINUX_THREADS
12792         pthread_kill_other_threads_np();
12793 #endif
12794
12795         return 0;
12796
12797 }
12798
12799 EOF
12800 if { (eval echo configure:12801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12801 then
12802   ol_cv_pthread_thread=yes
12803 else
12804   echo "configure: failed program was:" >&5
12805   cat conftest.$ac_ext >&5
12806   rm -fr conftest*
12807   ol_cv_pthread_thread=no
12808 fi
12809 rm -fr conftest*
12810 fi
12811
12812
12813                 # restore the LIBS
12814                 LIBS="$ol_LIBS"
12815         
12816 fi
12817
12818 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12819
12820         if test $ol_cv_pthread_thread = yes ; then
12821                 ol_link_pthreads="-thread"
12822                 ol_link_threads=posix
12823         fi
12824 fi
12825
12826
12827                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12828 if test "$ol_link_threads" = no ; then
12829         # try -lpthread -lmach -lexc -lc_r
12830         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12831 echo "configure:12832: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12832 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12833   echo $ac_n "(cached) $ac_c" 1>&6
12834 else
12835   
12836                 # save the flags
12837                 ol_LIBS="$LIBS"
12838                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12839
12840                 if test "$cross_compiling" = yes; then
12841   cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 /* pthread test headers */
12845 #include <pthread.h>
12846 #if HAVE_PTHREADS < 7
12847 #include <errno.h>
12848 #endif
12849 #ifndef NULL
12850 #define NULL (void*)0
12851 #endif
12852
12853 static void *task(p)
12854         void *p;
12855 {
12856         return (void *) (p == NULL);
12857 }
12858
12859 int main() {
12860
12861         /* pthread test function */
12862 #ifndef PTHREAD_CREATE_DETACHED
12863 #define PTHREAD_CREATE_DETACHED 1
12864 #endif
12865         pthread_t t;
12866         int status;
12867         int detach = PTHREAD_CREATE_DETACHED;
12868
12869 #if HAVE_PTHREADS > 4
12870         /* Final pthreads */
12871         pthread_attr_t attr;
12872
12873         status = pthread_attr_init(&attr);
12874         if( status ) return status;
12875
12876 #if HAVE_PTHREADS < 7
12877         status = pthread_attr_setdetachstate(&attr, &detach);
12878         if( status < 0 ) status = errno;
12879 #else
12880         status = pthread_attr_setdetachstate(&attr, detach);
12881 #endif
12882         if( status ) return status;
12883         status = pthread_create( &t, &attr, task, NULL );
12884 #if HAVE_PTHREADS < 7
12885         if( status < 0 ) status = errno;
12886 #endif
12887         if( status ) return status;
12888 #else
12889         /* Draft 4 pthreads */
12890         status = pthread_create( &t, pthread_attr_default, task, NULL );
12891         if( status ) return errno;
12892
12893         /* give thread a chance to complete */
12894         /* it should remain joinable and hence detachable */
12895         sleep( 1 );
12896
12897         status = pthread_detach( &t );
12898         if( status ) return errno;
12899 #endif
12900
12901 #ifdef HAVE_LINUX_THREADS
12902         pthread_kill_other_threads_np();
12903 #endif
12904
12905         return 0;
12906
12907 ; return 0; }
12908 EOF
12909 if { (eval echo configure:12910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12910   rm -rf conftest*
12911   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12912 else
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12917 fi
12918 rm -f conftest*
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 /* pthread test headers */
12924 #include <pthread.h>
12925 #if HAVE_PTHREADS < 7
12926 #include <errno.h>
12927 #endif
12928 #ifndef NULL
12929 #define NULL (void*)0
12930 #endif
12931
12932 static void *task(p)
12933         void *p;
12934 {
12935         return (void *) (p == NULL);
12936 }
12937
12938
12939 int main(argc, argv)
12940         int argc;
12941         char **argv;
12942 {
12943
12944         /* pthread test function */
12945 #ifndef PTHREAD_CREATE_DETACHED
12946 #define PTHREAD_CREATE_DETACHED 1
12947 #endif
12948         pthread_t t;
12949         int status;
12950         int detach = PTHREAD_CREATE_DETACHED;
12951
12952 #if HAVE_PTHREADS > 4
12953         /* Final pthreads */
12954         pthread_attr_t attr;
12955
12956         status = pthread_attr_init(&attr);
12957         if( status ) return status;
12958
12959 #if HAVE_PTHREADS < 7
12960         status = pthread_attr_setdetachstate(&attr, &detach);
12961         if( status < 0 ) status = errno;
12962 #else
12963         status = pthread_attr_setdetachstate(&attr, detach);
12964 #endif
12965         if( status ) return status;
12966         status = pthread_create( &t, &attr, task, NULL );
12967 #if HAVE_PTHREADS < 7
12968         if( status < 0 ) status = errno;
12969 #endif
12970         if( status ) return status;
12971 #else
12972         /* Draft 4 pthreads */
12973         status = pthread_create( &t, pthread_attr_default, task, NULL );
12974         if( status ) return errno;
12975
12976         /* give thread a chance to complete */
12977         /* it should remain joinable and hence detachable */
12978         sleep( 1 );
12979
12980         status = pthread_detach( &t );
12981         if( status ) return errno;
12982 #endif
12983
12984 #ifdef HAVE_LINUX_THREADS
12985         pthread_kill_other_threads_np();
12986 #endif
12987
12988         return 0;
12989
12990 }
12991
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12994 then
12995   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -fr conftest*
13000   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13001 fi
13002 rm -fr conftest*
13003 fi
13004
13005
13006                 # restore the LIBS
13007                 LIBS="$ol_LIBS"
13008         
13009 fi
13010
13011 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13012
13013         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13014                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13015                 ol_link_threads=posix
13016         fi
13017 fi
13018
13019                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13020 if test "$ol_link_threads" = no ; then
13021         # try -lpthread -lmach -lexc
13022         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13023 echo "configure:13024: checking for pthread link with -lpthread -lmach -lexc" >&5
13024 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13025   echo $ac_n "(cached) $ac_c" 1>&6
13026 else
13027   
13028                 # save the flags
13029                 ol_LIBS="$LIBS"
13030                 LIBS="-lpthread -lmach -lexc $LIBS"
13031
13032                 if test "$cross_compiling" = yes; then
13033   cat > conftest.$ac_ext <<EOF
13034 #line 13035 "configure"
13035 #include "confdefs.h"
13036 /* pthread test headers */
13037 #include <pthread.h>
13038 #if HAVE_PTHREADS < 7
13039 #include <errno.h>
13040 #endif
13041 #ifndef NULL
13042 #define NULL (void*)0
13043 #endif
13044
13045 static void *task(p)
13046         void *p;
13047 {
13048         return (void *) (p == NULL);
13049 }
13050
13051 int main() {
13052
13053         /* pthread test function */
13054 #ifndef PTHREAD_CREATE_DETACHED
13055 #define PTHREAD_CREATE_DETACHED 1
13056 #endif
13057         pthread_t t;
13058         int status;
13059         int detach = PTHREAD_CREATE_DETACHED;
13060
13061 #if HAVE_PTHREADS > 4
13062         /* Final pthreads */
13063         pthread_attr_t attr;
13064
13065         status = pthread_attr_init(&attr);
13066         if( status ) return status;
13067
13068 #if HAVE_PTHREADS < 7
13069         status = pthread_attr_setdetachstate(&attr, &detach);
13070         if( status < 0 ) status = errno;
13071 #else
13072         status = pthread_attr_setdetachstate(&attr, detach);
13073 #endif
13074         if( status ) return status;
13075         status = pthread_create( &t, &attr, task, NULL );
13076 #if HAVE_PTHREADS < 7
13077         if( status < 0 ) status = errno;
13078 #endif
13079         if( status ) return status;
13080 #else
13081         /* Draft 4 pthreads */
13082         status = pthread_create( &t, pthread_attr_default, task, NULL );
13083         if( status ) return errno;
13084
13085         /* give thread a chance to complete */
13086         /* it should remain joinable and hence detachable */
13087         sleep( 1 );
13088
13089         status = pthread_detach( &t );
13090         if( status ) return errno;
13091 #endif
13092
13093 #ifdef HAVE_LINUX_THREADS
13094         pthread_kill_other_threads_np();
13095 #endif
13096
13097         return 0;
13098
13099 ; return 0; }
13100 EOF
13101 if { (eval echo configure:13102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13102   rm -rf conftest*
13103   ol_cv_pthread_lpthread_lmach_lexc=yes
13104 else
13105   echo "configure: failed program was:" >&5
13106   cat conftest.$ac_ext >&5
13107   rm -rf conftest*
13108   ol_cv_pthread_lpthread_lmach_lexc=no
13109 fi
13110 rm -f conftest*
13111 else
13112   cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 /* pthread test headers */
13116 #include <pthread.h>
13117 #if HAVE_PTHREADS < 7
13118 #include <errno.h>
13119 #endif
13120 #ifndef NULL
13121 #define NULL (void*)0
13122 #endif
13123
13124 static void *task(p)
13125         void *p;
13126 {
13127         return (void *) (p == NULL);
13128 }
13129
13130
13131 int main(argc, argv)
13132         int argc;
13133         char **argv;
13134 {
13135
13136         /* pthread test function */
13137 #ifndef PTHREAD_CREATE_DETACHED
13138 #define PTHREAD_CREATE_DETACHED 1
13139 #endif
13140         pthread_t t;
13141         int status;
13142         int detach = PTHREAD_CREATE_DETACHED;
13143
13144 #if HAVE_PTHREADS > 4
13145         /* Final pthreads */
13146         pthread_attr_t attr;
13147
13148         status = pthread_attr_init(&attr);
13149         if( status ) return status;
13150
13151 #if HAVE_PTHREADS < 7
13152         status = pthread_attr_setdetachstate(&attr, &detach);
13153         if( status < 0 ) status = errno;
13154 #else
13155         status = pthread_attr_setdetachstate(&attr, detach);
13156 #endif
13157         if( status ) return status;
13158         status = pthread_create( &t, &attr, task, NULL );
13159 #if HAVE_PTHREADS < 7
13160         if( status < 0 ) status = errno;
13161 #endif
13162         if( status ) return status;
13163 #else
13164         /* Draft 4 pthreads */
13165         status = pthread_create( &t, pthread_attr_default, task, NULL );
13166         if( status ) return errno;
13167
13168         /* give thread a chance to complete */
13169         /* it should remain joinable and hence detachable */
13170         sleep( 1 );
13171
13172         status = pthread_detach( &t );
13173         if( status ) return errno;
13174 #endif
13175
13176 #ifdef HAVE_LINUX_THREADS
13177         pthread_kill_other_threads_np();
13178 #endif
13179
13180         return 0;
13181
13182 }
13183
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13186 then
13187   ol_cv_pthread_lpthread_lmach_lexc=yes
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -fr conftest*
13192   ol_cv_pthread_lpthread_lmach_lexc=no
13193 fi
13194 rm -fr conftest*
13195 fi
13196
13197
13198                 # restore the LIBS
13199                 LIBS="$ol_LIBS"
13200         
13201 fi
13202
13203 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13204
13205         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13206                 ol_link_pthreads="-lpthread -lmach -lexc"
13207                 ol_link_threads=posix
13208         fi
13209 fi
13210
13211
13212                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13213 if test "$ol_link_threads" = no ; then
13214         # try -lpthread -Wl,-woff,85
13215         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13216 echo "configure:13217: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13217 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13218   echo $ac_n "(cached) $ac_c" 1>&6
13219 else
13220   
13221                 # save the flags
13222                 ol_LIBS="$LIBS"
13223                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13224
13225                 if test "$cross_compiling" = yes; then
13226   cat > conftest.$ac_ext <<EOF
13227 #line 13228 "configure"
13228 #include "confdefs.h"
13229 /* pthread test headers */
13230 #include <pthread.h>
13231 #if HAVE_PTHREADS < 7
13232 #include <errno.h>
13233 #endif
13234 #ifndef NULL
13235 #define NULL (void*)0
13236 #endif
13237
13238 static void *task(p)
13239         void *p;
13240 {
13241         return (void *) (p == NULL);
13242 }
13243
13244 int main() {
13245
13246         /* pthread test function */
13247 #ifndef PTHREAD_CREATE_DETACHED
13248 #define PTHREAD_CREATE_DETACHED 1
13249 #endif
13250         pthread_t t;
13251         int status;
13252         int detach = PTHREAD_CREATE_DETACHED;
13253
13254 #if HAVE_PTHREADS > 4
13255         /* Final pthreads */
13256         pthread_attr_t attr;
13257
13258         status = pthread_attr_init(&attr);
13259         if( status ) return status;
13260
13261 #if HAVE_PTHREADS < 7
13262         status = pthread_attr_setdetachstate(&attr, &detach);
13263         if( status < 0 ) status = errno;
13264 #else
13265         status = pthread_attr_setdetachstate(&attr, detach);
13266 #endif
13267         if( status ) return status;
13268         status = pthread_create( &t, &attr, task, NULL );
13269 #if HAVE_PTHREADS < 7
13270         if( status < 0 ) status = errno;
13271 #endif
13272         if( status ) return status;
13273 #else
13274         /* Draft 4 pthreads */
13275         status = pthread_create( &t, pthread_attr_default, task, NULL );
13276         if( status ) return errno;
13277
13278         /* give thread a chance to complete */
13279         /* it should remain joinable and hence detachable */
13280         sleep( 1 );
13281
13282         status = pthread_detach( &t );
13283         if( status ) return errno;
13284 #endif
13285
13286 #ifdef HAVE_LINUX_THREADS
13287         pthread_kill_other_threads_np();
13288 #endif
13289
13290         return 0;
13291
13292 ; return 0; }
13293 EOF
13294 if { (eval echo configure:13295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13295   rm -rf conftest*
13296   ol_cv_pthread_lib_lpthread_woff=yes
13297 else
13298   echo "configure: failed program was:" >&5
13299   cat conftest.$ac_ext >&5
13300   rm -rf conftest*
13301   ol_cv_pthread_lib_lpthread_woff=no
13302 fi
13303 rm -f conftest*
13304 else
13305   cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* pthread test headers */
13309 #include <pthread.h>
13310 #if HAVE_PTHREADS < 7
13311 #include <errno.h>
13312 #endif
13313 #ifndef NULL
13314 #define NULL (void*)0
13315 #endif
13316
13317 static void *task(p)
13318         void *p;
13319 {
13320         return (void *) (p == NULL);
13321 }
13322
13323
13324 int main(argc, argv)
13325         int argc;
13326         char **argv;
13327 {
13328
13329         /* pthread test function */
13330 #ifndef PTHREAD_CREATE_DETACHED
13331 #define PTHREAD_CREATE_DETACHED 1
13332 #endif
13333         pthread_t t;
13334         int status;
13335         int detach = PTHREAD_CREATE_DETACHED;
13336
13337 #if HAVE_PTHREADS > 4
13338         /* Final pthreads */
13339         pthread_attr_t attr;
13340
13341         status = pthread_attr_init(&attr);
13342         if( status ) return status;
13343
13344 #if HAVE_PTHREADS < 7
13345         status = pthread_attr_setdetachstate(&attr, &detach);
13346         if( status < 0 ) status = errno;
13347 #else
13348         status = pthread_attr_setdetachstate(&attr, detach);
13349 #endif
13350         if( status ) return status;
13351         status = pthread_create( &t, &attr, task, NULL );
13352 #if HAVE_PTHREADS < 7
13353         if( status < 0 ) status = errno;
13354 #endif
13355         if( status ) return status;
13356 #else
13357         /* Draft 4 pthreads */
13358         status = pthread_create( &t, pthread_attr_default, task, NULL );
13359         if( status ) return errno;
13360
13361         /* give thread a chance to complete */
13362         /* it should remain joinable and hence detachable */
13363         sleep( 1 );
13364
13365         status = pthread_detach( &t );
13366         if( status ) return errno;
13367 #endif
13368
13369 #ifdef HAVE_LINUX_THREADS
13370         pthread_kill_other_threads_np();
13371 #endif
13372
13373         return 0;
13374
13375 }
13376
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13379 then
13380   ol_cv_pthread_lib_lpthread_woff=yes
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -fr conftest*
13385   ol_cv_pthread_lib_lpthread_woff=no
13386 fi
13387 rm -fr conftest*
13388 fi
13389
13390
13391                 # restore the LIBS
13392                 LIBS="$ol_LIBS"
13393         
13394 fi
13395
13396 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13397
13398         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13399                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13400                 ol_link_threads=posix
13401         fi
13402 fi
13403
13404
13405                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13406 if test "$ol_link_threads" = no ; then
13407         # try -lpthread
13408         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13409 echo "configure:13410: checking for pthread link with -lpthread" >&5
13410 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13411   echo $ac_n "(cached) $ac_c" 1>&6
13412 else
13413   
13414                 # save the flags
13415                 ol_LIBS="$LIBS"
13416                 LIBS="-lpthread $LIBS"
13417
13418                 if test "$cross_compiling" = yes; then
13419   cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 /* pthread test headers */
13423 #include <pthread.h>
13424 #if HAVE_PTHREADS < 7
13425 #include <errno.h>
13426 #endif
13427 #ifndef NULL
13428 #define NULL (void*)0
13429 #endif
13430
13431 static void *task(p)
13432         void *p;
13433 {
13434         return (void *) (p == NULL);
13435 }
13436
13437 int main() {
13438
13439         /* pthread test function */
13440 #ifndef PTHREAD_CREATE_DETACHED
13441 #define PTHREAD_CREATE_DETACHED 1
13442 #endif
13443         pthread_t t;
13444         int status;
13445         int detach = PTHREAD_CREATE_DETACHED;
13446
13447 #if HAVE_PTHREADS > 4
13448         /* Final pthreads */
13449         pthread_attr_t attr;
13450
13451         status = pthread_attr_init(&attr);
13452         if( status ) return status;
13453
13454 #if HAVE_PTHREADS < 7
13455         status = pthread_attr_setdetachstate(&attr, &detach);
13456         if( status < 0 ) status = errno;
13457 #else
13458         status = pthread_attr_setdetachstate(&attr, detach);
13459 #endif
13460         if( status ) return status;
13461         status = pthread_create( &t, &attr, task, NULL );
13462 #if HAVE_PTHREADS < 7
13463         if( status < 0 ) status = errno;
13464 #endif
13465         if( status ) return status;
13466 #else
13467         /* Draft 4 pthreads */
13468         status = pthread_create( &t, pthread_attr_default, task, NULL );
13469         if( status ) return errno;
13470
13471         /* give thread a chance to complete */
13472         /* it should remain joinable and hence detachable */
13473         sleep( 1 );
13474
13475         status = pthread_detach( &t );
13476         if( status ) return errno;
13477 #endif
13478
13479 #ifdef HAVE_LINUX_THREADS
13480         pthread_kill_other_threads_np();
13481 #endif
13482
13483         return 0;
13484
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13488   rm -rf conftest*
13489   ol_cv_pthread_lpthread=yes
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   ol_cv_pthread_lpthread=no
13495 fi
13496 rm -f conftest*
13497 else
13498   cat > conftest.$ac_ext <<EOF
13499 #line 13500 "configure"
13500 #include "confdefs.h"
13501 /* pthread test headers */
13502 #include <pthread.h>
13503 #if HAVE_PTHREADS < 7
13504 #include <errno.h>
13505 #endif
13506 #ifndef NULL
13507 #define NULL (void*)0
13508 #endif
13509
13510 static void *task(p)
13511         void *p;
13512 {
13513         return (void *) (p == NULL);
13514 }
13515
13516
13517 int main(argc, argv)
13518         int argc;
13519         char **argv;
13520 {
13521
13522         /* pthread test function */
13523 #ifndef PTHREAD_CREATE_DETACHED
13524 #define PTHREAD_CREATE_DETACHED 1
13525 #endif
13526         pthread_t t;
13527         int status;
13528         int detach = PTHREAD_CREATE_DETACHED;
13529
13530 #if HAVE_PTHREADS > 4
13531         /* Final pthreads */
13532         pthread_attr_t attr;
13533
13534         status = pthread_attr_init(&attr);
13535         if( status ) return status;
13536
13537 #if HAVE_PTHREADS < 7
13538         status = pthread_attr_setdetachstate(&attr, &detach);
13539         if( status < 0 ) status = errno;
13540 #else
13541         status = pthread_attr_setdetachstate(&attr, detach);
13542 #endif
13543         if( status ) return status;
13544         status = pthread_create( &t, &attr, task, NULL );
13545 #if HAVE_PTHREADS < 7
13546         if( status < 0 ) status = errno;
13547 #endif
13548         if( status ) return status;
13549 #else
13550         /* Draft 4 pthreads */
13551         status = pthread_create( &t, pthread_attr_default, task, NULL );
13552         if( status ) return errno;
13553
13554         /* give thread a chance to complete */
13555         /* it should remain joinable and hence detachable */
13556         sleep( 1 );
13557
13558         status = pthread_detach( &t );
13559         if( status ) return errno;
13560 #endif
13561
13562 #ifdef HAVE_LINUX_THREADS
13563         pthread_kill_other_threads_np();
13564 #endif
13565
13566         return 0;
13567
13568 }
13569
13570 EOF
13571 if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13572 then
13573   ol_cv_pthread_lpthread=yes
13574 else
13575   echo "configure: failed program was:" >&5
13576   cat conftest.$ac_ext >&5
13577   rm -fr conftest*
13578   ol_cv_pthread_lpthread=no
13579 fi
13580 rm -fr conftest*
13581 fi
13582
13583
13584                 # restore the LIBS
13585                 LIBS="$ol_LIBS"
13586         
13587 fi
13588
13589 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13590
13591         if test $ol_cv_pthread_lpthread = yes ; then
13592                 ol_link_pthreads="-lpthread"
13593                 ol_link_threads=posix
13594         fi
13595 fi
13596
13597                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13598 if test "$ol_link_threads" = no ; then
13599         # try -lc_r
13600         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13601 echo "configure:13602: checking for pthread link with -lc_r" >&5
13602 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13603   echo $ac_n "(cached) $ac_c" 1>&6
13604 else
13605   
13606                 # save the flags
13607                 ol_LIBS="$LIBS"
13608                 LIBS="-lc_r $LIBS"
13609
13610                 if test "$cross_compiling" = yes; then
13611   cat > conftest.$ac_ext <<EOF
13612 #line 13613 "configure"
13613 #include "confdefs.h"
13614 /* pthread test headers */
13615 #include <pthread.h>
13616 #if HAVE_PTHREADS < 7
13617 #include <errno.h>
13618 #endif
13619 #ifndef NULL
13620 #define NULL (void*)0
13621 #endif
13622
13623 static void *task(p)
13624         void *p;
13625 {
13626         return (void *) (p == NULL);
13627 }
13628
13629 int main() {
13630
13631         /* pthread test function */
13632 #ifndef PTHREAD_CREATE_DETACHED
13633 #define PTHREAD_CREATE_DETACHED 1
13634 #endif
13635         pthread_t t;
13636         int status;
13637         int detach = PTHREAD_CREATE_DETACHED;
13638
13639 #if HAVE_PTHREADS > 4
13640         /* Final pthreads */
13641         pthread_attr_t attr;
13642
13643         status = pthread_attr_init(&attr);
13644         if( status ) return status;
13645
13646 #if HAVE_PTHREADS < 7
13647         status = pthread_attr_setdetachstate(&attr, &detach);
13648         if( status < 0 ) status = errno;
13649 #else
13650         status = pthread_attr_setdetachstate(&attr, detach);
13651 #endif
13652         if( status ) return status;
13653         status = pthread_create( &t, &attr, task, NULL );
13654 #if HAVE_PTHREADS < 7
13655         if( status < 0 ) status = errno;
13656 #endif
13657         if( status ) return status;
13658 #else
13659         /* Draft 4 pthreads */
13660         status = pthread_create( &t, pthread_attr_default, task, NULL );
13661         if( status ) return errno;
13662
13663         /* give thread a chance to complete */
13664         /* it should remain joinable and hence detachable */
13665         sleep( 1 );
13666
13667         status = pthread_detach( &t );
13668         if( status ) return errno;
13669 #endif
13670
13671 #ifdef HAVE_LINUX_THREADS
13672         pthread_kill_other_threads_np();
13673 #endif
13674
13675         return 0;
13676
13677 ; return 0; }
13678 EOF
13679 if { (eval echo configure:13680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13680   rm -rf conftest*
13681   ol_cv_pthread_lc_r=yes
13682 else
13683   echo "configure: failed program was:" >&5
13684   cat conftest.$ac_ext >&5
13685   rm -rf conftest*
13686   ol_cv_pthread_lc_r=no
13687 fi
13688 rm -f conftest*
13689 else
13690   cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693 /* pthread test headers */
13694 #include <pthread.h>
13695 #if HAVE_PTHREADS < 7
13696 #include <errno.h>
13697 #endif
13698 #ifndef NULL
13699 #define NULL (void*)0
13700 #endif
13701
13702 static void *task(p)
13703         void *p;
13704 {
13705         return (void *) (p == NULL);
13706 }
13707
13708
13709 int main(argc, argv)
13710         int argc;
13711         char **argv;
13712 {
13713
13714         /* pthread test function */
13715 #ifndef PTHREAD_CREATE_DETACHED
13716 #define PTHREAD_CREATE_DETACHED 1
13717 #endif
13718         pthread_t t;
13719         int status;
13720         int detach = PTHREAD_CREATE_DETACHED;
13721
13722 #if HAVE_PTHREADS > 4
13723         /* Final pthreads */
13724         pthread_attr_t attr;
13725
13726         status = pthread_attr_init(&attr);
13727         if( status ) return status;
13728
13729 #if HAVE_PTHREADS < 7
13730         status = pthread_attr_setdetachstate(&attr, &detach);
13731         if( status < 0 ) status = errno;
13732 #else
13733         status = pthread_attr_setdetachstate(&attr, detach);
13734 #endif
13735         if( status ) return status;
13736         status = pthread_create( &t, &attr, task, NULL );
13737 #if HAVE_PTHREADS < 7
13738         if( status < 0 ) status = errno;
13739 #endif
13740         if( status ) return status;
13741 #else
13742         /* Draft 4 pthreads */
13743         status = pthread_create( &t, pthread_attr_default, task, NULL );
13744         if( status ) return errno;
13745
13746         /* give thread a chance to complete */
13747         /* it should remain joinable and hence detachable */
13748         sleep( 1 );
13749
13750         status = pthread_detach( &t );
13751         if( status ) return errno;
13752 #endif
13753
13754 #ifdef HAVE_LINUX_THREADS
13755         pthread_kill_other_threads_np();
13756 #endif
13757
13758         return 0;
13759
13760 }
13761
13762 EOF
13763 if { (eval echo configure:13764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13764 then
13765   ol_cv_pthread_lc_r=yes
13766 else
13767   echo "configure: failed program was:" >&5
13768   cat conftest.$ac_ext >&5
13769   rm -fr conftest*
13770   ol_cv_pthread_lc_r=no
13771 fi
13772 rm -fr conftest*
13773 fi
13774
13775
13776                 # restore the LIBS
13777                 LIBS="$ol_LIBS"
13778         
13779 fi
13780
13781 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13782
13783         if test $ol_cv_pthread_lc_r = yes ; then
13784                 ol_link_pthreads="-lc_r"
13785                 ol_link_threads=posix
13786         fi
13787 fi
13788
13789
13790                 # Pthread try link: -threads (ol_cv_pthread_threads)
13791 if test "$ol_link_threads" = no ; then
13792         # try -threads
13793         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13794 echo "configure:13795: checking for pthread link with -threads" >&5
13795 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13796   echo $ac_n "(cached) $ac_c" 1>&6
13797 else
13798   
13799                 # save the flags
13800                 ol_LIBS="$LIBS"
13801                 LIBS="-threads $LIBS"
13802
13803                 if test "$cross_compiling" = yes; then
13804   cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807 /* pthread test headers */
13808 #include <pthread.h>
13809 #if HAVE_PTHREADS < 7
13810 #include <errno.h>
13811 #endif
13812 #ifndef NULL
13813 #define NULL (void*)0
13814 #endif
13815
13816 static void *task(p)
13817         void *p;
13818 {
13819         return (void *) (p == NULL);
13820 }
13821
13822 int main() {
13823
13824         /* pthread test function */
13825 #ifndef PTHREAD_CREATE_DETACHED
13826 #define PTHREAD_CREATE_DETACHED 1
13827 #endif
13828         pthread_t t;
13829         int status;
13830         int detach = PTHREAD_CREATE_DETACHED;
13831
13832 #if HAVE_PTHREADS > 4
13833         /* Final pthreads */
13834         pthread_attr_t attr;
13835
13836         status = pthread_attr_init(&attr);
13837         if( status ) return status;
13838
13839 #if HAVE_PTHREADS < 7
13840         status = pthread_attr_setdetachstate(&attr, &detach);
13841         if( status < 0 ) status = errno;
13842 #else
13843         status = pthread_attr_setdetachstate(&attr, detach);
13844 #endif
13845         if( status ) return status;
13846         status = pthread_create( &t, &attr, task, NULL );
13847 #if HAVE_PTHREADS < 7
13848         if( status < 0 ) status = errno;
13849 #endif
13850         if( status ) return status;
13851 #else
13852         /* Draft 4 pthreads */
13853         status = pthread_create( &t, pthread_attr_default, task, NULL );
13854         if( status ) return errno;
13855
13856         /* give thread a chance to complete */
13857         /* it should remain joinable and hence detachable */
13858         sleep( 1 );
13859
13860         status = pthread_detach( &t );
13861         if( status ) return errno;
13862 #endif
13863
13864 #ifdef HAVE_LINUX_THREADS
13865         pthread_kill_other_threads_np();
13866 #endif
13867
13868         return 0;
13869
13870 ; return 0; }
13871 EOF
13872 if { (eval echo configure:13873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13873   rm -rf conftest*
13874   ol_cv_pthread_threads=yes
13875 else
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -rf conftest*
13879   ol_cv_pthread_threads=no
13880 fi
13881 rm -f conftest*
13882 else
13883   cat > conftest.$ac_ext <<EOF
13884 #line 13885 "configure"
13885 #include "confdefs.h"
13886 /* pthread test headers */
13887 #include <pthread.h>
13888 #if HAVE_PTHREADS < 7
13889 #include <errno.h>
13890 #endif
13891 #ifndef NULL
13892 #define NULL (void*)0
13893 #endif
13894
13895 static void *task(p)
13896         void *p;
13897 {
13898         return (void *) (p == NULL);
13899 }
13900
13901
13902 int main(argc, argv)
13903         int argc;
13904         char **argv;
13905 {
13906
13907         /* pthread test function */
13908 #ifndef PTHREAD_CREATE_DETACHED
13909 #define PTHREAD_CREATE_DETACHED 1
13910 #endif
13911         pthread_t t;
13912         int status;
13913         int detach = PTHREAD_CREATE_DETACHED;
13914
13915 #if HAVE_PTHREADS > 4
13916         /* Final pthreads */
13917         pthread_attr_t attr;
13918
13919         status = pthread_attr_init(&attr);
13920         if( status ) return status;
13921
13922 #if HAVE_PTHREADS < 7
13923         status = pthread_attr_setdetachstate(&attr, &detach);
13924         if( status < 0 ) status = errno;
13925 #else
13926         status = pthread_attr_setdetachstate(&attr, detach);
13927 #endif
13928         if( status ) return status;
13929         status = pthread_create( &t, &attr, task, NULL );
13930 #if HAVE_PTHREADS < 7
13931         if( status < 0 ) status = errno;
13932 #endif
13933         if( status ) return status;
13934 #else
13935         /* Draft 4 pthreads */
13936         status = pthread_create( &t, pthread_attr_default, task, NULL );
13937         if( status ) return errno;
13938
13939         /* give thread a chance to complete */
13940         /* it should remain joinable and hence detachable */
13941         sleep( 1 );
13942
13943         status = pthread_detach( &t );
13944         if( status ) return errno;
13945 #endif
13946
13947 #ifdef HAVE_LINUX_THREADS
13948         pthread_kill_other_threads_np();
13949 #endif
13950
13951         return 0;
13952
13953 }
13954
13955 EOF
13956 if { (eval echo configure:13957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13957 then
13958   ol_cv_pthread_threads=yes
13959 else
13960   echo "configure: failed program was:" >&5
13961   cat conftest.$ac_ext >&5
13962   rm -fr conftest*
13963   ol_cv_pthread_threads=no
13964 fi
13965 rm -fr conftest*
13966 fi
13967
13968
13969                 # restore the LIBS
13970                 LIBS="$ol_LIBS"
13971         
13972 fi
13973
13974 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13975
13976         if test $ol_cv_pthread_threads = yes ; then
13977                 ol_link_pthreads="-threads"
13978                 ol_link_threads=posix
13979         fi
13980 fi
13981
13982
13983                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13984 if test "$ol_link_threads" = no ; then
13985         # try -lpthreads -lmach -lexc -lc_r
13986         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13987 echo "configure:13988: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13988 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13989   echo $ac_n "(cached) $ac_c" 1>&6
13990 else
13991   
13992                 # save the flags
13993                 ol_LIBS="$LIBS"
13994                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13995
13996                 if test "$cross_compiling" = yes; then
13997   cat > conftest.$ac_ext <<EOF
13998 #line 13999 "configure"
13999 #include "confdefs.h"
14000 /* pthread test headers */
14001 #include <pthread.h>
14002 #if HAVE_PTHREADS < 7
14003 #include <errno.h>
14004 #endif
14005 #ifndef NULL
14006 #define NULL (void*)0
14007 #endif
14008
14009 static void *task(p)
14010         void *p;
14011 {
14012         return (void *) (p == NULL);
14013 }
14014
14015 int main() {
14016
14017         /* pthread test function */
14018 #ifndef PTHREAD_CREATE_DETACHED
14019 #define PTHREAD_CREATE_DETACHED 1
14020 #endif
14021         pthread_t t;
14022         int status;
14023         int detach = PTHREAD_CREATE_DETACHED;
14024
14025 #if HAVE_PTHREADS > 4
14026         /* Final pthreads */
14027         pthread_attr_t attr;
14028
14029         status = pthread_attr_init(&attr);
14030         if( status ) return status;
14031
14032 #if HAVE_PTHREADS < 7
14033         status = pthread_attr_setdetachstate(&attr, &detach);
14034         if( status < 0 ) status = errno;
14035 #else
14036         status = pthread_attr_setdetachstate(&attr, detach);
14037 #endif
14038         if( status ) return status;
14039         status = pthread_create( &t, &attr, task, NULL );
14040 #if HAVE_PTHREADS < 7
14041         if( status < 0 ) status = errno;
14042 #endif
14043         if( status ) return status;
14044 #else
14045         /* Draft 4 pthreads */
14046         status = pthread_create( &t, pthread_attr_default, task, NULL );
14047         if( status ) return errno;
14048
14049         /* give thread a chance to complete */
14050         /* it should remain joinable and hence detachable */
14051         sleep( 1 );
14052
14053         status = pthread_detach( &t );
14054         if( status ) return errno;
14055 #endif
14056
14057 #ifdef HAVE_LINUX_THREADS
14058         pthread_kill_other_threads_np();
14059 #endif
14060
14061         return 0;
14062
14063 ; return 0; }
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14066   rm -rf conftest*
14067   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -rf conftest*
14072   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14073 fi
14074 rm -f conftest*
14075 else
14076   cat > conftest.$ac_ext <<EOF
14077 #line 14078 "configure"
14078 #include "confdefs.h"
14079 /* pthread test headers */
14080 #include <pthread.h>
14081 #if HAVE_PTHREADS < 7
14082 #include <errno.h>
14083 #endif
14084 #ifndef NULL
14085 #define NULL (void*)0
14086 #endif
14087
14088 static void *task(p)
14089         void *p;
14090 {
14091         return (void *) (p == NULL);
14092 }
14093
14094
14095 int main(argc, argv)
14096         int argc;
14097         char **argv;
14098 {
14099
14100         /* pthread test function */
14101 #ifndef PTHREAD_CREATE_DETACHED
14102 #define PTHREAD_CREATE_DETACHED 1
14103 #endif
14104         pthread_t t;
14105         int status;
14106         int detach = PTHREAD_CREATE_DETACHED;
14107
14108 #if HAVE_PTHREADS > 4
14109         /* Final pthreads */
14110         pthread_attr_t attr;
14111
14112         status = pthread_attr_init(&attr);
14113         if( status ) return status;
14114
14115 #if HAVE_PTHREADS < 7
14116         status = pthread_attr_setdetachstate(&attr, &detach);
14117         if( status < 0 ) status = errno;
14118 #else
14119         status = pthread_attr_setdetachstate(&attr, detach);
14120 #endif
14121         if( status ) return status;
14122         status = pthread_create( &t, &attr, task, NULL );
14123 #if HAVE_PTHREADS < 7
14124         if( status < 0 ) status = errno;
14125 #endif
14126         if( status ) return status;
14127 #else
14128         /* Draft 4 pthreads */
14129         status = pthread_create( &t, pthread_attr_default, task, NULL );
14130         if( status ) return errno;
14131
14132         /* give thread a chance to complete */
14133         /* it should remain joinable and hence detachable */
14134         sleep( 1 );
14135
14136         status = pthread_detach( &t );
14137         if( status ) return errno;
14138 #endif
14139
14140 #ifdef HAVE_LINUX_THREADS
14141         pthread_kill_other_threads_np();
14142 #endif
14143
14144         return 0;
14145
14146 }
14147
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14150 then
14151   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -fr conftest*
14156   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14157 fi
14158 rm -fr conftest*
14159 fi
14160
14161
14162                 # restore the LIBS
14163                 LIBS="$ol_LIBS"
14164         
14165 fi
14166
14167 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14168
14169         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14170                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14171                 ol_link_threads=posix
14172         fi
14173 fi
14174
14175                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14176 if test "$ol_link_threads" = no ; then
14177         # try -lpthreads -lmach -lexc
14178         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14179 echo "configure:14180: checking for pthread link with -lpthreads -lmach -lexc" >&5
14180 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14181   echo $ac_n "(cached) $ac_c" 1>&6
14182 else
14183   
14184                 # save the flags
14185                 ol_LIBS="$LIBS"
14186                 LIBS="-lpthreads -lmach -lexc $LIBS"
14187
14188                 if test "$cross_compiling" = yes; then
14189   cat > conftest.$ac_ext <<EOF
14190 #line 14191 "configure"
14191 #include "confdefs.h"
14192 /* pthread test headers */
14193 #include <pthread.h>
14194 #if HAVE_PTHREADS < 7
14195 #include <errno.h>
14196 #endif
14197 #ifndef NULL
14198 #define NULL (void*)0
14199 #endif
14200
14201 static void *task(p)
14202         void *p;
14203 {
14204         return (void *) (p == NULL);
14205 }
14206
14207 int main() {
14208
14209         /* pthread test function */
14210 #ifndef PTHREAD_CREATE_DETACHED
14211 #define PTHREAD_CREATE_DETACHED 1
14212 #endif
14213         pthread_t t;
14214         int status;
14215         int detach = PTHREAD_CREATE_DETACHED;
14216
14217 #if HAVE_PTHREADS > 4
14218         /* Final pthreads */
14219         pthread_attr_t attr;
14220
14221         status = pthread_attr_init(&attr);
14222         if( status ) return status;
14223
14224 #if HAVE_PTHREADS < 7
14225         status = pthread_attr_setdetachstate(&attr, &detach);
14226         if( status < 0 ) status = errno;
14227 #else
14228         status = pthread_attr_setdetachstate(&attr, detach);
14229 #endif
14230         if( status ) return status;
14231         status = pthread_create( &t, &attr, task, NULL );
14232 #if HAVE_PTHREADS < 7
14233         if( status < 0 ) status = errno;
14234 #endif
14235         if( status ) return status;
14236 #else
14237         /* Draft 4 pthreads */
14238         status = pthread_create( &t, pthread_attr_default, task, NULL );
14239         if( status ) return errno;
14240
14241         /* give thread a chance to complete */
14242         /* it should remain joinable and hence detachable */
14243         sleep( 1 );
14244
14245         status = pthread_detach( &t );
14246         if( status ) return errno;
14247 #endif
14248
14249 #ifdef HAVE_LINUX_THREADS
14250         pthread_kill_other_threads_np();
14251 #endif
14252
14253         return 0;
14254
14255 ; return 0; }
14256 EOF
14257 if { (eval echo configure:14258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14258   rm -rf conftest*
14259   ol_cv_pthread_lpthreads_lmach_lexc=yes
14260 else
14261   echo "configure: failed program was:" >&5
14262   cat conftest.$ac_ext >&5
14263   rm -rf conftest*
14264   ol_cv_pthread_lpthreads_lmach_lexc=no
14265 fi
14266 rm -f conftest*
14267 else
14268   cat > conftest.$ac_ext <<EOF
14269 #line 14270 "configure"
14270 #include "confdefs.h"
14271 /* pthread test headers */
14272 #include <pthread.h>
14273 #if HAVE_PTHREADS < 7
14274 #include <errno.h>
14275 #endif
14276 #ifndef NULL
14277 #define NULL (void*)0
14278 #endif
14279
14280 static void *task(p)
14281         void *p;
14282 {
14283         return (void *) (p == NULL);
14284 }
14285
14286
14287 int main(argc, argv)
14288         int argc;
14289         char **argv;
14290 {
14291
14292         /* pthread test function */
14293 #ifndef PTHREAD_CREATE_DETACHED
14294 #define PTHREAD_CREATE_DETACHED 1
14295 #endif
14296         pthread_t t;
14297         int status;
14298         int detach = PTHREAD_CREATE_DETACHED;
14299
14300 #if HAVE_PTHREADS > 4
14301         /* Final pthreads */
14302         pthread_attr_t attr;
14303
14304         status = pthread_attr_init(&attr);
14305         if( status ) return status;
14306
14307 #if HAVE_PTHREADS < 7
14308         status = pthread_attr_setdetachstate(&attr, &detach);
14309         if( status < 0 ) status = errno;
14310 #else
14311         status = pthread_attr_setdetachstate(&attr, detach);
14312 #endif
14313         if( status ) return status;
14314         status = pthread_create( &t, &attr, task, NULL );
14315 #if HAVE_PTHREADS < 7
14316         if( status < 0 ) status = errno;
14317 #endif
14318         if( status ) return status;
14319 #else
14320         /* Draft 4 pthreads */
14321         status = pthread_create( &t, pthread_attr_default, task, NULL );
14322         if( status ) return errno;
14323
14324         /* give thread a chance to complete */
14325         /* it should remain joinable and hence detachable */
14326         sleep( 1 );
14327
14328         status = pthread_detach( &t );
14329         if( status ) return errno;
14330 #endif
14331
14332 #ifdef HAVE_LINUX_THREADS
14333         pthread_kill_other_threads_np();
14334 #endif
14335
14336         return 0;
14337
14338 }
14339
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14342 then
14343   ol_cv_pthread_lpthreads_lmach_lexc=yes
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -fr conftest*
14348   ol_cv_pthread_lpthreads_lmach_lexc=no
14349 fi
14350 rm -fr conftest*
14351 fi
14352
14353
14354                 # restore the LIBS
14355                 LIBS="$ol_LIBS"
14356         
14357 fi
14358
14359 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14360
14361         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14362                 ol_link_pthreads="-lpthreads -lmach -lexc"
14363                 ol_link_threads=posix
14364         fi
14365 fi
14366
14367                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14368 if test "$ol_link_threads" = no ; then
14369         # try -lpthreads -lexc
14370         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14371 echo "configure:14372: checking for pthread link with -lpthreads -lexc" >&5
14372 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14373   echo $ac_n "(cached) $ac_c" 1>&6
14374 else
14375   
14376                 # save the flags
14377                 ol_LIBS="$LIBS"
14378                 LIBS="-lpthreads -lexc $LIBS"
14379
14380                 if test "$cross_compiling" = yes; then
14381   cat > conftest.$ac_ext <<EOF
14382 #line 14383 "configure"
14383 #include "confdefs.h"
14384 /* pthread test headers */
14385 #include <pthread.h>
14386 #if HAVE_PTHREADS < 7
14387 #include <errno.h>
14388 #endif
14389 #ifndef NULL
14390 #define NULL (void*)0
14391 #endif
14392
14393 static void *task(p)
14394         void *p;
14395 {
14396         return (void *) (p == NULL);
14397 }
14398
14399 int main() {
14400
14401         /* pthread test function */
14402 #ifndef PTHREAD_CREATE_DETACHED
14403 #define PTHREAD_CREATE_DETACHED 1
14404 #endif
14405         pthread_t t;
14406         int status;
14407         int detach = PTHREAD_CREATE_DETACHED;
14408
14409 #if HAVE_PTHREADS > 4
14410         /* Final pthreads */
14411         pthread_attr_t attr;
14412
14413         status = pthread_attr_init(&attr);
14414         if( status ) return status;
14415
14416 #if HAVE_PTHREADS < 7
14417         status = pthread_attr_setdetachstate(&attr, &detach);
14418         if( status < 0 ) status = errno;
14419 #else
14420         status = pthread_attr_setdetachstate(&attr, detach);
14421 #endif
14422         if( status ) return status;
14423         status = pthread_create( &t, &attr, task, NULL );
14424 #if HAVE_PTHREADS < 7
14425         if( status < 0 ) status = errno;
14426 #endif
14427         if( status ) return status;
14428 #else
14429         /* Draft 4 pthreads */
14430         status = pthread_create( &t, pthread_attr_default, task, NULL );
14431         if( status ) return errno;
14432
14433         /* give thread a chance to complete */
14434         /* it should remain joinable and hence detachable */
14435         sleep( 1 );
14436
14437         status = pthread_detach( &t );
14438         if( status ) return errno;
14439 #endif
14440
14441 #ifdef HAVE_LINUX_THREADS
14442         pthread_kill_other_threads_np();
14443 #endif
14444
14445         return 0;
14446
14447 ; return 0; }
14448 EOF
14449 if { (eval echo configure:14450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14450   rm -rf conftest*
14451   ol_cv_pthread_lpthreads_lexc=yes
14452 else
14453   echo "configure: failed program was:" >&5
14454   cat conftest.$ac_ext >&5
14455   rm -rf conftest*
14456   ol_cv_pthread_lpthreads_lexc=no
14457 fi
14458 rm -f conftest*
14459 else
14460   cat > conftest.$ac_ext <<EOF
14461 #line 14462 "configure"
14462 #include "confdefs.h"
14463 /* pthread test headers */
14464 #include <pthread.h>
14465 #if HAVE_PTHREADS < 7
14466 #include <errno.h>
14467 #endif
14468 #ifndef NULL
14469 #define NULL (void*)0
14470 #endif
14471
14472 static void *task(p)
14473         void *p;
14474 {
14475         return (void *) (p == NULL);
14476 }
14477
14478
14479 int main(argc, argv)
14480         int argc;
14481         char **argv;
14482 {
14483
14484         /* pthread test function */
14485 #ifndef PTHREAD_CREATE_DETACHED
14486 #define PTHREAD_CREATE_DETACHED 1
14487 #endif
14488         pthread_t t;
14489         int status;
14490         int detach = PTHREAD_CREATE_DETACHED;
14491
14492 #if HAVE_PTHREADS > 4
14493         /* Final pthreads */
14494         pthread_attr_t attr;
14495
14496         status = pthread_attr_init(&attr);
14497         if( status ) return status;
14498
14499 #if HAVE_PTHREADS < 7
14500         status = pthread_attr_setdetachstate(&attr, &detach);
14501         if( status < 0 ) status = errno;
14502 #else
14503         status = pthread_attr_setdetachstate(&attr, detach);
14504 #endif
14505         if( status ) return status;
14506         status = pthread_create( &t, &attr, task, NULL );
14507 #if HAVE_PTHREADS < 7
14508         if( status < 0 ) status = errno;
14509 #endif
14510         if( status ) return status;
14511 #else
14512         /* Draft 4 pthreads */
14513         status = pthread_create( &t, pthread_attr_default, task, NULL );
14514         if( status ) return errno;
14515
14516         /* give thread a chance to complete */
14517         /* it should remain joinable and hence detachable */
14518         sleep( 1 );
14519
14520         status = pthread_detach( &t );
14521         if( status ) return errno;
14522 #endif
14523
14524 #ifdef HAVE_LINUX_THREADS
14525         pthread_kill_other_threads_np();
14526 #endif
14527
14528         return 0;
14529
14530 }
14531
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14534 then
14535   ol_cv_pthread_lpthreads_lexc=yes
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -fr conftest*
14540   ol_cv_pthread_lpthreads_lexc=no
14541 fi
14542 rm -fr conftest*
14543 fi
14544
14545
14546                 # restore the LIBS
14547                 LIBS="$ol_LIBS"
14548         
14549 fi
14550
14551 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14552
14553         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14554                 ol_link_pthreads="-lpthreads -lexc"
14555                 ol_link_threads=posix
14556         fi
14557 fi
14558
14559
14560                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14561 if test "$ol_link_threads" = no ; then
14562         # try -lpthreads
14563         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14564 echo "configure:14565: checking for pthread link with -lpthreads" >&5
14565 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14566   echo $ac_n "(cached) $ac_c" 1>&6
14567 else
14568   
14569                 # save the flags
14570                 ol_LIBS="$LIBS"
14571                 LIBS="-lpthreads $LIBS"
14572
14573                 if test "$cross_compiling" = yes; then
14574   cat > conftest.$ac_ext <<EOF
14575 #line 14576 "configure"
14576 #include "confdefs.h"
14577 /* pthread test headers */
14578 #include <pthread.h>
14579 #if HAVE_PTHREADS < 7
14580 #include <errno.h>
14581 #endif
14582 #ifndef NULL
14583 #define NULL (void*)0
14584 #endif
14585
14586 static void *task(p)
14587         void *p;
14588 {
14589         return (void *) (p == NULL);
14590 }
14591
14592 int main() {
14593
14594         /* pthread test function */
14595 #ifndef PTHREAD_CREATE_DETACHED
14596 #define PTHREAD_CREATE_DETACHED 1
14597 #endif
14598         pthread_t t;
14599         int status;
14600         int detach = PTHREAD_CREATE_DETACHED;
14601
14602 #if HAVE_PTHREADS > 4
14603         /* Final pthreads */
14604         pthread_attr_t attr;
14605
14606         status = pthread_attr_init(&attr);
14607         if( status ) return status;
14608
14609 #if HAVE_PTHREADS < 7
14610         status = pthread_attr_setdetachstate(&attr, &detach);
14611         if( status < 0 ) status = errno;
14612 #else
14613         status = pthread_attr_setdetachstate(&attr, detach);
14614 #endif
14615         if( status ) return status;
14616         status = pthread_create( &t, &attr, task, NULL );
14617 #if HAVE_PTHREADS < 7
14618         if( status < 0 ) status = errno;
14619 #endif
14620         if( status ) return status;
14621 #else
14622         /* Draft 4 pthreads */
14623         status = pthread_create( &t, pthread_attr_default, task, NULL );
14624         if( status ) return errno;
14625
14626         /* give thread a chance to complete */
14627         /* it should remain joinable and hence detachable */
14628         sleep( 1 );
14629
14630         status = pthread_detach( &t );
14631         if( status ) return errno;
14632 #endif
14633
14634 #ifdef HAVE_LINUX_THREADS
14635         pthread_kill_other_threads_np();
14636 #endif
14637
14638         return 0;
14639
14640 ; return 0; }
14641 EOF
14642 if { (eval echo configure:14643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14643   rm -rf conftest*
14644   ol_cv_pthread_lib_lpthreads=yes
14645 else
14646   echo "configure: failed program was:" >&5
14647   cat conftest.$ac_ext >&5
14648   rm -rf conftest*
14649   ol_cv_pthread_lib_lpthreads=no
14650 fi
14651 rm -f conftest*
14652 else
14653   cat > conftest.$ac_ext <<EOF
14654 #line 14655 "configure"
14655 #include "confdefs.h"
14656 /* pthread test headers */
14657 #include <pthread.h>
14658 #if HAVE_PTHREADS < 7
14659 #include <errno.h>
14660 #endif
14661 #ifndef NULL
14662 #define NULL (void*)0
14663 #endif
14664
14665 static void *task(p)
14666         void *p;
14667 {
14668         return (void *) (p == NULL);
14669 }
14670
14671
14672 int main(argc, argv)
14673         int argc;
14674         char **argv;
14675 {
14676
14677         /* pthread test function */
14678 #ifndef PTHREAD_CREATE_DETACHED
14679 #define PTHREAD_CREATE_DETACHED 1
14680 #endif
14681         pthread_t t;
14682         int status;
14683         int detach = PTHREAD_CREATE_DETACHED;
14684
14685 #if HAVE_PTHREADS > 4
14686         /* Final pthreads */
14687         pthread_attr_t attr;
14688
14689         status = pthread_attr_init(&attr);
14690         if( status ) return status;
14691
14692 #if HAVE_PTHREADS < 7
14693         status = pthread_attr_setdetachstate(&attr, &detach);
14694         if( status < 0 ) status = errno;
14695 #else
14696         status = pthread_attr_setdetachstate(&attr, detach);
14697 #endif
14698         if( status ) return status;
14699         status = pthread_create( &t, &attr, task, NULL );
14700 #if HAVE_PTHREADS < 7
14701         if( status < 0 ) status = errno;
14702 #endif
14703         if( status ) return status;
14704 #else
14705         /* Draft 4 pthreads */
14706         status = pthread_create( &t, pthread_attr_default, task, NULL );
14707         if( status ) return errno;
14708
14709         /* give thread a chance to complete */
14710         /* it should remain joinable and hence detachable */
14711         sleep( 1 );
14712
14713         status = pthread_detach( &t );
14714         if( status ) return errno;
14715 #endif
14716
14717 #ifdef HAVE_LINUX_THREADS
14718         pthread_kill_other_threads_np();
14719 #endif
14720
14721         return 0;
14722
14723 }
14724
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14727 then
14728   ol_cv_pthread_lib_lpthreads=yes
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732   rm -fr conftest*
14733   ol_cv_pthread_lib_lpthreads=no
14734 fi
14735 rm -fr conftest*
14736 fi
14737
14738
14739                 # restore the LIBS
14740                 LIBS="$ol_LIBS"
14741         
14742 fi
14743
14744 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14745
14746         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14747                 ol_link_pthreads="-lpthreads"
14748                 ol_link_threads=posix
14749         fi
14750 fi
14751
14752
14753                 if test $ol_link_threads != no ; then
14754                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14755
14756                                                 save_CPPFLAGS="$CPPFLAGS"
14757                         save_LIBS="$LIBS"
14758                         LIBS="$LTHREAD_LIBS $LIBS"
14759
14760                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14761 do
14762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14763 echo "configure:14764: checking for $ac_func" >&5
14764 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14765   echo $ac_n "(cached) $ac_c" 1>&6
14766 else
14767   cat > conftest.$ac_ext <<EOF
14768 #line 14769 "configure"
14769 #include "confdefs.h"
14770 /* System header to define __stub macros and hopefully few prototypes,
14771     which can conflict with char $ac_func(); below.  */
14772 #include <assert.h>
14773 /* Override any gcc2 internal prototype to avoid an error.  */
14774 /* We use char because int might match the return type of a gcc2
14775     builtin and then its argument prototype would still apply.  */
14776 char $ac_func();
14777 char (*f)();
14778
14779 int main() {
14780
14781 /* The GNU C library defines this for functions which it implements
14782     to always fail with ENOSYS.  Some functions are actually named
14783     something starting with __ and the normal name is an alias.  */
14784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14785 choke me
14786 #else
14787 f = $ac_func;
14788 #endif
14789
14790 ; return 0; }
14791 EOF
14792 if { (eval echo configure:14793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14793   rm -rf conftest*
14794   eval "ac_cv_func_$ac_func=yes"
14795 else
14796   echo "configure: failed program was:" >&5
14797   cat conftest.$ac_ext >&5
14798   rm -rf conftest*
14799   eval "ac_cv_func_$ac_func=no"
14800 fi
14801 rm -f conftest*
14802 fi
14803
14804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14805   echo "$ac_t""yes" 1>&6
14806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14807   cat >> confdefs.h <<EOF
14808 #define $ac_tr_func 1
14809 EOF
14810  
14811 else
14812   echo "$ac_t""no" 1>&6
14813 fi
14814 done
14815
14816
14817                         if test $ac_cv_func_sched_yield = no -a \
14818                                 $ac_cv_func_pthread_yield = no -a \
14819                                 $ac_cv_func_thr_yield = no ; then
14820                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14821 echo "configure:14822: checking for sched_yield in -lrt" >&5
14822 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14823 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14824   echo $ac_n "(cached) $ac_c" 1>&6
14825 else
14826   ac_save_LIBS="$LIBS"
14827 LIBS="-lrt  $LIBS"
14828 cat > conftest.$ac_ext <<EOF
14829 #line 14830 "configure"
14830 #include "confdefs.h"
14831 /* Override any gcc2 internal prototype to avoid an error.  */
14832 /* We use char because int might match the return type of a gcc2
14833     builtin and then its argument prototype would still apply.  */
14834 char sched_yield();
14835
14836 int main() {
14837 sched_yield()
14838 ; return 0; }
14839 EOF
14840 if { (eval echo configure:14841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14841   rm -rf conftest*
14842   eval "ac_cv_lib_$ac_lib_var=yes"
14843 else
14844   echo "configure: failed program was:" >&5
14845   cat conftest.$ac_ext >&5
14846   rm -rf conftest*
14847   eval "ac_cv_lib_$ac_lib_var=no"
14848 fi
14849 rm -f conftest*
14850 LIBS="$ac_save_LIBS"
14851
14852 fi
14853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14854   echo "$ac_t""yes" 1>&6
14855   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14856                                         cat >> confdefs.h <<\EOF
14857 #define HAVE_SCHED_YIELD 1
14858 EOF
14859
14860                                         ac_cv_func_sched_yield=yes
14861 else
14862   echo "$ac_t""no" 1>&6
14863 ac_cv_func_sched_yield=no
14864 fi
14865
14866                         fi
14867                         if test $ac_cv_func_sched_yield = no -a \
14868                                 $ac_cv_func_pthread_yield = no -a \
14869                                 "$ac_cv_func_thr_yield" = no ; then
14870                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14871                         fi
14872
14873                                                 for ac_func in pthread_kill pthread_rwlock_destroy
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
14930                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14931 echo "configure:14932: checking for pthread_detach with <pthread.h>" >&5
14932 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14933   echo $ac_n "(cached) $ac_c" 1>&6
14934 else
14935   
14936                                                                 cat > conftest.$ac_ext <<EOF
14937 #line 14938 "configure"
14938 #include "confdefs.h"
14939
14940 #include <pthread.h>
14941 #ifndef NULL
14942 #define NULL (void*)0
14943 #endif
14944
14945 int main() {
14946 pthread_detach(NULL);
14947 ; return 0; }
14948 EOF
14949 if { (eval echo configure:14950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14950   rm -rf conftest*
14951   ol_cv_func_pthread_detach=yes
14952 else
14953   echo "configure: failed program was:" >&5
14954   cat conftest.$ac_ext >&5
14955   rm -rf conftest*
14956   ol_cv_func_pthread_detach=no
14957 fi
14958 rm -f conftest*
14959                         
14960 fi
14961
14962 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14963
14964                         if test $ol_cv_func_pthread_detach = no ; then
14965                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14966                         fi
14967
14968                         cat >> confdefs.h <<\EOF
14969 #define HAVE_PTHREAD_DETACH 1
14970 EOF
14971
14972
14973                                                 for ac_func in \
14974                                 pthread_setconcurrency \
14975                                 pthread_getconcurrency \
14976                                 thr_setconcurrency \
14977                                 thr_getconcurrency \
14978                         
14979 do
14980 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14981 echo "configure:14982: checking for $ac_func" >&5
14982 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14983   echo $ac_n "(cached) $ac_c" 1>&6
14984 else
14985   cat > conftest.$ac_ext <<EOF
14986 #line 14987 "configure"
14987 #include "confdefs.h"
14988 /* System header to define __stub macros and hopefully few prototypes,
14989     which can conflict with char $ac_func(); below.  */
14990 #include <assert.h>
14991 /* Override any gcc2 internal prototype to avoid an error.  */
14992 /* We use char because int might match the return type of a gcc2
14993     builtin and then its argument prototype would still apply.  */
14994 char $ac_func();
14995 char (*f)();
14996
14997 int main() {
14998
14999 /* The GNU C library defines this for functions which it implements
15000     to always fail with ENOSYS.  Some functions are actually named
15001     something starting with __ and the normal name is an alias.  */
15002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15003 choke me
15004 #else
15005 f = $ac_func;
15006 #endif
15007
15008 ; return 0; }
15009 EOF
15010 if { (eval echo configure:15011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15011   rm -rf conftest*
15012   eval "ac_cv_func_$ac_func=yes"
15013 else
15014   echo "configure: failed program was:" >&5
15015   cat conftest.$ac_ext >&5
15016   rm -rf conftest*
15017   eval "ac_cv_func_$ac_func=no"
15018 fi
15019 rm -f conftest*
15020 fi
15021
15022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15023   echo "$ac_t""yes" 1>&6
15024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15025   cat >> confdefs.h <<EOF
15026 #define $ac_tr_func 1
15027 EOF
15028  
15029 else
15030   echo "$ac_t""no" 1>&6
15031 fi
15032 done
15033
15034
15035                         
15036         for ac_func in pthread_kill_other_threads_np
15037 do
15038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $ac_func" >&5
15040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char $ac_func(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char $ac_func();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 f = $ac_func;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15083   cat >> confdefs.h <<EOF
15084 #define $ac_tr_func 1
15085 EOF
15086  
15087 else
15088   echo "$ac_t""no" 1>&6
15089 fi
15090 done
15091
15092         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15093 echo "configure:15094: checking for LinuxThreads implementation" >&5
15094 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15095   echo $ac_n "(cached) $ac_c" 1>&6
15096 else
15097   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15098 fi
15099
15100 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15101
15102                         
15103         
15104         
15105         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15106 echo "configure:15107: checking for LinuxThreads consistency" >&5
15107 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15108   echo $ac_n "(cached) $ac_c" 1>&6
15109 else
15110   
15111                 if test $ol_cv_header_linux_threads = yes -a \
15112                         $ol_cv_sys_linux_threads = yes; then
15113                         ol_cv_linux_threads=yes
15114                 elif test $ol_cv_header_linux_threads = no -a \
15115                         $ol_cv_sys_linux_threads = no; then
15116                         ol_cv_linux_threads=no
15117                 else
15118                         ol_cv_linux_threads=error
15119                 fi
15120         
15121 fi
15122
15123 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15124
15125
15126                         if test $ol_cv_linux_threads = error; then
15127                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15128                         fi
15129
15130                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15131 echo "configure:15132: checking if pthread_create() works" >&5
15132 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15133   echo $ac_n "(cached) $ac_c" 1>&6
15134 else
15135   
15136                         if test "$cross_compiling" = yes; then
15137                                 ol_cv_pthread_create_works=yes
15138 else
15139   cat > conftest.$ac_ext <<EOF
15140 #line 15141 "configure"
15141 #include "confdefs.h"
15142 /* pthread test headers */
15143 #include <pthread.h>
15144 #if HAVE_PTHREADS < 7
15145 #include <errno.h>
15146 #endif
15147 #ifndef NULL
15148 #define NULL (void*)0
15149 #endif
15150
15151 static void *task(p)
15152         void *p;
15153 {
15154         return (void *) (p == NULL);
15155 }
15156
15157
15158 int main(argc, argv)
15159         int argc;
15160         char **argv;
15161 {
15162
15163         /* pthread test function */
15164 #ifndef PTHREAD_CREATE_DETACHED
15165 #define PTHREAD_CREATE_DETACHED 1
15166 #endif
15167         pthread_t t;
15168         int status;
15169         int detach = PTHREAD_CREATE_DETACHED;
15170
15171 #if HAVE_PTHREADS > 4
15172         /* Final pthreads */
15173         pthread_attr_t attr;
15174
15175         status = pthread_attr_init(&attr);
15176         if( status ) return status;
15177
15178 #if HAVE_PTHREADS < 7
15179         status = pthread_attr_setdetachstate(&attr, &detach);
15180         if( status < 0 ) status = errno;
15181 #else
15182         status = pthread_attr_setdetachstate(&attr, detach);
15183 #endif
15184         if( status ) return status;
15185         status = pthread_create( &t, &attr, task, NULL );
15186 #if HAVE_PTHREADS < 7
15187         if( status < 0 ) status = errno;
15188 #endif
15189         if( status ) return status;
15190 #else
15191         /* Draft 4 pthreads */
15192         status = pthread_create( &t, pthread_attr_default, task, NULL );
15193         if( status ) return errno;
15194
15195         /* give thread a chance to complete */
15196         /* it should remain joinable and hence detachable */
15197         sleep( 1 );
15198
15199         status = pthread_detach( &t );
15200         if( status ) return errno;
15201 #endif
15202
15203 #ifdef HAVE_LINUX_THREADS
15204         pthread_kill_other_threads_np();
15205 #endif
15206
15207         return 0;
15208
15209 }
15210
15211 EOF
15212 if { (eval echo configure:15213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15213 then
15214   ol_cv_pthread_create_works=yes
15215 else
15216   echo "configure: failed program was:" >&5
15217   cat conftest.$ac_ext >&5
15218   rm -fr conftest*
15219   ol_cv_pthread_create_works=no
15220 fi
15221 rm -fr conftest*
15222 fi
15223
15224 fi
15225
15226 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15227
15228                         if test $ol_cv_pthread_create_works = no ; then
15229                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15230                         fi
15231
15232                                                 if test $ol_with_yielding_select = auto ; then
15233                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15234 echo "configure:15235: checking if select yields when using pthreads" >&5
15235 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15236   echo $ac_n "(cached) $ac_c" 1>&6
15237 else
15238   
15239                                 if test "$cross_compiling" = yes; then
15240   ol_cv_pthread_select_yields=cross
15241 else
15242   cat > conftest.$ac_ext <<EOF
15243 #line 15244 "configure"
15244 #include "confdefs.h"
15245
15246 #include <sys/types.h>
15247 #include <sys/time.h>
15248 #include <unistd.h>
15249 #include <pthread.h>
15250 #ifndef NULL
15251 #define NULL (void*) 0
15252 #endif
15253
15254 static int fildes[2];
15255
15256 static void *task(p)
15257         void *p;
15258 {
15259         int i;
15260         struct timeval tv;
15261
15262         fd_set rfds;
15263
15264         tv.tv_sec=10;
15265         tv.tv_usec=0;
15266
15267         FD_ZERO(&rfds);
15268         FD_SET(fildes[0], &rfds);
15269
15270         /* we're not interested in any fds */
15271         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15272
15273         if(i < 0) {
15274                 perror("select");
15275                 exit(10);
15276         }
15277
15278         exit(0); /* if we exit here, the select blocked the whole process */
15279 }
15280
15281 int main(argc, argv)
15282         int argc;
15283         char **argv;
15284 {
15285         pthread_t t;
15286
15287         /* create a pipe to select */
15288         if(pipe(&fildes[0])) {
15289                 perror("select");
15290                 exit(1);
15291         }
15292
15293 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15294         (void) pthread_setconcurrency(2);
15295 #else
15296 #ifdef HAVE_THR_SETCONCURRENCY
15297         /* Set Solaris LWP concurrency to 2 */
15298         thr_setconcurrency(2);
15299 #endif
15300 #endif
15301
15302 #if HAVE_PTHREADS < 6
15303         pthread_create(&t, pthread_attr_default, task, NULL);
15304 #else
15305         pthread_create(&t, NULL, task, NULL);
15306 #endif
15307
15308         /* make sure task runs first */
15309 #if HAVE_THR_YIELD
15310         thr_yield();
15311 #elif defined( HAVE_SCHED_YIELD )
15312         sched_yield();
15313 #elif defined( HAVE_PTHREAD_YIELD )
15314         pthread_yield();
15315 #endif
15316
15317         exit(2);
15318 }
15319 EOF
15320 if { (eval echo configure:15321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15321 then
15322   ol_cv_pthread_select_yields=no
15323 else
15324   echo "configure: failed program was:" >&5
15325   cat conftest.$ac_ext >&5
15326   rm -fr conftest*
15327   ol_cv_pthread_select_yields=yes
15328 fi
15329 rm -fr conftest*
15330 fi
15331
15332 fi
15333
15334 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15335
15336                                 if test $ol_cv_pthread_select_yields = cross ; then
15337                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15338                                 fi
15339
15340                                 if test $ol_cv_pthread_select_yields = yes ; then
15341                                         ol_with_yielding_select=yes
15342                                 fi
15343                         fi
15344
15345                                                 CPPFLAGS="$save_CPPFLAGS"
15346                         LIBS="$save_LIBS"
15347                 else
15348                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15349                 fi
15350         fi
15351
15352         if test $ol_with_threads = posix ; then
15353                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15354         fi
15355 fi
15356
15357 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15358         -o $ol_with_threads = mach ; then
15359
15360                 for ac_hdr in mach/cthreads.h cthreads.h
15361 do
15362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15364 echo "configure:15365: checking for $ac_hdr" >&5
15365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15366   echo $ac_n "(cached) $ac_c" 1>&6
15367 else
15368   cat > conftest.$ac_ext <<EOF
15369 #line 15370 "configure"
15370 #include "confdefs.h"
15371 #include <$ac_hdr>
15372 EOF
15373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15374 { (eval echo configure:15375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15376 if test -z "$ac_err"; then
15377   rm -rf conftest*
15378   eval "ac_cv_header_$ac_safe=yes"
15379 else
15380   echo "$ac_err" >&5
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -rf conftest*
15384   eval "ac_cv_header_$ac_safe=no"
15385 fi
15386 rm -f conftest*
15387 fi
15388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15389   echo "$ac_t""yes" 1>&6
15390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15391   cat >> confdefs.h <<EOF
15392 #define $ac_tr_hdr 1
15393 EOF
15394  
15395 else
15396   echo "$ac_t""no" 1>&6
15397 fi
15398 done
15399
15400         if test $ac_cv_header_mach_cthreads_h = yes ; then
15401                 ol_with_threads=found
15402
15403                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15404 echo "configure:15405: checking for cthread_fork" >&5
15405 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15406   echo $ac_n "(cached) $ac_c" 1>&6
15407 else
15408   cat > conftest.$ac_ext <<EOF
15409 #line 15410 "configure"
15410 #include "confdefs.h"
15411 /* System header to define __stub macros and hopefully few prototypes,
15412     which can conflict with char cthread_fork(); below.  */
15413 #include <assert.h>
15414 /* Override any gcc2 internal prototype to avoid an error.  */
15415 /* We use char because int might match the return type of a gcc2
15416     builtin and then its argument prototype would still apply.  */
15417 char cthread_fork();
15418 char (*f)();
15419
15420 int main() {
15421
15422 /* The GNU C library defines this for functions which it implements
15423     to always fail with ENOSYS.  Some functions are actually named
15424     something starting with __ and the normal name is an alias.  */
15425 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15426 choke me
15427 #else
15428 f = cthread_fork;
15429 #endif
15430
15431 ; return 0; }
15432 EOF
15433 if { (eval echo configure:15434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15434   rm -rf conftest*
15435   eval "ac_cv_func_cthread_fork=yes"
15436 else
15437   echo "configure: failed program was:" >&5
15438   cat conftest.$ac_ext >&5
15439   rm -rf conftest*
15440   eval "ac_cv_func_cthread_fork=no"
15441 fi
15442 rm -f conftest*
15443 fi
15444
15445 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15446   echo "$ac_t""yes" 1>&6
15447   ol_link_threads=yes
15448 else
15449   echo "$ac_t""no" 1>&6
15450 fi
15451
15452
15453                 if test $ol_link_threads = no ; then
15454                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15455 echo "configure:15456: checking for cthread_fork with -all_load" >&5
15456 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15457   echo $ac_n "(cached) $ac_c" 1>&6
15458 else
15459   
15460                                                                 save_LIBS="$LIBS"
15461                                 LIBS="-all_load $LIBS"
15462                                 cat > conftest.$ac_ext <<EOF
15463 #line 15464 "configure"
15464 #include "confdefs.h"
15465 #include <mach/cthreads.h>
15466 int main() {
15467
15468                                         cthread_fork((void *)0, (void *)0);
15469                                         
15470 ; return 0; }
15471 EOF
15472 if { (eval echo configure:15473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15473   rm -rf conftest*
15474   ol_cv_cthread_all_load=yes
15475 else
15476   echo "configure: failed program was:" >&5
15477   cat conftest.$ac_ext >&5
15478   rm -rf conftest*
15479   ol_cv_cthread_all_load=no
15480 fi
15481 rm -f conftest*
15482                                                                 LIBS="$save_LIBS"
15483                         
15484 fi
15485
15486 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15487
15488                         if test $ol_cv_cthread_all_load = yes ; then
15489                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15490                                 ol_link_threads=mach
15491                                 ol_with_threads=found
15492                         fi
15493                 fi
15494
15495         elif test $ac_cv_header_cthreads_h = yes ; then
15496                                 
15497                 ol_with_threads=found
15498  
15499                                 save_LIBS="$LIBS"
15500                 LIBS="$LIBS -lthreads"
15501                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15502 echo "configure:15503: checking for cthread_fork" >&5
15503 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15504   echo $ac_n "(cached) $ac_c" 1>&6
15505 else
15506   cat > conftest.$ac_ext <<EOF
15507 #line 15508 "configure"
15508 #include "confdefs.h"
15509 /* System header to define __stub macros and hopefully few prototypes,
15510     which can conflict with char cthread_fork(); below.  */
15511 #include <assert.h>
15512 /* Override any gcc2 internal prototype to avoid an error.  */
15513 /* We use char because int might match the return type of a gcc2
15514     builtin and then its argument prototype would still apply.  */
15515 char cthread_fork();
15516 char (*f)();
15517
15518 int main() {
15519
15520 /* The GNU C library defines this for functions which it implements
15521     to always fail with ENOSYS.  Some functions are actually named
15522     something starting with __ and the normal name is an alias.  */
15523 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15524 choke me
15525 #else
15526 f = cthread_fork;
15527 #endif
15528
15529 ; return 0; }
15530 EOF
15531 if { (eval echo configure:15532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15532   rm -rf conftest*
15533   eval "ac_cv_func_cthread_fork=yes"
15534 else
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -rf conftest*
15538   eval "ac_cv_func_cthread_fork=no"
15539 fi
15540 rm -f conftest*
15541 fi
15542
15543 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15544   echo "$ac_t""yes" 1>&6
15545   ol_link_threads=yes
15546 else
15547   echo "$ac_t""no" 1>&6
15548 fi
15549
15550                 LIBS="$save_LIBS"
15551
15552                 if test $ol_link_threads = yes ; then
15553                         LTHREAD_LIBS="-lthreads"
15554                         ol_link_threads=mach
15555                         ol_with_threads=found
15556                 else
15557                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15558                 fi
15559
15560         elif test $ol_with_threads = mach ; then
15561                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15562         fi
15563
15564         if test $ol_link_threads = mach ; then
15565                 cat >> confdefs.h <<\EOF
15566 #define HAVE_MACH_CTHREADS 1
15567 EOF
15568
15569         elif test $ol_with_threads = found ; then
15570                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15571         fi
15572 fi
15573
15574 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15575         -o $ol_with_threads = pth ; then
15576
15577         for ac_hdr in pth.h
15578 do
15579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15581 echo "configure:15582: checking for $ac_hdr" >&5
15582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15583   echo $ac_n "(cached) $ac_c" 1>&6
15584 else
15585   cat > conftest.$ac_ext <<EOF
15586 #line 15587 "configure"
15587 #include "confdefs.h"
15588 #include <$ac_hdr>
15589 EOF
15590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15591 { (eval echo configure:15592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15593 if test -z "$ac_err"; then
15594   rm -rf conftest*
15595   eval "ac_cv_header_$ac_safe=yes"
15596 else
15597   echo "$ac_err" >&5
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_header_$ac_safe=no"
15602 fi
15603 rm -f conftest*
15604 fi
15605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15606   echo "$ac_t""yes" 1>&6
15607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15608   cat >> confdefs.h <<EOF
15609 #define $ac_tr_hdr 1
15610 EOF
15611  
15612 else
15613   echo "$ac_t""no" 1>&6
15614 fi
15615 done
15616
15617
15618         if test $ac_cv_header_pth_h = yes ; then
15619                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15620 echo "configure:15621: checking for pth_version in -lpth" >&5
15621 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15622 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15623   echo $ac_n "(cached) $ac_c" 1>&6
15624 else
15625   ac_save_LIBS="$LIBS"
15626 LIBS="-lpth  $LIBS"
15627 cat > conftest.$ac_ext <<EOF
15628 #line 15629 "configure"
15629 #include "confdefs.h"
15630 /* Override any gcc2 internal prototype to avoid an error.  */
15631 /* We use char because int might match the return type of a gcc2
15632     builtin and then its argument prototype would still apply.  */
15633 char pth_version();
15634
15635 int main() {
15636 pth_version()
15637 ; return 0; }
15638 EOF
15639 if { (eval echo configure:15640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15640   rm -rf conftest*
15641   eval "ac_cv_lib_$ac_lib_var=yes"
15642 else
15643   echo "configure: failed program was:" >&5
15644   cat conftest.$ac_ext >&5
15645   rm -rf conftest*
15646   eval "ac_cv_lib_$ac_lib_var=no"
15647 fi
15648 rm -f conftest*
15649 LIBS="$ac_save_LIBS"
15650
15651 fi
15652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15653   echo "$ac_t""yes" 1>&6
15654   have_pth=yes
15655 else
15656   echo "$ac_t""no" 1>&6
15657 have_pth=no
15658 fi
15659
15660
15661                 if test $have_pth = yes ; then
15662                         cat >> confdefs.h <<\EOF
15663 #define HAVE_GNU_PTH 1
15664 EOF
15665
15666                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15667                         ol_link_threads=pth
15668                         ol_with_threads=found
15669
15670                         if test $ol_with_yielding_select = auto ; then
15671                                 ol_with_yielding_select=yes
15672                         fi
15673                 fi
15674         fi
15675 fi
15676
15677 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15678         -o $ol_with_threads = lwp ; then
15679
15680                 for ac_hdr in thread.h synch.h
15681 do
15682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15684 echo "configure:15685: checking for $ac_hdr" >&5
15685 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15686   echo $ac_n "(cached) $ac_c" 1>&6
15687 else
15688   cat > conftest.$ac_ext <<EOF
15689 #line 15690 "configure"
15690 #include "confdefs.h"
15691 #include <$ac_hdr>
15692 EOF
15693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15694 { (eval echo configure:15695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15696 if test -z "$ac_err"; then
15697   rm -rf conftest*
15698   eval "ac_cv_header_$ac_safe=yes"
15699 else
15700   echo "$ac_err" >&5
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_header_$ac_safe=no"
15705 fi
15706 rm -f conftest*
15707 fi
15708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15709   echo "$ac_t""yes" 1>&6
15710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15711   cat >> confdefs.h <<EOF
15712 #define $ac_tr_hdr 1
15713 EOF
15714  
15715 else
15716   echo "$ac_t""no" 1>&6
15717 fi
15718 done
15719
15720         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15721                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15722 echo "configure:15723: checking for thr_create in -lthread" >&5
15723 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15725   echo $ac_n "(cached) $ac_c" 1>&6
15726 else
15727   ac_save_LIBS="$LIBS"
15728 LIBS="-lthread  $LIBS"
15729 cat > conftest.$ac_ext <<EOF
15730 #line 15731 "configure"
15731 #include "confdefs.h"
15732 /* Override any gcc2 internal prototype to avoid an error.  */
15733 /* We use char because int might match the return type of a gcc2
15734     builtin and then its argument prototype would still apply.  */
15735 char thr_create();
15736
15737 int main() {
15738 thr_create()
15739 ; return 0; }
15740 EOF
15741 if { (eval echo configure:15742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15742   rm -rf conftest*
15743   eval "ac_cv_lib_$ac_lib_var=yes"
15744 else
15745   echo "configure: failed program was:" >&5
15746   cat conftest.$ac_ext >&5
15747   rm -rf conftest*
15748   eval "ac_cv_lib_$ac_lib_var=no"
15749 fi
15750 rm -f conftest*
15751 LIBS="$ac_save_LIBS"
15752
15753 fi
15754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15755   echo "$ac_t""yes" 1>&6
15756   have_thr=yes
15757 else
15758   echo "$ac_t""no" 1>&6
15759 have_thr=no
15760 fi
15761
15762
15763                 if test $have_thr = yes ; then
15764                         cat >> confdefs.h <<\EOF
15765 #define HAVE_THR 1
15766 EOF
15767
15768                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15769                         ol_link_threads=thr
15770
15771                         if test $ol_with_yielding_select = auto ; then
15772                                 ol_with_yielding_select=yes
15773                         fi
15774
15775                                                 for ac_func in \
15776                                 thr_setconcurrency \
15777                                 thr_getconcurrency \
15778                         
15779 do
15780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15781 echo "configure:15782: checking for $ac_func" >&5
15782 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   cat > conftest.$ac_ext <<EOF
15786 #line 15787 "configure"
15787 #include "confdefs.h"
15788 /* System header to define __stub macros and hopefully few prototypes,
15789     which can conflict with char $ac_func(); below.  */
15790 #include <assert.h>
15791 /* Override any gcc2 internal prototype to avoid an error.  */
15792 /* We use char because int might match the return type of a gcc2
15793     builtin and then its argument prototype would still apply.  */
15794 char $ac_func();
15795 char (*f)();
15796
15797 int main() {
15798
15799 /* The GNU C library defines this for functions which it implements
15800     to always fail with ENOSYS.  Some functions are actually named
15801     something starting with __ and the normal name is an alias.  */
15802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15803 choke me
15804 #else
15805 f = $ac_func;
15806 #endif
15807
15808 ; return 0; }
15809 EOF
15810 if { (eval echo configure:15811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15811   rm -rf conftest*
15812   eval "ac_cv_func_$ac_func=yes"
15813 else
15814   echo "configure: failed program was:" >&5
15815   cat conftest.$ac_ext >&5
15816   rm -rf conftest*
15817   eval "ac_cv_func_$ac_func=no"
15818 fi
15819 rm -f conftest*
15820 fi
15821
15822 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15823   echo "$ac_t""yes" 1>&6
15824     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15825   cat >> confdefs.h <<EOF
15826 #define $ac_tr_func 1
15827 EOF
15828  
15829 else
15830   echo "$ac_t""no" 1>&6
15831 fi
15832 done
15833
15834                 fi
15835         fi
15836
15837                 for ac_hdr in lwp/lwp.h
15838 do
15839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15841 echo "configure:15842: checking for $ac_hdr" >&5
15842 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15843   echo $ac_n "(cached) $ac_c" 1>&6
15844 else
15845   cat > conftest.$ac_ext <<EOF
15846 #line 15847 "configure"
15847 #include "confdefs.h"
15848 #include <$ac_hdr>
15849 EOF
15850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15851 { (eval echo configure:15852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15853 if test -z "$ac_err"; then
15854   rm -rf conftest*
15855   eval "ac_cv_header_$ac_safe=yes"
15856 else
15857   echo "$ac_err" >&5
15858   echo "configure: failed program was:" >&5
15859   cat conftest.$ac_ext >&5
15860   rm -rf conftest*
15861   eval "ac_cv_header_$ac_safe=no"
15862 fi
15863 rm -f conftest*
15864 fi
15865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15866   echo "$ac_t""yes" 1>&6
15867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15868   cat >> confdefs.h <<EOF
15869 #define $ac_tr_hdr 1
15870 EOF
15871  
15872 else
15873   echo "$ac_t""no" 1>&6
15874 fi
15875 done
15876
15877         if test $ac_cv_header_lwp_lwp_h = yes ; then
15878                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15879 echo "configure:15880: checking for lwp_create in -llwp" >&5
15880 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15882   echo $ac_n "(cached) $ac_c" 1>&6
15883 else
15884   ac_save_LIBS="$LIBS"
15885 LIBS="-llwp  $LIBS"
15886 cat > conftest.$ac_ext <<EOF
15887 #line 15888 "configure"
15888 #include "confdefs.h"
15889 /* Override any gcc2 internal prototype to avoid an error.  */
15890 /* We use char because int might match the return type of a gcc2
15891     builtin and then its argument prototype would still apply.  */
15892 char lwp_create();
15893
15894 int main() {
15895 lwp_create()
15896 ; return 0; }
15897 EOF
15898 if { (eval echo configure:15899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15899   rm -rf conftest*
15900   eval "ac_cv_lib_$ac_lib_var=yes"
15901 else
15902   echo "configure: failed program was:" >&5
15903   cat conftest.$ac_ext >&5
15904   rm -rf conftest*
15905   eval "ac_cv_lib_$ac_lib_var=no"
15906 fi
15907 rm -f conftest*
15908 LIBS="$ac_save_LIBS"
15909
15910 fi
15911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15912   echo "$ac_t""yes" 1>&6
15913   have_lwp=yes
15914 else
15915   echo "$ac_t""no" 1>&6
15916 have_lwp=no
15917 fi
15918
15919
15920                 if test $have_lwp = yes ; then
15921                         cat >> confdefs.h <<\EOF
15922 #define HAVE_LWP 1
15923 EOF
15924
15925                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15926                         ol_link_threads=lwp
15927
15928                         if test $ol_with_yielding_select = auto ; then
15929                                 ol_with_yielding_select=no
15930                         fi
15931                 fi
15932         fi
15933 fi
15934
15935 if test $ol_with_yielding_select = yes ; then
15936         cat >> confdefs.h <<\EOF
15937 #define HAVE_YIELDING_SELECT 1
15938 EOF
15939
15940 fi
15941
15942 if test $ol_with_threads = manual ; then
15943                 ol_link_threads=yes
15944
15945         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15946
15947         for ac_hdr in pthread.h sched.h
15948 do
15949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15951 echo "configure:15952: checking for $ac_hdr" >&5
15952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15953   echo $ac_n "(cached) $ac_c" 1>&6
15954 else
15955   cat > conftest.$ac_ext <<EOF
15956 #line 15957 "configure"
15957 #include "confdefs.h"
15958 #include <$ac_hdr>
15959 EOF
15960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15961 { (eval echo configure:15962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15963 if test -z "$ac_err"; then
15964   rm -rf conftest*
15965   eval "ac_cv_header_$ac_safe=yes"
15966 else
15967   echo "$ac_err" >&5
15968   echo "configure: failed program was:" >&5
15969   cat conftest.$ac_ext >&5
15970   rm -rf conftest*
15971   eval "ac_cv_header_$ac_safe=no"
15972 fi
15973 rm -f conftest*
15974 fi
15975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15976   echo "$ac_t""yes" 1>&6
15977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15978   cat >> confdefs.h <<EOF
15979 #define $ac_tr_hdr 1
15980 EOF
15981  
15982 else
15983   echo "$ac_t""no" 1>&6
15984 fi
15985 done
15986
15987         for ac_func in sched_yield pthread_yield
15988 do
15989 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15990 echo "configure:15991: checking for $ac_func" >&5
15991 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15992   echo $ac_n "(cached) $ac_c" 1>&6
15993 else
15994   cat > conftest.$ac_ext <<EOF
15995 #line 15996 "configure"
15996 #include "confdefs.h"
15997 /* System header to define __stub macros and hopefully few prototypes,
15998     which can conflict with char $ac_func(); below.  */
15999 #include <assert.h>
16000 /* Override any gcc2 internal prototype to avoid an error.  */
16001 /* We use char because int might match the return type of a gcc2
16002     builtin and then its argument prototype would still apply.  */
16003 char $ac_func();
16004 char (*f)();
16005
16006 int main() {
16007
16008 /* The GNU C library defines this for functions which it implements
16009     to always fail with ENOSYS.  Some functions are actually named
16010     something starting with __ and the normal name is an alias.  */
16011 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16012 choke me
16013 #else
16014 f = $ac_func;
16015 #endif
16016
16017 ; return 0; }
16018 EOF
16019 if { (eval echo configure:16020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16020   rm -rf conftest*
16021   eval "ac_cv_func_$ac_func=yes"
16022 else
16023   echo "configure: failed program was:" >&5
16024   cat conftest.$ac_ext >&5
16025   rm -rf conftest*
16026   eval "ac_cv_func_$ac_func=no"
16027 fi
16028 rm -f conftest*
16029 fi
16030
16031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16032   echo "$ac_t""yes" 1>&6
16033     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16034   cat >> confdefs.h <<EOF
16035 #define $ac_tr_func 1
16036 EOF
16037  
16038 else
16039   echo "$ac_t""no" 1>&6
16040 fi
16041 done
16042
16043         
16044         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16045 echo "configure:16046: checking for LinuxThreads pthread.h" >&5
16046 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16047   echo $ac_n "(cached) $ac_c" 1>&6
16048 else
16049   cat > conftest.$ac_ext <<EOF
16050 #line 16051 "configure"
16051 #include "confdefs.h"
16052 #include <pthread.h>
16053 EOF
16054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16055   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16056   rm -rf conftest*
16057   ol_cv_header_linux_threads=yes
16058 else
16059   rm -rf conftest*
16060   ol_cv_header_linux_threads=no
16061 fi
16062 rm -f conftest*
16063
16064                 
16065 fi
16066
16067 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16068         if test $ol_cv_header_linux_threads = yes; then
16069                 cat >> confdefs.h <<\EOF
16070 #define HAVE_LINUX_THREADS 1
16071 EOF
16072
16073         fi
16074
16075
16076         for ac_hdr in mach/cthreads.h
16077 do
16078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16080 echo "configure:16081: checking for $ac_hdr" >&5
16081 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16082   echo $ac_n "(cached) $ac_c" 1>&6
16083 else
16084   cat > conftest.$ac_ext <<EOF
16085 #line 16086 "configure"
16086 #include "confdefs.h"
16087 #include <$ac_hdr>
16088 EOF
16089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16090 { (eval echo configure:16091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16092 if test -z "$ac_err"; then
16093   rm -rf conftest*
16094   eval "ac_cv_header_$ac_safe=yes"
16095 else
16096   echo "$ac_err" >&5
16097   echo "configure: failed program was:" >&5
16098   cat conftest.$ac_ext >&5
16099   rm -rf conftest*
16100   eval "ac_cv_header_$ac_safe=no"
16101 fi
16102 rm -f conftest*
16103 fi
16104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16105   echo "$ac_t""yes" 1>&6
16106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16107   cat >> confdefs.h <<EOF
16108 #define $ac_tr_hdr 1
16109 EOF
16110  
16111 else
16112   echo "$ac_t""no" 1>&6
16113 fi
16114 done
16115
16116         for ac_hdr in lwp/lwp.h
16117 do
16118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16120 echo "configure:16121: checking for $ac_hdr" >&5
16121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16122   echo $ac_n "(cached) $ac_c" 1>&6
16123 else
16124   cat > conftest.$ac_ext <<EOF
16125 #line 16126 "configure"
16126 #include "confdefs.h"
16127 #include <$ac_hdr>
16128 EOF
16129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16130 { (eval echo configure:16131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16132 if test -z "$ac_err"; then
16133   rm -rf conftest*
16134   eval "ac_cv_header_$ac_safe=yes"
16135 else
16136   echo "$ac_err" >&5
16137   echo "configure: failed program was:" >&5
16138   cat conftest.$ac_ext >&5
16139   rm -rf conftest*
16140   eval "ac_cv_header_$ac_safe=no"
16141 fi
16142 rm -f conftest*
16143 fi
16144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16145   echo "$ac_t""yes" 1>&6
16146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16147   cat >> confdefs.h <<EOF
16148 #define $ac_tr_hdr 1
16149 EOF
16150  
16151 else
16152   echo "$ac_t""no" 1>&6
16153 fi
16154 done
16155
16156         for ac_hdr in thread.h synch.h
16157 do
16158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16160 echo "configure:16161: checking for $ac_hdr" >&5
16161 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16162   echo $ac_n "(cached) $ac_c" 1>&6
16163 else
16164   cat > conftest.$ac_ext <<EOF
16165 #line 16166 "configure"
16166 #include "confdefs.h"
16167 #include <$ac_hdr>
16168 EOF
16169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16170 { (eval echo configure:16171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16172 if test -z "$ac_err"; then
16173   rm -rf conftest*
16174   eval "ac_cv_header_$ac_safe=yes"
16175 else
16176   echo "$ac_err" >&5
16177   echo "configure: failed program was:" >&5
16178   cat conftest.$ac_ext >&5
16179   rm -rf conftest*
16180   eval "ac_cv_header_$ac_safe=no"
16181 fi
16182 rm -f conftest*
16183 fi
16184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16185   echo "$ac_t""yes" 1>&6
16186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16187   cat >> confdefs.h <<EOF
16188 #define $ac_tr_hdr 1
16189 EOF
16190  
16191 else
16192   echo "$ac_t""no" 1>&6
16193 fi
16194 done
16195
16196 fi
16197
16198 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16199                         cat >> confdefs.h <<\EOF
16200 #define REENTRANT 1
16201 EOF
16202
16203         cat >> confdefs.h <<\EOF
16204 #define _REENTRANT 1
16205 EOF
16206
16207         cat >> confdefs.h <<\EOF
16208 #define THREAD_SAFE 1
16209 EOF
16210
16211         cat >> confdefs.h <<\EOF
16212 #define _THREAD_SAFE 1
16213 EOF
16214
16215         cat >> confdefs.h <<\EOF
16216 #define THREADSAFE 1
16217 EOF
16218
16219         cat >> confdefs.h <<\EOF
16220 #define _THREADSAFE 1
16221 EOF
16222
16223         cat >> confdefs.h <<\EOF
16224 #define _SGI_MP_SOURCE 1
16225 EOF
16226
16227
16228                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16229 echo "configure:16230: checking for thread specific errno" >&5
16230 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16231   echo $ac_n "(cached) $ac_c" 1>&6
16232 else
16233   
16234                 cat > conftest.$ac_ext <<EOF
16235 #line 16236 "configure"
16236 #include "confdefs.h"
16237 #include <errno.h>
16238 int main() {
16239 errno = 0;
16240 ; return 0; }
16241 EOF
16242 if { (eval echo configure:16243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16243   rm -rf conftest*
16244   ol_cv_errno_thread_specific=yes
16245 else
16246   echo "configure: failed program was:" >&5
16247   cat conftest.$ac_ext >&5
16248   rm -rf conftest*
16249   ol_cv_errno_thread_specific=no
16250 fi
16251 rm -f conftest*
16252         
16253 fi
16254
16255 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16256
16257                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16258 echo "configure:16259: checking for thread specific h_errno" >&5
16259 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16260   echo $ac_n "(cached) $ac_c" 1>&6
16261 else
16262   
16263                 cat > conftest.$ac_ext <<EOF
16264 #line 16265 "configure"
16265 #include "confdefs.h"
16266 #include <netdb.h>
16267 int main() {
16268 h_errno = 0;
16269 ; return 0; }
16270 EOF
16271 if { (eval echo configure:16272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16272   rm -rf conftest*
16273   ol_cv_h_errno_thread_specific=yes
16274 else
16275   echo "configure: failed program was:" >&5
16276   cat conftest.$ac_ext >&5
16277   rm -rf conftest*
16278   ol_cv_h_errno_thread_specific=no
16279 fi
16280 rm -f conftest*
16281         
16282 fi
16283
16284 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16285
16286         if test $ol_cv_errno_thread_specific != yes \
16287                 -o $ol_cv_h_errno_thread_specific != yes ; then
16288                 LIBS="$LTHREAD_LIBS $LIBS"
16289                 LTHREAD_LIBS=""
16290         fi
16291
16292 fi  
16293
16294 if test $ol_link_threads = no ; then
16295         if test $ol_with_threads = yes ; then
16296                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16297         fi
16298
16299         if test $ol_with_threads = auto ; then
16300                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16301                 ol_with_threads=no
16302         fi
16303
16304         cat >> confdefs.h <<\EOF
16305 #define NO_THREADS 1
16306 EOF
16307
16308         LTHREAD_LIBS=""
16309 fi
16310
16311 if test $ol_link_threads != no ; then
16312         cat >> confdefs.h <<\EOF
16313 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16314 EOF
16315
16316 fi
16317
16318 for ac_func in \
16319         ctime_r                 \
16320         gethostbyname_r gethostbyaddr_r \
16321
16322 do
16323 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16324 echo "configure:16325: checking for $ac_func" >&5
16325 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   cat > conftest.$ac_ext <<EOF
16329 #line 16330 "configure"
16330 #include "confdefs.h"
16331 /* System header to define __stub macros and hopefully few prototypes,
16332     which can conflict with char $ac_func(); below.  */
16333 #include <assert.h>
16334 /* Override any gcc2 internal prototype to avoid an error.  */
16335 /* We use char because int might match the return type of a gcc2
16336     builtin and then its argument prototype would still apply.  */
16337 char $ac_func();
16338 char (*f)();
16339
16340 int main() {
16341
16342 /* The GNU C library defines this for functions which it implements
16343     to always fail with ENOSYS.  Some functions are actually named
16344     something starting with __ and the normal name is an alias.  */
16345 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16346 choke me
16347 #else
16348 f = $ac_func;
16349 #endif
16350
16351 ; return 0; }
16352 EOF
16353 if { (eval echo configure:16354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16354   rm -rf conftest*
16355   eval "ac_cv_func_$ac_func=yes"
16356 else
16357   echo "configure: failed program was:" >&5
16358   cat conftest.$ac_ext >&5
16359   rm -rf conftest*
16360   eval "ac_cv_func_$ac_func=no"
16361 fi
16362 rm -f conftest*
16363 fi
16364
16365 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16366   echo "$ac_t""yes" 1>&6
16367     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16368   cat >> confdefs.h <<EOF
16369 #define $ac_tr_func 1
16370 EOF
16371  
16372 else
16373   echo "$ac_t""no" 1>&6
16374 fi
16375 done
16376
16377
16378 if test "$ac_cv_func_ctime_r" = no ; then
16379         ol_cv_func_ctime_r_nargs=0
16380 else
16381         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16382 echo "configure:16383: checking number of arguments of ctime_r" >&5
16383 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 #include <time.h>
16390 int main() {
16391 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16392 ; return 0; }
16393 EOF
16394 if { (eval echo configure:16395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16395   rm -rf conftest*
16396   ol_cv_func_ctime_r_nargs3=yes
16397 else
16398   echo "configure: failed program was:" >&5
16399   cat conftest.$ac_ext >&5
16400   rm -rf conftest*
16401   ol_cv_func_ctime_r_nargs3=no
16402 fi
16403 rm -f conftest*
16404
16405         cat > conftest.$ac_ext <<EOF
16406 #line 16407 "configure"
16407 #include "confdefs.h"
16408 #include <time.h>
16409 int main() {
16410 time_t ti; char *buffer; ctime_r(&ti,buffer);
16411 ; return 0; }
16412 EOF
16413 if { (eval echo configure:16414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16414   rm -rf conftest*
16415   ol_cv_func_ctime_r_nargs2=yes
16416 else
16417   echo "configure: failed program was:" >&5
16418   cat conftest.$ac_ext >&5
16419   rm -rf conftest*
16420   ol_cv_func_ctime_r_nargs2=no
16421 fi
16422 rm -f conftest*
16423
16424         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16425                 $ol_cv_func_ctime_r_nargs2 = no ; then
16426
16427                 ol_cv_func_ctime_r_nargs=3
16428
16429         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16430                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16431
16432                 ol_cv_func_ctime_r_nargs=2
16433
16434         else
16435                 ol_cv_func_ctime_r_nargs=0
16436         fi
16437   
16438 fi
16439
16440 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16441
16442   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16443         cat >> confdefs.h <<EOF
16444 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16445 EOF
16446
16447   fi
16448
16449 fi
16450
16451 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16452         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16453 echo "configure:16454: checking number of arguments of gethostbyname_r" >&5
16454 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16455   echo $ac_n "(cached) $ac_c" 1>&6
16456 else
16457   cat > conftest.$ac_ext <<EOF
16458 #line 16459 "configure"
16459 #include "confdefs.h"
16460 #include <sys/types.h>
16461 #include <sys/socket.h>
16462 #include <netinet/in.h>
16463 #include <netdb.h>
16464 #define BUFSIZE (sizeof(struct hostent)+10)
16465 int main() {
16466 struct hostent hent; char buffer[BUFSIZE];
16467                 int bufsize=BUFSIZE;int h_errno;
16468                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16469                         buffer, bufsize, &h_errno);
16470 ; return 0; }
16471 EOF
16472 if { (eval echo configure:16473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16473   rm -rf conftest*
16474   ol_cv_func_gethostbyname_r_nargs5=yes
16475 else
16476   echo "configure: failed program was:" >&5
16477   cat conftest.$ac_ext >&5
16478   rm -rf conftest*
16479   ol_cv_func_gethostbyname_r_nargs5=no
16480 fi
16481 rm -f conftest*
16482
16483         cat > conftest.$ac_ext <<EOF
16484 #line 16485 "configure"
16485 #include "confdefs.h"
16486 #include <sys/types.h>
16487 #include <sys/socket.h>
16488 #include <netinet/in.h>
16489 #include <netdb.h>
16490 #define BUFSIZE (sizeof(struct hostent)+10)
16491 int main() {
16492 struct hostent hent;struct hostent *rhent;
16493                 char buffer[BUFSIZE];
16494                 int bufsize=BUFSIZE;int h_errno;
16495                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16496                         &rhent, &h_errno);
16497 ; return 0; }
16498 EOF
16499 if { (eval echo configure:16500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16500   rm -rf conftest*
16501   ol_cv_func_gethostbyname_r_nargs6=yes
16502 else
16503   echo "configure: failed program was:" >&5
16504   cat conftest.$ac_ext >&5
16505   rm -rf conftest*
16506   ol_cv_func_gethostbyname_r_nargs6=no
16507 fi
16508 rm -f conftest*
16509
16510         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16511                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16512
16513                 ol_cv_func_gethostbyname_r_nargs=5
16514
16515         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16516                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16517
16518                 ol_cv_func_gethostbyname_r_nargs=6
16519
16520         else
16521                 ol_cv_func_gethostbyname_r_nargs=0
16522         fi
16523   
16524 fi
16525
16526 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16527   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16528         cat >> confdefs.h <<EOF
16529 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16530 EOF
16531
16532   fi
16533
16534 else
16535         ol_cv_func_gethostbyname_r_nargs=0
16536 fi
16537  
16538 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16539         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16540 echo "configure:16541: checking number of arguments of gethostbyaddr_r" >&5
16541 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16542   echo $ac_n "(cached) $ac_c" 1>&6
16543 else
16544   cat > conftest.$ac_ext <<EOF
16545 #line 16546 "configure"
16546 #include "confdefs.h"
16547 #include <sys/types.h>
16548 #include <sys/socket.h>
16549 #include <netinet/in.h>
16550 #include <netdb.h>
16551 #define BUFSIZE (sizeof(struct hostent)+10)
16552 int main() {
16553 struct hostent hent; char buffer[BUFSIZE]; 
16554             struct in_addr add;
16555             size_t alen=sizeof(struct in_addr);
16556             int bufsize=BUFSIZE;int h_errno;
16557                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16558                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16559 ; return 0; }
16560 EOF
16561 if { (eval echo configure:16562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16562   rm -rf conftest*
16563   ol_cv_func_gethostbyaddr_r_nargs7=yes
16564 else
16565   echo "configure: failed program was:" >&5
16566   cat conftest.$ac_ext >&5
16567   rm -rf conftest*
16568   ol_cv_func_gethostbyaddr_r_nargs7=no
16569 fi
16570 rm -f conftest*
16571
16572         cat > conftest.$ac_ext <<EOF
16573 #line 16574 "configure"
16574 #include "confdefs.h"
16575 #include <sys/types.h>
16576 #include <sys/socket.h>
16577 #include <netinet/in.h>
16578 #include <netdb.h>
16579 #define BUFSIZE (sizeof(struct hostent)+10)
16580 int main() {
16581 struct hostent hent;
16582                 struct hostent *rhent; char buffer[BUFSIZE]; 
16583                 struct in_addr add;
16584                 size_t alen=sizeof(struct in_addr);
16585                 int bufsize=BUFSIZE;int h_errno;
16586                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16587                         alen, AF_INET, &hent, buffer, bufsize, 
16588                         &rhent, &h_errno);
16589 ; return 0; }
16590 EOF
16591 if { (eval echo configure:16592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16592   rm -rf conftest*
16593   ol_cv_func_gethostbyaddr_r_nargs8=yes
16594 else
16595   echo "configure: failed program was:" >&5
16596   cat conftest.$ac_ext >&5
16597   rm -rf conftest*
16598   ol_cv_func_gethostbyaddr_r_nargs8=no
16599 fi
16600 rm -f conftest*
16601
16602         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16603                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16604
16605                 ol_cv_func_gethostbyaddr_r_nargs=7
16606
16607         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16608                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16609
16610                 ol_cv_func_gethostbyaddr_r_nargs=8
16611
16612         else
16613                 ol_cv_func_gethostbyaddr_r_nargs=0
16614         fi
16615   
16616 fi
16617
16618 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16619   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16620     cat >> confdefs.h <<EOF
16621 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16622 EOF
16623
16624   fi
16625
16626 else
16627         ol_cv_func_gethostbyaddr_r_nargs=0
16628 fi
16629
16630 ol_link_ldbm=no 
16631
16632 if test $ol_with_ldbm_api = auto \
16633         -o $ol_with_ldbm_api = berkeley \
16634         -o $ol_with_ldbm_api = bcompat ; then
16635
16636         if test $ol_with_ldbm_api = bcompat; then \
16637                 for ac_hdr in db_185.h db.h
16638 do
16639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16641 echo "configure:16642: checking for $ac_hdr" >&5
16642 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16643   echo $ac_n "(cached) $ac_c" 1>&6
16644 else
16645   cat > conftest.$ac_ext <<EOF
16646 #line 16647 "configure"
16647 #include "confdefs.h"
16648 #include <$ac_hdr>
16649 EOF
16650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16651 { (eval echo configure:16652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16653 if test -z "$ac_err"; then
16654   rm -rf conftest*
16655   eval "ac_cv_header_$ac_safe=yes"
16656 else
16657   echo "$ac_err" >&5
16658   echo "configure: failed program was:" >&5
16659   cat conftest.$ac_ext >&5
16660   rm -rf conftest*
16661   eval "ac_cv_header_$ac_safe=no"
16662 fi
16663 rm -f conftest*
16664 fi
16665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16666   echo "$ac_t""yes" 1>&6
16667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16668   cat >> confdefs.h <<EOF
16669 #define $ac_tr_hdr 1
16670 EOF
16671  
16672 else
16673   echo "$ac_t""no" 1>&6
16674 fi
16675 done
16676
16677 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16678         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16679 echo "configure:16680: checking if Berkeley DB header compatibility" >&5
16680 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16681   echo $ac_n "(cached) $ac_c" 1>&6
16682 else
16683   
16684                 cat > conftest.$ac_ext <<EOF
16685 #line 16686 "configure"
16686 #include "confdefs.h"
16687
16688 #if HAVE_DB_185_H
16689 #       include <db_185.h>
16690 #else
16691 #       include <db.h>
16692 #endif
16693
16694  /* this check could be improved */
16695 #ifndef DB_VERSION_MAJOR
16696 #       define DB_VERSION_MAJOR 1
16697 #endif
16698
16699 #if DB_VERSION_MAJOR == 1 
16700         __db_version_1
16701 #endif
16702
16703 EOF
16704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16705   egrep "__db_version_1" >/dev/null 2>&1; then
16706   rm -rf conftest*
16707   ol_cv_header_db1=yes
16708 else
16709   rm -rf conftest*
16710   ol_cv_header_db1=no
16711 fi
16712 rm -f conftest*
16713
16714 fi
16715
16716 echo "$ac_t""$ol_cv_header_db1" 1>&6
16717
16718         if test $ol_cv_header_db1 = yes ; then
16719                 ol_cv_lib_db=no
16720 if test $ol_cv_lib_db = no ; then
16721         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16722 echo "configure:16723: checking for Berkeley DB link (default)" >&5
16723 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16724   echo $ac_n "(cached) $ac_c" 1>&6
16725 else
16726   
16727         ol_DB_LIB=
16728         ol_LIBS=$LIBS
16729         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16730
16731         cat > conftest.$ac_ext <<EOF
16732 #line 16733 "configure"
16733 #include "confdefs.h"
16734
16735 #ifdef HAVE_DB_185_H
16736 # include <db_185.h>
16737 #else
16738 # include <db.h>
16739 #endif
16740
16741 #ifndef DB_VERSION_MAJOR
16742 # define DB_VERSION_MAJOR 1
16743 #endif
16744
16745 #ifndef NULL
16746 #define NULL ((void*)0)
16747 #endif
16748
16749 int main() {
16750
16751 #if DB_VERSION_MAJOR > 1
16752         {
16753                 char *version;
16754                 int major, minor, patch;
16755
16756                 version = db_version( &major, &minor, &patch );
16757
16758                 if( major != DB_VERSION_MAJOR ||
16759                         minor < DB_VERSION_MINOR )
16760                 {
16761                         printf("Berkeley DB version mismatch\n"
16762                                 "\texpected: %s\n\tgot: %s\n",
16763                                 DB_VERSION_STRING, version);
16764                         return 1;
16765                 }
16766         }
16767 #endif
16768
16769 #if DB_VERSION_MAJOR > 2
16770         db_env_create( NULL, 0 );
16771 #elif DB_VERSION_MAJOR > 1
16772         db_appexit( NULL );
16773 #else
16774         (void) dbopen( NULL, 0, 0, 0, NULL);
16775 #endif
16776
16777 ; return 0; }
16778 EOF
16779 if { (eval echo configure:16780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16780   rm -rf conftest*
16781   ol_cv_db_none=yes
16782 else
16783   echo "configure: failed program was:" >&5
16784   cat conftest.$ac_ext >&5
16785   rm -rf conftest*
16786   ol_cv_db_none=no
16787 fi
16788 rm -f conftest*
16789
16790         LIBS="$ol_LIBS"
16791
16792 fi
16793
16794 echo "$ac_t""$ol_cv_db_none" 1>&6
16795
16796         if test $ol_cv_db_none = yes ; then
16797                 ol_cv_lib_db=yes
16798         fi
16799 fi
16800
16801 if test $ol_cv_lib_db = no ; then
16802         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16803 echo "configure:16804: checking for Berkeley DB link (-ldb41)" >&5
16804 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16805   echo $ac_n "(cached) $ac_c" 1>&6
16806 else
16807   
16808         ol_DB_LIB=-ldb41
16809         ol_LIBS=$LIBS
16810         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16811
16812         cat > conftest.$ac_ext <<EOF
16813 #line 16814 "configure"
16814 #include "confdefs.h"
16815
16816 #ifdef HAVE_DB_185_H
16817 # include <db_185.h>
16818 #else
16819 # include <db.h>
16820 #endif
16821
16822 #ifndef DB_VERSION_MAJOR
16823 # define DB_VERSION_MAJOR 1
16824 #endif
16825
16826 #ifndef NULL
16827 #define NULL ((void*)0)
16828 #endif
16829
16830 int main() {
16831
16832 #if DB_VERSION_MAJOR > 1
16833         {
16834                 char *version;
16835                 int major, minor, patch;
16836
16837                 version = db_version( &major, &minor, &patch );
16838
16839                 if( major != DB_VERSION_MAJOR ||
16840                         minor < DB_VERSION_MINOR )
16841                 {
16842                         printf("Berkeley DB version mismatch\n"
16843                                 "\texpected: %s\n\tgot: %s\n",
16844                                 DB_VERSION_STRING, version);
16845                         return 1;
16846                 }
16847         }
16848 #endif
16849
16850 #if DB_VERSION_MAJOR > 2
16851         db_env_create( NULL, 0 );
16852 #elif DB_VERSION_MAJOR > 1
16853         db_appexit( NULL );
16854 #else
16855         (void) dbopen( NULL, 0, 0, 0, NULL);
16856 #endif
16857
16858 ; return 0; }
16859 EOF
16860 if { (eval echo configure:16861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16861   rm -rf conftest*
16862   ol_cv_db_db41=yes
16863 else
16864   echo "configure: failed program was:" >&5
16865   cat conftest.$ac_ext >&5
16866   rm -rf conftest*
16867   ol_cv_db_db41=no
16868 fi
16869 rm -f conftest*
16870
16871         LIBS="$ol_LIBS"
16872
16873 fi
16874
16875 echo "$ac_t""$ol_cv_db_db41" 1>&6
16876
16877         if test $ol_cv_db_db41 = yes ; then
16878                 ol_cv_lib_db=-ldb41
16879         fi
16880 fi
16881
16882 if test $ol_cv_lib_db = no ; then
16883         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16884 echo "configure:16885: checking for Berkeley DB link (-ldb-41)" >&5
16885 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16886   echo $ac_n "(cached) $ac_c" 1>&6
16887 else
16888   
16889         ol_DB_LIB=-ldb-41
16890         ol_LIBS=$LIBS
16891         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16892
16893         cat > conftest.$ac_ext <<EOF
16894 #line 16895 "configure"
16895 #include "confdefs.h"
16896
16897 #ifdef HAVE_DB_185_H
16898 # include <db_185.h>
16899 #else
16900 # include <db.h>
16901 #endif
16902
16903 #ifndef DB_VERSION_MAJOR
16904 # define DB_VERSION_MAJOR 1
16905 #endif
16906
16907 #ifndef NULL
16908 #define NULL ((void*)0)
16909 #endif
16910
16911 int main() {
16912
16913 #if DB_VERSION_MAJOR > 1
16914         {
16915                 char *version;
16916                 int major, minor, patch;
16917
16918                 version = db_version( &major, &minor, &patch );
16919
16920                 if( major != DB_VERSION_MAJOR ||
16921                         minor < DB_VERSION_MINOR )
16922                 {
16923                         printf("Berkeley DB version mismatch\n"
16924                                 "\texpected: %s\n\tgot: %s\n",
16925                                 DB_VERSION_STRING, version);
16926                         return 1;
16927                 }
16928         }
16929 #endif
16930
16931 #if DB_VERSION_MAJOR > 2
16932         db_env_create( NULL, 0 );
16933 #elif DB_VERSION_MAJOR > 1
16934         db_appexit( NULL );
16935 #else
16936         (void) dbopen( NULL, 0, 0, 0, NULL);
16937 #endif
16938
16939 ; return 0; }
16940 EOF
16941 if { (eval echo configure:16942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16942   rm -rf conftest*
16943   ol_cv_db_db_41=yes
16944 else
16945   echo "configure: failed program was:" >&5
16946   cat conftest.$ac_ext >&5
16947   rm -rf conftest*
16948   ol_cv_db_db_41=no
16949 fi
16950 rm -f conftest*
16951
16952         LIBS="$ol_LIBS"
16953
16954 fi
16955
16956 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16957
16958         if test $ol_cv_db_db_41 = yes ; then
16959                 ol_cv_lib_db=-ldb-41
16960         fi
16961 fi
16962
16963 if test $ol_cv_lib_db = no ; then
16964         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16965 echo "configure:16966: checking for Berkeley DB link (-ldb-4.1)" >&5
16966 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16967   echo $ac_n "(cached) $ac_c" 1>&6
16968 else
16969   
16970         ol_DB_LIB=-ldb-4.1
16971         ol_LIBS=$LIBS
16972         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16973
16974         cat > conftest.$ac_ext <<EOF
16975 #line 16976 "configure"
16976 #include "confdefs.h"
16977
16978 #ifdef HAVE_DB_185_H
16979 # include <db_185.h>
16980 #else
16981 # include <db.h>
16982 #endif
16983
16984 #ifndef DB_VERSION_MAJOR
16985 # define DB_VERSION_MAJOR 1
16986 #endif
16987
16988 #ifndef NULL
16989 #define NULL ((void*)0)
16990 #endif
16991
16992 int main() {
16993
16994 #if DB_VERSION_MAJOR > 1
16995         {
16996                 char *version;
16997                 int major, minor, patch;
16998
16999                 version = db_version( &major, &minor, &patch );
17000
17001                 if( major != DB_VERSION_MAJOR ||
17002                         minor < DB_VERSION_MINOR )
17003                 {
17004                         printf("Berkeley DB version mismatch\n"
17005                                 "\texpected: %s\n\tgot: %s\n",
17006                                 DB_VERSION_STRING, version);
17007                         return 1;
17008                 }
17009         }
17010 #endif
17011
17012 #if DB_VERSION_MAJOR > 2
17013         db_env_create( NULL, 0 );
17014 #elif DB_VERSION_MAJOR > 1
17015         db_appexit( NULL );
17016 #else
17017         (void) dbopen( NULL, 0, 0, 0, NULL);
17018 #endif
17019
17020 ; return 0; }
17021 EOF
17022 if { (eval echo configure:17023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17023   rm -rf conftest*
17024   ol_cv_db_db_4_dot_1=yes
17025 else
17026   echo "configure: failed program was:" >&5
17027   cat conftest.$ac_ext >&5
17028   rm -rf conftest*
17029   ol_cv_db_db_4_dot_1=no
17030 fi
17031 rm -f conftest*
17032
17033         LIBS="$ol_LIBS"
17034
17035 fi
17036
17037 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17038
17039         if test $ol_cv_db_db_4_dot_1 = yes ; then
17040                 ol_cv_lib_db=-ldb-4.1
17041         fi
17042 fi
17043
17044 if test $ol_cv_lib_db = no ; then
17045         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17046 echo "configure:17047: checking for Berkeley DB link (-ldb-4-1)" >&5
17047 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17048   echo $ac_n "(cached) $ac_c" 1>&6
17049 else
17050   
17051         ol_DB_LIB=-ldb-4-1
17052         ol_LIBS=$LIBS
17053         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17054
17055         cat > conftest.$ac_ext <<EOF
17056 #line 17057 "configure"
17057 #include "confdefs.h"
17058
17059 #ifdef HAVE_DB_185_H
17060 # include <db_185.h>
17061 #else
17062 # include <db.h>
17063 #endif
17064
17065 #ifndef DB_VERSION_MAJOR
17066 # define DB_VERSION_MAJOR 1
17067 #endif
17068
17069 #ifndef NULL
17070 #define NULL ((void*)0)
17071 #endif
17072
17073 int main() {
17074
17075 #if DB_VERSION_MAJOR > 1
17076         {
17077                 char *version;
17078                 int major, minor, patch;
17079
17080                 version = db_version( &major, &minor, &patch );
17081
17082                 if( major != DB_VERSION_MAJOR ||
17083                         minor < DB_VERSION_MINOR )
17084                 {
17085                         printf("Berkeley DB version mismatch\n"
17086                                 "\texpected: %s\n\tgot: %s\n",
17087                                 DB_VERSION_STRING, version);
17088                         return 1;
17089                 }
17090         }
17091 #endif
17092
17093 #if DB_VERSION_MAJOR > 2
17094         db_env_create( NULL, 0 );
17095 #elif DB_VERSION_MAJOR > 1
17096         db_appexit( NULL );
17097 #else
17098         (void) dbopen( NULL, 0, 0, 0, NULL);
17099 #endif
17100
17101 ; return 0; }
17102 EOF
17103 if { (eval echo configure:17104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17104   rm -rf conftest*
17105   ol_cv_db_db_4_1=yes
17106 else
17107   echo "configure: failed program was:" >&5
17108   cat conftest.$ac_ext >&5
17109   rm -rf conftest*
17110   ol_cv_db_db_4_1=no
17111 fi
17112 rm -f conftest*
17113
17114         LIBS="$ol_LIBS"
17115
17116 fi
17117
17118 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17119
17120         if test $ol_cv_db_db_4_1 = yes ; then
17121                 ol_cv_lib_db=-ldb-4-1
17122         fi
17123 fi
17124
17125 if test $ol_cv_lib_db = no ; then
17126         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17127 echo "configure:17128: checking for Berkeley DB link (-ldb-4)" >&5
17128 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17129   echo $ac_n "(cached) $ac_c" 1>&6
17130 else
17131   
17132         ol_DB_LIB=-ldb-4
17133         ol_LIBS=$LIBS
17134         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17135
17136         cat > conftest.$ac_ext <<EOF
17137 #line 17138 "configure"
17138 #include "confdefs.h"
17139
17140 #ifdef HAVE_DB_185_H
17141 # include <db_185.h>
17142 #else
17143 # include <db.h>
17144 #endif
17145
17146 #ifndef DB_VERSION_MAJOR
17147 # define DB_VERSION_MAJOR 1
17148 #endif
17149
17150 #ifndef NULL
17151 #define NULL ((void*)0)
17152 #endif
17153
17154 int main() {
17155
17156 #if DB_VERSION_MAJOR > 1
17157         {
17158                 char *version;
17159                 int major, minor, patch;
17160
17161                 version = db_version( &major, &minor, &patch );
17162
17163                 if( major != DB_VERSION_MAJOR ||
17164                         minor < DB_VERSION_MINOR )
17165                 {
17166                         printf("Berkeley DB version mismatch\n"
17167                                 "\texpected: %s\n\tgot: %s\n",
17168                                 DB_VERSION_STRING, version);
17169                         return 1;
17170                 }
17171         }
17172 #endif
17173
17174 #if DB_VERSION_MAJOR > 2
17175         db_env_create( NULL, 0 );
17176 #elif DB_VERSION_MAJOR > 1
17177         db_appexit( NULL );
17178 #else
17179         (void) dbopen( NULL, 0, 0, 0, NULL);
17180 #endif
17181
17182 ; return 0; }
17183 EOF
17184 if { (eval echo configure:17185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17185   rm -rf conftest*
17186   ol_cv_db_db_4=yes
17187 else
17188   echo "configure: failed program was:" >&5
17189   cat conftest.$ac_ext >&5
17190   rm -rf conftest*
17191   ol_cv_db_db_4=no
17192 fi
17193 rm -f conftest*
17194
17195         LIBS="$ol_LIBS"
17196
17197 fi
17198
17199 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17200
17201         if test $ol_cv_db_db_4 = yes ; then
17202                 ol_cv_lib_db=-ldb-4
17203         fi
17204 fi
17205
17206 if test $ol_cv_lib_db = no ; then
17207         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17208 echo "configure:17209: checking for Berkeley DB link (-ldb4)" >&5
17209 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17210   echo $ac_n "(cached) $ac_c" 1>&6
17211 else
17212   
17213         ol_DB_LIB=-ldb4
17214         ol_LIBS=$LIBS
17215         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17216
17217         cat > conftest.$ac_ext <<EOF
17218 #line 17219 "configure"
17219 #include "confdefs.h"
17220
17221 #ifdef HAVE_DB_185_H
17222 # include <db_185.h>
17223 #else
17224 # include <db.h>
17225 #endif
17226
17227 #ifndef DB_VERSION_MAJOR
17228 # define DB_VERSION_MAJOR 1
17229 #endif
17230
17231 #ifndef NULL
17232 #define NULL ((void*)0)
17233 #endif
17234
17235 int main() {
17236
17237 #if DB_VERSION_MAJOR > 1
17238         {
17239                 char *version;
17240                 int major, minor, patch;
17241
17242                 version = db_version( &major, &minor, &patch );
17243
17244                 if( major != DB_VERSION_MAJOR ||
17245                         minor < DB_VERSION_MINOR )
17246                 {
17247                         printf("Berkeley DB version mismatch\n"
17248                                 "\texpected: %s\n\tgot: %s\n",
17249                                 DB_VERSION_STRING, version);
17250                         return 1;
17251                 }
17252         }
17253 #endif
17254
17255 #if DB_VERSION_MAJOR > 2
17256         db_env_create( NULL, 0 );
17257 #elif DB_VERSION_MAJOR > 1
17258         db_appexit( NULL );
17259 #else
17260         (void) dbopen( NULL, 0, 0, 0, NULL);
17261 #endif
17262
17263 ; return 0; }
17264 EOF
17265 if { (eval echo configure:17266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17266   rm -rf conftest*
17267   ol_cv_db_db4=yes
17268 else
17269   echo "configure: failed program was:" >&5
17270   cat conftest.$ac_ext >&5
17271   rm -rf conftest*
17272   ol_cv_db_db4=no
17273 fi
17274 rm -f conftest*
17275
17276         LIBS="$ol_LIBS"
17277
17278 fi
17279
17280 echo "$ac_t""$ol_cv_db_db4" 1>&6
17281
17282         if test $ol_cv_db_db4 = yes ; then
17283                 ol_cv_lib_db=-ldb4
17284         fi
17285 fi
17286
17287 if test $ol_cv_lib_db = no ; then
17288         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17289 echo "configure:17290: checking for Berkeley DB link (-ldb)" >&5
17290 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17291   echo $ac_n "(cached) $ac_c" 1>&6
17292 else
17293   
17294         ol_DB_LIB=-ldb
17295         ol_LIBS=$LIBS
17296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17297
17298         cat > conftest.$ac_ext <<EOF
17299 #line 17300 "configure"
17300 #include "confdefs.h"
17301
17302 #ifdef HAVE_DB_185_H
17303 # include <db_185.h>
17304 #else
17305 # include <db.h>
17306 #endif
17307
17308 #ifndef DB_VERSION_MAJOR
17309 # define DB_VERSION_MAJOR 1
17310 #endif
17311
17312 #ifndef NULL
17313 #define NULL ((void*)0)
17314 #endif
17315
17316 int main() {
17317
17318 #if DB_VERSION_MAJOR > 1
17319         {
17320                 char *version;
17321                 int major, minor, patch;
17322
17323                 version = db_version( &major, &minor, &patch );
17324
17325                 if( major != DB_VERSION_MAJOR ||
17326                         minor < DB_VERSION_MINOR )
17327                 {
17328                         printf("Berkeley DB version mismatch\n"
17329                                 "\texpected: %s\n\tgot: %s\n",
17330                                 DB_VERSION_STRING, version);
17331                         return 1;
17332                 }
17333         }
17334 #endif
17335
17336 #if DB_VERSION_MAJOR > 2
17337         db_env_create( NULL, 0 );
17338 #elif DB_VERSION_MAJOR > 1
17339         db_appexit( NULL );
17340 #else
17341         (void) dbopen( NULL, 0, 0, 0, NULL);
17342 #endif
17343
17344 ; return 0; }
17345 EOF
17346 if { (eval echo configure:17347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17347   rm -rf conftest*
17348   ol_cv_db_db=yes
17349 else
17350   echo "configure: failed program was:" >&5
17351   cat conftest.$ac_ext >&5
17352   rm -rf conftest*
17353   ol_cv_db_db=no
17354 fi
17355 rm -f conftest*
17356
17357         LIBS="$ol_LIBS"
17358
17359 fi
17360
17361 echo "$ac_t""$ol_cv_db_db" 1>&6
17362
17363         if test $ol_cv_db_db = yes ; then
17364                 ol_cv_lib_db=-ldb
17365         fi
17366 fi
17367
17368 if test $ol_cv_lib_db = no ; then
17369         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17370 echo "configure:17371: checking for Berkeley DB link (-ldb3)" >&5
17371 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17372   echo $ac_n "(cached) $ac_c" 1>&6
17373 else
17374   
17375         ol_DB_LIB=-ldb3
17376         ol_LIBS=$LIBS
17377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17378
17379         cat > conftest.$ac_ext <<EOF
17380 #line 17381 "configure"
17381 #include "confdefs.h"
17382
17383 #ifdef HAVE_DB_185_H
17384 # include <db_185.h>
17385 #else
17386 # include <db.h>
17387 #endif
17388
17389 #ifndef DB_VERSION_MAJOR
17390 # define DB_VERSION_MAJOR 1
17391 #endif
17392
17393 #ifndef NULL
17394 #define NULL ((void*)0)
17395 #endif
17396
17397 int main() {
17398
17399 #if DB_VERSION_MAJOR > 1
17400         {
17401                 char *version;
17402                 int major, minor, patch;
17403
17404                 version = db_version( &major, &minor, &patch );
17405
17406                 if( major != DB_VERSION_MAJOR ||
17407                         minor < DB_VERSION_MINOR )
17408                 {
17409                         printf("Berkeley DB version mismatch\n"
17410                                 "\texpected: %s\n\tgot: %s\n",
17411                                 DB_VERSION_STRING, version);
17412                         return 1;
17413                 }
17414         }
17415 #endif
17416
17417 #if DB_VERSION_MAJOR > 2
17418         db_env_create( NULL, 0 );
17419 #elif DB_VERSION_MAJOR > 1
17420         db_appexit( NULL );
17421 #else
17422         (void) dbopen( NULL, 0, 0, 0, NULL);
17423 #endif
17424
17425 ; return 0; }
17426 EOF
17427 if { (eval echo configure:17428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17428   rm -rf conftest*
17429   ol_cv_db_db3=yes
17430 else
17431   echo "configure: failed program was:" >&5
17432   cat conftest.$ac_ext >&5
17433   rm -rf conftest*
17434   ol_cv_db_db3=no
17435 fi
17436 rm -f conftest*
17437
17438         LIBS="$ol_LIBS"
17439
17440 fi
17441
17442 echo "$ac_t""$ol_cv_db_db3" 1>&6
17443
17444         if test $ol_cv_db_db3 = yes ; then
17445                 ol_cv_lib_db=-ldb3
17446         fi
17447 fi
17448
17449 if test $ol_cv_lib_db = no ; then
17450         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17451 echo "configure:17452: checking for Berkeley DB link (-ldb-3)" >&5
17452 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17453   echo $ac_n "(cached) $ac_c" 1>&6
17454 else
17455   
17456         ol_DB_LIB=-ldb-3
17457         ol_LIBS=$LIBS
17458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17459
17460         cat > conftest.$ac_ext <<EOF
17461 #line 17462 "configure"
17462 #include "confdefs.h"
17463
17464 #ifdef HAVE_DB_185_H
17465 # include <db_185.h>
17466 #else
17467 # include <db.h>
17468 #endif
17469
17470 #ifndef DB_VERSION_MAJOR
17471 # define DB_VERSION_MAJOR 1
17472 #endif
17473
17474 #ifndef NULL
17475 #define NULL ((void*)0)
17476 #endif
17477
17478 int main() {
17479
17480 #if DB_VERSION_MAJOR > 1
17481         {
17482                 char *version;
17483                 int major, minor, patch;
17484
17485                 version = db_version( &major, &minor, &patch );
17486
17487                 if( major != DB_VERSION_MAJOR ||
17488                         minor < DB_VERSION_MINOR )
17489                 {
17490                         printf("Berkeley DB version mismatch\n"
17491                                 "\texpected: %s\n\tgot: %s\n",
17492                                 DB_VERSION_STRING, version);
17493                         return 1;
17494                 }
17495         }
17496 #endif
17497
17498 #if DB_VERSION_MAJOR > 2
17499         db_env_create( NULL, 0 );
17500 #elif DB_VERSION_MAJOR > 1
17501         db_appexit( NULL );
17502 #else
17503         (void) dbopen( NULL, 0, 0, 0, NULL);
17504 #endif
17505
17506 ; return 0; }
17507 EOF
17508 if { (eval echo configure:17509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17509   rm -rf conftest*
17510   ol_cv_db_db_3=yes
17511 else
17512   echo "configure: failed program was:" >&5
17513   cat conftest.$ac_ext >&5
17514   rm -rf conftest*
17515   ol_cv_db_db_3=no
17516 fi
17517 rm -f conftest*
17518
17519         LIBS="$ol_LIBS"
17520
17521 fi
17522
17523 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17524
17525         if test $ol_cv_db_db_3 = yes ; then
17526                 ol_cv_lib_db=-ldb-3
17527         fi
17528 fi
17529
17530 if test $ol_cv_lib_db = no ; then
17531         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17532 echo "configure:17533: checking for Berkeley DB link (-ldb2)" >&5
17533 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17534   echo $ac_n "(cached) $ac_c" 1>&6
17535 else
17536   
17537         ol_DB_LIB=-ldb2
17538         ol_LIBS=$LIBS
17539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17540
17541         cat > conftest.$ac_ext <<EOF
17542 #line 17543 "configure"
17543 #include "confdefs.h"
17544
17545 #ifdef HAVE_DB_185_H
17546 # include <db_185.h>
17547 #else
17548 # include <db.h>
17549 #endif
17550
17551 #ifndef DB_VERSION_MAJOR
17552 # define DB_VERSION_MAJOR 1
17553 #endif
17554
17555 #ifndef NULL
17556 #define NULL ((void*)0)
17557 #endif
17558
17559 int main() {
17560
17561 #if DB_VERSION_MAJOR > 1
17562         {
17563                 char *version;
17564                 int major, minor, patch;
17565
17566                 version = db_version( &major, &minor, &patch );
17567
17568                 if( major != DB_VERSION_MAJOR ||
17569                         minor < DB_VERSION_MINOR )
17570                 {
17571                         printf("Berkeley DB version mismatch\n"
17572                                 "\texpected: %s\n\tgot: %s\n",
17573                                 DB_VERSION_STRING, version);
17574                         return 1;
17575                 }
17576         }
17577 #endif
17578
17579 #if DB_VERSION_MAJOR > 2
17580         db_env_create( NULL, 0 );
17581 #elif DB_VERSION_MAJOR > 1
17582         db_appexit( NULL );
17583 #else
17584         (void) dbopen( NULL, 0, 0, 0, NULL);
17585 #endif
17586
17587 ; return 0; }
17588 EOF
17589 if { (eval echo configure:17590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17590   rm -rf conftest*
17591   ol_cv_db_db2=yes
17592 else
17593   echo "configure: failed program was:" >&5
17594   cat conftest.$ac_ext >&5
17595   rm -rf conftest*
17596   ol_cv_db_db2=no
17597 fi
17598 rm -f conftest*
17599
17600         LIBS="$ol_LIBS"
17601
17602 fi
17603
17604 echo "$ac_t""$ol_cv_db_db2" 1>&6
17605
17606         if test $ol_cv_db_db2 = yes ; then
17607                 ol_cv_lib_db=-ldb2
17608         fi
17609 fi
17610
17611 if test $ol_cv_lib_db = no ; then
17612         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17613 echo "configure:17614: checking for Berkeley DB link (-ldb-2)" >&5
17614 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17615   echo $ac_n "(cached) $ac_c" 1>&6
17616 else
17617   
17618         ol_DB_LIB=-ldb-2
17619         ol_LIBS=$LIBS
17620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17621
17622         cat > conftest.$ac_ext <<EOF
17623 #line 17624 "configure"
17624 #include "confdefs.h"
17625
17626 #ifdef HAVE_DB_185_H
17627 # include <db_185.h>
17628 #else
17629 # include <db.h>
17630 #endif
17631
17632 #ifndef DB_VERSION_MAJOR
17633 # define DB_VERSION_MAJOR 1
17634 #endif
17635
17636 #ifndef NULL
17637 #define NULL ((void*)0)
17638 #endif
17639
17640 int main() {
17641
17642 #if DB_VERSION_MAJOR > 1
17643         {
17644                 char *version;
17645                 int major, minor, patch;
17646
17647                 version = db_version( &major, &minor, &patch );
17648
17649                 if( major != DB_VERSION_MAJOR ||
17650                         minor < DB_VERSION_MINOR )
17651                 {
17652                         printf("Berkeley DB version mismatch\n"
17653                                 "\texpected: %s\n\tgot: %s\n",
17654                                 DB_VERSION_STRING, version);
17655                         return 1;
17656                 }
17657         }
17658 #endif
17659
17660 #if DB_VERSION_MAJOR > 2
17661         db_env_create( NULL, 0 );
17662 #elif DB_VERSION_MAJOR > 1
17663         db_appexit( NULL );
17664 #else
17665         (void) dbopen( NULL, 0, 0, 0, NULL);
17666 #endif
17667
17668 ; return 0; }
17669 EOF
17670 if { (eval echo configure:17671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17671   rm -rf conftest*
17672   ol_cv_db_db_2=yes
17673 else
17674   echo "configure: failed program was:" >&5
17675   cat conftest.$ac_ext >&5
17676   rm -rf conftest*
17677   ol_cv_db_db_2=no
17678 fi
17679 rm -f conftest*
17680
17681         LIBS="$ol_LIBS"
17682
17683 fi
17684
17685 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17686
17687         if test $ol_cv_db_db_2 = yes ; then
17688                 ol_cv_lib_db=-ldb-2
17689         fi
17690 fi
17691
17692 if test $ol_cv_lib_db = no ; then
17693         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17694 echo "configure:17695: checking for Berkeley DB link (-ldb1)" >&5
17695 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17696   echo $ac_n "(cached) $ac_c" 1>&6
17697 else
17698   
17699         ol_DB_LIB=-ldb1
17700         ol_LIBS=$LIBS
17701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17702
17703         cat > conftest.$ac_ext <<EOF
17704 #line 17705 "configure"
17705 #include "confdefs.h"
17706
17707 #ifdef HAVE_DB_185_H
17708 # include <db_185.h>
17709 #else
17710 # include <db.h>
17711 #endif
17712
17713 #ifndef DB_VERSION_MAJOR
17714 # define DB_VERSION_MAJOR 1
17715 #endif
17716
17717 #ifndef NULL
17718 #define NULL ((void*)0)
17719 #endif
17720
17721 int main() {
17722
17723 #if DB_VERSION_MAJOR > 1
17724         {
17725                 char *version;
17726                 int major, minor, patch;
17727
17728                 version = db_version( &major, &minor, &patch );
17729
17730                 if( major != DB_VERSION_MAJOR ||
17731                         minor < DB_VERSION_MINOR )
17732                 {
17733                         printf("Berkeley DB version mismatch\n"
17734                                 "\texpected: %s\n\tgot: %s\n",
17735                                 DB_VERSION_STRING, version);
17736                         return 1;
17737                 }
17738         }
17739 #endif
17740
17741 #if DB_VERSION_MAJOR > 2
17742         db_env_create( NULL, 0 );
17743 #elif DB_VERSION_MAJOR > 1
17744         db_appexit( NULL );
17745 #else
17746         (void) dbopen( NULL, 0, 0, 0, NULL);
17747 #endif
17748
17749 ; return 0; }
17750 EOF
17751 if { (eval echo configure:17752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17752   rm -rf conftest*
17753   ol_cv_db_db1=yes
17754 else
17755   echo "configure: failed program was:" >&5
17756   cat conftest.$ac_ext >&5
17757   rm -rf conftest*
17758   ol_cv_db_db1=no
17759 fi
17760 rm -f conftest*
17761
17762         LIBS="$ol_LIBS"
17763
17764 fi
17765
17766 echo "$ac_t""$ol_cv_db_db1" 1>&6
17767
17768         if test $ol_cv_db_db1 = yes ; then
17769                 ol_cv_lib_db=-ldb1
17770         fi
17771 fi
17772
17773 if test $ol_cv_lib_db = no ; then
17774         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17775 echo "configure:17776: checking for Berkeley DB link (-ldb-1)" >&5
17776 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17777   echo $ac_n "(cached) $ac_c" 1>&6
17778 else
17779   
17780         ol_DB_LIB=-ldb-1
17781         ol_LIBS=$LIBS
17782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17783
17784         cat > conftest.$ac_ext <<EOF
17785 #line 17786 "configure"
17786 #include "confdefs.h"
17787
17788 #ifdef HAVE_DB_185_H
17789 # include <db_185.h>
17790 #else
17791 # include <db.h>
17792 #endif
17793
17794 #ifndef DB_VERSION_MAJOR
17795 # define DB_VERSION_MAJOR 1
17796 #endif
17797
17798 #ifndef NULL
17799 #define NULL ((void*)0)
17800 #endif
17801
17802 int main() {
17803
17804 #if DB_VERSION_MAJOR > 1
17805         {
17806                 char *version;
17807                 int major, minor, patch;
17808
17809                 version = db_version( &major, &minor, &patch );
17810
17811                 if( major != DB_VERSION_MAJOR ||
17812                         minor < DB_VERSION_MINOR )
17813                 {
17814                         printf("Berkeley DB version mismatch\n"
17815                                 "\texpected: %s\n\tgot: %s\n",
17816                                 DB_VERSION_STRING, version);
17817                         return 1;
17818                 }
17819         }
17820 #endif
17821
17822 #if DB_VERSION_MAJOR > 2
17823         db_env_create( NULL, 0 );
17824 #elif DB_VERSION_MAJOR > 1
17825         db_appexit( NULL );
17826 #else
17827         (void) dbopen( NULL, 0, 0, 0, NULL);
17828 #endif
17829
17830 ; return 0; }
17831 EOF
17832 if { (eval echo configure:17833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17833   rm -rf conftest*
17834   ol_cv_db_db_1=yes
17835 else
17836   echo "configure: failed program was:" >&5
17837   cat conftest.$ac_ext >&5
17838   rm -rf conftest*
17839   ol_cv_db_db_1=no
17840 fi
17841 rm -f conftest*
17842
17843         LIBS="$ol_LIBS"
17844
17845 fi
17846
17847 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17848
17849         if test $ol_cv_db_db_1 = yes ; then
17850                 ol_cv_lib_db=-ldb-1
17851         fi
17852 fi
17853
17854
17855                 if test "$ol_cv_lib_db" != no ; then
17856                         ol_cv_berkeley_db=yes
17857                 fi
17858         fi
17859 fi
17860
17861         else
17862                 ol_cv_berkeley_db=no
17863 for ac_hdr in db.h
17864 do
17865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17867 echo "configure:17868: checking for $ac_hdr" >&5
17868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17869   echo $ac_n "(cached) $ac_c" 1>&6
17870 else
17871   cat > conftest.$ac_ext <<EOF
17872 #line 17873 "configure"
17873 #include "confdefs.h"
17874 #include <$ac_hdr>
17875 EOF
17876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17877 { (eval echo configure:17878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17879 if test -z "$ac_err"; then
17880   rm -rf conftest*
17881   eval "ac_cv_header_$ac_safe=yes"
17882 else
17883   echo "$ac_err" >&5
17884   echo "configure: failed program was:" >&5
17885   cat conftest.$ac_ext >&5
17886   rm -rf conftest*
17887   eval "ac_cv_header_$ac_safe=no"
17888 fi
17889 rm -f conftest*
17890 fi
17891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17892   echo "$ac_t""yes" 1>&6
17893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17894   cat >> confdefs.h <<EOF
17895 #define $ac_tr_hdr 1
17896 EOF
17897  
17898 else
17899   echo "$ac_t""no" 1>&6
17900 fi
17901 done
17902
17903 if test $ac_cv_header_db_h = yes; then
17904         ol_cv_lib_db=no
17905 if test $ol_cv_lib_db = no ; then
17906         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17907 echo "configure:17908: checking for Berkeley DB link (default)" >&5
17908 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17909   echo $ac_n "(cached) $ac_c" 1>&6
17910 else
17911   
17912         ol_DB_LIB=
17913         ol_LIBS=$LIBS
17914         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17915
17916         cat > conftest.$ac_ext <<EOF
17917 #line 17918 "configure"
17918 #include "confdefs.h"
17919
17920 #ifdef HAVE_DB_185_H
17921 # include <db_185.h>
17922 #else
17923 # include <db.h>
17924 #endif
17925
17926 #ifndef DB_VERSION_MAJOR
17927 # define DB_VERSION_MAJOR 1
17928 #endif
17929
17930 #ifndef NULL
17931 #define NULL ((void*)0)
17932 #endif
17933
17934 int main() {
17935
17936 #if DB_VERSION_MAJOR > 1
17937         {
17938                 char *version;
17939                 int major, minor, patch;
17940
17941                 version = db_version( &major, &minor, &patch );
17942
17943                 if( major != DB_VERSION_MAJOR ||
17944                         minor < DB_VERSION_MINOR )
17945                 {
17946                         printf("Berkeley DB version mismatch\n"
17947                                 "\texpected: %s\n\tgot: %s\n",
17948                                 DB_VERSION_STRING, version);
17949                         return 1;
17950                 }
17951         }
17952 #endif
17953
17954 #if DB_VERSION_MAJOR > 2
17955         db_env_create( NULL, 0 );
17956 #elif DB_VERSION_MAJOR > 1
17957         db_appexit( NULL );
17958 #else
17959         (void) dbopen( NULL, 0, 0, 0, NULL);
17960 #endif
17961
17962 ; return 0; }
17963 EOF
17964 if { (eval echo configure:17965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17965   rm -rf conftest*
17966   ol_cv_db_none=yes
17967 else
17968   echo "configure: failed program was:" >&5
17969   cat conftest.$ac_ext >&5
17970   rm -rf conftest*
17971   ol_cv_db_none=no
17972 fi
17973 rm -f conftest*
17974
17975         LIBS="$ol_LIBS"
17976
17977 fi
17978
17979 echo "$ac_t""$ol_cv_db_none" 1>&6
17980
17981         if test $ol_cv_db_none = yes ; then
17982                 ol_cv_lib_db=yes
17983         fi
17984 fi
17985
17986 if test $ol_cv_lib_db = no ; then
17987         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17988 echo "configure:17989: checking for Berkeley DB link (-ldb41)" >&5
17989 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17990   echo $ac_n "(cached) $ac_c" 1>&6
17991 else
17992   
17993         ol_DB_LIB=-ldb41
17994         ol_LIBS=$LIBS
17995         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17996
17997         cat > conftest.$ac_ext <<EOF
17998 #line 17999 "configure"
17999 #include "confdefs.h"
18000
18001 #ifdef HAVE_DB_185_H
18002 # include <db_185.h>
18003 #else
18004 # include <db.h>
18005 #endif
18006
18007 #ifndef DB_VERSION_MAJOR
18008 # define DB_VERSION_MAJOR 1
18009 #endif
18010
18011 #ifndef NULL
18012 #define NULL ((void*)0)
18013 #endif
18014
18015 int main() {
18016
18017 #if DB_VERSION_MAJOR > 1
18018         {
18019                 char *version;
18020                 int major, minor, patch;
18021
18022                 version = db_version( &major, &minor, &patch );
18023
18024                 if( major != DB_VERSION_MAJOR ||
18025                         minor < DB_VERSION_MINOR )
18026                 {
18027                         printf("Berkeley DB version mismatch\n"
18028                                 "\texpected: %s\n\tgot: %s\n",
18029                                 DB_VERSION_STRING, version);
18030                         return 1;
18031                 }
18032         }
18033 #endif
18034
18035 #if DB_VERSION_MAJOR > 2
18036         db_env_create( NULL, 0 );
18037 #elif DB_VERSION_MAJOR > 1
18038         db_appexit( NULL );
18039 #else
18040         (void) dbopen( NULL, 0, 0, 0, NULL);
18041 #endif
18042
18043 ; return 0; }
18044 EOF
18045 if { (eval echo configure:18046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18046   rm -rf conftest*
18047   ol_cv_db_db41=yes
18048 else
18049   echo "configure: failed program was:" >&5
18050   cat conftest.$ac_ext >&5
18051   rm -rf conftest*
18052   ol_cv_db_db41=no
18053 fi
18054 rm -f conftest*
18055
18056         LIBS="$ol_LIBS"
18057
18058 fi
18059
18060 echo "$ac_t""$ol_cv_db_db41" 1>&6
18061
18062         if test $ol_cv_db_db41 = yes ; then
18063                 ol_cv_lib_db=-ldb41
18064         fi
18065 fi
18066
18067 if test $ol_cv_lib_db = no ; then
18068         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18069 echo "configure:18070: checking for Berkeley DB link (-ldb-41)" >&5
18070 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18071   echo $ac_n "(cached) $ac_c" 1>&6
18072 else
18073   
18074         ol_DB_LIB=-ldb-41
18075         ol_LIBS=$LIBS
18076         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18077
18078         cat > conftest.$ac_ext <<EOF
18079 #line 18080 "configure"
18080 #include "confdefs.h"
18081
18082 #ifdef HAVE_DB_185_H
18083 # include <db_185.h>
18084 #else
18085 # include <db.h>
18086 #endif
18087
18088 #ifndef DB_VERSION_MAJOR
18089 # define DB_VERSION_MAJOR 1
18090 #endif
18091
18092 #ifndef NULL
18093 #define NULL ((void*)0)
18094 #endif
18095
18096 int main() {
18097
18098 #if DB_VERSION_MAJOR > 1
18099         {
18100                 char *version;
18101                 int major, minor, patch;
18102
18103                 version = db_version( &major, &minor, &patch );
18104
18105                 if( major != DB_VERSION_MAJOR ||
18106                         minor < DB_VERSION_MINOR )
18107                 {
18108                         printf("Berkeley DB version mismatch\n"
18109                                 "\texpected: %s\n\tgot: %s\n",
18110                                 DB_VERSION_STRING, version);
18111                         return 1;
18112                 }
18113         }
18114 #endif
18115
18116 #if DB_VERSION_MAJOR > 2
18117         db_env_create( NULL, 0 );
18118 #elif DB_VERSION_MAJOR > 1
18119         db_appexit( NULL );
18120 #else
18121         (void) dbopen( NULL, 0, 0, 0, NULL);
18122 #endif
18123
18124 ; return 0; }
18125 EOF
18126 if { (eval echo configure:18127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18127   rm -rf conftest*
18128   ol_cv_db_db_41=yes
18129 else
18130   echo "configure: failed program was:" >&5
18131   cat conftest.$ac_ext >&5
18132   rm -rf conftest*
18133   ol_cv_db_db_41=no
18134 fi
18135 rm -f conftest*
18136
18137         LIBS="$ol_LIBS"
18138
18139 fi
18140
18141 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18142
18143         if test $ol_cv_db_db_41 = yes ; then
18144                 ol_cv_lib_db=-ldb-41
18145         fi
18146 fi
18147
18148 if test $ol_cv_lib_db = no ; then
18149         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18150 echo "configure:18151: checking for Berkeley DB link (-ldb-4.1)" >&5
18151 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18152   echo $ac_n "(cached) $ac_c" 1>&6
18153 else
18154   
18155         ol_DB_LIB=-ldb-4.1
18156         ol_LIBS=$LIBS
18157         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18158
18159         cat > conftest.$ac_ext <<EOF
18160 #line 18161 "configure"
18161 #include "confdefs.h"
18162
18163 #ifdef HAVE_DB_185_H
18164 # include <db_185.h>
18165 #else
18166 # include <db.h>
18167 #endif
18168
18169 #ifndef DB_VERSION_MAJOR
18170 # define DB_VERSION_MAJOR 1
18171 #endif
18172
18173 #ifndef NULL
18174 #define NULL ((void*)0)
18175 #endif
18176
18177 int main() {
18178
18179 #if DB_VERSION_MAJOR > 1
18180         {
18181                 char *version;
18182                 int major, minor, patch;
18183
18184                 version = db_version( &major, &minor, &patch );
18185
18186                 if( major != DB_VERSION_MAJOR ||
18187                         minor < DB_VERSION_MINOR )
18188                 {
18189                         printf("Berkeley DB version mismatch\n"
18190                                 "\texpected: %s\n\tgot: %s\n",
18191                                 DB_VERSION_STRING, version);
18192                         return 1;
18193                 }
18194         }
18195 #endif
18196
18197 #if DB_VERSION_MAJOR > 2
18198         db_env_create( NULL, 0 );
18199 #elif DB_VERSION_MAJOR > 1
18200         db_appexit( NULL );
18201 #else
18202         (void) dbopen( NULL, 0, 0, 0, NULL);
18203 #endif
18204
18205 ; return 0; }
18206 EOF
18207 if { (eval echo configure:18208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18208   rm -rf conftest*
18209   ol_cv_db_db_4_dot_1=yes
18210 else
18211   echo "configure: failed program was:" >&5
18212   cat conftest.$ac_ext >&5
18213   rm -rf conftest*
18214   ol_cv_db_db_4_dot_1=no
18215 fi
18216 rm -f conftest*
18217
18218         LIBS="$ol_LIBS"
18219
18220 fi
18221
18222 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18223
18224         if test $ol_cv_db_db_4_dot_1 = yes ; then
18225                 ol_cv_lib_db=-ldb-4.1
18226         fi
18227 fi
18228
18229 if test $ol_cv_lib_db = no ; then
18230         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18231 echo "configure:18232: checking for Berkeley DB link (-ldb-4-1)" >&5
18232 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18233   echo $ac_n "(cached) $ac_c" 1>&6
18234 else
18235   
18236         ol_DB_LIB=-ldb-4-1
18237         ol_LIBS=$LIBS
18238         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18239
18240         cat > conftest.$ac_ext <<EOF
18241 #line 18242 "configure"
18242 #include "confdefs.h"
18243
18244 #ifdef HAVE_DB_185_H
18245 # include <db_185.h>
18246 #else
18247 # include <db.h>
18248 #endif
18249
18250 #ifndef DB_VERSION_MAJOR
18251 # define DB_VERSION_MAJOR 1
18252 #endif
18253
18254 #ifndef NULL
18255 #define NULL ((void*)0)
18256 #endif
18257
18258 int main() {
18259
18260 #if DB_VERSION_MAJOR > 1
18261         {
18262                 char *version;
18263                 int major, minor, patch;
18264
18265                 version = db_version( &major, &minor, &patch );
18266
18267                 if( major != DB_VERSION_MAJOR ||
18268                         minor < DB_VERSION_MINOR )
18269                 {
18270                         printf("Berkeley DB version mismatch\n"
18271                                 "\texpected: %s\n\tgot: %s\n",
18272                                 DB_VERSION_STRING, version);
18273                         return 1;
18274                 }
18275         }
18276 #endif
18277
18278 #if DB_VERSION_MAJOR > 2
18279         db_env_create( NULL, 0 );
18280 #elif DB_VERSION_MAJOR > 1
18281         db_appexit( NULL );
18282 #else
18283         (void) dbopen( NULL, 0, 0, 0, NULL);
18284 #endif
18285
18286 ; return 0; }
18287 EOF
18288 if { (eval echo configure:18289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18289   rm -rf conftest*
18290   ol_cv_db_db_4_1=yes
18291 else
18292   echo "configure: failed program was:" >&5
18293   cat conftest.$ac_ext >&5
18294   rm -rf conftest*
18295   ol_cv_db_db_4_1=no
18296 fi
18297 rm -f conftest*
18298
18299         LIBS="$ol_LIBS"
18300
18301 fi
18302
18303 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18304
18305         if test $ol_cv_db_db_4_1 = yes ; then
18306                 ol_cv_lib_db=-ldb-4-1
18307         fi
18308 fi
18309
18310 if test $ol_cv_lib_db = no ; then
18311         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18312 echo "configure:18313: checking for Berkeley DB link (-ldb-4)" >&5
18313 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18314   echo $ac_n "(cached) $ac_c" 1>&6
18315 else
18316   
18317         ol_DB_LIB=-ldb-4
18318         ol_LIBS=$LIBS
18319         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18320
18321         cat > conftest.$ac_ext <<EOF
18322 #line 18323 "configure"
18323 #include "confdefs.h"
18324
18325 #ifdef HAVE_DB_185_H
18326 # include <db_185.h>
18327 #else
18328 # include <db.h>
18329 #endif
18330
18331 #ifndef DB_VERSION_MAJOR
18332 # define DB_VERSION_MAJOR 1
18333 #endif
18334
18335 #ifndef NULL
18336 #define NULL ((void*)0)
18337 #endif
18338
18339 int main() {
18340
18341 #if DB_VERSION_MAJOR > 1
18342         {
18343                 char *version;
18344                 int major, minor, patch;
18345
18346                 version = db_version( &major, &minor, &patch );
18347
18348                 if( major != DB_VERSION_MAJOR ||
18349                         minor < DB_VERSION_MINOR )
18350                 {
18351                         printf("Berkeley DB version mismatch\n"
18352                                 "\texpected: %s\n\tgot: %s\n",
18353                                 DB_VERSION_STRING, version);
18354                         return 1;
18355                 }
18356         }
18357 #endif
18358
18359 #if DB_VERSION_MAJOR > 2
18360         db_env_create( NULL, 0 );
18361 #elif DB_VERSION_MAJOR > 1
18362         db_appexit( NULL );
18363 #else
18364         (void) dbopen( NULL, 0, 0, 0, NULL);
18365 #endif
18366
18367 ; return 0; }
18368 EOF
18369 if { (eval echo configure:18370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18370   rm -rf conftest*
18371   ol_cv_db_db_4=yes
18372 else
18373   echo "configure: failed program was:" >&5
18374   cat conftest.$ac_ext >&5
18375   rm -rf conftest*
18376   ol_cv_db_db_4=no
18377 fi
18378 rm -f conftest*
18379
18380         LIBS="$ol_LIBS"
18381
18382 fi
18383
18384 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18385
18386         if test $ol_cv_db_db_4 = yes ; then
18387                 ol_cv_lib_db=-ldb-4
18388         fi
18389 fi
18390
18391 if test $ol_cv_lib_db = no ; then
18392         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18393 echo "configure:18394: checking for Berkeley DB link (-ldb4)" >&5
18394 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18395   echo $ac_n "(cached) $ac_c" 1>&6
18396 else
18397   
18398         ol_DB_LIB=-ldb4
18399         ol_LIBS=$LIBS
18400         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18401
18402         cat > conftest.$ac_ext <<EOF
18403 #line 18404 "configure"
18404 #include "confdefs.h"
18405
18406 #ifdef HAVE_DB_185_H
18407 # include <db_185.h>
18408 #else
18409 # include <db.h>
18410 #endif
18411
18412 #ifndef DB_VERSION_MAJOR
18413 # define DB_VERSION_MAJOR 1
18414 #endif
18415
18416 #ifndef NULL
18417 #define NULL ((void*)0)
18418 #endif
18419
18420 int main() {
18421
18422 #if DB_VERSION_MAJOR > 1
18423         {
18424                 char *version;
18425                 int major, minor, patch;
18426
18427                 version = db_version( &major, &minor, &patch );
18428
18429                 if( major != DB_VERSION_MAJOR ||
18430                         minor < DB_VERSION_MINOR )
18431                 {
18432                         printf("Berkeley DB version mismatch\n"
18433                                 "\texpected: %s\n\tgot: %s\n",
18434                                 DB_VERSION_STRING, version);
18435                         return 1;
18436                 }
18437         }
18438 #endif
18439
18440 #if DB_VERSION_MAJOR > 2
18441         db_env_create( NULL, 0 );
18442 #elif DB_VERSION_MAJOR > 1
18443         db_appexit( NULL );
18444 #else
18445         (void) dbopen( NULL, 0, 0, 0, NULL);
18446 #endif
18447
18448 ; return 0; }
18449 EOF
18450 if { (eval echo configure:18451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18451   rm -rf conftest*
18452   ol_cv_db_db4=yes
18453 else
18454   echo "configure: failed program was:" >&5
18455   cat conftest.$ac_ext >&5
18456   rm -rf conftest*
18457   ol_cv_db_db4=no
18458 fi
18459 rm -f conftest*
18460
18461         LIBS="$ol_LIBS"
18462
18463 fi
18464
18465 echo "$ac_t""$ol_cv_db_db4" 1>&6
18466
18467         if test $ol_cv_db_db4 = yes ; then
18468                 ol_cv_lib_db=-ldb4
18469         fi
18470 fi
18471
18472 if test $ol_cv_lib_db = no ; then
18473         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18474 echo "configure:18475: checking for Berkeley DB link (-ldb)" >&5
18475 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18476   echo $ac_n "(cached) $ac_c" 1>&6
18477 else
18478   
18479         ol_DB_LIB=-ldb
18480         ol_LIBS=$LIBS
18481         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18482
18483         cat > conftest.$ac_ext <<EOF
18484 #line 18485 "configure"
18485 #include "confdefs.h"
18486
18487 #ifdef HAVE_DB_185_H
18488 # include <db_185.h>
18489 #else
18490 # include <db.h>
18491 #endif
18492
18493 #ifndef DB_VERSION_MAJOR
18494 # define DB_VERSION_MAJOR 1
18495 #endif
18496
18497 #ifndef NULL
18498 #define NULL ((void*)0)
18499 #endif
18500
18501 int main() {
18502
18503 #if DB_VERSION_MAJOR > 1
18504         {
18505                 char *version;
18506                 int major, minor, patch;
18507
18508                 version = db_version( &major, &minor, &patch );
18509
18510                 if( major != DB_VERSION_MAJOR ||
18511                         minor < DB_VERSION_MINOR )
18512                 {
18513                         printf("Berkeley DB version mismatch\n"
18514                                 "\texpected: %s\n\tgot: %s\n",
18515                                 DB_VERSION_STRING, version);
18516                         return 1;
18517                 }
18518         }
18519 #endif
18520
18521 #if DB_VERSION_MAJOR > 2
18522         db_env_create( NULL, 0 );
18523 #elif DB_VERSION_MAJOR > 1
18524         db_appexit( NULL );
18525 #else
18526         (void) dbopen( NULL, 0, 0, 0, NULL);
18527 #endif
18528
18529 ; return 0; }
18530 EOF
18531 if { (eval echo configure:18532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18532   rm -rf conftest*
18533   ol_cv_db_db=yes
18534 else
18535   echo "configure: failed program was:" >&5
18536   cat conftest.$ac_ext >&5
18537   rm -rf conftest*
18538   ol_cv_db_db=no
18539 fi
18540 rm -f conftest*
18541
18542         LIBS="$ol_LIBS"
18543
18544 fi
18545
18546 echo "$ac_t""$ol_cv_db_db" 1>&6
18547
18548         if test $ol_cv_db_db = yes ; then
18549                 ol_cv_lib_db=-ldb
18550         fi
18551 fi
18552
18553 if test $ol_cv_lib_db = no ; then
18554         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18555 echo "configure:18556: checking for Berkeley DB link (-ldb3)" >&5
18556 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18557   echo $ac_n "(cached) $ac_c" 1>&6
18558 else
18559   
18560         ol_DB_LIB=-ldb3
18561         ol_LIBS=$LIBS
18562         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18563
18564         cat > conftest.$ac_ext <<EOF
18565 #line 18566 "configure"
18566 #include "confdefs.h"
18567
18568 #ifdef HAVE_DB_185_H
18569 # include <db_185.h>
18570 #else
18571 # include <db.h>
18572 #endif
18573
18574 #ifndef DB_VERSION_MAJOR
18575 # define DB_VERSION_MAJOR 1
18576 #endif
18577
18578 #ifndef NULL
18579 #define NULL ((void*)0)
18580 #endif
18581
18582 int main() {
18583
18584 #if DB_VERSION_MAJOR > 1
18585         {
18586                 char *version;
18587                 int major, minor, patch;
18588
18589                 version = db_version( &major, &minor, &patch );
18590
18591                 if( major != DB_VERSION_MAJOR ||
18592                         minor < DB_VERSION_MINOR )
18593                 {
18594                         printf("Berkeley DB version mismatch\n"
18595                                 "\texpected: %s\n\tgot: %s\n",
18596                                 DB_VERSION_STRING, version);
18597                         return 1;
18598                 }
18599         }
18600 #endif
18601
18602 #if DB_VERSION_MAJOR > 2
18603         db_env_create( NULL, 0 );
18604 #elif DB_VERSION_MAJOR > 1
18605         db_appexit( NULL );
18606 #else
18607         (void) dbopen( NULL, 0, 0, 0, NULL);
18608 #endif
18609
18610 ; return 0; }
18611 EOF
18612 if { (eval echo configure:18613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18613   rm -rf conftest*
18614   ol_cv_db_db3=yes
18615 else
18616   echo "configure: failed program was:" >&5
18617   cat conftest.$ac_ext >&5
18618   rm -rf conftest*
18619   ol_cv_db_db3=no
18620 fi
18621 rm -f conftest*
18622
18623         LIBS="$ol_LIBS"
18624
18625 fi
18626
18627 echo "$ac_t""$ol_cv_db_db3" 1>&6
18628
18629         if test $ol_cv_db_db3 = yes ; then
18630                 ol_cv_lib_db=-ldb3
18631         fi
18632 fi
18633
18634 if test $ol_cv_lib_db = no ; then
18635         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18636 echo "configure:18637: checking for Berkeley DB link (-ldb-3)" >&5
18637 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18638   echo $ac_n "(cached) $ac_c" 1>&6
18639 else
18640   
18641         ol_DB_LIB=-ldb-3
18642         ol_LIBS=$LIBS
18643         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18644
18645         cat > conftest.$ac_ext <<EOF
18646 #line 18647 "configure"
18647 #include "confdefs.h"
18648
18649 #ifdef HAVE_DB_185_H
18650 # include <db_185.h>
18651 #else
18652 # include <db.h>
18653 #endif
18654
18655 #ifndef DB_VERSION_MAJOR
18656 # define DB_VERSION_MAJOR 1
18657 #endif
18658
18659 #ifndef NULL
18660 #define NULL ((void*)0)
18661 #endif
18662
18663 int main() {
18664
18665 #if DB_VERSION_MAJOR > 1
18666         {
18667                 char *version;
18668                 int major, minor, patch;
18669
18670                 version = db_version( &major, &minor, &patch );
18671
18672                 if( major != DB_VERSION_MAJOR ||
18673                         minor < DB_VERSION_MINOR )
18674                 {
18675                         printf("Berkeley DB version mismatch\n"
18676                                 "\texpected: %s\n\tgot: %s\n",
18677                                 DB_VERSION_STRING, version);
18678                         return 1;
18679                 }
18680         }
18681 #endif
18682
18683 #if DB_VERSION_MAJOR > 2
18684         db_env_create( NULL, 0 );
18685 #elif DB_VERSION_MAJOR > 1
18686         db_appexit( NULL );
18687 #else
18688         (void) dbopen( NULL, 0, 0, 0, NULL);
18689 #endif
18690
18691 ; return 0; }
18692 EOF
18693 if { (eval echo configure:18694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18694   rm -rf conftest*
18695   ol_cv_db_db_3=yes
18696 else
18697   echo "configure: failed program was:" >&5
18698   cat conftest.$ac_ext >&5
18699   rm -rf conftest*
18700   ol_cv_db_db_3=no
18701 fi
18702 rm -f conftest*
18703
18704         LIBS="$ol_LIBS"
18705
18706 fi
18707
18708 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18709
18710         if test $ol_cv_db_db_3 = yes ; then
18711                 ol_cv_lib_db=-ldb-3
18712         fi
18713 fi
18714
18715 if test $ol_cv_lib_db = no ; then
18716         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18717 echo "configure:18718: checking for Berkeley DB link (-ldb2)" >&5
18718 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18719   echo $ac_n "(cached) $ac_c" 1>&6
18720 else
18721   
18722         ol_DB_LIB=-ldb2
18723         ol_LIBS=$LIBS
18724         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18725
18726         cat > conftest.$ac_ext <<EOF
18727 #line 18728 "configure"
18728 #include "confdefs.h"
18729
18730 #ifdef HAVE_DB_185_H
18731 # include <db_185.h>
18732 #else
18733 # include <db.h>
18734 #endif
18735
18736 #ifndef DB_VERSION_MAJOR
18737 # define DB_VERSION_MAJOR 1
18738 #endif
18739
18740 #ifndef NULL
18741 #define NULL ((void*)0)
18742 #endif
18743
18744 int main() {
18745
18746 #if DB_VERSION_MAJOR > 1
18747         {
18748                 char *version;
18749                 int major, minor, patch;
18750
18751                 version = db_version( &major, &minor, &patch );
18752
18753                 if( major != DB_VERSION_MAJOR ||
18754                         minor < DB_VERSION_MINOR )
18755                 {
18756                         printf("Berkeley DB version mismatch\n"
18757                                 "\texpected: %s\n\tgot: %s\n",
18758                                 DB_VERSION_STRING, version);
18759                         return 1;
18760                 }
18761         }
18762 #endif
18763
18764 #if DB_VERSION_MAJOR > 2
18765         db_env_create( NULL, 0 );
18766 #elif DB_VERSION_MAJOR > 1
18767         db_appexit( NULL );
18768 #else
18769         (void) dbopen( NULL, 0, 0, 0, NULL);
18770 #endif
18771
18772 ; return 0; }
18773 EOF
18774 if { (eval echo configure:18775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18775   rm -rf conftest*
18776   ol_cv_db_db2=yes
18777 else
18778   echo "configure: failed program was:" >&5
18779   cat conftest.$ac_ext >&5
18780   rm -rf conftest*
18781   ol_cv_db_db2=no
18782 fi
18783 rm -f conftest*
18784
18785         LIBS="$ol_LIBS"
18786
18787 fi
18788
18789 echo "$ac_t""$ol_cv_db_db2" 1>&6
18790
18791         if test $ol_cv_db_db2 = yes ; then
18792                 ol_cv_lib_db=-ldb2
18793         fi
18794 fi
18795
18796 if test $ol_cv_lib_db = no ; then
18797         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18798 echo "configure:18799: checking for Berkeley DB link (-ldb-2)" >&5
18799 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18800   echo $ac_n "(cached) $ac_c" 1>&6
18801 else
18802   
18803         ol_DB_LIB=-ldb-2
18804         ol_LIBS=$LIBS
18805         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18806
18807         cat > conftest.$ac_ext <<EOF
18808 #line 18809 "configure"
18809 #include "confdefs.h"
18810
18811 #ifdef HAVE_DB_185_H
18812 # include <db_185.h>
18813 #else
18814 # include <db.h>
18815 #endif
18816
18817 #ifndef DB_VERSION_MAJOR
18818 # define DB_VERSION_MAJOR 1
18819 #endif
18820
18821 #ifndef NULL
18822 #define NULL ((void*)0)
18823 #endif
18824
18825 int main() {
18826
18827 #if DB_VERSION_MAJOR > 1
18828         {
18829                 char *version;
18830                 int major, minor, patch;
18831
18832                 version = db_version( &major, &minor, &patch );
18833
18834                 if( major != DB_VERSION_MAJOR ||
18835                         minor < DB_VERSION_MINOR )
18836                 {
18837                         printf("Berkeley DB version mismatch\n"
18838                                 "\texpected: %s\n\tgot: %s\n",
18839                                 DB_VERSION_STRING, version);
18840                         return 1;
18841                 }
18842         }
18843 #endif
18844
18845 #if DB_VERSION_MAJOR > 2
18846         db_env_create( NULL, 0 );
18847 #elif DB_VERSION_MAJOR > 1
18848         db_appexit( NULL );
18849 #else
18850         (void) dbopen( NULL, 0, 0, 0, NULL);
18851 #endif
18852
18853 ; return 0; }
18854 EOF
18855 if { (eval echo configure:18856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18856   rm -rf conftest*
18857   ol_cv_db_db_2=yes
18858 else
18859   echo "configure: failed program was:" >&5
18860   cat conftest.$ac_ext >&5
18861   rm -rf conftest*
18862   ol_cv_db_db_2=no
18863 fi
18864 rm -f conftest*
18865
18866         LIBS="$ol_LIBS"
18867
18868 fi
18869
18870 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18871
18872         if test $ol_cv_db_db_2 = yes ; then
18873                 ol_cv_lib_db=-ldb-2
18874         fi
18875 fi
18876
18877 if test $ol_cv_lib_db = no ; then
18878         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18879 echo "configure:18880: checking for Berkeley DB link (-ldb1)" >&5
18880 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18881   echo $ac_n "(cached) $ac_c" 1>&6
18882 else
18883   
18884         ol_DB_LIB=-ldb1
18885         ol_LIBS=$LIBS
18886         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18887
18888         cat > conftest.$ac_ext <<EOF
18889 #line 18890 "configure"
18890 #include "confdefs.h"
18891
18892 #ifdef HAVE_DB_185_H
18893 # include <db_185.h>
18894 #else
18895 # include <db.h>
18896 #endif
18897
18898 #ifndef DB_VERSION_MAJOR
18899 # define DB_VERSION_MAJOR 1
18900 #endif
18901
18902 #ifndef NULL
18903 #define NULL ((void*)0)
18904 #endif
18905
18906 int main() {
18907
18908 #if DB_VERSION_MAJOR > 1
18909         {
18910                 char *version;
18911                 int major, minor, patch;
18912
18913                 version = db_version( &major, &minor, &patch );
18914
18915                 if( major != DB_VERSION_MAJOR ||
18916                         minor < DB_VERSION_MINOR )
18917                 {
18918                         printf("Berkeley DB version mismatch\n"
18919                                 "\texpected: %s\n\tgot: %s\n",
18920                                 DB_VERSION_STRING, version);
18921                         return 1;
18922                 }
18923         }
18924 #endif
18925
18926 #if DB_VERSION_MAJOR > 2
18927         db_env_create( NULL, 0 );
18928 #elif DB_VERSION_MAJOR > 1
18929         db_appexit( NULL );
18930 #else
18931         (void) dbopen( NULL, 0, 0, 0, NULL);
18932 #endif
18933
18934 ; return 0; }
18935 EOF
18936 if { (eval echo configure:18937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18937   rm -rf conftest*
18938   ol_cv_db_db1=yes
18939 else
18940   echo "configure: failed program was:" >&5
18941   cat conftest.$ac_ext >&5
18942   rm -rf conftest*
18943   ol_cv_db_db1=no
18944 fi
18945 rm -f conftest*
18946
18947         LIBS="$ol_LIBS"
18948
18949 fi
18950
18951 echo "$ac_t""$ol_cv_db_db1" 1>&6
18952
18953         if test $ol_cv_db_db1 = yes ; then
18954                 ol_cv_lib_db=-ldb1
18955         fi
18956 fi
18957
18958 if test $ol_cv_lib_db = no ; then
18959         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18960 echo "configure:18961: checking for Berkeley DB link (-ldb-1)" >&5
18961 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18962   echo $ac_n "(cached) $ac_c" 1>&6
18963 else
18964   
18965         ol_DB_LIB=-ldb-1
18966         ol_LIBS=$LIBS
18967         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18968
18969         cat > conftest.$ac_ext <<EOF
18970 #line 18971 "configure"
18971 #include "confdefs.h"
18972
18973 #ifdef HAVE_DB_185_H
18974 # include <db_185.h>
18975 #else
18976 # include <db.h>
18977 #endif
18978
18979 #ifndef DB_VERSION_MAJOR
18980 # define DB_VERSION_MAJOR 1
18981 #endif
18982
18983 #ifndef NULL
18984 #define NULL ((void*)0)
18985 #endif
18986
18987 int main() {
18988
18989 #if DB_VERSION_MAJOR > 1
18990         {
18991                 char *version;
18992                 int major, minor, patch;
18993
18994                 version = db_version( &major, &minor, &patch );
18995
18996                 if( major != DB_VERSION_MAJOR ||
18997                         minor < DB_VERSION_MINOR )
18998                 {
18999                         printf("Berkeley DB version mismatch\n"
19000                                 "\texpected: %s\n\tgot: %s\n",
19001                                 DB_VERSION_STRING, version);
19002                         return 1;
19003                 }
19004         }
19005 #endif
19006
19007 #if DB_VERSION_MAJOR > 2
19008         db_env_create( NULL, 0 );
19009 #elif DB_VERSION_MAJOR > 1
19010         db_appexit( NULL );
19011 #else
19012         (void) dbopen( NULL, 0, 0, 0, NULL);
19013 #endif
19014
19015 ; return 0; }
19016 EOF
19017 if { (eval echo configure:19018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19018   rm -rf conftest*
19019   ol_cv_db_db_1=yes
19020 else
19021   echo "configure: failed program was:" >&5
19022   cat conftest.$ac_ext >&5
19023   rm -rf conftest*
19024   ol_cv_db_db_1=no
19025 fi
19026 rm -f conftest*
19027
19028         LIBS="$ol_LIBS"
19029
19030 fi
19031
19032 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19033
19034         if test $ol_cv_db_db_1 = yes ; then
19035                 ol_cv_lib_db=-ldb-1
19036         fi
19037 fi
19038
19039
19040         if test "$ol_cv_lib_db" != no ; then
19041                 ol_cv_berkeley_db=yes
19042                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19043 echo "configure:19044: checking for Berkeley DB thread support" >&5
19044 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19045   echo $ac_n "(cached) $ac_c" 1>&6
19046 else
19047   
19048         ol_LIBS="$LIBS"
19049         LIBS="$LTHREAD_LIBS $LIBS"
19050         if test $ol_cv_lib_db != yes ; then
19051                 LIBS="$ol_cv_lib_db $LIBS"
19052         fi
19053
19054         if test "$cross_compiling" = yes; then
19055   ol_cv_berkeley_db_thread=cross
19056 else
19057   cat > conftest.$ac_ext <<EOF
19058 #line 19059 "configure"
19059 #include "confdefs.h"
19060
19061 #ifdef HAVE_DB_185_H
19062         choke me;
19063 #else
19064 #include <db.h>
19065 #endif
19066 #ifndef NULL
19067 #define NULL ((void *)0)
19068 #endif
19069 main()
19070 {
19071         int rc;
19072         u_int32_t flags = DB_CREATE |
19073 #ifdef DB_PRIVATE
19074                 DB_PRIVATE |
19075 #endif
19076                 DB_THREAD;
19077
19078 #if DB_VERSION_MAJOR > 2
19079         DB_ENV *env = NULL;
19080
19081         rc = db_env_create( &env, 0 );
19082
19083         flags |= DB_INIT_MPOOL;
19084 #ifdef DB_MPOOL_PRIVATE
19085         flags |= DB_MPOOL_PRIVATE;
19086 #endif
19087
19088         if( rc ) {
19089                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19090                 return rc;
19091         }
19092
19093 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19094         rc = env->open( env, NULL, flags, 0 );
19095 #else
19096         rc = env->open( env, NULL, NULL, flags, 0 );
19097 #endif
19098
19099         if ( rc == 0 ) {
19100                 rc = env->close( env, 0 );
19101         }
19102
19103         if( rc ) {
19104                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19105                 return rc;
19106         }
19107
19108 #else
19109         DB_ENV env;
19110         memset( &env, '\0', sizeof(env) );
19111
19112         rc = db_appinit( NULL, NULL, &env, flags );
19113
19114         if( rc == 0 ) {
19115                 db_appexit( &env );
19116         }
19117
19118         unlink("__db_mpool.share");
19119         unlink("__db_lock.share");
19120 #endif
19121
19122         return rc;
19123 }
19124 EOF
19125 if { (eval echo configure:19126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19126 then
19127   ol_cv_berkeley_db_thread=yes
19128 else
19129   echo "configure: failed program was:" >&5
19130   cat conftest.$ac_ext >&5
19131   rm -fr conftest*
19132   ol_cv_berkeley_db_thread=no
19133 fi
19134 rm -fr conftest*
19135 fi
19136
19137
19138         LIBS="$ol_LIBS"
19139
19140 fi
19141
19142 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19143
19144         if test $ol_cv_berkeley_db_thread != no ; then
19145                 cat >> confdefs.h <<\EOF
19146 #define HAVE_BERKELEY_DB_THREAD 1
19147 EOF
19148
19149         fi
19150
19151         fi
19152 fi
19153
19154         fi
19155
19156         if test $ol_cv_berkeley_db != no ; then
19157                 cat >> confdefs.h <<\EOF
19158 #define HAVE_BERKELEY_DB 1
19159 EOF
19160
19161
19162                 ol_link_ldbm=berkeley
19163                 ol_with_ldbm_api=berkeley
19164
19165                 if test $ol_with_ldbm_type = hash ; then
19166                         cat >> confdefs.h <<\EOF
19167 #define LDBM_USE_DBHASH 1
19168 EOF
19169
19170                 else
19171                         cat >> confdefs.h <<\EOF
19172 #define LDBM_USE_DBBTREE 1
19173 EOF
19174
19175                 fi
19176
19177                                                 if test $ol_cv_lib_db != yes ; then
19178                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19179                 fi
19180         fi
19181 fi
19182
19183 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19184         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19185 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19186         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19187 echo "configure:19188: checking Berkeley DB version for BDB backend" >&5
19188 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19189   echo $ac_n "(cached) $ac_c" 1>&6
19190 else
19191   
19192         cat > conftest.$ac_ext <<EOF
19193 #line 19194 "configure"
19194 #include "confdefs.h"
19195
19196 #include <db.h>
19197
19198  /* this check could be improved */
19199 #ifndef DB_VERSION_MAJOR
19200 #       define DB_VERSION_MAJOR 1
19201 #endif
19202 #ifndef DB_VERSION_MINOR
19203 #       define DB_VERSION_MINOR 0
19204 #endif
19205
19206 /* require 4.1 or later */
19207 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19208         __db_version_compat
19209 #endif
19210         
19211 EOF
19212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19213   egrep "__db_version_compat" >/dev/null 2>&1; then
19214   rm -rf conftest*
19215   ol_cv_bdb_compat=yes
19216 else
19217   rm -rf conftest*
19218   ol_cv_bdb_compat=no
19219 fi
19220 rm -f conftest*
19221
19222 fi
19223
19224 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19225
19226
19227         if test $ol_cv_bdb_compat = yes ; then
19228                 ol_enable_bdb=yes
19229         elif test $ol_enable_bdb = yes ; then
19230                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19231         else
19232                 ol_enable_bdb=no
19233         fi
19234 fi
19235 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19236         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19237 fi
19238
19239 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19240         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19241         ol_with_ldbm_api=none
19242 fi
19243
19244 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19245         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19246 echo "configure:19247: checking for MDBM library" >&5
19247 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19248   echo $ac_n "(cached) $ac_c" 1>&6
19249 else
19250         ol_LIBS="$LIBS"
19251         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19252 echo "configure:19253: checking for mdbm_set_chain" >&5
19253 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19254   echo $ac_n "(cached) $ac_c" 1>&6
19255 else
19256   cat > conftest.$ac_ext <<EOF
19257 #line 19258 "configure"
19258 #include "confdefs.h"
19259 /* System header to define __stub macros and hopefully few prototypes,
19260     which can conflict with char mdbm_set_chain(); below.  */
19261 #include <assert.h>
19262 /* Override any gcc2 internal prototype to avoid an error.  */
19263 /* We use char because int might match the return type of a gcc2
19264     builtin and then its argument prototype would still apply.  */
19265 char mdbm_set_chain();
19266 char (*f)();
19267
19268 int main() {
19269
19270 /* The GNU C library defines this for functions which it implements
19271     to always fail with ENOSYS.  Some functions are actually named
19272     something starting with __ and the normal name is an alias.  */
19273 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19274 choke me
19275 #else
19276 f = mdbm_set_chain;
19277 #endif
19278
19279 ; return 0; }
19280 EOF
19281 if { (eval echo configure:19282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19282   rm -rf conftest*
19283   eval "ac_cv_func_mdbm_set_chain=yes"
19284 else
19285   echo "configure: failed program was:" >&5
19286   cat conftest.$ac_ext >&5
19287   rm -rf conftest*
19288   eval "ac_cv_func_mdbm_set_chain=no"
19289 fi
19290 rm -f conftest*
19291 fi
19292
19293 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19294   echo "$ac_t""yes" 1>&6
19295   ol_cv_lib_mdbm=yes
19296 else
19297   echo "$ac_t""no" 1>&6
19298
19299                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19300 echo "configure:19301: checking for mdbm_set_chain in -lmdbm" >&5
19301 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19302 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19303   echo $ac_n "(cached) $ac_c" 1>&6
19304 else
19305   ac_save_LIBS="$LIBS"
19306 LIBS="-lmdbm  $LIBS"
19307 cat > conftest.$ac_ext <<EOF
19308 #line 19309 "configure"
19309 #include "confdefs.h"
19310 /* Override any gcc2 internal prototype to avoid an error.  */
19311 /* We use char because int might match the return type of a gcc2
19312     builtin and then its argument prototype would still apply.  */
19313 char mdbm_set_chain();
19314
19315 int main() {
19316 mdbm_set_chain()
19317 ; return 0; }
19318 EOF
19319 if { (eval echo configure:19320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19320   rm -rf conftest*
19321   eval "ac_cv_lib_$ac_lib_var=yes"
19322 else
19323   echo "configure: failed program was:" >&5
19324   cat conftest.$ac_ext >&5
19325   rm -rf conftest*
19326   eval "ac_cv_lib_$ac_lib_var=no"
19327 fi
19328 rm -f conftest*
19329 LIBS="$ac_save_LIBS"
19330
19331 fi
19332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19333   echo "$ac_t""yes" 1>&6
19334   ol_cv_lib_mdbm=-lmdbm
19335 else
19336   echo "$ac_t""no" 1>&6
19337 ol_cv_lib_mdbm=no
19338 fi
19339
19340         
19341 fi
19342
19343         LIBS="$ol_LIBS"
19344
19345 fi
19346
19347 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19348
19349
19350  for ac_hdr in mdbm.h
19351 do
19352 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19353 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19354 echo "configure:19355: checking for $ac_hdr" >&5
19355 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19356   echo $ac_n "(cached) $ac_c" 1>&6
19357 else
19358   cat > conftest.$ac_ext <<EOF
19359 #line 19360 "configure"
19360 #include "confdefs.h"
19361 #include <$ac_hdr>
19362 EOF
19363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19364 { (eval echo configure:19365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19366 if test -z "$ac_err"; then
19367   rm -rf conftest*
19368   eval "ac_cv_header_$ac_safe=yes"
19369 else
19370   echo "$ac_err" >&5
19371   echo "configure: failed program was:" >&5
19372   cat conftest.$ac_ext >&5
19373   rm -rf conftest*
19374   eval "ac_cv_header_$ac_safe=no"
19375 fi
19376 rm -f conftest*
19377 fi
19378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19379   echo "$ac_t""yes" 1>&6
19380     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19381   cat >> confdefs.h <<EOF
19382 #define $ac_tr_hdr 1
19383 EOF
19384  
19385 else
19386   echo "$ac_t""no" 1>&6
19387 fi
19388 done
19389
19390  echo $ac_n "checking for db""... $ac_c" 1>&6
19391 echo "configure:19392: checking for db" >&5
19392 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19393   echo $ac_n "(cached) $ac_c" 1>&6
19394 else
19395   
19396         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19397                 ol_cv_mdbm=no
19398         else
19399                 ol_cv_mdbm=yes
19400         fi
19401
19402 fi
19403
19404 echo "$ac_t""$ol_cv_mdbm" 1>&6
19405  if test $ol_cv_mdbm = yes ; then
19406         cat >> confdefs.h <<\EOF
19407 #define HAVE_MDBM 1
19408 EOF
19409
19410  fi
19411
19412
19413         if test $ol_cv_mdbm = yes ; then
19414                 ol_link_ldbm=mdbm
19415                 ol_with_ldbm_api=mdbm
19416                 if test $ol_cv_lib_mdbm != yes ; then
19417                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19418                 fi
19419         fi
19420 fi
19421
19422 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19423         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19424 echo "configure:19425: checking for GDBM library" >&5
19425 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19426   echo $ac_n "(cached) $ac_c" 1>&6
19427 else
19428         ol_LIBS="$LIBS"
19429         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19430 echo "configure:19431: checking for gdbm_open" >&5
19431 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19432   echo $ac_n "(cached) $ac_c" 1>&6
19433 else
19434   cat > conftest.$ac_ext <<EOF
19435 #line 19436 "configure"
19436 #include "confdefs.h"
19437 /* System header to define __stub macros and hopefully few prototypes,
19438     which can conflict with char gdbm_open(); below.  */
19439 #include <assert.h>
19440 /* Override any gcc2 internal prototype to avoid an error.  */
19441 /* We use char because int might match the return type of a gcc2
19442     builtin and then its argument prototype would still apply.  */
19443 char gdbm_open();
19444 char (*f)();
19445
19446 int main() {
19447
19448 /* The GNU C library defines this for functions which it implements
19449     to always fail with ENOSYS.  Some functions are actually named
19450     something starting with __ and the normal name is an alias.  */
19451 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19452 choke me
19453 #else
19454 f = gdbm_open;
19455 #endif
19456
19457 ; return 0; }
19458 EOF
19459 if { (eval echo configure:19460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19460   rm -rf conftest*
19461   eval "ac_cv_func_gdbm_open=yes"
19462 else
19463   echo "configure: failed program was:" >&5
19464   cat conftest.$ac_ext >&5
19465   rm -rf conftest*
19466   eval "ac_cv_func_gdbm_open=no"
19467 fi
19468 rm -f conftest*
19469 fi
19470
19471 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19472   echo "$ac_t""yes" 1>&6
19473   ol_cv_lib_gdbm=yes
19474 else
19475   echo "$ac_t""no" 1>&6
19476
19477                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19478 echo "configure:19479: checking for gdbm_open in -lgdbm" >&5
19479 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19480 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19481   echo $ac_n "(cached) $ac_c" 1>&6
19482 else
19483   ac_save_LIBS="$LIBS"
19484 LIBS="-lgdbm  $LIBS"
19485 cat > conftest.$ac_ext <<EOF
19486 #line 19487 "configure"
19487 #include "confdefs.h"
19488 /* Override any gcc2 internal prototype to avoid an error.  */
19489 /* We use char because int might match the return type of a gcc2
19490     builtin and then its argument prototype would still apply.  */
19491 char gdbm_open();
19492
19493 int main() {
19494 gdbm_open()
19495 ; return 0; }
19496 EOF
19497 if { (eval echo configure:19498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19498   rm -rf conftest*
19499   eval "ac_cv_lib_$ac_lib_var=yes"
19500 else
19501   echo "configure: failed program was:" >&5
19502   cat conftest.$ac_ext >&5
19503   rm -rf conftest*
19504   eval "ac_cv_lib_$ac_lib_var=no"
19505 fi
19506 rm -f conftest*
19507 LIBS="$ac_save_LIBS"
19508
19509 fi
19510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19511   echo "$ac_t""yes" 1>&6
19512   ol_cv_lib_gdbm=-lgdbm
19513 else
19514   echo "$ac_t""no" 1>&6
19515 ol_cv_lib_gdbm=no
19516 fi
19517
19518         
19519 fi
19520
19521         LIBS="$ol_LIBS"
19522
19523 fi
19524
19525 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19526
19527
19528  for ac_hdr in gdbm.h
19529 do
19530 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19531 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19532 echo "configure:19533: checking for $ac_hdr" >&5
19533 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19534   echo $ac_n "(cached) $ac_c" 1>&6
19535 else
19536   cat > conftest.$ac_ext <<EOF
19537 #line 19538 "configure"
19538 #include "confdefs.h"
19539 #include <$ac_hdr>
19540 EOF
19541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19542 { (eval echo configure:19543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19544 if test -z "$ac_err"; then
19545   rm -rf conftest*
19546   eval "ac_cv_header_$ac_safe=yes"
19547 else
19548   echo "$ac_err" >&5
19549   echo "configure: failed program was:" >&5
19550   cat conftest.$ac_ext >&5
19551   rm -rf conftest*
19552   eval "ac_cv_header_$ac_safe=no"
19553 fi
19554 rm -f conftest*
19555 fi
19556 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19557   echo "$ac_t""yes" 1>&6
19558     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19559   cat >> confdefs.h <<EOF
19560 #define $ac_tr_hdr 1
19561 EOF
19562  
19563 else
19564   echo "$ac_t""no" 1>&6
19565 fi
19566 done
19567
19568  echo $ac_n "checking for db""... $ac_c" 1>&6
19569 echo "configure:19570: checking for db" >&5
19570 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19571   echo $ac_n "(cached) $ac_c" 1>&6
19572 else
19573   
19574         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19575                 ol_cv_gdbm=no
19576         else
19577                 ol_cv_gdbm=yes
19578         fi
19579
19580 fi
19581
19582 echo "$ac_t""$ol_cv_gdbm" 1>&6
19583  if test $ol_cv_gdbm = yes ; then
19584         cat >> confdefs.h <<\EOF
19585 #define HAVE_GDBM 1
19586 EOF
19587
19588  fi
19589
19590
19591         if test $ol_cv_gdbm = yes ; then
19592                 ol_link_ldbm=gdbm
19593                 ol_with_ldbm_api=gdbm
19594
19595                 if test $ol_cv_lib_gdbm != yes ; then
19596                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19597                 fi
19598         fi
19599 fi
19600
19601 if test $ol_with_ldbm_api = ndbm ; then
19602         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19603 echo "configure:19604: checking for NDBM library" >&5
19604 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19605   echo $ac_n "(cached) $ac_c" 1>&6
19606 else
19607         ol_LIBS="$LIBS"
19608         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19609 echo "configure:19610: checking for dbm_open" >&5
19610 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   cat > conftest.$ac_ext <<EOF
19614 #line 19615 "configure"
19615 #include "confdefs.h"
19616 /* System header to define __stub macros and hopefully few prototypes,
19617     which can conflict with char dbm_open(); below.  */
19618 #include <assert.h>
19619 /* Override any gcc2 internal prototype to avoid an error.  */
19620 /* We use char because int might match the return type of a gcc2
19621     builtin and then its argument prototype would still apply.  */
19622 char dbm_open();
19623 char (*f)();
19624
19625 int main() {
19626
19627 /* The GNU C library defines this for functions which it implements
19628     to always fail with ENOSYS.  Some functions are actually named
19629     something starting with __ and the normal name is an alias.  */
19630 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19631 choke me
19632 #else
19633 f = dbm_open;
19634 #endif
19635
19636 ; return 0; }
19637 EOF
19638 if { (eval echo configure:19639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19639   rm -rf conftest*
19640   eval "ac_cv_func_dbm_open=yes"
19641 else
19642   echo "configure: failed program was:" >&5
19643   cat conftest.$ac_ext >&5
19644   rm -rf conftest*
19645   eval "ac_cv_func_dbm_open=no"
19646 fi
19647 rm -f conftest*
19648 fi
19649
19650 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19651   echo "$ac_t""yes" 1>&6
19652   ol_cv_lib_ndbm=yes
19653 else
19654   echo "$ac_t""no" 1>&6
19655
19656                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19657 echo "configure:19658: checking for dbm_open in -lndbm" >&5
19658 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19659 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19660   echo $ac_n "(cached) $ac_c" 1>&6
19661 else
19662   ac_save_LIBS="$LIBS"
19663 LIBS="-lndbm  $LIBS"
19664 cat > conftest.$ac_ext <<EOF
19665 #line 19666 "configure"
19666 #include "confdefs.h"
19667 /* Override any gcc2 internal prototype to avoid an error.  */
19668 /* We use char because int might match the return type of a gcc2
19669     builtin and then its argument prototype would still apply.  */
19670 char dbm_open();
19671
19672 int main() {
19673 dbm_open()
19674 ; return 0; }
19675 EOF
19676 if { (eval echo configure:19677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19677   rm -rf conftest*
19678   eval "ac_cv_lib_$ac_lib_var=yes"
19679 else
19680   echo "configure: failed program was:" >&5
19681   cat conftest.$ac_ext >&5
19682   rm -rf conftest*
19683   eval "ac_cv_lib_$ac_lib_var=no"
19684 fi
19685 rm -f conftest*
19686 LIBS="$ac_save_LIBS"
19687
19688 fi
19689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19690   echo "$ac_t""yes" 1>&6
19691   ol_cv_lib_ndbm=-lndbm
19692 else
19693   echo "$ac_t""no" 1>&6
19694
19695                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19696 echo "configure:19697: checking for dbm_open in -ldbm" >&5
19697 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19698 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19699   echo $ac_n "(cached) $ac_c" 1>&6
19700 else
19701   ac_save_LIBS="$LIBS"
19702 LIBS="-ldbm  $LIBS"
19703 cat > conftest.$ac_ext <<EOF
19704 #line 19705 "configure"
19705 #include "confdefs.h"
19706 /* Override any gcc2 internal prototype to avoid an error.  */
19707 /* We use char because int might match the return type of a gcc2
19708     builtin and then its argument prototype would still apply.  */
19709 char dbm_open();
19710
19711 int main() {
19712 dbm_open()
19713 ; return 0; }
19714 EOF
19715 if { (eval echo configure:19716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19716   rm -rf conftest*
19717   eval "ac_cv_lib_$ac_lib_var=yes"
19718 else
19719   echo "configure: failed program was:" >&5
19720   cat conftest.$ac_ext >&5
19721   rm -rf conftest*
19722   eval "ac_cv_lib_$ac_lib_var=no"
19723 fi
19724 rm -f conftest*
19725 LIBS="$ac_save_LIBS"
19726
19727 fi
19728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19729   echo "$ac_t""yes" 1>&6
19730   ol_cv_lib_ndbm=-ldbm
19731 else
19732   echo "$ac_t""no" 1>&6
19733 ol_cv_lib_ndbm=no
19734 fi
19735                 
19736 fi
19737
19738         
19739 fi
19740
19741         LIBS="$ol_LIBS"
19742
19743 fi
19744
19745 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19746
19747
19748  for ac_hdr in ndbm.h
19749 do
19750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19752 echo "configure:19753: checking for $ac_hdr" >&5
19753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19754   echo $ac_n "(cached) $ac_c" 1>&6
19755 else
19756   cat > conftest.$ac_ext <<EOF
19757 #line 19758 "configure"
19758 #include "confdefs.h"
19759 #include <$ac_hdr>
19760 EOF
19761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19762 { (eval echo configure:19763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19764 if test -z "$ac_err"; then
19765   rm -rf conftest*
19766   eval "ac_cv_header_$ac_safe=yes"
19767 else
19768   echo "$ac_err" >&5
19769   echo "configure: failed program was:" >&5
19770   cat conftest.$ac_ext >&5
19771   rm -rf conftest*
19772   eval "ac_cv_header_$ac_safe=no"
19773 fi
19774 rm -f conftest*
19775 fi
19776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19777   echo "$ac_t""yes" 1>&6
19778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19779   cat >> confdefs.h <<EOF
19780 #define $ac_tr_hdr 1
19781 EOF
19782  
19783 else
19784   echo "$ac_t""no" 1>&6
19785 fi
19786 done
19787
19788  echo $ac_n "checking for db""... $ac_c" 1>&6
19789 echo "configure:19790: checking for db" >&5
19790 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19791   echo $ac_n "(cached) $ac_c" 1>&6
19792 else
19793   
19794         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19795                 ol_cv_ndbm=no
19796         else
19797                 ol_cv_ndbm=yes
19798         fi
19799
19800 fi
19801
19802 echo "$ac_t""$ol_cv_ndbm" 1>&6
19803  if test $ol_cv_ndbm = yes ; then
19804         cat >> confdefs.h <<\EOF
19805 #define HAVE_NDBM 1
19806 EOF
19807
19808  fi
19809
19810
19811         if test $ol_cv_ndbm = yes ; then
19812                 ol_link_ldbm=ndbm
19813                 ol_with_ldbm_api=ndbm
19814
19815                 if test $ol_cv_lib_ndbm != yes ; then
19816                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19817                 fi
19818         fi
19819 fi
19820
19821 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19822         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19823         if test $ol_enable_ldbm = yes ; then
19824                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19825         fi
19826
19827         echo "configure: warning: disabling LDBM" 1>&2
19828         ol_enable_ldbm=no
19829 fi
19830
19831
19832 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19833         BUILD_LIBS_DYNAMIC=shared
19834         cat >> confdefs.h <<\EOF
19835 #define LDAP_LIBS_DYNAMIC 1
19836 EOF
19837
19838         LTSTATIC=""
19839 else
19840         BUILD_LIBS_DYNAMIC=static
19841         LTSTATIC="-static"
19842 fi
19843
19844 if test $ol_enable_wrappers != no ; then
19845         for ac_hdr in tcpd.h
19846 do
19847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19849 echo "configure:19850: checking for $ac_hdr" >&5
19850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19851   echo $ac_n "(cached) $ac_c" 1>&6
19852 else
19853   cat > conftest.$ac_ext <<EOF
19854 #line 19855 "configure"
19855 #include "confdefs.h"
19856 #include <$ac_hdr>
19857 EOF
19858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19859 { (eval echo configure:19860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19861 if test -z "$ac_err"; then
19862   rm -rf conftest*
19863   eval "ac_cv_header_$ac_safe=yes"
19864 else
19865   echo "$ac_err" >&5
19866   echo "configure: failed program was:" >&5
19867   cat conftest.$ac_ext >&5
19868   rm -rf conftest*
19869   eval "ac_cv_header_$ac_safe=no"
19870 fi
19871 rm -f conftest*
19872 fi
19873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19874   echo "$ac_t""yes" 1>&6
19875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19876   cat >> confdefs.h <<EOF
19877 #define $ac_tr_hdr 1
19878 EOF
19879  
19880                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19881 echo "configure:19882: checking for TCP wrappers library" >&5
19882                 save_LIBS="$LIBS"
19883                 LIBS="$LIBS -lwrap"
19884                 cat > conftest.$ac_ext <<EOF
19885 #line 19886 "configure"
19886 #include "confdefs.h"
19887
19888 #include <tcpd.h>
19889 int allow_severity = 0;
19890 int deny_severity  = 0;
19891
19892 struct request_info *req;
19893                 
19894 int main() {
19895
19896 hosts_access(req)
19897                 
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   echo "$ac_t""-lwrap" 1>&6
19903                 have_wrappers=yes
19904                 LIBS="$save_LIBS"
19905 else
19906   echo "configure: failed program was:" >&5
19907   cat conftest.$ac_ext >&5
19908   rm -rf conftest*
19909   
19910                                 LIBS="$LIBS -lnsl"
19911                 cat > conftest.$ac_ext <<EOF
19912 #line 19913 "configure"
19913 #include "confdefs.h"
19914
19915 #include <tcpd.h>
19916 int allow_severity = 0;
19917 int deny_severity  = 0;
19918
19919 struct request_info *req;
19920                 
19921 int main() {
19922
19923 hosts_access(req)
19924                 
19925 ; return 0; }
19926 EOF
19927 if { (eval echo configure:19928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19928   rm -rf conftest*
19929   echo "$ac_t""-lwrap -lnsl" 1>&6
19930                 have_wrappers=yes
19931                 LIBS="$save_LIBS -lnsl"
19932 else
19933   echo "configure: failed program was:" >&5
19934   cat conftest.$ac_ext >&5
19935   rm -rf conftest*
19936   
19937                 echo "$ac_t""no" 1>&6
19938                 have_wrappers=no
19939                 LIBS=$save_LIBS
19940 fi
19941 rm -f conftest*
19942 fi
19943 rm -f conftest*
19944 else
19945   echo "$ac_t""no" 1>&6
19946 have_wrappers=no
19947 fi
19948 done
19949
19950
19951         if test $have_wrappers = yes ; then
19952                 cat >> confdefs.h <<\EOF
19953 #define HAVE_TCPD 1
19954 EOF
19955
19956                 WRAP_LIBS="-lwrap"
19957         elif test $ol_enable_wrappers = yes ; then
19958                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19959         else
19960                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19961                 WRAP_LIBS=""
19962         fi
19963 fi
19964
19965 if test $ol_enable_syslog != no ; then
19966         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19967 echo "configure:19968: checking for openlog" >&5
19968 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19969   echo $ac_n "(cached) $ac_c" 1>&6
19970 else
19971   cat > conftest.$ac_ext <<EOF
19972 #line 19973 "configure"
19973 #include "confdefs.h"
19974 /* System header to define __stub macros and hopefully few prototypes,
19975     which can conflict with char openlog(); below.  */
19976 #include <assert.h>
19977 /* Override any gcc2 internal prototype to avoid an error.  */
19978 /* We use char because int might match the return type of a gcc2
19979     builtin and then its argument prototype would still apply.  */
19980 char openlog();
19981 char (*f)();
19982
19983 int main() {
19984
19985 /* The GNU C library defines this for functions which it implements
19986     to always fail with ENOSYS.  Some functions are actually named
19987     something starting with __ and the normal name is an alias.  */
19988 #if defined (__stub_openlog) || defined (__stub___openlog)
19989 choke me
19990 #else
19991 f = openlog;
19992 #endif
19993
19994 ; return 0; }
19995 EOF
19996 if { (eval echo configure:19997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19997   rm -rf conftest*
19998   eval "ac_cv_func_openlog=yes"
19999 else
20000   echo "configure: failed program was:" >&5
20001   cat conftest.$ac_ext >&5
20002   rm -rf conftest*
20003   eval "ac_cv_func_openlog=no"
20004 fi
20005 rm -f conftest*
20006 fi
20007
20008 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20009   echo "$ac_t""yes" 1>&6
20010   :
20011 else
20012   echo "$ac_t""no" 1>&6
20013 fi
20014
20015         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20016                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20017         fi
20018         ol_enable_syslog=$ac_cv_func_openlog
20019 fi
20020
20021
20022 ol_link_sql=no
20023 if test $ol_enable_sql != no ; then
20024         for ac_hdr in sql.h sqlext.h
20025 do
20026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20028 echo "configure:20029: checking for $ac_hdr" >&5
20029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20030   echo $ac_n "(cached) $ac_c" 1>&6
20031 else
20032   cat > conftest.$ac_ext <<EOF
20033 #line 20034 "configure"
20034 #include "confdefs.h"
20035 #include <$ac_hdr>
20036 EOF
20037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20038 { (eval echo configure:20039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20040 if test -z "$ac_err"; then
20041   rm -rf conftest*
20042   eval "ac_cv_header_$ac_safe=yes"
20043 else
20044   echo "$ac_err" >&5
20045   echo "configure: failed program was:" >&5
20046   cat conftest.$ac_ext >&5
20047   rm -rf conftest*
20048   eval "ac_cv_header_$ac_safe=no"
20049 fi
20050 rm -f conftest*
20051 fi
20052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20053   echo "$ac_t""yes" 1>&6
20054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20055   cat >> confdefs.h <<EOF
20056 #define $ac_tr_hdr 1
20057 EOF
20058  
20059 else
20060   echo "$ac_t""no" 1>&6
20061 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20062         
20063 fi
20064 done
20065
20066
20067         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20068 echo "configure:20069: checking for SQLDriverConnect in -liodbc" >&5
20069 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20071   echo $ac_n "(cached) $ac_c" 1>&6
20072 else
20073   ac_save_LIBS="$LIBS"
20074 LIBS="-liodbc  $LIBS"
20075 cat > conftest.$ac_ext <<EOF
20076 #line 20077 "configure"
20077 #include "confdefs.h"
20078 /* Override any gcc2 internal prototype to avoid an error.  */
20079 /* We use char because int might match the return type of a gcc2
20080     builtin and then its argument prototype would still apply.  */
20081 char SQLDriverConnect();
20082
20083 int main() {
20084 SQLDriverConnect()
20085 ; return 0; }
20086 EOF
20087 if { (eval echo configure:20088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20088   rm -rf conftest*
20089   eval "ac_cv_lib_$ac_lib_var=yes"
20090 else
20091   echo "configure: failed program was:" >&5
20092   cat conftest.$ac_ext >&5
20093   rm -rf conftest*
20094   eval "ac_cv_lib_$ac_lib_var=no"
20095 fi
20096 rm -f conftest*
20097 LIBS="$ac_save_LIBS"
20098
20099 fi
20100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20101   echo "$ac_t""yes" 1>&6
20102   have_iodbc=yes
20103 else
20104   echo "$ac_t""no" 1>&6
20105 have_iodbc=no
20106 fi
20107
20108         if test $have_iodbc = yes ; then
20109                 ol_link_sql="-liodbc"
20110         else
20111                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20112 echo "configure:20113: checking for SQLDriverConnect in -lodbc" >&5
20113 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20115   echo $ac_n "(cached) $ac_c" 1>&6
20116 else
20117   ac_save_LIBS="$LIBS"
20118 LIBS="-lodbc  $LIBS"
20119 cat > conftest.$ac_ext <<EOF
20120 #line 20121 "configure"
20121 #include "confdefs.h"
20122 /* Override any gcc2 internal prototype to avoid an error.  */
20123 /* We use char because int might match the return type of a gcc2
20124     builtin and then its argument prototype would still apply.  */
20125 char SQLDriverConnect();
20126
20127 int main() {
20128 SQLDriverConnect()
20129 ; return 0; }
20130 EOF
20131 if { (eval echo configure:20132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20132   rm -rf conftest*
20133   eval "ac_cv_lib_$ac_lib_var=yes"
20134 else
20135   echo "configure: failed program was:" >&5
20136   cat conftest.$ac_ext >&5
20137   rm -rf conftest*
20138   eval "ac_cv_lib_$ac_lib_var=no"
20139 fi
20140 rm -f conftest*
20141 LIBS="$ac_save_LIBS"
20142
20143 fi
20144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20145   echo "$ac_t""yes" 1>&6
20146   have_odbc=yes
20147 else
20148   echo "$ac_t""no" 1>&6
20149 have_odbc=no
20150 fi
20151
20152                 if test $have_odbc = yes ; then
20153                         ol_link_sql="-lodbc"
20154                 fi
20155         fi
20156
20157         if test $ol_link_sql != no ; then
20158                 SLAPD_SQL_LIBS="$ol_link_sql"
20159
20160         elif test $ol_enable_sql != auto ; then
20161                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20162         fi
20163 fi
20164
20165 if test $ol_enable_tcl != no ; then
20166         for ac_hdr in tcl.h
20167 do
20168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20170 echo "configure:20171: checking for $ac_hdr" >&5
20171 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20172   echo $ac_n "(cached) $ac_c" 1>&6
20173 else
20174   cat > conftest.$ac_ext <<EOF
20175 #line 20176 "configure"
20176 #include "confdefs.h"
20177 #include <$ac_hdr>
20178 EOF
20179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20180 { (eval echo configure:20181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20182 if test -z "$ac_err"; then
20183   rm -rf conftest*
20184   eval "ac_cv_header_$ac_safe=yes"
20185 else
20186   echo "$ac_err" >&5
20187   echo "configure: failed program was:" >&5
20188   cat conftest.$ac_ext >&5
20189   rm -rf conftest*
20190   eval "ac_cv_header_$ac_safe=no"
20191 fi
20192 rm -f conftest*
20193 fi
20194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20195   echo "$ac_t""yes" 1>&6
20196     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20197   cat >> confdefs.h <<EOF
20198 #define $ac_tr_hdr 1
20199 EOF
20200  
20201 else
20202   echo "$ac_t""no" 1>&6
20203 fi
20204 done
20205
20206
20207         if test $ac_cv_header_tcl_h != yes ; then
20208                 have_tcl=no
20209         else
20210                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20211                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20212 echo "configure:20213: checking for main in -l$lib" >&5
20213 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20215   echo $ac_n "(cached) $ac_c" 1>&6
20216 else
20217   ac_save_LIBS="$LIBS"
20218 LIBS="-l$lib  $LIBS"
20219 cat > conftest.$ac_ext <<EOF
20220 #line 20221 "configure"
20221 #include "confdefs.h"
20222
20223 int main() {
20224 main()
20225 ; return 0; }
20226 EOF
20227 if { (eval echo configure:20228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20228   rm -rf conftest*
20229   eval "ac_cv_lib_$ac_lib_var=yes"
20230 else
20231   echo "configure: failed program was:" >&5
20232   cat conftest.$ac_ext >&5
20233   rm -rf conftest*
20234   eval "ac_cv_lib_$ac_lib_var=no"
20235 fi
20236 rm -f conftest*
20237 LIBS="$ac_save_LIBS"
20238
20239 fi
20240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20241   echo "$ac_t""yes" 1>&6
20242   have_tcl=yes
20243                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20244                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20245                            else
20246                                         MOD_TCL_LIB="-l${lib}"
20247                            fi;break
20248 else
20249   echo "$ac_t""no" 1>&6
20250 have_tcl=no
20251 fi
20252
20253                 done
20254         fi
20255
20256         if test $have_tcl != yes ; then
20257                 echo "configure: warning: could not find -ltcl" 1>&2
20258                 if test $ol_enable_tcl = yes ; then
20259                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20260                 fi
20261
20262                 ol_enable_tcl=no
20263         fi
20264 fi
20265
20266 ol_link_termcap=no
20267 for ac_hdr in termcap.h ncurses.h
20268 do
20269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20271 echo "configure:20272: checking for $ac_hdr" >&5
20272 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20273   echo $ac_n "(cached) $ac_c" 1>&6
20274 else
20275   cat > conftest.$ac_ext <<EOF
20276 #line 20277 "configure"
20277 #include "confdefs.h"
20278 #include <$ac_hdr>
20279 EOF
20280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20281 { (eval echo configure:20282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20283 if test -z "$ac_err"; then
20284   rm -rf conftest*
20285   eval "ac_cv_header_$ac_safe=yes"
20286 else
20287   echo "$ac_err" >&5
20288   echo "configure: failed program was:" >&5
20289   cat conftest.$ac_ext >&5
20290   rm -rf conftest*
20291   eval "ac_cv_header_$ac_safe=no"
20292 fi
20293 rm -f conftest*
20294 fi
20295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20296   echo "$ac_t""yes" 1>&6
20297     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20298   cat >> confdefs.h <<EOF
20299 #define $ac_tr_hdr 1
20300 EOF
20301  
20302 else
20303   echo "$ac_t""no" 1>&6
20304 fi
20305 done
20306
20307
20308 if test $ol_link_termcap = no ; then
20309         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20310 echo "configure:20311: checking for tputs in -ltermcap" >&5
20311 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   ac_save_LIBS="$LIBS"
20316 LIBS="-ltermcap  $LIBS"
20317 cat > conftest.$ac_ext <<EOF
20318 #line 20319 "configure"
20319 #include "confdefs.h"
20320 /* Override any gcc2 internal prototype to avoid an error.  */
20321 /* We use char because int might match the return type of a gcc2
20322     builtin and then its argument prototype would still apply.  */
20323 char tputs();
20324
20325 int main() {
20326 tputs()
20327 ; return 0; }
20328 EOF
20329 if { (eval echo configure:20330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20330   rm -rf conftest*
20331   eval "ac_cv_lib_$ac_lib_var=yes"
20332 else
20333   echo "configure: failed program was:" >&5
20334   cat conftest.$ac_ext >&5
20335   rm -rf conftest*
20336   eval "ac_cv_lib_$ac_lib_var=no"
20337 fi
20338 rm -f conftest*
20339 LIBS="$ac_save_LIBS"
20340
20341 fi
20342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20343   echo "$ac_t""yes" 1>&6
20344   have_termcap=yes
20345 else
20346   echo "$ac_t""no" 1>&6
20347 have_termcap=no
20348 fi
20349
20350         if test $have_termcap = yes ; then
20351                 cat >> confdefs.h <<\EOF
20352 #define HAVE_TERMCAP 1
20353 EOF
20354
20355                 ol_link_termcap=yes
20356                 TERMCAP_LIBS=-ltermcap
20357         fi
20358 fi
20359
20360 if test $ol_link_termcap = no ; then
20361         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20362 echo "configure:20363: checking for initscr in -lncurses" >&5
20363 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20365   echo $ac_n "(cached) $ac_c" 1>&6
20366 else
20367   ac_save_LIBS="$LIBS"
20368 LIBS="-lncurses  $LIBS"
20369 cat > conftest.$ac_ext <<EOF
20370 #line 20371 "configure"
20371 #include "confdefs.h"
20372 /* Override any gcc2 internal prototype to avoid an error.  */
20373 /* We use char because int might match the return type of a gcc2
20374     builtin and then its argument prototype would still apply.  */
20375 char initscr();
20376
20377 int main() {
20378 initscr()
20379 ; return 0; }
20380 EOF
20381 if { (eval echo configure:20382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20382   rm -rf conftest*
20383   eval "ac_cv_lib_$ac_lib_var=yes"
20384 else
20385   echo "configure: failed program was:" >&5
20386   cat conftest.$ac_ext >&5
20387   rm -rf conftest*
20388   eval "ac_cv_lib_$ac_lib_var=no"
20389 fi
20390 rm -f conftest*
20391 LIBS="$ac_save_LIBS"
20392
20393 fi
20394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20395   echo "$ac_t""yes" 1>&6
20396   have_ncurses=yes
20397 else
20398   echo "$ac_t""no" 1>&6
20399 have_ncurses=no
20400 fi
20401
20402         if test $have_ncurses = yes ; then
20403                 cat >> confdefs.h <<\EOF
20404 #define HAVE_NCURSES 1
20405 EOF
20406
20407                 ol_link_termcap=yes
20408                 TERMCAP_LIBS=-lncurses
20409         fi
20410 fi
20411
20412 if test $ol_link_termcap = no ; then
20413         cat >> confdefs.h <<\EOF
20414 #define NO_TERMCAP 1
20415 EOF
20416
20417         TERMCAP_LIBS=
20418 fi
20419
20420 ol_link_sasl=no
20421 ol_link_spasswd=no
20422 if test $ol_with_cyrus_sasl != no ; then
20423         for ac_hdr in sasl/sasl.h sasl.h
20424 do
20425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20427 echo "configure:20428: checking for $ac_hdr" >&5
20428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20429   echo $ac_n "(cached) $ac_c" 1>&6
20430 else
20431   cat > conftest.$ac_ext <<EOF
20432 #line 20433 "configure"
20433 #include "confdefs.h"
20434 #include <$ac_hdr>
20435 EOF
20436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20437 { (eval echo configure:20438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20439 if test -z "$ac_err"; then
20440   rm -rf conftest*
20441   eval "ac_cv_header_$ac_safe=yes"
20442 else
20443   echo "$ac_err" >&5
20444   echo "configure: failed program was:" >&5
20445   cat conftest.$ac_ext >&5
20446   rm -rf conftest*
20447   eval "ac_cv_header_$ac_safe=no"
20448 fi
20449 rm -f conftest*
20450 fi
20451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20452   echo "$ac_t""yes" 1>&6
20453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20454   cat >> confdefs.h <<EOF
20455 #define $ac_tr_hdr 1
20456 EOF
20457  
20458 else
20459   echo "$ac_t""no" 1>&6
20460 fi
20461 done
20462
20463
20464         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20465                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20466 echo "configure:20467: checking for sasl_client_init in -lsasl2" >&5
20467 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20468 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   ac_save_LIBS="$LIBS"
20472 LIBS="-lsasl2  $LIBS"
20473 cat > conftest.$ac_ext <<EOF
20474 #line 20475 "configure"
20475 #include "confdefs.h"
20476 /* Override any gcc2 internal prototype to avoid an error.  */
20477 /* We use char because int might match the return type of a gcc2
20478     builtin and then its argument prototype would still apply.  */
20479 char sasl_client_init();
20480
20481 int main() {
20482 sasl_client_init()
20483 ; return 0; }
20484 EOF
20485 if { (eval echo configure:20486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20486   rm -rf conftest*
20487   eval "ac_cv_lib_$ac_lib_var=yes"
20488 else
20489   echo "configure: failed program was:" >&5
20490   cat conftest.$ac_ext >&5
20491   rm -rf conftest*
20492   eval "ac_cv_lib_$ac_lib_var=no"
20493 fi
20494 rm -f conftest*
20495 LIBS="$ac_save_LIBS"
20496
20497 fi
20498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20499   echo "$ac_t""yes" 1>&6
20500   ol_link_sasl="-lsasl2"
20501 else
20502   echo "$ac_t""no" 1>&6
20503 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20504 echo "configure:20505: checking for sasl_client_init in -lsasl" >&5
20505 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20507   echo $ac_n "(cached) $ac_c" 1>&6
20508 else
20509   ac_save_LIBS="$LIBS"
20510 LIBS="-lsasl  $LIBS"
20511 cat > conftest.$ac_ext <<EOF
20512 #line 20513 "configure"
20513 #include "confdefs.h"
20514 /* Override any gcc2 internal prototype to avoid an error.  */
20515 /* We use char because int might match the return type of a gcc2
20516     builtin and then its argument prototype would still apply.  */
20517 char sasl_client_init();
20518
20519 int main() {
20520 sasl_client_init()
20521 ; return 0; }
20522 EOF
20523 if { (eval echo configure:20524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20524   rm -rf conftest*
20525   eval "ac_cv_lib_$ac_lib_var=yes"
20526 else
20527   echo "configure: failed program was:" >&5
20528   cat conftest.$ac_ext >&5
20529   rm -rf conftest*
20530   eval "ac_cv_lib_$ac_lib_var=no"
20531 fi
20532 rm -f conftest*
20533 LIBS="$ac_save_LIBS"
20534
20535 fi
20536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20537   echo "$ac_t""yes" 1>&6
20538   ol_link_sasl="-lsasl"
20539 else
20540   echo "$ac_t""no" 1>&6
20541 fi
20542
20543 fi
20544
20545         fi
20546
20547         if test $ol_link_sasl = no ; then
20548                 if test $ol_with_cyrus_sasl != auto ; then
20549                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20550                 else
20551                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20552                         echo "configure: warning: SASL authentication not supported!" 1>&2
20553                         if test $ol_link_tls = no ; then
20554                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20555                         fi
20556                 fi
20557         else
20558                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20559 echo "configure:20560: checking Cyrus SASL library version" >&5
20560 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20561   echo $ac_n "(cached) $ac_c" 1>&6
20562 else
20563   
20564         cat > conftest.$ac_ext <<EOF
20565 #line 20566 "configure"
20566 #include "confdefs.h"
20567
20568 #ifdef HAVE_SASL_SASL_H
20569 #include <sasl/sasl.h>
20570 #else
20571 #include <sasl.h>
20572 #endif
20573
20574 /* require 2.1.3 or later */
20575 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20576         char *__sasl_compat = "1.5.x okay";
20577 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20578         __sasl_compat "2.2+ or better okay (we guess)";
20579 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20580         && SASL_VERSION_STEP >=3
20581         __sasl_compat = "2.1.3+ or better okay";
20582 #endif
20583         
20584 EOF
20585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20586   egrep "__sasl_compat" >/dev/null 2>&1; then
20587   rm -rf conftest*
20588   ol_cv_sasl_compat=yes
20589 else
20590   rm -rf conftest*
20591   ol_cv_sasl_compat=no
20592 fi
20593 rm -f conftest*
20594
20595 fi
20596
20597 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20598
20599                 if test $ol_cv_sasl_compat = no ; then
20600                         ol_link_sasl=no
20601                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20602                 fi
20603
20604                 cat >> confdefs.h <<\EOF
20605 #define HAVE_CYRUS_SASL 1
20606 EOF
20607
20608                 SASL_LIBS="$ol_link_sasl"
20609                 if test $ol_enable_spasswd != no ; then
20610                         ol_link_spasswd=yes
20611                 fi
20612
20613                 ac_save_LIBS="$LIBS"
20614                 LIBS="$LIBS $ol_link_sasl"
20615                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20616 echo "configure:20617: checking for sasl_version" >&5
20617 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20618   echo $ac_n "(cached) $ac_c" 1>&6
20619 else
20620   cat > conftest.$ac_ext <<EOF
20621 #line 20622 "configure"
20622 #include "confdefs.h"
20623 /* System header to define __stub macros and hopefully few prototypes,
20624     which can conflict with char sasl_version(); below.  */
20625 #include <assert.h>
20626 /* Override any gcc2 internal prototype to avoid an error.  */
20627 /* We use char because int might match the return type of a gcc2
20628     builtin and then its argument prototype would still apply.  */
20629 char sasl_version();
20630 char (*f)();
20631
20632 int main() {
20633
20634 /* The GNU C library defines this for functions which it implements
20635     to always fail with ENOSYS.  Some functions are actually named
20636     something starting with __ and the normal name is an alias.  */
20637 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20638 choke me
20639 #else
20640 f = sasl_version;
20641 #endif
20642
20643 ; return 0; }
20644 EOF
20645 if { (eval echo configure:20646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20646   rm -rf conftest*
20647   eval "ac_cv_func_sasl_version=yes"
20648 else
20649   echo "configure: failed program was:" >&5
20650   cat conftest.$ac_ext >&5
20651   rm -rf conftest*
20652   eval "ac_cv_func_sasl_version=no"
20653 fi
20654 rm -f conftest*
20655 fi
20656
20657 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20658   echo "$ac_t""yes" 1>&6
20659   cat >> confdefs.h <<\EOF
20660 #define HAVE_SASL_VERSION 1
20661 EOF
20662
20663 else
20664   echo "$ac_t""no" 1>&6
20665 fi
20666
20667                 LIBS="$ac_save_LIBS"
20668         fi
20669
20670 else
20671         echo "configure: warning: SASL authentication not supported!" 1>&2
20672         if test $ol_link_tls = no ; then
20673                 echo "configure: warning: Strong authentication not supported!" 1>&2
20674         fi
20675 fi
20676
20677 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20678         dev=no
20679         if test -r /dev/urandom ; then
20680                 dev="/dev/urandom";
20681         elif test -r /idev/urandom ; then
20682                 dev="/idev/urandom";
20683         elif test -r /dev/srandom ; then
20684                 dev="/dev/srandom";
20685         elif test -r /dev/random ; then
20686                 dev="/dev/random";
20687         elif test -r /idev/random ; then
20688                 dev="/idev/random";
20689         fi
20690
20691         if test $dev != no ; then
20692                 cat >> confdefs.h <<EOF
20693 #define URANDOM_DEVICE "$dev"
20694 EOF
20695
20696         fi
20697 fi
20698
20699 ol_link_fetch=no
20700 if test $ol_with_fetch != no ; then
20701         ol_LIBS=$LIBS
20702 LIBS="-lfetch -lcom_err $LIBS"
20703 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20704 echo "configure:20705: checking fetch(3) library" >&5
20705 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20706   echo $ac_n "(cached) $ac_c" 1>&6
20707 else
20708   
20709         cat > conftest.$ac_ext <<EOF
20710 #line 20711 "configure"
20711 #include "confdefs.h"
20712
20713 #include <sys/param.h>
20714 #include <stdio.h>
20715 #include <fetch.h>
20716 int main() {
20717 struct url *u = fetchParseURL("file:///"); 
20718 ; return 0; }
20719 EOF
20720 if { (eval echo configure:20721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20721   rm -rf conftest*
20722   ol_cv_lib_fetch=yes
20723 else
20724   echo "configure: failed program was:" >&5
20725   cat conftest.$ac_ext >&5
20726   rm -rf conftest*
20727   ol_cv_lib_fetch=no
20728 fi
20729 rm -f conftest*
20730 fi
20731
20732 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20733 LIBS=$ol_LIBS
20734 if test $ol_cv_lib_fetch != no ; then
20735         ol_link_fetch="-lfetch -lcom_err"
20736         cat >> confdefs.h <<\EOF
20737 #define HAVE_FETCH 1
20738 EOF
20739
20740 fi
20741
20742
20743         if test $ol_cv_lib_fetch != no ; then
20744                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20745                 ol_link_fetch=freebsd
20746
20747         elif test $ol_with_fetch != auto ; then
20748                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20749         fi 
20750 fi
20751
20752 ol_link_readline=no
20753 if test $ol_with_readline != no ; then
20754         for ac_hdr in readline/readline.h readline/history.h
20755 do
20756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20758 echo "configure:20759: checking for $ac_hdr" >&5
20759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20760   echo $ac_n "(cached) $ac_c" 1>&6
20761 else
20762   cat > conftest.$ac_ext <<EOF
20763 #line 20764 "configure"
20764 #include "confdefs.h"
20765 #include <$ac_hdr>
20766 EOF
20767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20768 { (eval echo configure:20769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20770 if test -z "$ac_err"; then
20771   rm -rf conftest*
20772   eval "ac_cv_header_$ac_safe=yes"
20773 else
20774   echo "$ac_err" >&5
20775   echo "configure: failed program was:" >&5
20776   cat conftest.$ac_ext >&5
20777   rm -rf conftest*
20778   eval "ac_cv_header_$ac_safe=no"
20779 fi
20780 rm -f conftest*
20781 fi
20782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20783   echo "$ac_t""yes" 1>&6
20784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20785   cat >> confdefs.h <<EOF
20786 #define $ac_tr_hdr 1
20787 EOF
20788  
20789 else
20790   echo "$ac_t""no" 1>&6
20791 fi
20792 done
20793
20794
20795         if test $ac_cv_header_readline_readline_h = yes ; then
20796                 save_LIBS="$LIBS"
20797                 LIBS="$TERMCAP_LIBS $LIBS"
20798                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20799 echo "configure:20800: checking for readline in -lreadline" >&5
20800 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20802   echo $ac_n "(cached) $ac_c" 1>&6
20803 else
20804   ac_save_LIBS="$LIBS"
20805 LIBS="-lreadline  $LIBS"
20806 cat > conftest.$ac_ext <<EOF
20807 #line 20808 "configure"
20808 #include "confdefs.h"
20809 /* Override any gcc2 internal prototype to avoid an error.  */
20810 /* We use char because int might match the return type of a gcc2
20811     builtin and then its argument prototype would still apply.  */
20812 char readline();
20813
20814 int main() {
20815 readline()
20816 ; return 0; }
20817 EOF
20818 if { (eval echo configure:20819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20819   rm -rf conftest*
20820   eval "ac_cv_lib_$ac_lib_var=yes"
20821 else
20822   echo "configure: failed program was:" >&5
20823   cat conftest.$ac_ext >&5
20824   rm -rf conftest*
20825   eval "ac_cv_lib_$ac_lib_var=no"
20826 fi
20827 rm -f conftest*
20828 LIBS="$ac_save_LIBS"
20829
20830 fi
20831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20832   echo "$ac_t""yes" 1>&6
20833   have_readline=yes
20834 else
20835   echo "$ac_t""no" 1>&6
20836 have_readline=no
20837 fi
20838
20839                 LIBS="$save_LIBS"
20840                         
20841                 if test $have_readline = yes ; then
20842                         ol_with_readline=found
20843                         ol_link_readline=yes
20844
20845                         READLINE_LIBS="-lreadline"
20846                 fi
20847         fi
20848 fi
20849
20850 if test $ol_link_readline = yes ; then
20851         cat >> confdefs.h <<\EOF
20852 #define HAVE_READLINE 1
20853 EOF
20854
20855 fi
20856
20857
20858 if test $ol_enable_crypt != no ; then
20859         save_LIBS="$LIBS"
20860         LIBS="$TLS_LIBS $LIBS"
20861
20862         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20863 echo "configure:20864: checking for crypt" >&5
20864 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20865   echo $ac_n "(cached) $ac_c" 1>&6
20866 else
20867   cat > conftest.$ac_ext <<EOF
20868 #line 20869 "configure"
20869 #include "confdefs.h"
20870 /* System header to define __stub macros and hopefully few prototypes,
20871     which can conflict with char crypt(); below.  */
20872 #include <assert.h>
20873 /* Override any gcc2 internal prototype to avoid an error.  */
20874 /* We use char because int might match the return type of a gcc2
20875     builtin and then its argument prototype would still apply.  */
20876 char crypt();
20877 char (*f)();
20878
20879 int main() {
20880
20881 /* The GNU C library defines this for functions which it implements
20882     to always fail with ENOSYS.  Some functions are actually named
20883     something starting with __ and the normal name is an alias.  */
20884 #if defined (__stub_crypt) || defined (__stub___crypt)
20885 choke me
20886 #else
20887 f = crypt;
20888 #endif
20889
20890 ; return 0; }
20891 EOF
20892 if { (eval echo configure:20893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20893   rm -rf conftest*
20894   eval "ac_cv_func_crypt=yes"
20895 else
20896   echo "configure: failed program was:" >&5
20897   cat conftest.$ac_ext >&5
20898   rm -rf conftest*
20899   eval "ac_cv_func_crypt=no"
20900 fi
20901 rm -f conftest*
20902 fi
20903
20904 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20905   echo "$ac_t""yes" 1>&6
20906   have_crypt=yes
20907 else
20908   echo "$ac_t""no" 1>&6
20909
20910                 LIBS="$save_LIBS"
20911                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20912 echo "configure:20913: checking for crypt in -lcrypt" >&5
20913 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20915   echo $ac_n "(cached) $ac_c" 1>&6
20916 else
20917   ac_save_LIBS="$LIBS"
20918 LIBS="-lcrypt  $LIBS"
20919 cat > conftest.$ac_ext <<EOF
20920 #line 20921 "configure"
20921 #include "confdefs.h"
20922 /* Override any gcc2 internal prototype to avoid an error.  */
20923 /* We use char because int might match the return type of a gcc2
20924     builtin and then its argument prototype would still apply.  */
20925 char crypt();
20926
20927 int main() {
20928 crypt()
20929 ; return 0; }
20930 EOF
20931 if { (eval echo configure:20932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20932   rm -rf conftest*
20933   eval "ac_cv_lib_$ac_lib_var=yes"
20934 else
20935   echo "configure: failed program was:" >&5
20936   cat conftest.$ac_ext >&5
20937   rm -rf conftest*
20938   eval "ac_cv_lib_$ac_lib_var=no"
20939 fi
20940 rm -f conftest*
20941 LIBS="$ac_save_LIBS"
20942
20943 fi
20944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20945   echo "$ac_t""yes" 1>&6
20946   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20947                         have_crypt=yes
20948 else
20949   echo "$ac_t""no" 1>&6
20950 have_crypt=no
20951 fi
20952
20953 fi
20954
20955
20956         LIBS="$save_LIBS"
20957
20958         if test $have_crypt = yes ; then
20959                 cat >> confdefs.h <<\EOF
20960 #define HAVE_CRYPT 1
20961 EOF
20962
20963         else
20964                 echo "configure: warning: could not find crypt" 1>&2
20965                 if test $ol_enable_crypt = yes ; then
20966                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20967                 fi
20968
20969                 echo "configure: warning: disabling crypt support" 1>&2
20970                 ol_enable_crypt=no
20971         fi
20972 fi
20973
20974 if test $ol_enable_proctitle != no ; then
20975         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20976 echo "configure:20977: checking for setproctitle" >&5
20977 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20978   echo $ac_n "(cached) $ac_c" 1>&6
20979 else
20980   cat > conftest.$ac_ext <<EOF
20981 #line 20982 "configure"
20982 #include "confdefs.h"
20983 /* System header to define __stub macros and hopefully few prototypes,
20984     which can conflict with char setproctitle(); below.  */
20985 #include <assert.h>
20986 /* Override any gcc2 internal prototype to avoid an error.  */
20987 /* We use char because int might match the return type of a gcc2
20988     builtin and then its argument prototype would still apply.  */
20989 char setproctitle();
20990 char (*f)();
20991
20992 int main() {
20993
20994 /* The GNU C library defines this for functions which it implements
20995     to always fail with ENOSYS.  Some functions are actually named
20996     something starting with __ and the normal name is an alias.  */
20997 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20998 choke me
20999 #else
21000 f = setproctitle;
21001 #endif
21002
21003 ; return 0; }
21004 EOF
21005 if { (eval echo configure:21006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21006   rm -rf conftest*
21007   eval "ac_cv_func_setproctitle=yes"
21008 else
21009   echo "configure: failed program was:" >&5
21010   cat conftest.$ac_ext >&5
21011   rm -rf conftest*
21012   eval "ac_cv_func_setproctitle=no"
21013 fi
21014 rm -f conftest*
21015 fi
21016
21017 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21018   echo "$ac_t""yes" 1>&6
21019   have_setproctitle=yes
21020 else
21021   echo "$ac_t""no" 1>&6
21022
21023                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21024 echo "configure:21025: checking for setproctitle in -lutil" >&5
21025 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21027   echo $ac_n "(cached) $ac_c" 1>&6
21028 else
21029   ac_save_LIBS="$LIBS"
21030 LIBS="-lutil  $LIBS"
21031 cat > conftest.$ac_ext <<EOF
21032 #line 21033 "configure"
21033 #include "confdefs.h"
21034 /* Override any gcc2 internal prototype to avoid an error.  */
21035 /* We use char because int might match the return type of a gcc2
21036     builtin and then its argument prototype would still apply.  */
21037 char setproctitle();
21038
21039 int main() {
21040 setproctitle()
21041 ; return 0; }
21042 EOF
21043 if { (eval echo configure:21044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21044   rm -rf conftest*
21045   eval "ac_cv_lib_$ac_lib_var=yes"
21046 else
21047   echo "configure: failed program was:" >&5
21048   cat conftest.$ac_ext >&5
21049   rm -rf conftest*
21050   eval "ac_cv_lib_$ac_lib_var=no"
21051 fi
21052 rm -f conftest*
21053 LIBS="$ac_save_LIBS"
21054
21055 fi
21056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21057   echo "$ac_t""yes" 1>&6
21058   have_setproctitle=yes
21059                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21060 else
21061   echo "$ac_t""no" 1>&6
21062 have_setproctitle=no
21063                         LIBOBJS="$LIBOBJS setproctitle.o"
21064                         LIBSRCS="$LIBSRCS setproctitle.c"
21065 fi
21066
21067 fi
21068
21069
21070         if test $have_setproctitle = yes ; then
21071                 cat >> confdefs.h <<\EOF
21072 #define HAVE_SETPROCTITLE 1
21073 EOF
21074
21075         fi
21076 fi
21077
21078 if test $ol_enable_slp != no ; then
21079         for ac_hdr in slp.h 
21080 do
21081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21083 echo "configure:21084: checking for $ac_hdr" >&5
21084 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21085   echo $ac_n "(cached) $ac_c" 1>&6
21086 else
21087   cat > conftest.$ac_ext <<EOF
21088 #line 21089 "configure"
21089 #include "confdefs.h"
21090 #include <$ac_hdr>
21091 EOF
21092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21093 { (eval echo configure:21094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21095 if test -z "$ac_err"; then
21096   rm -rf conftest*
21097   eval "ac_cv_header_$ac_safe=yes"
21098 else
21099   echo "$ac_err" >&5
21100   echo "configure: failed program was:" >&5
21101   cat conftest.$ac_ext >&5
21102   rm -rf conftest*
21103   eval "ac_cv_header_$ac_safe=no"
21104 fi
21105 rm -f conftest*
21106 fi
21107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21108   echo "$ac_t""yes" 1>&6
21109     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21110   cat >> confdefs.h <<EOF
21111 #define $ac_tr_hdr 1
21112 EOF
21113  
21114 else
21115   echo "$ac_t""no" 1>&6
21116 fi
21117 done
21118
21119
21120         if test $ac_cv_header_slp_h = yes ; then
21121                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21122 echo "configure:21123: checking for SLPOpen in -lslp" >&5
21123 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21124 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21125   echo $ac_n "(cached) $ac_c" 1>&6
21126 else
21127   ac_save_LIBS="$LIBS"
21128 LIBS="-lslp  $LIBS"
21129 cat > conftest.$ac_ext <<EOF
21130 #line 21131 "configure"
21131 #include "confdefs.h"
21132 /* Override any gcc2 internal prototype to avoid an error.  */
21133 /* We use char because int might match the return type of a gcc2
21134     builtin and then its argument prototype would still apply.  */
21135 char SLPOpen();
21136
21137 int main() {
21138 SLPOpen()
21139 ; return 0; }
21140 EOF
21141 if { (eval echo configure:21142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21142   rm -rf conftest*
21143   eval "ac_cv_lib_$ac_lib_var=yes"
21144 else
21145   echo "configure: failed program was:" >&5
21146   cat conftest.$ac_ext >&5
21147   rm -rf conftest*
21148   eval "ac_cv_lib_$ac_lib_var=no"
21149 fi
21150 rm -f conftest*
21151 LIBS="$ac_save_LIBS"
21152
21153 fi
21154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21155   echo "$ac_t""yes" 1>&6
21156   have_slp=yes
21157 else
21158   echo "$ac_t""no" 1>&6
21159 have_slp=no
21160 fi
21161
21162                 if test $have_slp = yes ; then
21163                         cat >> confdefs.h <<\EOF
21164 #define HAVE_SLP 1
21165 EOF
21166
21167                         SLAPD_SLP_LIBS=-lslp
21168                 fi
21169
21170         elif test $ol_enable_slp = yes ; then
21171                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21172         fi
21173 fi
21174
21175 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21176 echo "configure:21177: checking for ANSI C header files" >&5
21177 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21178   echo $ac_n "(cached) $ac_c" 1>&6
21179 else
21180   cat > conftest.$ac_ext <<EOF
21181 #line 21182 "configure"
21182 #include "confdefs.h"
21183 #include <stdlib.h>
21184 #include <stdarg.h>
21185 #include <string.h>
21186 #include <float.h>
21187 EOF
21188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21189 { (eval echo configure:21190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21191 if test -z "$ac_err"; then
21192   rm -rf conftest*
21193   ac_cv_header_stdc=yes
21194 else
21195   echo "$ac_err" >&5
21196   echo "configure: failed program was:" >&5
21197   cat conftest.$ac_ext >&5
21198   rm -rf conftest*
21199   ac_cv_header_stdc=no
21200 fi
21201 rm -f conftest*
21202
21203 if test $ac_cv_header_stdc = yes; then
21204   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21205 cat > conftest.$ac_ext <<EOF
21206 #line 21207 "configure"
21207 #include "confdefs.h"
21208 #include <string.h>
21209 EOF
21210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21211   egrep "memchr" >/dev/null 2>&1; then
21212   :
21213 else
21214   rm -rf conftest*
21215   ac_cv_header_stdc=no
21216 fi
21217 rm -f conftest*
21218
21219 fi
21220
21221 if test $ac_cv_header_stdc = yes; then
21222   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21223 cat > conftest.$ac_ext <<EOF
21224 #line 21225 "configure"
21225 #include "confdefs.h"
21226 #include <stdlib.h>
21227 EOF
21228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21229   egrep "free" >/dev/null 2>&1; then
21230   :
21231 else
21232   rm -rf conftest*
21233   ac_cv_header_stdc=no
21234 fi
21235 rm -f conftest*
21236
21237 fi
21238
21239 if test $ac_cv_header_stdc = yes; then
21240   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21241 if test "$cross_compiling" = yes; then
21242   :
21243 else
21244   cat > conftest.$ac_ext <<EOF
21245 #line 21246 "configure"
21246 #include "confdefs.h"
21247 #include <ctype.h>
21248 #if ((' ' & 0x0FF) == 0x020)
21249 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21250 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21251 #else
21252 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21253  || ('j' <= (c) && (c) <= 'r') \
21254  || ('s' <= (c) && (c) <= 'z'))
21255 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21256 #endif
21257 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21258 int main () { int i; for (i = 0; i < 256; i++)
21259 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21260 exit (0); }
21261
21262 EOF
21263 if { (eval echo configure:21264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21264 then
21265   :
21266 else
21267   echo "configure: failed program was:" >&5
21268   cat conftest.$ac_ext >&5
21269   rm -fr conftest*
21270   ac_cv_header_stdc=no
21271 fi
21272 rm -fr conftest*
21273 fi
21274
21275 fi
21276 fi
21277
21278 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21279 if test $ac_cv_header_stdc = yes; then
21280   cat >> confdefs.h <<\EOF
21281 #define STDC_HEADERS 1
21282 EOF
21283
21284 fi
21285
21286 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21287 echo "configure:21288: checking for mode_t" >&5
21288 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21289   echo $ac_n "(cached) $ac_c" 1>&6
21290 else
21291   cat > conftest.$ac_ext <<EOF
21292 #line 21293 "configure"
21293 #include "confdefs.h"
21294 #include <sys/types.h>
21295 #if STDC_HEADERS
21296 #include <stdlib.h>
21297 #include <stddef.h>
21298 #endif
21299
21300 EOF
21301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21302   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21303   rm -rf conftest*
21304   eval "ac_cv_type_mode_t=yes"
21305 else
21306   rm -rf conftest*
21307   eval "ac_cv_type_mode_t=no"
21308 fi
21309 rm -f conftest*
21310
21311 fi
21312 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21313   echo "$ac_t""yes" 1>&6
21314 else
21315   echo "$ac_t""no" 1>&6
21316   cat >> confdefs.h <<EOF
21317 #define mode_t int
21318 EOF
21319
21320 fi
21321
21322 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21323 echo "configure:21324: checking for off_t" >&5
21324 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21325   echo $ac_n "(cached) $ac_c" 1>&6
21326 else
21327   cat > conftest.$ac_ext <<EOF
21328 #line 21329 "configure"
21329 #include "confdefs.h"
21330 #include <sys/types.h>
21331 #if STDC_HEADERS
21332 #include <stdlib.h>
21333 #include <stddef.h>
21334 #endif
21335
21336 EOF
21337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21338   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21339   rm -rf conftest*
21340   eval "ac_cv_type_off_t=yes"
21341 else
21342   rm -rf conftest*
21343   eval "ac_cv_type_off_t=no"
21344 fi
21345 rm -f conftest*
21346
21347 fi
21348 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21349   echo "$ac_t""yes" 1>&6
21350 else
21351   echo "$ac_t""no" 1>&6
21352   cat >> confdefs.h <<EOF
21353 #define off_t long
21354 EOF
21355
21356 fi
21357
21358 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21359 echo "configure:21360: checking for pid_t" >&5
21360 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21361   echo $ac_n "(cached) $ac_c" 1>&6
21362 else
21363   cat > conftest.$ac_ext <<EOF
21364 #line 21365 "configure"
21365 #include "confdefs.h"
21366 #include <sys/types.h>
21367 #if STDC_HEADERS
21368 #include <stdlib.h>
21369 #include <stddef.h>
21370 #endif
21371
21372 EOF
21373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21374   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21375   rm -rf conftest*
21376   eval "ac_cv_type_pid_t=yes"
21377 else
21378   rm -rf conftest*
21379   eval "ac_cv_type_pid_t=no"
21380 fi
21381 rm -f conftest*
21382
21383 fi
21384 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21385   echo "$ac_t""yes" 1>&6
21386 else
21387   echo "$ac_t""no" 1>&6
21388   cat >> confdefs.h <<EOF
21389 #define pid_t int
21390 EOF
21391
21392 fi
21393
21394 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21395 echo "configure:21396: checking for ptrdiff_t" >&5
21396 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21397   echo $ac_n "(cached) $ac_c" 1>&6
21398 else
21399   cat > conftest.$ac_ext <<EOF
21400 #line 21401 "configure"
21401 #include "confdefs.h"
21402 #include <stddef.h>
21403 int main() {
21404 ptrdiff_t p
21405 ; return 0; }
21406 EOF
21407 if { (eval echo configure:21408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21408   rm -rf conftest*
21409   am_cv_type_ptrdiff_t=yes
21410 else
21411   echo "configure: failed program was:" >&5
21412   cat conftest.$ac_ext >&5
21413   rm -rf conftest*
21414   am_cv_type_ptrdiff_t=no
21415 fi
21416 rm -f conftest*
21417 fi
21418
21419 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21420    if test $am_cv_type_ptrdiff_t = yes; then
21421      cat >> confdefs.h <<\EOF
21422 #define HAVE_PTRDIFF_T 1
21423 EOF
21424
21425    fi
21426
21427 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21428 echo "configure:21429: checking return type of signal handlers" >&5
21429 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21430   echo $ac_n "(cached) $ac_c" 1>&6
21431 else
21432   cat > conftest.$ac_ext <<EOF
21433 #line 21434 "configure"
21434 #include "confdefs.h"
21435 #include <sys/types.h>
21436 #include <signal.h>
21437 #ifdef signal
21438 #undef signal
21439 #endif
21440 #ifdef __cplusplus
21441 extern "C" void (*signal (int, void (*)(int)))(int);
21442 #else
21443 void (*signal ()) ();
21444 #endif
21445
21446 int main() {
21447 int i;
21448 ; return 0; }
21449 EOF
21450 if { (eval echo configure:21451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21451   rm -rf conftest*
21452   ac_cv_type_signal=void
21453 else
21454   echo "configure: failed program was:" >&5
21455   cat conftest.$ac_ext >&5
21456   rm -rf conftest*
21457   ac_cv_type_signal=int
21458 fi
21459 rm -f conftest*
21460 fi
21461
21462 echo "$ac_t""$ac_cv_type_signal" 1>&6
21463 cat >> confdefs.h <<EOF
21464 #define RETSIGTYPE $ac_cv_type_signal
21465 EOF
21466
21467
21468 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21469 echo "configure:21470: checking for size_t" >&5
21470 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21471   echo $ac_n "(cached) $ac_c" 1>&6
21472 else
21473   cat > conftest.$ac_ext <<EOF
21474 #line 21475 "configure"
21475 #include "confdefs.h"
21476 #include <sys/types.h>
21477 #if STDC_HEADERS
21478 #include <stdlib.h>
21479 #include <stddef.h>
21480 #endif
21481
21482 EOF
21483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21484   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21485   rm -rf conftest*
21486   eval "ac_cv_type_size_t=yes"
21487 else
21488   rm -rf conftest*
21489   eval "ac_cv_type_size_t=no"
21490 fi
21491 rm -f conftest*
21492
21493 fi
21494 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21495   echo "$ac_t""yes" 1>&6
21496 else
21497   echo "$ac_t""no" 1>&6
21498   cat >> confdefs.h <<EOF
21499 #define size_t unsigned
21500 EOF
21501
21502 fi
21503
21504
21505 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21506 echo "configure:21507: checking for ssize_t" >&5
21507 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21508   echo $ac_n "(cached) $ac_c" 1>&6
21509 else
21510   cat > conftest.$ac_ext <<EOF
21511 #line 21512 "configure"
21512 #include "confdefs.h"
21513 #include <sys/types.h>
21514 #if STDC_HEADERS
21515 #include <stdlib.h>
21516 #include <stddef.h>
21517 #endif
21518
21519 EOF
21520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21521   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21522   rm -rf conftest*
21523   eval "ac_cv_type_ssize_t=yes"
21524 else
21525   rm -rf conftest*
21526   eval "ac_cv_type_ssize_t=no"
21527 fi
21528 rm -f conftest*
21529
21530 fi
21531 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21532   echo "$ac_t""yes" 1>&6
21533 else
21534   echo "$ac_t""no" 1>&6
21535   cat >> confdefs.h <<EOF
21536 #define ssize_t signed int
21537 EOF
21538
21539 fi
21540
21541 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21542 echo "configure:21543: checking for caddr_t" >&5
21543 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21544   echo $ac_n "(cached) $ac_c" 1>&6
21545 else
21546   cat > conftest.$ac_ext <<EOF
21547 #line 21548 "configure"
21548 #include "confdefs.h"
21549 #include <sys/types.h>
21550 #if STDC_HEADERS
21551 #include <stdlib.h>
21552 #include <stddef.h>
21553 #endif
21554
21555 EOF
21556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21557   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21558   rm -rf conftest*
21559   eval "ac_cv_type_caddr_t=yes"
21560 else
21561   rm -rf conftest*
21562   eval "ac_cv_type_caddr_t=no"
21563 fi
21564 rm -f conftest*
21565
21566 fi
21567 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21568   echo "$ac_t""yes" 1>&6
21569 else
21570   echo "$ac_t""no" 1>&6
21571   cat >> confdefs.h <<EOF
21572 #define caddr_t char *
21573 EOF
21574
21575 fi
21576
21577
21578 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21579 echo "configure:21580: checking for socklen_t" >&5
21580 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21581   echo $ac_n "(cached) $ac_c" 1>&6
21582 else
21583   cat > conftest.$ac_ext <<EOF
21584 #line 21585 "configure"
21585 #include "confdefs.h"
21586
21587 #ifdef HAVE_SYS_TYPES_H
21588 #include <sys/types.h>
21589 #endif
21590 #ifdef HAVE_SYS_SOCKET_H
21591 #include <sys/socket.h>
21592 #endif
21593
21594 int main() {
21595 socklen_t len;
21596 ; return 0; }
21597 EOF
21598 if { (eval echo configure:21599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21599   rm -rf conftest*
21600   ol_cv_type_socklen_t=yes
21601 else
21602   echo "configure: failed program was:" >&5
21603   cat conftest.$ac_ext >&5
21604   rm -rf conftest*
21605   ol_cv_type_socklen_t=no
21606 fi
21607 rm -f conftest*
21608 fi
21609
21610 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21611   if test $ol_cv_type_socklen_t = no; then
21612     cat >> confdefs.h <<\EOF
21613 #define socklen_t int
21614 EOF
21615
21616   fi
21617  
21618 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21619 echo "configure:21620: checking for member st_blksize in aggregate type struct stat" >&5
21620 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21621   echo $ac_n "(cached) $ac_c" 1>&6
21622 else
21623   cat > conftest.$ac_ext <<EOF
21624 #line 21625 "configure"
21625 #include "confdefs.h"
21626 #include <sys/types.h>
21627 #include <sys/stat.h>
21628 int main() {
21629 struct stat foo; foo.st_blksize;
21630 ; return 0; }
21631 EOF
21632 if { (eval echo configure:21633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21633   rm -rf conftest*
21634   ac_cv_c_struct_member_st_blksize=yes
21635 else
21636   echo "configure: failed program was:" >&5
21637   cat conftest.$ac_ext >&5
21638   rm -rf conftest*
21639   ac_cv_c_struct_member_st_blksize=no
21640 fi
21641 rm -f conftest*
21642 fi
21643
21644 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21645 st_blksize="$ac_cv_c_struct_member_st_blksize"
21646 if test $ac_cv_c_struct_member_st_blksize = yes; then
21647   cat >> confdefs.h <<\EOF
21648 #define HAVE_ST_BLKSIZE 1
21649 EOF
21650
21651 fi
21652
21653 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21654 echo "configure:21655: checking whether time.h and sys/time.h may both be included" >&5
21655 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21656   echo $ac_n "(cached) $ac_c" 1>&6
21657 else
21658   cat > conftest.$ac_ext <<EOF
21659 #line 21660 "configure"
21660 #include "confdefs.h"
21661 #include <sys/types.h>
21662 #include <sys/time.h>
21663 #include <time.h>
21664 int main() {
21665 struct tm *tp;
21666 ; return 0; }
21667 EOF
21668 if { (eval echo configure:21669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21669   rm -rf conftest*
21670   ac_cv_header_time=yes
21671 else
21672   echo "configure: failed program was:" >&5
21673   cat conftest.$ac_ext >&5
21674   rm -rf conftest*
21675   ac_cv_header_time=no
21676 fi
21677 rm -f conftest*
21678 fi
21679
21680 echo "$ac_t""$ac_cv_header_time" 1>&6
21681 if test $ac_cv_header_time = yes; then
21682   cat >> confdefs.h <<\EOF
21683 #define TIME_WITH_SYS_TIME 1
21684 EOF
21685
21686 fi
21687
21688 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21689 echo "configure:21690: checking whether struct tm is in sys/time.h or time.h" >&5
21690 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21691   echo $ac_n "(cached) $ac_c" 1>&6
21692 else
21693   cat > conftest.$ac_ext <<EOF
21694 #line 21695 "configure"
21695 #include "confdefs.h"
21696 #include <sys/types.h>
21697 #include <time.h>
21698 int main() {
21699 struct tm *tp; tp->tm_sec;
21700 ; return 0; }
21701 EOF
21702 if { (eval echo configure:21703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21703   rm -rf conftest*
21704   ac_cv_struct_tm=time.h
21705 else
21706   echo "configure: failed program was:" >&5
21707   cat conftest.$ac_ext >&5
21708   rm -rf conftest*
21709   ac_cv_struct_tm=sys/time.h
21710 fi
21711 rm -f conftest*
21712 fi
21713
21714 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21715 if test $ac_cv_struct_tm = sys/time.h; then
21716   cat >> confdefs.h <<\EOF
21717 #define TM_IN_SYS_TIME 1
21718 EOF
21719
21720 fi
21721
21722 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21723 echo "configure:21724: checking for uid_t in sys/types.h" >&5
21724 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21725   echo $ac_n "(cached) $ac_c" 1>&6
21726 else
21727   cat > conftest.$ac_ext <<EOF
21728 #line 21729 "configure"
21729 #include "confdefs.h"
21730 #include <sys/types.h>
21731 EOF
21732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21733   egrep "uid_t" >/dev/null 2>&1; then
21734   rm -rf conftest*
21735   ac_cv_type_uid_t=yes
21736 else
21737   rm -rf conftest*
21738   ac_cv_type_uid_t=no
21739 fi
21740 rm -f conftest*
21741
21742 fi
21743
21744 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21745 if test $ac_cv_type_uid_t = no; then
21746   cat >> confdefs.h <<\EOF
21747 #define uid_t int
21748 EOF
21749
21750   cat >> confdefs.h <<\EOF
21751 #define gid_t int
21752 EOF
21753
21754 fi
21755
21756 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21757 echo "configure:21758: checking for sig_atomic_t" >&5
21758 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21759   echo $ac_n "(cached) $ac_c" 1>&6
21760 else
21761   cat > conftest.$ac_ext <<EOF
21762 #line 21763 "configure"
21763 #include "confdefs.h"
21764 #include <signal.h>
21765 int main() {
21766 sig_atomic_t atomic;
21767 ; return 0; }
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21770   rm -rf conftest*
21771   ol_cv_type_sig_atomic_t=yes
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775   rm -rf conftest*
21776   ol_cv_type_sig_atomic_t=no
21777 fi
21778 rm -f conftest*
21779 fi
21780
21781 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21782   if test $ol_cv_type_sig_atomic_t = no; then
21783     cat >> confdefs.h <<\EOF
21784 #define sig_atomic_t int
21785 EOF
21786
21787   fi
21788  
21789
21790
21791 # test for pw_gecos in struct passwd
21792 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21793 echo "configure:21794: checking struct passwd for pw_gecos" >&5
21794 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21795   echo $ac_n "(cached) $ac_c" 1>&6
21796 else
21797   
21798         cat > conftest.$ac_ext <<EOF
21799 #line 21800 "configure"
21800 #include "confdefs.h"
21801 #include <pwd.h>
21802 int main() {
21803
21804         struct passwd pwd;
21805         pwd.pw_gecos = pwd.pw_name;
21806
21807 ; return 0; }
21808 EOF
21809 if { (eval echo configure:21810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21810   rm -rf conftest*
21811   ol_cv_struct_passwd_pw_gecos=yes
21812 else
21813   echo "configure: failed program was:" >&5
21814   cat conftest.$ac_ext >&5
21815   rm -rf conftest*
21816   ol_cv_struct_passwd_pw_gecos=no
21817 fi
21818 rm -f conftest*
21819 fi
21820
21821 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21822 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21823         cat >> confdefs.h <<\EOF
21824 #define HAVE_PW_GECOS 1
21825 EOF
21826
21827 fi
21828
21829 # test for pw_passwd in struct passwd
21830 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21831 echo "configure:21832: checking struct passwd for pw_passwd" >&5
21832 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21833   echo $ac_n "(cached) $ac_c" 1>&6
21834 else
21835   
21836         cat > conftest.$ac_ext <<EOF
21837 #line 21838 "configure"
21838 #include "confdefs.h"
21839 #include <pwd.h>
21840 int main() {
21841
21842         struct passwd pwd;
21843         pwd.pw_passwd = pwd.pw_name;
21844
21845 ; return 0; }
21846 EOF
21847 if { (eval echo configure:21848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21848   rm -rf conftest*
21849   ol_cv_struct_passwd_pw_passwd=yes
21850 else
21851   echo "configure: failed program was:" >&5
21852   cat conftest.$ac_ext >&5
21853   rm -rf conftest*
21854   ol_cv_struct_passwd_pw_passwd=no
21855 fi
21856 rm -f conftest*
21857 fi
21858
21859 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21860 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21861         cat >> confdefs.h <<\EOF
21862 #define HAVE_PW_PASSWD 1
21863 EOF
21864
21865 fi
21866
21867
21868 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21869 echo "configure:21870: checking if toupper() requires islower()" >&5
21870 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21871   echo $ac_n "(cached) $ac_c" 1>&6
21872 else
21873   
21874         if test "$cross_compiling" = yes; then
21875   ol_cv_c_upper_lower=safe
21876 else
21877   cat > conftest.$ac_ext <<EOF
21878 #line 21879 "configure"
21879 #include "confdefs.h"
21880
21881 #include <ctype.h>
21882 main()
21883 {
21884         if ('C' == toupper('C'))
21885                 exit(0);
21886         else
21887                 exit(1);
21888 }
21889 EOF
21890 if { (eval echo configure:21891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21891 then
21892   ol_cv_c_upper_lower=no
21893 else
21894   echo "configure: failed program was:" >&5
21895   cat conftest.$ac_ext >&5
21896   rm -fr conftest*
21897   ol_cv_c_upper_lower=yes
21898 fi
21899 rm -fr conftest*
21900 fi
21901
21902 fi
21903
21904 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21905 if test $ol_cv_c_upper_lower != no ; then
21906         cat >> confdefs.h <<\EOF
21907 #define C_UPPER_LOWER 1
21908 EOF
21909
21910 fi
21911
21912 echo $ac_n "checking for working const""... $ac_c" 1>&6
21913 echo "configure:21914: checking for working const" >&5
21914 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21915   echo $ac_n "(cached) $ac_c" 1>&6
21916 else
21917   cat > conftest.$ac_ext <<EOF
21918 #line 21919 "configure"
21919 #include "confdefs.h"
21920
21921 int main() {
21922
21923 /* Ultrix mips cc rejects this.  */
21924 typedef int charset[2]; const charset x;
21925 /* SunOS 4.1.1 cc rejects this.  */
21926 char const *const *ccp;
21927 char **p;
21928 /* NEC SVR4.0.2 mips cc rejects this.  */
21929 struct point {int x, y;};
21930 static struct point const zero = {0,0};
21931 /* AIX XL C 1.02.0.0 rejects this.
21932    It does not let you subtract one const X* pointer from another in an arm
21933    of an if-expression whose if-part is not a constant expression */
21934 const char *g = "string";
21935 ccp = &g + (g ? g-g : 0);
21936 /* HPUX 7.0 cc rejects these. */
21937 ++ccp;
21938 p = (char**) ccp;
21939 ccp = (char const *const *) p;
21940 { /* SCO 3.2v4 cc rejects this.  */
21941   char *t;
21942   char const *s = 0 ? (char *) 0 : (char const *) 0;
21943
21944   *t++ = 0;
21945 }
21946 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21947   int x[] = {25, 17};
21948   const int *foo = &x[0];
21949   ++foo;
21950 }
21951 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21952   typedef const int *iptr;
21953   iptr p = 0;
21954   ++p;
21955 }
21956 { /* AIX XL C 1.02.0.0 rejects this saying
21957      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21958   struct s { int j; const int *ap[3]; };
21959   struct s *b; b->j = 5;
21960 }
21961 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21962   const int foo = 10;
21963 }
21964
21965 ; return 0; }
21966 EOF
21967 if { (eval echo configure:21968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21968   rm -rf conftest*
21969   ac_cv_c_const=yes
21970 else
21971   echo "configure: failed program was:" >&5
21972   cat conftest.$ac_ext >&5
21973   rm -rf conftest*
21974   ac_cv_c_const=no
21975 fi
21976 rm -f conftest*
21977 fi
21978
21979 echo "$ac_t""$ac_cv_c_const" 1>&6
21980 if test $ac_cv_c_const = no; then
21981   cat >> confdefs.h <<\EOF
21982 #define const 
21983 EOF
21984
21985 fi
21986
21987 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21988 echo "configure:21989: checking if compiler understands volatile" >&5
21989 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21990   echo $ac_n "(cached) $ac_c" 1>&6
21991 else
21992   cat > conftest.$ac_ext <<EOF
21993 #line 21994 "configure"
21994 #include "confdefs.h"
21995 int x, y, z;
21996 int main() {
21997 volatile int a; int * volatile b = x ? &y : &z;
21998       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21999       *b = 0;
22000 ; return 0; }
22001 EOF
22002 if { (eval echo configure:22003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22003   rm -rf conftest*
22004   ol_cv_c_volatile=yes
22005 else
22006   echo "configure: failed program was:" >&5
22007   cat conftest.$ac_ext >&5
22008   rm -rf conftest*
22009   ol_cv_c_volatile=no
22010 fi
22011 rm -f conftest*
22012 fi
22013
22014 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22015   if test $ol_cv_c_volatile = yes; then
22016     : 
22017   else
22018     cat >> confdefs.h <<\EOF
22019 #define volatile 
22020 EOF
22021
22022   fi
22023  
22024
22025 if test $cross_compiling = yes ; then
22026         cat >> confdefs.h <<\EOF
22027 #define CROSS_COMPILING 1
22028 EOF
22029
22030 else
22031         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22032 echo "configure:22033: checking whether byte ordering is bigendian" >&5
22033 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22034   echo $ac_n "(cached) $ac_c" 1>&6
22035 else
22036   ac_cv_c_bigendian=unknown
22037 # See if sys/param.h defines the BYTE_ORDER macro.
22038 cat > conftest.$ac_ext <<EOF
22039 #line 22040 "configure"
22040 #include "confdefs.h"
22041 #include <sys/types.h>
22042 #include <sys/param.h>
22043 int main() {
22044
22045 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22046  bogus endian macros
22047 #endif
22048 ; return 0; }
22049 EOF
22050 if { (eval echo configure:22051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22051   rm -rf conftest*
22052   # It does; now see whether it defined to BIG_ENDIAN or not.
22053 cat > conftest.$ac_ext <<EOF
22054 #line 22055 "configure"
22055 #include "confdefs.h"
22056 #include <sys/types.h>
22057 #include <sys/param.h>
22058 int main() {
22059
22060 #if BYTE_ORDER != BIG_ENDIAN
22061  not big endian
22062 #endif
22063 ; return 0; }
22064 EOF
22065 if { (eval echo configure:22066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22066   rm -rf conftest*
22067   ac_cv_c_bigendian=yes
22068 else
22069   echo "configure: failed program was:" >&5
22070   cat conftest.$ac_ext >&5
22071   rm -rf conftest*
22072   ac_cv_c_bigendian=no
22073 fi
22074 rm -f conftest*
22075 else
22076   echo "configure: failed program was:" >&5
22077   cat conftest.$ac_ext >&5
22078 fi
22079 rm -f conftest*
22080 if test $ac_cv_c_bigendian = unknown; then
22081 if test "$cross_compiling" = yes; then
22082     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22083 else
22084   cat > conftest.$ac_ext <<EOF
22085 #line 22086 "configure"
22086 #include "confdefs.h"
22087 main () {
22088   /* Are we little or big endian?  From Harbison&Steele.  */
22089   union
22090   {
22091     long l;
22092     char c[sizeof (long)];
22093   } u;
22094   u.l = 1;
22095   exit (u.c[sizeof (long) - 1] == 1);
22096 }
22097 EOF
22098 if { (eval echo configure:22099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22099 then
22100   ac_cv_c_bigendian=no
22101 else
22102   echo "configure: failed program was:" >&5
22103   cat conftest.$ac_ext >&5
22104   rm -fr conftest*
22105   ac_cv_c_bigendian=yes
22106 fi
22107 rm -fr conftest*
22108 fi
22109
22110 fi
22111 fi
22112
22113 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22114 if test $ac_cv_c_bigendian = yes; then
22115   cat >> confdefs.h <<\EOF
22116 #define WORDS_BIGENDIAN 1
22117 EOF
22118
22119 fi
22120
22121 fi
22122
22123 echo $ac_n "checking size of short""... $ac_c" 1>&6
22124 echo "configure:22125: checking size of short" >&5 
22125 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22126   echo $ac_n "(cached) $ac_c" 1>&6
22127 else
22128   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22129   cat > conftest.$ac_ext <<EOF
22130 #line 22131 "configure"
22131 #include "confdefs.h"
22132 #include "confdefs.h" 
22133 #include <sys/types.h> 
22134  
22135
22136 int main() {
22137 switch (0) case 0: case (sizeof (short) == $ac_size):;
22138 ; return 0; }
22139 EOF
22140 if { (eval echo configure:22141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22141   rm -rf conftest*
22142   ac_cv_sizeof_short=$ac_size
22143 else
22144   echo "configure: failed program was:" >&5
22145   cat conftest.$ac_ext >&5
22146 fi
22147 rm -f conftest* 
22148   if test x$ac_cv_sizeof_short != x ; then break; fi 
22149 done 
22150
22151 fi
22152  
22153 if test x$ac_cv_sizeof_short = x ; then 
22154   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22155 fi 
22156 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22157 cat >> confdefs.h <<EOF
22158 #define SIZEOF_SHORT $ac_cv_sizeof_short
22159 EOF
22160  
22161  
22162 echo $ac_n "checking size of int""... $ac_c" 1>&6
22163 echo "configure:22164: checking size of int" >&5 
22164 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22165   echo $ac_n "(cached) $ac_c" 1>&6
22166 else
22167   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22168   cat > conftest.$ac_ext <<EOF
22169 #line 22170 "configure"
22170 #include "confdefs.h"
22171 #include "confdefs.h" 
22172 #include <sys/types.h> 
22173  
22174
22175 int main() {
22176 switch (0) case 0: case (sizeof (int) == $ac_size):;
22177 ; return 0; }
22178 EOF
22179 if { (eval echo configure:22180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22180   rm -rf conftest*
22181   ac_cv_sizeof_int=$ac_size
22182 else
22183   echo "configure: failed program was:" >&5
22184   cat conftest.$ac_ext >&5
22185 fi
22186 rm -f conftest* 
22187   if test x$ac_cv_sizeof_int != x ; then break; fi 
22188 done 
22189
22190 fi
22191  
22192 if test x$ac_cv_sizeof_int = x ; then 
22193   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22194 fi 
22195 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22196 cat >> confdefs.h <<EOF
22197 #define SIZEOF_INT $ac_cv_sizeof_int
22198 EOF
22199  
22200  
22201 echo $ac_n "checking size of long""... $ac_c" 1>&6
22202 echo "configure:22203: checking size of long" >&5 
22203 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22204   echo $ac_n "(cached) $ac_c" 1>&6
22205 else
22206   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22207   cat > conftest.$ac_ext <<EOF
22208 #line 22209 "configure"
22209 #include "confdefs.h"
22210 #include "confdefs.h" 
22211 #include <sys/types.h> 
22212  
22213
22214 int main() {
22215 switch (0) case 0: case (sizeof (long) == $ac_size):;
22216 ; return 0; }
22217 EOF
22218 if { (eval echo configure:22219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22219   rm -rf conftest*
22220   ac_cv_sizeof_long=$ac_size
22221 else
22222   echo "configure: failed program was:" >&5
22223   cat conftest.$ac_ext >&5
22224 fi
22225 rm -f conftest* 
22226   if test x$ac_cv_sizeof_long != x ; then break; fi 
22227 done 
22228
22229 fi
22230  
22231 if test x$ac_cv_sizeof_long = x ; then 
22232   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22233 fi 
22234 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22235 cat >> confdefs.h <<EOF
22236 #define SIZEOF_LONG $ac_cv_sizeof_long
22237 EOF
22238  
22239
22240
22241 if test "$ac_cv_sizeof_int" -lt 4 ; then
22242         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22243
22244         cat >> confdefs.h <<\EOF
22245 #define LBER_INT_T long
22246 EOF
22247
22248 else
22249         cat >> confdefs.h <<\EOF
22250 #define LBER_INT_T int
22251 EOF
22252
22253 fi
22254
22255 cat >> confdefs.h <<\EOF
22256 #define LBER_LEN_T long
22257 EOF
22258
22259 cat >> confdefs.h <<\EOF
22260 #define LBER_SOCKET_T int
22261 EOF
22262
22263 cat >> confdefs.h <<\EOF
22264 #define LBER_TAG_T long
22265 EOF
22266
22267
22268 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22269 echo "configure:22270: checking for 8-bit clean memcmp" >&5
22270 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22271   echo $ac_n "(cached) $ac_c" 1>&6
22272 else
22273   if test "$cross_compiling" = yes; then
22274   ac_cv_func_memcmp_clean=no
22275 else
22276   cat > conftest.$ac_ext <<EOF
22277 #line 22278 "configure"
22278 #include "confdefs.h"
22279
22280 main()
22281 {
22282   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22283   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22284 }
22285
22286 EOF
22287 if { (eval echo configure:22288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22288 then
22289   ac_cv_func_memcmp_clean=yes
22290 else
22291   echo "configure: failed program was:" >&5
22292   cat conftest.$ac_ext >&5
22293   rm -fr conftest*
22294   ac_cv_func_memcmp_clean=no
22295 fi
22296 rm -fr conftest*
22297 fi
22298
22299 fi
22300
22301 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22302 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22303
22304 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22305 echo "configure:22306: checking for strftime" >&5
22306 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22307   echo $ac_n "(cached) $ac_c" 1>&6
22308 else
22309   cat > conftest.$ac_ext <<EOF
22310 #line 22311 "configure"
22311 #include "confdefs.h"
22312 /* System header to define __stub macros and hopefully few prototypes,
22313     which can conflict with char strftime(); below.  */
22314 #include <assert.h>
22315 /* Override any gcc2 internal prototype to avoid an error.  */
22316 /* We use char because int might match the return type of a gcc2
22317     builtin and then its argument prototype would still apply.  */
22318 char strftime();
22319 char (*f)();
22320
22321 int main() {
22322
22323 /* The GNU C library defines this for functions which it implements
22324     to always fail with ENOSYS.  Some functions are actually named
22325     something starting with __ and the normal name is an alias.  */
22326 #if defined (__stub_strftime) || defined (__stub___strftime)
22327 choke me
22328 #else
22329 f = strftime;
22330 #endif
22331
22332 ; return 0; }
22333 EOF
22334 if { (eval echo configure:22335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22335   rm -rf conftest*
22336   eval "ac_cv_func_strftime=yes"
22337 else
22338   echo "configure: failed program was:" >&5
22339   cat conftest.$ac_ext >&5
22340   rm -rf conftest*
22341   eval "ac_cv_func_strftime=no"
22342 fi
22343 rm -f conftest*
22344 fi
22345
22346 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22347   echo "$ac_t""yes" 1>&6
22348   cat >> confdefs.h <<\EOF
22349 #define HAVE_STRFTIME 1
22350 EOF
22351
22352 else
22353   echo "$ac_t""no" 1>&6
22354 # strftime is in -lintl on SCO UNIX.
22355 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22356 echo "configure:22357: checking for strftime in -lintl" >&5
22357 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22359   echo $ac_n "(cached) $ac_c" 1>&6
22360 else
22361   ac_save_LIBS="$LIBS"
22362 LIBS="-lintl  $LIBS"
22363 cat > conftest.$ac_ext <<EOF
22364 #line 22365 "configure"
22365 #include "confdefs.h"
22366 /* Override any gcc2 internal prototype to avoid an error.  */
22367 /* We use char because int might match the return type of a gcc2
22368     builtin and then its argument prototype would still apply.  */
22369 char strftime();
22370
22371 int main() {
22372 strftime()
22373 ; return 0; }
22374 EOF
22375 if { (eval echo configure:22376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22376   rm -rf conftest*
22377   eval "ac_cv_lib_$ac_lib_var=yes"
22378 else
22379   echo "configure: failed program was:" >&5
22380   cat conftest.$ac_ext >&5
22381   rm -rf conftest*
22382   eval "ac_cv_lib_$ac_lib_var=no"
22383 fi
22384 rm -f conftest*
22385 LIBS="$ac_save_LIBS"
22386
22387 fi
22388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22389   echo "$ac_t""yes" 1>&6
22390   cat >> confdefs.h <<\EOF
22391 #define HAVE_STRFTIME 1
22392 EOF
22393
22394 LIBS="-lintl $LIBS"
22395 else
22396   echo "$ac_t""no" 1>&6
22397 fi
22398
22399 fi
22400
22401
22402 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22403 echo "configure:22404: checking for inet_aton()" >&5
22404 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22405   echo $ac_n "(cached) $ac_c" 1>&6
22406 else
22407   cat > conftest.$ac_ext <<EOF
22408 #line 22409 "configure"
22409 #include "confdefs.h"
22410
22411 #ifdef HAVE_SYS_TYPES_H
22412 #       include <sys/types.h>
22413 #endif
22414 #ifdef HAVE_SYS_SOCKET_H
22415 #       include <sys/socket.h>
22416 #       ifdef HAVE_SYS_SELECT_H
22417 #               include <sys/select.h>
22418 #       endif
22419 #       include <netinet/in.h>
22420 #       ifdef HAVE_ARPA_INET_H
22421 #               include <arpa/inet.h>
22422 #       endif
22423 #endif
22424
22425 int main() {
22426 struct in_addr in;
22427 int rc = inet_aton( "255.255.255.255", &in );
22428 ; return 0; }
22429 EOF
22430 if { (eval echo configure:22431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22431   rm -rf conftest*
22432   ol_cv_func_inet_aton=yes
22433 else
22434   echo "configure: failed program was:" >&5
22435   cat conftest.$ac_ext >&5
22436   rm -rf conftest*
22437   ol_cv_func_inet_aton=no
22438 fi
22439 rm -f conftest*
22440 fi
22441
22442 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22443   if test $ol_cv_func_inet_aton != no; then
22444     cat >> confdefs.h <<\EOF
22445 #define HAVE_INET_ATON 1
22446 EOF
22447
22448   fi
22449  
22450
22451 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22452 echo "configure:22453: checking for _spawnlp" >&5
22453 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22454   echo $ac_n "(cached) $ac_c" 1>&6
22455 else
22456   cat > conftest.$ac_ext <<EOF
22457 #line 22458 "configure"
22458 #include "confdefs.h"
22459 /* System header to define __stub macros and hopefully few prototypes,
22460     which can conflict with char _spawnlp(); below.  */
22461 #include <assert.h>
22462 /* Override any gcc2 internal prototype to avoid an error.  */
22463 /* We use char because int might match the return type of a gcc2
22464     builtin and then its argument prototype would still apply.  */
22465 char _spawnlp();
22466 char (*f)();
22467
22468 int main() {
22469
22470 /* The GNU C library defines this for functions which it implements
22471     to always fail with ENOSYS.  Some functions are actually named
22472     something starting with __ and the normal name is an alias.  */
22473 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22474 choke me
22475 #else
22476 f = _spawnlp;
22477 #endif
22478
22479 ; return 0; }
22480 EOF
22481 if { (eval echo configure:22482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22482   rm -rf conftest*
22483   eval "ac_cv_func__spawnlp=yes"
22484 else
22485   echo "configure: failed program was:" >&5
22486   cat conftest.$ac_ext >&5
22487   rm -rf conftest*
22488   eval "ac_cv_func__spawnlp=no"
22489 fi
22490 rm -f conftest*
22491 fi
22492
22493 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22494   echo "$ac_t""yes" 1>&6
22495   cat >> confdefs.h <<\EOF
22496 #define HAVE_SPAWNLP 1
22497 EOF
22498
22499 else
22500   echo "$ac_t""no" 1>&6
22501 fi
22502
22503
22504 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22505 echo "configure:22506: checking for _snprintf" >&5
22506 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22507   echo $ac_n "(cached) $ac_c" 1>&6
22508 else
22509   cat > conftest.$ac_ext <<EOF
22510 #line 22511 "configure"
22511 #include "confdefs.h"
22512 /* System header to define __stub macros and hopefully few prototypes,
22513     which can conflict with char _snprintf(); below.  */
22514 #include <assert.h>
22515 /* Override any gcc2 internal prototype to avoid an error.  */
22516 /* We use char because int might match the return type of a gcc2
22517     builtin and then its argument prototype would still apply.  */
22518 char _snprintf();
22519 char (*f)();
22520
22521 int main() {
22522
22523 /* The GNU C library defines this for functions which it implements
22524     to always fail with ENOSYS.  Some functions are actually named
22525     something starting with __ and the normal name is an alias.  */
22526 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22527 choke me
22528 #else
22529 f = _snprintf;
22530 #endif
22531
22532 ; return 0; }
22533 EOF
22534 if { (eval echo configure:22535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22535   rm -rf conftest*
22536   eval "ac_cv_func__snprintf=yes"
22537 else
22538   echo "configure: failed program was:" >&5
22539   cat conftest.$ac_ext >&5
22540   rm -rf conftest*
22541   eval "ac_cv_func__snprintf=no"
22542 fi
22543 rm -f conftest*
22544 fi
22545
22546 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22547   echo "$ac_t""yes" 1>&6
22548   ac_cv_func_snprintf=yes
22549         cat >> confdefs.h <<\EOF
22550 #define snprintf _snprintf
22551 EOF
22552
22553
22554 else
22555   echo "$ac_t""no" 1>&6
22556 fi
22557
22558
22559 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22560 echo "configure:22561: checking for _vsnprintf" >&5
22561 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22562   echo $ac_n "(cached) $ac_c" 1>&6
22563 else
22564   cat > conftest.$ac_ext <<EOF
22565 #line 22566 "configure"
22566 #include "confdefs.h"
22567 /* System header to define __stub macros and hopefully few prototypes,
22568     which can conflict with char _vsnprintf(); below.  */
22569 #include <assert.h>
22570 /* Override any gcc2 internal prototype to avoid an error.  */
22571 /* We use char because int might match the return type of a gcc2
22572     builtin and then its argument prototype would still apply.  */
22573 char _vsnprintf();
22574 char (*f)();
22575
22576 int main() {
22577
22578 /* The GNU C library defines this for functions which it implements
22579     to always fail with ENOSYS.  Some functions are actually named
22580     something starting with __ and the normal name is an alias.  */
22581 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22582 choke me
22583 #else
22584 f = _vsnprintf;
22585 #endif
22586
22587 ; return 0; }
22588 EOF
22589 if { (eval echo configure:22590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22590   rm -rf conftest*
22591   eval "ac_cv_func__vsnprintf=yes"
22592 else
22593   echo "configure: failed program was:" >&5
22594   cat conftest.$ac_ext >&5
22595   rm -rf conftest*
22596   eval "ac_cv_func__vsnprintf=no"
22597 fi
22598 rm -f conftest*
22599 fi
22600
22601 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22602   echo "$ac_t""yes" 1>&6
22603   ac_cv_func_vsnprintf=yes
22604         cat >> confdefs.h <<\EOF
22605 #define vsnprintf _vsnprintf
22606 EOF
22607
22608
22609 else
22610   echo "$ac_t""no" 1>&6
22611 fi
22612
22613
22614 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22615 echo "configure:22616: checking for vprintf" >&5
22616 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22617   echo $ac_n "(cached) $ac_c" 1>&6
22618 else
22619   cat > conftest.$ac_ext <<EOF
22620 #line 22621 "configure"
22621 #include "confdefs.h"
22622 /* System header to define __stub macros and hopefully few prototypes,
22623     which can conflict with char vprintf(); below.  */
22624 #include <assert.h>
22625 /* Override any gcc2 internal prototype to avoid an error.  */
22626 /* We use char because int might match the return type of a gcc2
22627     builtin and then its argument prototype would still apply.  */
22628 char vprintf();
22629 char (*f)();
22630
22631 int main() {
22632
22633 /* The GNU C library defines this for functions which it implements
22634     to always fail with ENOSYS.  Some functions are actually named
22635     something starting with __ and the normal name is an alias.  */
22636 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22637 choke me
22638 #else
22639 f = vprintf;
22640 #endif
22641
22642 ; return 0; }
22643 EOF
22644 if { (eval echo configure:22645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22645   rm -rf conftest*
22646   eval "ac_cv_func_vprintf=yes"
22647 else
22648   echo "configure: failed program was:" >&5
22649   cat conftest.$ac_ext >&5
22650   rm -rf conftest*
22651   eval "ac_cv_func_vprintf=no"
22652 fi
22653 rm -f conftest*
22654 fi
22655
22656 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22657   echo "$ac_t""yes" 1>&6
22658   cat >> confdefs.h <<\EOF
22659 #define HAVE_VPRINTF 1
22660 EOF
22661
22662 else
22663   echo "$ac_t""no" 1>&6
22664 fi
22665
22666 if test "$ac_cv_func_vprintf" != yes; then
22667 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22668 echo "configure:22669: checking for _doprnt" >&5
22669 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22670   echo $ac_n "(cached) $ac_c" 1>&6
22671 else
22672   cat > conftest.$ac_ext <<EOF
22673 #line 22674 "configure"
22674 #include "confdefs.h"
22675 /* System header to define __stub macros and hopefully few prototypes,
22676     which can conflict with char _doprnt(); below.  */
22677 #include <assert.h>
22678 /* Override any gcc2 internal prototype to avoid an error.  */
22679 /* We use char because int might match the return type of a gcc2
22680     builtin and then its argument prototype would still apply.  */
22681 char _doprnt();
22682 char (*f)();
22683
22684 int main() {
22685
22686 /* The GNU C library defines this for functions which it implements
22687     to always fail with ENOSYS.  Some functions are actually named
22688     something starting with __ and the normal name is an alias.  */
22689 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22690 choke me
22691 #else
22692 f = _doprnt;
22693 #endif
22694
22695 ; return 0; }
22696 EOF
22697 if { (eval echo configure:22698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22698   rm -rf conftest*
22699   eval "ac_cv_func__doprnt=yes"
22700 else
22701   echo "configure: failed program was:" >&5
22702   cat conftest.$ac_ext >&5
22703   rm -rf conftest*
22704   eval "ac_cv_func__doprnt=no"
22705 fi
22706 rm -f conftest*
22707 fi
22708
22709 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22710   echo "$ac_t""yes" 1>&6
22711   cat >> confdefs.h <<\EOF
22712 #define HAVE_DOPRNT 1
22713 EOF
22714
22715 else
22716   echo "$ac_t""no" 1>&6
22717 fi
22718
22719 fi
22720
22721
22722 if test $ac_cv_func_vprintf = yes ; then
22723                 for ac_func in snprintf vsnprintf
22724 do
22725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22726 echo "configure:22727: checking for $ac_func" >&5
22727 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22728   echo $ac_n "(cached) $ac_c" 1>&6
22729 else
22730   cat > conftest.$ac_ext <<EOF
22731 #line 22732 "configure"
22732 #include "confdefs.h"
22733 /* System header to define __stub macros and hopefully few prototypes,
22734     which can conflict with char $ac_func(); below.  */
22735 #include <assert.h>
22736 /* Override any gcc2 internal prototype to avoid an error.  */
22737 /* We use char because int might match the return type of a gcc2
22738     builtin and then its argument prototype would still apply.  */
22739 char $ac_func();
22740 char (*f)();
22741
22742 int main() {
22743
22744 /* The GNU C library defines this for functions which it implements
22745     to always fail with ENOSYS.  Some functions are actually named
22746     something starting with __ and the normal name is an alias.  */
22747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22748 choke me
22749 #else
22750 f = $ac_func;
22751 #endif
22752
22753 ; return 0; }
22754 EOF
22755 if { (eval echo configure:22756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22756   rm -rf conftest*
22757   eval "ac_cv_func_$ac_func=yes"
22758 else
22759   echo "configure: failed program was:" >&5
22760   cat conftest.$ac_ext >&5
22761   rm -rf conftest*
22762   eval "ac_cv_func_$ac_func=no"
22763 fi
22764 rm -f conftest*
22765 fi
22766
22767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22768   echo "$ac_t""yes" 1>&6
22769     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22770   cat >> confdefs.h <<EOF
22771 #define $ac_tr_func 1
22772 EOF
22773  
22774 else
22775   echo "$ac_t""no" 1>&6
22776 fi
22777 done
22778
22779 fi
22780
22781 for ac_func in \
22782         bcopy                   \
22783         closesocket             \
22784         chroot                  \
22785         endgrent                \
22786         endpwent                \
22787         fcntl                   \
22788         flock                   \
22789         fstat                   \
22790         getdtablesize   \
22791         getgrgid                \
22792         gethostname             \
22793         getpass                 \
22794         getpassphrase   \
22795         getpwuid                \
22796         getpwnam                \
22797         getspnam                \
22798         gettimeofday    \
22799         initgroups              \
22800         lockf                   \
22801         memcpy                  \
22802         memmove                 \
22803         mkstemp                 \
22804         mktemp                  \
22805         pipe                    \
22806         read                    \
22807         recv                    \
22808         recvfrom                \
22809         setpwfile               \
22810         setgid                  \
22811         setegid                 \
22812         setsid                  \
22813         setuid                  \
22814         seteuid                 \
22815         sigaction               \
22816         signal                  \
22817         sigset                  \
22818         strdup                  \
22819         strerror                \
22820         strpbrk                 \
22821         strrchr                 \
22822         strsep                  \
22823         strstr                  \
22824         strtol                  \
22825         strtoul                 \
22826         strspn                  \
22827         sysconf                 \
22828         usleep                  \
22829         waitpid                 \
22830         wait4                   \
22831         write                   \
22832         send                    \
22833         sendmsg                 \
22834         sendto                  \
22835
22836 do
22837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22838 echo "configure:22839: checking for $ac_func" >&5
22839 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22840   echo $ac_n "(cached) $ac_c" 1>&6
22841 else
22842   cat > conftest.$ac_ext <<EOF
22843 #line 22844 "configure"
22844 #include "confdefs.h"
22845 /* System header to define __stub macros and hopefully few prototypes,
22846     which can conflict with char $ac_func(); below.  */
22847 #include <assert.h>
22848 /* Override any gcc2 internal prototype to avoid an error.  */
22849 /* We use char because int might match the return type of a gcc2
22850     builtin and then its argument prototype would still apply.  */
22851 char $ac_func();
22852 char (*f)();
22853
22854 int main() {
22855
22856 /* The GNU C library defines this for functions which it implements
22857     to always fail with ENOSYS.  Some functions are actually named
22858     something starting with __ and the normal name is an alias.  */
22859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22860 choke me
22861 #else
22862 f = $ac_func;
22863 #endif
22864
22865 ; return 0; }
22866 EOF
22867 if { (eval echo configure:22868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22868   rm -rf conftest*
22869   eval "ac_cv_func_$ac_func=yes"
22870 else
22871   echo "configure: failed program was:" >&5
22872   cat conftest.$ac_ext >&5
22873   rm -rf conftest*
22874   eval "ac_cv_func_$ac_func=no"
22875 fi
22876 rm -f conftest*
22877 fi
22878
22879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22880   echo "$ac_t""yes" 1>&6
22881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22882   cat >> confdefs.h <<EOF
22883 #define $ac_tr_func 1
22884 EOF
22885  
22886 else
22887   echo "$ac_t""no" 1>&6
22888 fi
22889 done
22890
22891
22892 for ac_func in getopt getpeereid
22893 do
22894 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22895 echo "configure:22896: checking for $ac_func" >&5
22896 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22897   echo $ac_n "(cached) $ac_c" 1>&6
22898 else
22899   cat > conftest.$ac_ext <<EOF
22900 #line 22901 "configure"
22901 #include "confdefs.h"
22902 /* System header to define __stub macros and hopefully few prototypes,
22903     which can conflict with char $ac_func(); below.  */
22904 #include <assert.h>
22905 /* Override any gcc2 internal prototype to avoid an error.  */
22906 /* We use char because int might match the return type of a gcc2
22907     builtin and then its argument prototype would still apply.  */
22908 char $ac_func();
22909 char (*f)();
22910
22911 int main() {
22912
22913 /* The GNU C library defines this for functions which it implements
22914     to always fail with ENOSYS.  Some functions are actually named
22915     something starting with __ and the normal name is an alias.  */
22916 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22917 choke me
22918 #else
22919 f = $ac_func;
22920 #endif
22921
22922 ; return 0; }
22923 EOF
22924 if { (eval echo configure:22925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22925   rm -rf conftest*
22926   eval "ac_cv_func_$ac_func=yes"
22927 else
22928   echo "configure: failed program was:" >&5
22929   cat conftest.$ac_ext >&5
22930   rm -rf conftest*
22931   eval "ac_cv_func_$ac_func=no"
22932 fi
22933 rm -f conftest*
22934 fi
22935
22936 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22937   echo "$ac_t""yes" 1>&6
22938     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22939   cat >> confdefs.h <<EOF
22940 #define $ac_tr_func 1
22941 EOF
22942  
22943 else
22944   echo "$ac_t""no" 1>&6
22945 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22946 fi
22947 done
22948
22949
22950
22951 if test "$ac_cv_func_getopt" != yes; then
22952         LIBSRCS="$LIBSRCS getopt.c"
22953 fi
22954 if test "$ac_cv_func_getpeereid" != yes; then
22955         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22956 echo "configure:22957: checking for msg_accrights in msghdr" >&5
22957 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22958   echo $ac_n "(cached) $ac_c" 1>&6
22959 else
22960   cat > conftest.$ac_ext <<EOF
22961 #line 22962 "configure"
22962 #include "confdefs.h"
22963 #include <sys/socket.h>
22964 int main() {
22965 struct msghdr m; m.msg_accrightslen=0
22966 ; return 0; }
22967 EOF
22968 if { (eval echo configure:22969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22969   rm -rf conftest*
22970   ol_cv_msghdr_msg_accrights=yes
22971 else
22972   echo "configure: failed program was:" >&5
22973   cat conftest.$ac_ext >&5
22974   rm -rf conftest*
22975   ol_cv_msghdr_msg_accrights=no
22976 fi
22977 rm -f conftest*
22978         
22979 fi
22980
22981 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22982   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22983         cat >> confdefs.h <<\EOF
22984 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22985 EOF
22986
22987   fi
22988
22989         LIBSRCS="$LIBSRCS getpeereid.c"
22990 fi
22991 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22992         if test "$ac_cv_func_snprintf" != yes; then
22993                 cat >> confdefs.h <<\EOF
22994 #define snprintf ber_pvt_snprintf
22995 EOF
22996
22997         fi
22998         if test "$ac_cv_func_vsnprintf" != yes; then
22999                 cat >> confdefs.h <<\EOF
23000 #define vsnprintf ber_pvt_vsnprintf
23001 EOF
23002
23003         fi
23004 fi
23005
23006 # Check Configuration
23007 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23008 echo "configure:23009: checking declaration of sys_errlist" >&5
23009 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23010   echo $ac_n "(cached) $ac_c" 1>&6
23011 else
23012   
23013         cat > conftest.$ac_ext <<EOF
23014 #line 23015 "configure"
23015 #include "confdefs.h"
23016
23017 #include <stdio.h>
23018 #include <sys/types.h>
23019 #include <errno.h>
23020 #ifdef WINNT
23021 #include <stdlib.h>
23022 #endif 
23023 int main() {
23024 char *c = (char *) *sys_errlist
23025 ; return 0; }
23026 EOF
23027 if { (eval echo configure:23028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23028   rm -rf conftest*
23029   ol_cv_dcl_sys_errlist=yes
23030         ol_cv_have_sys_errlist=yes
23031 else
23032   echo "configure: failed program was:" >&5
23033   cat conftest.$ac_ext >&5
23034   rm -rf conftest*
23035   ol_cv_dcl_sys_errlist=no
23036 fi
23037 rm -f conftest*
23038 fi
23039
23040 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23041 #
23042 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23043 if test $ol_cv_dcl_sys_errlist = no ; then
23044         cat >> confdefs.h <<\EOF
23045 #define DECL_SYS_ERRLIST 1
23046 EOF
23047
23048
23049         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23050 echo "configure:23051: checking existence of sys_errlist" >&5
23051 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23052   echo $ac_n "(cached) $ac_c" 1>&6
23053 else
23054   
23055                 cat > conftest.$ac_ext <<EOF
23056 #line 23057 "configure"
23057 #include "confdefs.h"
23058 #include <errno.h>
23059 int main() {
23060 char *c = (char *) *sys_errlist
23061 ; return 0; }
23062 EOF
23063 if { (eval echo configure:23064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23064   rm -rf conftest*
23065   ol_cv_have_sys_errlist=yes
23066 else
23067   echo "configure: failed program was:" >&5
23068   cat conftest.$ac_ext >&5
23069   rm -rf conftest*
23070   ol_cv_have_sys_errlist=no
23071 fi
23072 rm -f conftest*
23073 fi
23074
23075 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23076 fi
23077 if test $ol_cv_have_sys_errlist = yes ; then
23078         cat >> confdefs.h <<\EOF
23079 #define HAVE_SYS_ERRLIST 1
23080 EOF
23081
23082 fi
23083
23084
23085
23086 if test "$ol_enable_slapi" != no ; then
23087                         for ac_hdr in ltdl.h
23088 do
23089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23091 echo "configure:23092: checking for $ac_hdr" >&5
23092 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23093   echo $ac_n "(cached) $ac_c" 1>&6
23094 else
23095   cat > conftest.$ac_ext <<EOF
23096 #line 23097 "configure"
23097 #include "confdefs.h"
23098 #include <$ac_hdr>
23099 EOF
23100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23101 { (eval echo configure:23102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23103 if test -z "$ac_err"; then
23104   rm -rf conftest*
23105   eval "ac_cv_header_$ac_safe=yes"
23106 else
23107   echo "$ac_err" >&5
23108   echo "configure: failed program was:" >&5
23109   cat conftest.$ac_ext >&5
23110   rm -rf conftest*
23111   eval "ac_cv_header_$ac_safe=no"
23112 fi
23113 rm -f conftest*
23114 fi
23115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23116   echo "$ac_t""yes" 1>&6
23117     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23118   cat >> confdefs.h <<EOF
23119 #define $ac_tr_hdr 1
23120 EOF
23121  
23122 else
23123   echo "$ac_t""no" 1>&6
23124 fi
23125 done
23126
23127
23128         if test $ac_cv_header_ltdl_h != yes ; then
23129                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23130         fi
23131         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23132 echo "configure:23133: checking for lt_dlinit in -lltdl" >&5
23133 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23135   echo $ac_n "(cached) $ac_c" 1>&6
23136 else
23137   ac_save_LIBS="$LIBS"
23138 LIBS="-lltdl  $LIBS"
23139 cat > conftest.$ac_ext <<EOF
23140 #line 23141 "configure"
23141 #include "confdefs.h"
23142 /* Override any gcc2 internal prototype to avoid an error.  */
23143 /* We use char because int might match the return type of a gcc2
23144     builtin and then its argument prototype would still apply.  */
23145 char lt_dlinit();
23146
23147 int main() {
23148 lt_dlinit()
23149 ; return 0; }
23150 EOF
23151 if { (eval echo configure:23152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23152   rm -rf conftest*
23153   eval "ac_cv_lib_$ac_lib_var=yes"
23154 else
23155   echo "configure: failed program was:" >&5
23156   cat conftest.$ac_ext >&5
23157   rm -rf conftest*
23158   eval "ac_cv_lib_$ac_lib_var=no"
23159 fi
23160 rm -f conftest*
23161 LIBS="$ac_save_LIBS"
23162
23163 fi
23164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23165   echo "$ac_t""yes" 1>&6
23166   
23167                 SLAPI_LIBS=-lltdl
23168                 LIBSLAPI=./libslapi.a
23169                 LIBSLAPITOOLS=../libslapi.a
23170                 cat >> confdefs.h <<\EOF
23171 #define HAVE_LIBLTDL 1
23172 EOF
23173
23174         
23175 else
23176   echo "$ac_t""no" 1>&6
23177 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23178 fi
23179
23180
23181         cat >> confdefs.h <<\EOF
23182 #define LDAP_SLAPI 1
23183 EOF
23184
23185 fi
23186
23187 if test "$ol_enable_debug" != no ; then
23188         cat >> confdefs.h <<\EOF
23189 #define LDAP_DEBUG 1
23190 EOF
23191
23192 fi
23193 if test "$ol_enable_syslog" = yes ; then
23194         cat >> confdefs.h <<\EOF
23195 #define LDAP_SYSLOG 1
23196 EOF
23197
23198 fi
23199 if test "$ol_link_kbind" != no ; then
23200         cat >> confdefs.h <<\EOF
23201 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23202 EOF
23203
23204 fi
23205 if test "$ol_enable_proctitle" != no ; then
23206         cat >> confdefs.h <<\EOF
23207 #define LDAP_PROCTITLE 1
23208 EOF
23209
23210 fi
23211 if test "$ol_enable_referrals" != no ; then
23212         cat >> confdefs.h <<\EOF
23213 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23214 EOF
23215
23216 fi
23217 if test "$ol_enable_local" != no; then
23218         cat >> confdefs.h <<\EOF
23219 #define LDAP_PF_LOCAL 1
23220 EOF
23221
23222 fi
23223 if test "$ol_link_ipv6" != no; then
23224         cat >> confdefs.h <<\EOF
23225 #define LDAP_PF_INET6 1
23226 EOF
23227
23228 fi
23229 if test "$ol_enable_cleartext" != no ; then
23230         cat >> confdefs.h <<\EOF
23231 #define SLAPD_CLEARTEXT 1
23232 EOF
23233
23234 fi
23235 if test "$ol_enable_crypt" != no ; then
23236         cat >> confdefs.h <<\EOF
23237 #define SLAPD_CRYPT 1
23238 EOF
23239
23240 fi
23241 if test "$ol_link_kpasswd" != no ; then
23242         cat >> confdefs.h <<\EOF
23243 #define SLAPD_KPASSWD 1
23244 EOF
23245
23246 fi
23247 if test "$ol_link_spasswd" != no ; then
23248         cat >> confdefs.h <<\EOF
23249 #define SLAPD_SPASSWD 1
23250 EOF
23251
23252 fi
23253 if test "$ol_enable_multimaster" != no ; then
23254         cat >> confdefs.h <<\EOF
23255 #define SLAPD_MULTIMASTER 1
23256 EOF
23257
23258 fi
23259 if test "$ol_enable_phonetic" != no ; then
23260         cat >> confdefs.h <<\EOF
23261 #define SLAPD_PHONETIC 1
23262 EOF
23263
23264 fi
23265 if test "$ol_enable_rlookups" != no ; then
23266         cat >> confdefs.h <<\EOF
23267 #define SLAPD_RLOOKUPS 1
23268 EOF
23269
23270 fi
23271 if test "$ol_enable_aci" != no ; then
23272         cat >> confdefs.h <<\EOF
23273 #define SLAPD_ACI_ENABLED 1
23274 EOF
23275
23276 fi
23277
23278 if test "$ol_link_modules" != no ; then
23279         cat >> confdefs.h <<\EOF
23280 #define SLAPD_MODULES 1
23281 EOF
23282
23283         BUILD_SLAPD=yes
23284         SLAPD_MODULES_LDFLAGS="-dlopen self"
23285 fi
23286
23287 if test "$ol_enable_bdb" != no ; then
23288         cat >> confdefs.h <<\EOF
23289 #define SLAPD_BDB 1
23290 EOF
23291
23292         BUILD_SLAPD=yes
23293         BUILD_BDB=yes
23294         if test "$ol_with_bdb_module" != static ; then
23295                 cat >> confdefs.h <<\EOF
23296 #define SLAPD_BDB_DYNAMIC 1
23297 EOF
23298
23299                 BUILD_BDB=mod
23300                 BUILD_BDB_DYNAMIC=shared
23301                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23302         else
23303                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23304         fi
23305 fi
23306
23307 if test "$ol_link_dnssrv" != no ; then
23308         cat >> confdefs.h <<\EOF
23309 #define SLAPD_DNSSRV 1
23310 EOF
23311
23312         BUILD_SLAPD=yes
23313         BUILD_DNSSRV=yes
23314         if test "$ol_with_dnssrv_module" != static ; then
23315                 cat >> confdefs.h <<\EOF
23316 #define SLAPD_DNSSRV_DYNAMIC 1
23317 EOF
23318
23319                 BUILD_DNSSRV=mod
23320                 BUILD_DNSSRV_DYNAMIC=shared
23321                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23322         else
23323                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23324         fi
23325 fi
23326
23327 if test "$ol_enable_hdb" != no ; then
23328         cat >> confdefs.h <<\EOF
23329 #define SLAPD_HDB 1
23330 EOF
23331
23332         BUILD_SLAPD=yes
23333         BUILD_HDB=yes
23334         if test "$ol_with_hdb_module" != static ; then
23335                 cat >> confdefs.h <<\EOF
23336 #define SLAPD_HDB_DYNAMIC 1
23337 EOF
23338
23339                 BUILD_HDB=mod
23340                 BUILD_HDB_DYNAMIC=shared
23341                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23342         else
23343                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23344         fi
23345 fi
23346
23347 if test "$ol_enable_ldap" != no ; then
23348         cat >> confdefs.h <<\EOF
23349 #define SLAPD_LDAP 1
23350 EOF
23351
23352         BUILD_SLAPD=yes
23353         BUILD_LDAP=yes
23354         if test "$ol_with_ldap_module" != static ; then
23355                 cat >> confdefs.h <<\EOF
23356 #define SLAPD_LDAP_DYNAMIC 1
23357 EOF
23358
23359                 BUILD_LDAP=mod
23360                 BUILD_LDAP_DYNAMIC=shared
23361                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23362         else
23363                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23364         fi
23365 fi
23366
23367 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23368         cat >> confdefs.h <<\EOF
23369 #define SLAPD_LDBM 1
23370 EOF
23371
23372         BUILD_SLAPD=yes
23373         BUILD_LDBM=yes
23374         if test "$ol_with_ldbm_module" != static ; then
23375                 cat >> confdefs.h <<\EOF
23376 #define SLAPD_LDBM_DYNAMIC 1
23377 EOF
23378
23379                 BUILD_LDBM=mod
23380                 BUILD_LDBM_DYNAMIC=shared
23381                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23382         else
23383                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23384         fi
23385 fi
23386
23387 if test "$ol_enable_meta" != no ; then
23388         if test "$ol_enable_ldap" = no ; then
23389                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23390         fi
23391         if test "$ol_enable_rewrite" = no ; then
23392                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23393         fi
23394         cat >> confdefs.h <<\EOF
23395 #define SLAPD_META 1
23396 EOF
23397
23398         BUILD_SLAPD=yes
23399         BUILD_META=yes
23400         BUILD_LDAP=yes
23401         BUILD_REWRITE=yes
23402         if test "$ol_with_meta_module" != static ; then
23403                 cat >> confdefs.h <<\EOF
23404 #define SLAPD_META_DYNAMIC 1
23405 EOF
23406
23407                 BUILD_META=mod
23408                 BUILD_META_DYNAMIC=shared
23409                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23410         else
23411                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23412         fi
23413 fi
23414
23415 if test "$ol_enable_monitor" != no ; then
23416         cat >> confdefs.h <<\EOF
23417 #define SLAPD_MONITOR 1
23418 EOF
23419
23420         BUILD_SLAPD=yes
23421         BUILD_MONITOR=yes
23422         if test "$ol_with_monitor_module" != static ; then
23423                 cat >> confdefs.h <<\EOF
23424 #define SLAPD_MONITOR_DYNAMIC 1
23425 EOF
23426
23427                 BUILD_MONITOR=mod
23428                 BUILD_MONITOR_DYNAMIC=shared
23429                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23430         else
23431                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23432         fi
23433 fi
23434
23435 if test "$ol_enable_null" != no ; then
23436         cat >> confdefs.h <<\EOF
23437 #define SLAPD_NULL 1
23438 EOF
23439
23440         BUILD_SLAPD=yes
23441         BUILD_NULL=yes
23442         if test "$ol_with_null_module" != static ; then
23443                 cat >> confdefs.h <<\EOF
23444 #define SLAPD_NULL_DYNAMIC 1
23445 EOF
23446
23447                 BUILD_NULL=mod
23448                 BUILD_NULL_DYNAMIC=shared
23449                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23450         else
23451                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23452         fi
23453 fi
23454
23455 if test "$ol_enable_passwd" != no ; then
23456         cat >> confdefs.h <<\EOF
23457 #define SLAPD_PASSWD 1
23458 EOF
23459
23460         BUILD_SLAPD=yes
23461         BUILD_PASSWD=yes
23462         if test "$ol_with_passwd_module" != static ; then
23463                 cat >> confdefs.h <<\EOF
23464 #define SLAPD_PASSWD_DYNAMIC 1
23465 EOF
23466
23467                 BUILD_PASSWD=mod
23468                 BUILD_PASSWD_DYNAMIC=shared
23469                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23470         else
23471                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23472         fi
23473 fi
23474
23475 if test "$ol_link_perl" != no ; then
23476         cat >> confdefs.h <<\EOF
23477 #define SLAPD_PERL 1
23478 EOF
23479
23480         BUILD_SLAPD=yes
23481         BUILD_PERL=yes
23482         if test "$ol_with_perl_module" != static ; then
23483                 cat >> confdefs.h <<\EOF
23484 #define SLAPD_PERL_DYNAMIC 1
23485 EOF
23486
23487                 BUILD_PERL=mod
23488                 BUILD_PERL_DYNAMIC=shared
23489                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23490         else
23491                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23492         fi
23493 fi
23494
23495 if test "$ol_enable_shell" != no ; then
23496         if test "$ol_link_thread" != no ; then
23497                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23498         fi
23499         cat >> confdefs.h <<\EOF
23500 #define SLAPD_SHELL 1
23501 EOF
23502
23503         BUILD_SLAPD=yes
23504         BUILD_SHELL=yes
23505         if test "$ol_with_shell_module" != static ; then
23506                 cat >> confdefs.h <<\EOF
23507 #define SLAPD_SHELL_DYNAMIC 1
23508 EOF
23509
23510                 BUILD_SHELL=mod
23511                 BUILD_SHELL_DYNAMIC=shared
23512                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23513         else
23514                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23515         fi
23516 fi
23517
23518 if test "$ol_enable_tcl" != no ; then
23519         cat >> confdefs.h <<\EOF
23520 #define SLAPD_TCL 1
23521 EOF
23522
23523         BUILD_SLAPD=yes
23524         BUILD_TCL=yes
23525         if test "$ol_with_tcl_module" != static; then
23526                 cat >> confdefs.h <<\EOF
23527 #define SLAPD_TCL_DYNAMIC 1
23528 EOF
23529
23530                 BUILD_TCL=mod
23531                 BUILD_TCL_DYNAMIC=shared
23532                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23533         else
23534                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23535         fi
23536 fi
23537
23538 if test "$ol_link_sql" != no ; then
23539         cat >> confdefs.h <<\EOF
23540 #define SLAPD_SQL 1
23541 EOF
23542
23543         BUILD_SLAPD=yes
23544         BUILD_SQL=yes
23545         if test "$ol_with_sql_module" != static; then
23546                 cat >> confdefs.h <<\EOF
23547 #define SLAPD_SQL_DYNAMIC 1
23548 EOF
23549
23550                 BUILD_SQL=mod
23551                 BUILD_SQL_DYNAMIC=shared
23552                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23553         else
23554                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23555         fi
23556 fi
23557
23558 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23559         $BUILD_SLAPD = yes ; then
23560         BUILD_SLURPD=yes
23561 fi
23562
23563 if test "$ol_enable_rewrite" != no ; then
23564         cat >> confdefs.h <<\EOF
23565 #define ENABLE_REWRITE 1
23566 EOF
23567
23568         BUILD_REWRITE=yes
23569 fi
23570
23571 if test "$ol_enable_slapi" != no ; then
23572         cat >> confdefs.h <<\EOF
23573 #define ENABLE_SLAPI 1
23574 EOF
23575
23576         BUILD_SLAPI=yes
23577         SLAPD_SLAPI_DEPEND=libslapi.a
23578 fi
23579
23580
23581
23582 if test "$ac_cv_mingw32" = yes ; then
23583         PLAT=NT
23584         SLAPD_MODULES_LDFLAGS=
23585 else
23586         PLAT=UNIX
23587 fi
23588
23589 if test -z "$SLAPD_STATIC_BACKENDS"; then
23590         SLAPD_NO_STATIC='#'
23591 else
23592         SLAPD_NO_STATIC=
23593 fi
23594
23595
23596
23597
23598
23599
23600   
23601   
23602   
23603   
23604   
23605   
23606   
23607   
23608   
23609   
23610   
23611   
23612   
23613   
23614   
23615   
23616   
23617   
23618   
23619   
23620   
23621   
23622   
23623   
23624   
23625   
23626   
23627   
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669 # Check whether --with-xxinstall or --without-xxinstall was given.
23670 if test "${with_xxinstall+set}" = set; then
23671   withval="$with_xxinstall"
23672   :
23673 fi
23674
23675
23676
23677 trap '' 1 2 15
23678
23679 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23680
23681 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23682 # Let make expand exec_prefix.
23683 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23684
23685 # Any assignment to VPATH causes Sun make to only execute
23686 # the first set of double-colon rules, so remove it if not needed.
23687 # If there is a colon in the path, we need to keep it.
23688 if test "x$srcdir" = x.; then
23689   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23690 fi
23691
23692 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23693
23694 DEFS=-DHAVE_CONFIG_H
23695
23696 # Without the "./", some shells look in PATH for config.status.
23697 : ${CONFIG_STATUS=./config.status}
23698
23699 echo creating $CONFIG_STATUS
23700 rm -f $CONFIG_STATUS
23701 cat > $CONFIG_STATUS <<EOF
23702 #! /bin/sh
23703 # Generated automatically by configure.
23704 # Run this file to recreate the current configuration.
23705 # This directory was configured as follows,
23706 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23707 #
23708 # $0 $ac_configure_args
23709 #
23710 # Compiler output produced by configure, useful for debugging
23711 # configure, is in ./config.log if it exists.
23712
23713 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23714 for ac_option
23715 do
23716   case "\$ac_option" in
23717   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23718     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23719     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23720   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23721     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23722     exit 0 ;;
23723   -help | --help | --hel | --he | --h)
23724     echo "\$ac_cs_usage"; exit 0 ;;
23725   *) echo "\$ac_cs_usage"; exit 1 ;;
23726   esac
23727 done
23728
23729 ac_given_srcdir=$srcdir
23730 ac_given_INSTALL="$INSTALL"
23731
23732 trap 'rm -fr `echo "\
23733 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23734 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23735 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23736 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23737 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23738 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23739 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23740 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23741 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23742 include/Makefile:build/top.mk:include/Makefile.in \
23743 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23744 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23745 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23746 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23747 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23748 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23749 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23750 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23751 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23752 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23753 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23754 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23755 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23756 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23757 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23758 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23759 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23760 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23761 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23762 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23763 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23764 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23765 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23766 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23767 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23768 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23769 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23770 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23771 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23772 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23773 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23774  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23775 EOF
23776 cat >> $CONFIG_STATUS <<EOF
23777
23778 # Protect against being on the right side of a sed subst in config.status.
23779 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23780  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23781 $ac_vpsub
23782 $extrasub
23783 s%@SHELL@%$SHELL%g
23784 s%@CFLAGS@%$CFLAGS%g
23785 s%@CPPFLAGS@%$CPPFLAGS%g
23786 s%@CXXFLAGS@%$CXXFLAGS%g
23787 s%@FFLAGS@%$FFLAGS%g
23788 s%@DEFS@%$DEFS%g
23789 s%@LDFLAGS@%$LDFLAGS%g
23790 s%@LIBS@%$LIBS%g
23791 s%@exec_prefix@%$exec_prefix%g
23792 s%@prefix@%$prefix%g
23793 s%@program_transform_name@%$program_transform_name%g
23794 s%@bindir@%$bindir%g
23795 s%@sbindir@%$sbindir%g
23796 s%@libexecdir@%$libexecdir%g
23797 s%@datadir@%$datadir%g
23798 s%@sysconfdir@%$sysconfdir%g
23799 s%@sharedstatedir@%$sharedstatedir%g
23800 s%@localstatedir@%$localstatedir%g
23801 s%@libdir@%$libdir%g
23802 s%@includedir@%$includedir%g
23803 s%@oldincludedir@%$oldincludedir%g
23804 s%@infodir@%$infodir%g
23805 s%@mandir@%$mandir%g
23806 s%@host@%$host%g
23807 s%@host_alias@%$host_alias%g
23808 s%@host_cpu@%$host_cpu%g
23809 s%@host_vendor@%$host_vendor%g
23810 s%@host_os@%$host_os%g
23811 s%@target@%$target%g
23812 s%@target_alias@%$target_alias%g
23813 s%@target_cpu@%$target_cpu%g
23814 s%@target_vendor@%$target_vendor%g
23815 s%@target_os@%$target_os%g
23816 s%@build@%$build%g
23817 s%@build_alias@%$build_alias%g
23818 s%@build_cpu@%$build_cpu%g
23819 s%@build_vendor@%$build_vendor%g
23820 s%@build_os@%$build_os%g
23821 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23822 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23823 s%@INSTALL_DATA@%$INSTALL_DATA%g
23824 s%@PACKAGE@%$PACKAGE%g
23825 s%@VERSION@%$VERSION%g
23826 s%@ACLOCAL@%$ACLOCAL%g
23827 s%@AUTOCONF@%$AUTOCONF%g
23828 s%@AUTOMAKE@%$AUTOMAKE%g
23829 s%@AUTOHEADER@%$AUTOHEADER%g
23830 s%@MAKEINFO@%$MAKEINFO%g
23831 s%@install_sh@%$install_sh%g
23832 s%@AMTAR@%$AMTAR%g
23833 s%@AWK@%$AWK%g
23834 s%@AMTARFLAGS@%$AMTARFLAGS%g
23835 s%@SET_MAKE@%$SET_MAKE%g
23836 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23837 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23838 s%@top_builddir@%$top_builddir%g
23839 s%@ldap_subdir@%$ldap_subdir%g
23840 s%@CC@%$CC%g
23841 s%@AR@%$AR%g
23842 s%@LN_S@%$LN_S%g
23843 s%@OBJEXT@%$OBJEXT%g
23844 s%@EXEEXT@%$EXEEXT%g
23845 s%@ECHO@%$ECHO%g
23846 s%@RANLIB@%$RANLIB%g
23847 s%@STRIP@%$STRIP%g
23848 s%@DLLTOOL@%$DLLTOOL%g
23849 s%@AS@%$AS%g
23850 s%@OBJDUMP@%$OBJDUMP%g
23851 s%@CPP@%$CPP%g
23852 s%@LIBTOOL@%$LIBTOOL%g
23853 s%@LN_H@%$LN_H%g
23854 s%@PERLBIN@%$PERLBIN%g
23855 s%@OL_MKDEP@%$OL_MKDEP%g
23856 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23857 s%@LTSTATIC@%$LTSTATIC%g
23858 s%@LIBOBJS@%$LIBOBJS%g
23859 s%@LIBSRCS@%$LIBSRCS%g
23860 s%@PLAT@%$PLAT%g
23861 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23862 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23863 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23864 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23865 s%@BUILD_BDB@%$BUILD_BDB%g
23866 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23867 s%@BUILD_HDB@%$BUILD_HDB%g
23868 s%@BUILD_LDAP@%$BUILD_LDAP%g
23869 s%@BUILD_LDBM@%$BUILD_LDBM%g
23870 s%@BUILD_META@%$BUILD_META%g
23871 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23872 s%@BUILD_NULL@%$BUILD_NULL%g
23873 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23874 s%@BUILD_PERL@%$BUILD_PERL%g
23875 s%@BUILD_SHELL@%$BUILD_SHELL%g
23876 s%@BUILD_SQL@%$BUILD_SQL%g
23877 s%@BUILD_TCL@%$BUILD_TCL%g
23878 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23879 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23880 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23881 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23882 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23883 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23884 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23885 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23886 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23887 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23888 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23889 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23890 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23891 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23892 s%@LDAP_LIBS@%$LDAP_LIBS%g
23893 s%@LDIF_LIBS@%$LDIF_LIBS%g
23894 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23895 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23896 s%@LDBM_LIBS@%$LDBM_LIBS%g
23897 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23898 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23899 s%@WRAP_LIBS@%$WRAP_LIBS%g
23900 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23901 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23902 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23903 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23904 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23905 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23906 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23907 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23908 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23909 s%@KRB4_LIBS@%$KRB4_LIBS%g
23910 s%@KRB5_LIBS@%$KRB5_LIBS%g
23911 s%@READLINE_LIBS@%$READLINE_LIBS%g
23912 s%@SASL_LIBS@%$SASL_LIBS%g
23913 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23914 s%@TLS_LIBS@%$TLS_LIBS%g
23915 s%@MODULES_LIBS@%$MODULES_LIBS%g
23916 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23917 s%@LIBSLAPI@%$LIBSLAPI%g
23918 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23919 s%@AUTH_LIBS@%$AUTH_LIBS%g
23920 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23921 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23922 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23923 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23924
23925 CEOF
23926 EOF
23927
23928 cat >> $CONFIG_STATUS <<\EOF
23929
23930 # Split the substitutions into bite-sized pieces for seds with
23931 # small command number limits, like on Digital OSF/1 and HP-UX.
23932 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23933 ac_file=1 # Number of current file.
23934 ac_beg=1 # First line for current file.
23935 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23936 ac_more_lines=:
23937 ac_sed_cmds=""
23938 while $ac_more_lines; do
23939   if test $ac_beg -gt 1; then
23940     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23941   else
23942     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23943   fi
23944   if test ! -s conftest.s$ac_file; then
23945     ac_more_lines=false
23946     rm -f conftest.s$ac_file
23947   else
23948     if test -z "$ac_sed_cmds"; then
23949       ac_sed_cmds="sed -f conftest.s$ac_file"
23950     else
23951       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23952     fi
23953     ac_file=`expr $ac_file + 1`
23954     ac_beg=$ac_end
23955     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23956   fi
23957 done
23958 if test -z "$ac_sed_cmds"; then
23959   ac_sed_cmds=cat
23960 fi
23961 EOF
23962
23963 cat >> $CONFIG_STATUS <<EOF
23964
23965 CONFIG_FILES=\${CONFIG_FILES-"\
23966 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23967 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23968 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23969 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23970 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23971 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23972 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23973 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23974 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23975 include/Makefile:build/top.mk:include/Makefile.in \
23976 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23977 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23978 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23979 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23980 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23981 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23982 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23983 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23984 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23985 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23986 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23987 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23988 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23989 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23990 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23991 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23992 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23993 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23994 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23995 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23996 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23997 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23998 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23999 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24000 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
24001 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24002 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24003 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24004 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24005 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24006 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24007 "}
24008 EOF
24009 cat >> $CONFIG_STATUS <<\EOF
24010 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24011   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24012   case "$ac_file" in
24013   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24014        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24015   *) ac_file_in="${ac_file}.in" ;;
24016   esac
24017
24018   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24019
24020   # Remove last slash and all that follows it.  Not all systems have dirname.
24021   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24022   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24023     # The file is in a subdirectory.
24024     test ! -d "$ac_dir" && mkdir "$ac_dir"
24025     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24026     # A "../" for each directory in $ac_dir_suffix.
24027     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24028   else
24029     ac_dir_suffix= ac_dots=
24030   fi
24031
24032   case "$ac_given_srcdir" in
24033   .)  srcdir=.
24034       if test -z "$ac_dots"; then top_srcdir=.
24035       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24036   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24037   *) # Relative path.
24038     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24039     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24040   esac
24041
24042   case "$ac_given_INSTALL" in
24043   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24044   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24045   esac
24046
24047   echo creating "$ac_file"
24048   rm -f "$ac_file"
24049   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24050   case "$ac_file" in
24051   *[Mm]akefile*) ac_comsub="1i\\
24052 # $configure_input" ;;
24053   *) ac_comsub= ;;
24054   esac
24055
24056   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24057   sed -e "$ac_comsub
24058 s%@configure_input@%$configure_input%g
24059 s%@srcdir@%$srcdir%g
24060 s%@top_srcdir@%$top_srcdir%g
24061 s%@INSTALL@%$INSTALL%g
24062 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24063 fi; done
24064 rm -f conftest.s*
24065
24066 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24067 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24068 #
24069 # ac_d sets the value in "#define NAME VALUE" lines.
24070 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24071 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24072 ac_dC='\3'
24073 ac_dD='%g'
24074 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24075 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24076 ac_uB='\([      ]\)%\1#\2define\3'
24077 ac_uC=' '
24078 ac_uD='\4%g'
24079 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24080 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24081 ac_eB='$%\1#\2define\3'
24082 ac_eC=' '
24083 ac_eD='%g'
24084
24085 if test "${CONFIG_HEADERS+set}" != set; then
24086 EOF
24087 cat >> $CONFIG_STATUS <<EOF
24088   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24089 EOF
24090 cat >> $CONFIG_STATUS <<\EOF
24091 fi
24092 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24093   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24094   case "$ac_file" in
24095   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24096        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24097   *) ac_file_in="${ac_file}.in" ;;
24098   esac
24099
24100   echo creating $ac_file
24101
24102   rm -f conftest.frag conftest.in conftest.out
24103   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24104   cat $ac_file_inputs > conftest.in
24105
24106 EOF
24107
24108 # Transform confdefs.h into a sed script conftest.vals that substitutes
24109 # the proper values into config.h.in to produce config.h.  And first:
24110 # Protect against being on the right side of a sed subst in config.status.
24111 # Protect against being in an unquoted here document in config.status.
24112 rm -f conftest.vals
24113 cat > conftest.hdr <<\EOF
24114 s/[\\&%]/\\&/g
24115 s%[\\$`]%\\&%g
24116 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24117 s%ac_d%ac_u%gp
24118 s%ac_u%ac_e%gp
24119 EOF
24120 sed -n -f conftest.hdr confdefs.h > conftest.vals
24121 rm -f conftest.hdr
24122
24123 # This sed command replaces #undef with comments.  This is necessary, for
24124 # example, in the case of _POSIX_SOURCE, which is predefined and required
24125 # on some systems where configure will not decide to define it.
24126 cat >> conftest.vals <<\EOF
24127 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24128 EOF
24129
24130 # Break up conftest.vals because some shells have a limit on
24131 # the size of here documents, and old seds have small limits too.
24132
24133 rm -f conftest.tail
24134 while :
24135 do
24136   ac_lines=`grep -c . conftest.vals`
24137   # grep -c gives empty output for an empty file on some AIX systems.
24138   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24139   # Write a limited-size here document to conftest.frag.
24140   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24141   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24142   echo 'CEOF
24143   sed -f conftest.frag conftest.in > conftest.out
24144   rm -f conftest.in
24145   mv conftest.out conftest.in
24146 ' >> $CONFIG_STATUS
24147   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24148   rm -f conftest.vals
24149   mv conftest.tail conftest.vals
24150 done
24151 rm -f conftest.vals
24152
24153 cat >> $CONFIG_STATUS <<\EOF
24154   rm -f conftest.frag conftest.h
24155   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24156   cat conftest.in >> conftest.h
24157   rm -f conftest.in
24158   if cmp -s $ac_file conftest.h 2>/dev/null; then
24159     echo "$ac_file is unchanged"
24160     rm -f conftest.h
24161   else
24162     # Remove last slash and all that follows it.  Not all systems have dirname.
24163       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24164       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24165       # The file is in a subdirectory.
24166       test ! -d "$ac_dir" && mkdir "$ac_dir"
24167     fi
24168     rm -f $ac_file
24169     mv conftest.h $ac_file
24170   fi
24171 fi; done
24172
24173 EOF
24174 cat >> $CONFIG_STATUS <<EOF
24175
24176 EOF
24177 cat >> $CONFIG_STATUS <<\EOF
24178
24179 date > stamp-h
24180 echo Please run \"make depend\" to build dependencies
24181
24182 exit 0
24183 EOF
24184 chmod +x $CONFIG_STATUS
24185 rm -fr confdefs* $ac_clean_files
24186 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24187