]> git.sur5r.net Git - openldap/blob - configure
misc syncrpel updates
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.486 2003/10/05 22:09:59 ando 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-threads          with threads [auto]"
50 ac_help="$ac_help
51   --with-tls              with TLS/SSL support [auto]"
52 ac_help="$ac_help
53   --with-yielding-select  with implicitly yielding select [auto]"
54 ac_help="$ac_help
55
56 SLAPD (Standalone LDAP Daemon) Options:"
57 ac_help="$ac_help
58   --enable-slapd          enable building slapd [yes]"
59 ac_help="$ac_help
60     --enable-aci          enable per-object ACIs (experimental) [no]"
61 ac_help="$ac_help
62     --enable-cleartext    enable cleartext passwords [yes]"
63 ac_help="$ac_help
64     --enable-crypt        enable crypt(3) passwords [no]"
65 ac_help="$ac_help
66     --enable-lmpasswd     enable LAN Manager passwords [no]"
67 ac_help="$ac_help
68     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
69 ac_help="$ac_help
70     --enable-modules      enable dynamic module support [no]"
71 ac_help="$ac_help
72     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
73 ac_help="$ac_help
74     --enable-rlookups     enable reverse lookups of client hostnames [no]"
75 ac_help="$ac_help
76     --enable-slapi        enable SLAPI support (experimental) [no]"
77 ac_help="$ac_help
78     --enable-slp          enable SLPv2 support [no]"
79 ac_help="$ac_help
80     --enable-wrappers     enable tcp wrapper support [no]"
81 ac_help="$ac_help
82     --enable-bdb          enable Berkeley DB backend [yes]"
83 ac_help="$ac_help
84     --with-bdb-module     module type static|dynamic [static]"
85 ac_help="$ac_help
86     --enable-dnssrv       enable dnssrv backend [no]"
87 ac_help="$ac_help
88     --with-dnssrv-module  module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-hdb          enable Hierarchical DB backend [no]"
91 ac_help="$ac_help
92     --with-hdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend [no]"
95 ac_help="$ac_help
96     --with-ldap-module    module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend [no]"
99 ac_help="$ac_help
100     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102     --with-ldbm-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
105 ac_help="$ac_help
106     --enable-meta         enable metadirectory backend [no]"
107 ac_help="$ac_help
108     --with-meta-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend [yes]"
111 ac_help="$ac_help
112     --with-monitor-module module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-null         enable null backend [no]"
115 ac_help="$ac_help
116     --with-null-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-passwd       enable passwd backend [no]"
119 ac_help="$ac_help
120     --with-passwd-module  module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-perl         enable perl backend [no]"
123 ac_help="$ac_help
124     --with-perl-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-shell        enable shell backend [no]"
127 ac_help="$ac_help
128     --with-shell-module   module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-sql          enable sql backend [no]"
131 ac_help="$ac_help
132     --with-sql-module     module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-tcl          enable tcl backend [no]"
135 ac_help="$ac_help
136     --with-tcl-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138
139 SLURPD (Replication Daemon) Options:"
140 ac_help="$ac_help
141   --enable-slurpd         enable building slurpd [auto]"
142 ac_help="$ac_help
143
144 Library Generation & Linking Options"
145 ac_help="$ac_help
146   --enable-static[=PKGS]  build static libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-shared[=PKGS]  build shared libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
151 ac_help="$ac_help
152   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
153
154 # Find the correct PATH separator.  Usually this is `:', but
155 # DJGPP uses `;' like DOS.
156 if test "X${PATH_SEPARATOR+set}" != Xset; then
157   UNAME=${UNAME-`uname 2>/dev/null`}
158   case X$UNAME in
159     *-DOS) lt_cv_sys_path_separator=';' ;;
160     *)     lt_cv_sys_path_separator=':' ;;
161   esac
162   PATH_SEPARATOR=$lt_cv_sys_path_separator
163 fi
164
165
166 # Check that we are running under the correct shell.
167 SHELL=${CONFIG_SHELL-/bin/sh}
168
169 case X$ECHO in
170 X*--fallback-echo)
171   # Remove one level of quotation (which was required for Make).
172   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
173   ;;
174 esac
175
176 echo=${ECHO-echo}
177 if test "X$1" = X--no-reexec; then
178   # Discard the --no-reexec flag, and continue.
179   shift
180 elif test "X$1" = X--fallback-echo; then
181   # Avoid inline document here, it may be left over
182   :
183 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
184   # Yippee, $echo works!
185   :
186 else
187   # Restart under the correct shell.
188   exec $SHELL "$0" --no-reexec ${1+"$@"}
189 fi
190
191 if test "X$1" = X--fallback-echo; then
192   # used as fallback echo
193   shift
194   cat <<EOF
195
196 EOF
197   exit 0
198 fi
199
200 # The HP-UX ksh and POSIX shell print the target directory to stdout
201 # if CDPATH is set.
202 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
203
204 if test -z "$ECHO"; then
205 if test "X${echo_test_string+set}" != Xset; then
206 # find a string as large as possible, as long as the shell can cope with it
207   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
208     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
209     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
210        echo_test_string="`eval $cmd`" &&
211        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
212     then
213       break
214     fi
215   done
216 fi
217
218 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
219    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
220    test "X$echo_testing_string" = "X$echo_test_string"; then
221   :
222 else
223   # The Solaris, AIX, and Digital Unix default echo programs unquote
224   # backslashes.  This makes it impossible to quote backslashes using
225   #   echo "$something" | sed 's/\\/\\\\/g'
226   #
227   # So, first we look for a working echo in the user's PATH.
228
229   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
230   for dir in $PATH /usr/ucb; do
231     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
232        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
233        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
234        test "X$echo_testing_string" = "X$echo_test_string"; then
235       echo="$dir/echo"
236       break
237     fi
238   done
239   IFS="$save_ifs"
240
241   if test "X$echo" = Xecho; then
242     # We didn't find a better echo, so look for alternatives.
243     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
244        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
245        test "X$echo_testing_string" = "X$echo_test_string"; then
246       # This shell has a builtin print -r that does the trick.
247       echo='print -r'
248     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
249          test "X$CONFIG_SHELL" != X/bin/ksh; then
250       # If we have ksh, try running configure again with it.
251       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
252       export ORIGINAL_CONFIG_SHELL
253       CONFIG_SHELL=/bin/ksh
254       export CONFIG_SHELL
255       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
256     else
257       # Try using printf.
258       echo='printf %s\n'
259       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
260          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
261          test "X$echo_testing_string" = "X$echo_test_string"; then
262         # Cool, printf works
263         :
264       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
265            test "X$echo_testing_string" = 'X\t' &&
266            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
267            test "X$echo_testing_string" = "X$echo_test_string"; then
268         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
269         export CONFIG_SHELL
270         SHELL="$CONFIG_SHELL"
271         export SHELL
272         echo="$CONFIG_SHELL $0 --fallback-echo"
273       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       else
279         # maybe with a smaller string...
280         prev=:
281
282         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
283           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
284           then
285             break
286           fi
287           prev="$cmd"
288         done
289
290         if test "$prev" != 'sed 50q "$0"'; then
291           echo_test_string=`eval $prev`
292           export echo_test_string
293           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
294         else
295           # Oops.  We lost completely, so just stick with echo.
296           echo=echo
297         fi
298       fi
299     fi
300   fi
301 fi
302 fi
303
304 # Copy echo and quote the copy suitably for passing to libtool from
305 # the Makefile, instead of quoting the original, which is used later.
306 ECHO=$echo
307 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
308    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
309 fi
310
311
312 ac_help="$ac_help
313   --disable-libtool-lock  avoid locking (might break parallel builds)"
314 ac_help="$ac_help
315   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
316 ac_help="$ac_help
317
318 See INSTALL file for further details."
319
320 # Initialize some variables set by options.
321 # The variables have the same names as the options, with
322 # dashes changed to underlines.
323 build=NONE
324 cache_file=./config.cache
325 exec_prefix=NONE
326 host=NONE
327 no_create=
328 nonopt=NONE
329 no_recursion=
330 prefix=NONE
331 program_prefix=NONE
332 program_suffix=NONE
333 program_transform_name=s,x,x,
334 silent=
335 site=
336 srcdir=
337 target=NONE
338 verbose=
339 x_includes=NONE
340 x_libraries=NONE
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 # Initialize some other variables.
355 subdirs=
356 MFLAGS= MAKEFLAGS=
357 SHELL=${CONFIG_SHELL-/bin/sh}
358 # Maximum number of lines to put in a shell here document.
359 ac_max_here_lines=12
360
361 ac_prev=
362 for ac_option
363 do
364
365   # If the previous option needs an argument, assign it.
366   if test -n "$ac_prev"; then
367     eval "$ac_prev=\$ac_option"
368     ac_prev=
369     continue
370   fi
371
372   case "$ac_option" in
373   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
374   *) ac_optarg= ;;
375   esac
376
377   # Accept the important Cygnus configure options, so we can diagnose typos.
378
379   case "$ac_option" in
380
381   -bindir | --bindir | --bindi | --bind | --bin | --bi)
382     ac_prev=bindir ;;
383   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
384     bindir="$ac_optarg" ;;
385
386   -build | --build | --buil | --bui | --bu)
387     ac_prev=build ;;
388   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
389     build="$ac_optarg" ;;
390
391   -cache-file | --cache-file | --cache-fil | --cache-fi \
392   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
393     ac_prev=cache_file ;;
394   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
395   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
396     cache_file="$ac_optarg" ;;
397
398   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
399     ac_prev=datadir ;;
400   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
401   | --da=*)
402     datadir="$ac_optarg" ;;
403
404   -disable-* | --disable-*)
405     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
408       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
409     fi
410     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
411     eval "enable_${ac_feature}=no" ;;
412
413   -enable-* | --enable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     case "$ac_option" in
421       *=*) ;;
422       *) ac_optarg=yes ;;
423     esac
424     eval "enable_${ac_feature}='$ac_optarg'" ;;
425
426   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
427   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
428   | --exec | --exe | --ex)
429     ac_prev=exec_prefix ;;
430   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
431   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
432   | --exec=* | --exe=* | --ex=*)
433     exec_prefix="$ac_optarg" ;;
434
435   -gas | --gas | --ga | --g)
436     # Obsolete; use --with-gas.
437     with_gas=yes ;;
438
439   -help | --help | --hel | --he)
440     # Omit some internal or obsolete options to make the list less imposing.
441     # This message is too long to be a string in the A/UX 3.1 sh.
442     cat << EOF
443 Usage: configure [options] [host]
444 Options: [defaults in brackets after descriptions]
445 Configuration:
446   --cache-file=FILE       cache test results in FILE
447   --help                  print this message
448   --no-create             do not create output files
449   --quiet, --silent       do not print \`checking...' messages
450   --version               print the version of autoconf that created configure
451 Directory and file names:
452   --prefix=PREFIX         install architecture-independent files in PREFIX
453                           [$ac_default_prefix]
454   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
455                           [same as prefix]
456   --bindir=DIR            user executables in DIR [EPREFIX/bin]
457   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
458   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
459   --datadir=DIR           read-only architecture-independent data in DIR
460                           [PREFIX/share]
461   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
462   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
463                           [PREFIX/com]
464   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
465   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
466   --includedir=DIR        C header files in DIR [PREFIX/include]
467   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
468   --infodir=DIR           info documentation in DIR [PREFIX/info]
469   --mandir=DIR            man documentation in DIR [PREFIX/man]
470   --srcdir=DIR            find the sources in DIR [configure dir or ..]
471   --program-prefix=PREFIX prepend PREFIX to installed program names
472   --program-suffix=SUFFIX append SUFFIX to installed program names
473   --program-transform-name=PROGRAM
474                           run sed PROGRAM on installed program names
475 EOF
476     cat << EOF
477 Host type:
478   --build=BUILD           configure for building on BUILD [BUILD=HOST]
479   --host=HOST             configure for HOST [guessed]
480   --target=TARGET         configure for TARGET [TARGET=HOST]
481 Features and packages:
482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
484   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
485   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
486   --x-includes=DIR        X include files are in DIR
487   --x-libraries=DIR       X library files are in DIR
488 EOF
489     if test -n "$ac_help"; then
490       echo "--enable and --with options recognized:$ac_help"
491     fi
492     exit 0 ;;
493
494   -host | --host | --hos | --ho)
495     ac_prev=host ;;
496   -host=* | --host=* | --hos=* | --ho=*)
497     host="$ac_optarg" ;;
498
499   -includedir | --includedir | --includedi | --included | --include \
500   | --includ | --inclu | --incl | --inc)
501     ac_prev=includedir ;;
502   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
503   | --includ=* | --inclu=* | --incl=* | --inc=*)
504     includedir="$ac_optarg" ;;
505
506   -infodir | --infodir | --infodi | --infod | --info | --inf)
507     ac_prev=infodir ;;
508   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
509     infodir="$ac_optarg" ;;
510
511   -libdir | --libdir | --libdi | --libd)
512     ac_prev=libdir ;;
513   -libdir=* | --libdir=* | --libdi=* | --libd=*)
514     libdir="$ac_optarg" ;;
515
516   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
517   | --libexe | --libex | --libe)
518     ac_prev=libexecdir ;;
519   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
520   | --libexe=* | --libex=* | --libe=*)
521     libexecdir="$ac_optarg" ;;
522
523   -localstatedir | --localstatedir | --localstatedi | --localstated \
524   | --localstate | --localstat | --localsta | --localst \
525   | --locals | --local | --loca | --loc | --lo)
526     ac_prev=localstatedir ;;
527   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
528   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
529   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
530     localstatedir="$ac_optarg" ;;
531
532   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
533     ac_prev=mandir ;;
534   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
535     mandir="$ac_optarg" ;;
536
537   -nfp | --nfp | --nf)
538     # Obsolete; use --without-fp.
539     with_fp=no ;;
540
541   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
542   | --no-cr | --no-c)
543     no_create=yes ;;
544
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
547     no_recursion=yes ;;
548
549   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
550   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
551   | --oldin | --oldi | --old | --ol | --o)
552     ac_prev=oldincludedir ;;
553   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
554   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
555   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
556     oldincludedir="$ac_optarg" ;;
557
558   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
559     ac_prev=prefix ;;
560   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
561     prefix="$ac_optarg" ;;
562
563   -program-prefix | --program-prefix | --program-prefi | --program-pref \
564   | --program-pre | --program-pr | --program-p)
565     ac_prev=program_prefix ;;
566   -program-prefix=* | --program-prefix=* | --program-prefi=* \
567   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
568     program_prefix="$ac_optarg" ;;
569
570   -program-suffix | --program-suffix | --program-suffi | --program-suff \
571   | --program-suf | --program-su | --program-s)
572     ac_prev=program_suffix ;;
573   -program-suffix=* | --program-suffix=* | --program-suffi=* \
574   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
575     program_suffix="$ac_optarg" ;;
576
577   -program-transform-name | --program-transform-name \
578   | --program-transform-nam | --program-transform-na \
579   | --program-transform-n | --program-transform- \
580   | --program-transform | --program-transfor \
581   | --program-transfo | --program-transf \
582   | --program-trans | --program-tran \
583   | --progr-tra | --program-tr | --program-t)
584     ac_prev=program_transform_name ;;
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     program_transform_name="$ac_optarg" ;;
593
594   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
595   | -silent | --silent | --silen | --sile | --sil)
596     silent=yes ;;
597
598   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
599     ac_prev=sbindir ;;
600   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
601   | --sbi=* | --sb=*)
602     sbindir="$ac_optarg" ;;
603
604   -sharedstatedir | --sharedstatedir | --sharedstatedi \
605   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
606   | --sharedst | --shareds | --shared | --share | --shar \
607   | --sha | --sh)
608     ac_prev=sharedstatedir ;;
609   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
610   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
611   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
612   | --sha=* | --sh=*)
613     sharedstatedir="$ac_optarg" ;;
614
615   -site | --site | --sit)
616     ac_prev=site ;;
617   -site=* | --site=* | --sit=*)
618     site="$ac_optarg" ;;
619
620   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
621     ac_prev=srcdir ;;
622   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
623     srcdir="$ac_optarg" ;;
624
625   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
626   | --syscon | --sysco | --sysc | --sys | --sy)
627     ac_prev=sysconfdir ;;
628   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
629   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
630     sysconfdir="$ac_optarg" ;;
631
632   -target | --target | --targe | --targ | --tar | --ta | --t)
633     ac_prev=target ;;
634   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
635     target="$ac_optarg" ;;
636
637   -v | -verbose | --verbose | --verbos | --verbo | --verb)
638     verbose=yes ;;
639
640   -version | --version | --versio | --versi | --vers)
641     echo "configure generated by autoconf version 2.13.1"
642     exit 0 ;;
643
644   -with-* | --with-*)
645     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
646     # Reject names that are not valid shell variable names.
647     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
648       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
649     fi
650     ac_package=`echo $ac_package| sed 's/-/_/g'`
651     case "$ac_option" in
652       *=*) ;;
653       *) ac_optarg=yes ;;
654     esac
655     eval "with_${ac_package}='$ac_optarg'" ;;
656
657   -without-* | --without-*)
658     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     eval "with_${ac_package}=no" ;;
665
666   --x)
667     # Obsolete; use --with-x.
668     with_x=yes ;;
669
670   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
671   | --x-incl | --x-inc | --x-in | --x-i)
672     ac_prev=x_includes ;;
673   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
674   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
675     x_includes="$ac_optarg" ;;
676
677   -x-libraries | --x-libraries | --x-librarie | --x-librari \
678   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
679     ac_prev=x_libraries ;;
680   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
681   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
682     x_libraries="$ac_optarg" ;;
683
684   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
685     ;;
686
687   *)
688     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
689       echo "configure: warning: $ac_option: invalid host type" 1>&2
690     fi
691     if test "x$nonopt" != xNONE; then
692       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
693     fi
694     nonopt="$ac_option"
695     ;;
696
697   esac
698 done
699
700 if test -n "$ac_prev"; then
701   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
702 fi
703
704 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
705
706 # File descriptor usage:
707 # 0 standard input
708 # 1 file creation
709 # 2 errors and warnings
710 # 3 some systems may open it to /dev/tty
711 # 4 used on the Kubota Titan
712 # 6 checking for... messages and results
713 # 5 compiler messages saved in config.log
714 if test "$silent" = yes; then
715   exec 6>/dev/null
716 else
717   exec 6>&1
718 fi
719 exec 5>./config.log
720
721 echo "\
722 This file contains any messages produced by compilers while
723 running configure, to aid debugging if configure makes a mistake.
724 " 1>&5
725
726 # Strip out --no-create and --no-recursion so they do not pile up.
727 # Also quote any args containing shell metacharacters.
728 ac_configure_args=
729 for ac_arg
730 do
731   case "$ac_arg" in
732   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
733   | --no-cr | --no-c) ;;
734   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
736   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
737   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
738   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
739   esac
740 done
741
742 # NLS nuisances.
743 # Only set these to C if already set.  These must not be set unconditionally
744 # because not all systems understand e.g. LANG=C (notably SCO).
745 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
746 # Non-C LC_CTYPE values break the ctype check.
747 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
748 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
749 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
750 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
751
752 # confdefs.h avoids OS command line length limits that DEFS can exceed.
753 rm -rf conftest* confdefs.h
754 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
755 echo > confdefs.h
756
757 # A filename unique to this package, relative to the directory that
758 # configure is in, which we can look for to find out if srcdir is correct.
759 ac_unique_file=build/version.sh
760
761 # Find the source files, if location was not specified.
762 if test -z "$srcdir"; then
763   ac_srcdir_defaulted=yes
764   # Try the directory containing this script, then its parent.
765   ac_prog=$0
766   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
767   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
768   srcdir=$ac_confdir
769   if test ! -r $srcdir/$ac_unique_file; then
770     srcdir=..
771   fi
772 else
773   ac_srcdir_defaulted=no
774 fi
775 if test ! -r $srcdir/$ac_unique_file; then
776   if test "$ac_srcdir_defaulted" = yes; then
777     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
778   else
779     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
780   fi
781 fi
782 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
783
784 # Prefer explicitly selected file to automatically selected ones.
785 if test -z "$CONFIG_SITE"; then
786   if test "x$prefix" != xNONE; then
787     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
788   else
789     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
790   fi
791 fi
792 for ac_site_file in $CONFIG_SITE; do
793   if test -r "$ac_site_file"; then
794     echo "loading site script $ac_site_file"
795     . "$ac_site_file"
796   fi
797 done
798
799
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 ac_exeext=
808 ac_objext=o
809 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
810   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
811   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
812     ac_n= ac_c='
813 ' ac_t='        '
814   else
815     ac_n=-n ac_c= ac_t=
816   fi
817 else
818   ac_n= ac_c='\c' ac_t=
819 fi
820
821
822 # set unset (borrowed from autoconf 2.49c)
823 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
824   ol_unset=unset
825 else
826   ol_unset=false
827 fi
828 # unset CDPATH
829 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
830
831 ac_aux_dir=
832 for ac_dir in build $srcdir/build; do
833   if test -f $ac_dir/install-sh; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/install-sh -c"
836     break
837   elif test -f $ac_dir/install.sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install.sh -c"
840     break
841   elif test -f $ac_dir/shtool; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/shtool install -c"
844     break
845   fi
846 done
847 if test -z "$ac_aux_dir"; then
848   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
849 fi
850 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
851 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
852 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
853
854 eval `$ac_aux_dir/version.sh`
855 if test -z "$OL_STRING"; then
856         { echo "configure: error: could not determine version" 1>&2; exit 1; }
857 fi
858
859 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
860         ac_cv_shtool="$ac_aux_dir/shtool"
861 else
862         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
863 fi
864
865 SHTOOL="$ac_cv_shtool"
866
867 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
868 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
869
870 OPENLDAP_CVS=""
871 if test -d $ac_aux_dir/CVS; then
872         OPENLDAP_CVS="(from CVS sources) "
873 fi
874
875 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
876
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
881
882 # Make sure we can run config.sub.
883   if $ac_config_sub sun4 >/dev/null 2>&1; then :
884     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
885   fi
886
887   ac_cv_host_alias=$host
888   case "$ac_cv_host_alias" in
889   NONE)
890     case $nonopt in
891     NONE)
892       if ac_cv_host_alias=`$ac_config_guess`; then :
893       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
894       fi ;;
895     *) ac_cv_host_alias=$nonopt ;;
896     esac ;;
897   esac
898
899   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
900   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
901   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
902   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
903 else
904   echo $ac_n "(cached) $ac_c" 1>&6
905 fi
906
907 echo "$ac_t""$ac_cv_host" 1>&6
908
909 host=$ac_cv_host
910 host_alias=$ac_cv_host_alias
911 host_cpu=$ac_cv_host_cpu
912 host_vendor=$ac_cv_host_vendor
913 host_os=$ac_cv_host_os
914
915
916
917
918
919 echo $ac_n "checking target system type""... $ac_c" 1>&6
920 echo "configure:921: checking target system type" >&5
921 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
922
923 # Make sure we can run config.sub.
924   if $ac_config_sub sun4 >/dev/null 2>&1; then :
925     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926   fi
927
928   ac_cv_target_alias=$target
929   case "$ac_cv_target_alias" in
930   NONE)
931     case $nonopt in
932     NONE)
933       ac_cv_target_alias=$host_alias ;;
934
935     *) ac_cv_target_alias=$nonopt ;;
936     esac ;;
937   esac
938
939   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
940   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
941   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
942   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
943 else
944   echo $ac_n "(cached) $ac_c" 1>&6
945 fi
946
947 echo "$ac_t""$ac_cv_target" 1>&6
948
949 target=$ac_cv_target
950 target_alias=$ac_cv_target_alias
951 target_cpu=$ac_cv_target_cpu
952 target_vendor=$ac_cv_target_vendor
953 target_os=$ac_cv_target_os
954
955
956
957
958
959 echo $ac_n "checking build system type""... $ac_c" 1>&6
960 echo "configure:961: checking build system type" >&5
961 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
962
963 # Make sure we can run config.sub.
964   if $ac_config_sub sun4 >/dev/null 2>&1; then :
965     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966   fi
967
968   ac_cv_build_alias=$build
969   case "$ac_cv_build_alias" in
970   NONE)
971     case $nonopt in
972     NONE)
973       ac_cv_build_alias=$host_alias ;;
974
975     *) ac_cv_build_alias=$nonopt ;;
976     esac ;;
977   esac
978
979   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
980   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983 else
984   echo $ac_n "(cached) $ac_c" 1>&6
985 fi
986
987 echo "$ac_t""$ac_cv_build" 1>&6
988
989 build=$ac_cv_build
990 build_alias=$ac_cv_build_alias
991 build_cpu=$ac_cv_build_cpu
992 build_vendor=$ac_cv_build_vendor
993 build_os=$ac_cv_build_os
994
995
996
997
998
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1002 #
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 #    same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 #    as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1011
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1018
1019 test "$host_alias" != "$target_alias" &&
1020   test "$program_prefix$program_suffix$program_transform_name" = \
1021     NONENONEs,x,x, &&
1022   program_prefix=${target_alias}-
1023
1024
1025 # Find a good install program.  We prefer a C program (faster),
1026 # so one script is as good as another.  But avoid the broken or
1027 # incompatible versions:
1028 # SysV /etc/install, /usr/sbin/install
1029 # SunOS /usr/etc/install
1030 # IRIX /sbin/install
1031 # AIX /bin/install
1032 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1033 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1034 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1035 # ./install, which can be erroneously created by make from ./install.sh.
1036 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1037 echo "configure:1038: checking for a BSD compatible install" >&5
1038 if test -z "$INSTALL"; then
1039 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1040   echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1043   for ac_dir in $PATH; do
1044     # Account for people who put trailing slashes in PATH elements.
1045     case "$ac_dir/" in
1046     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1047     *)
1048       # OSF1 and SCO ODT 3.0 have their own names for install.
1049       # Don't use installbsd from OSF since it installs stuff as root
1050       # by default.
1051       for ac_prog in ginstall scoinst install; do
1052         if test -f $ac_dir/$ac_prog; then
1053           if test $ac_prog = install &&
1054             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1055             # AIX install.  It has an incompatible calling convention.
1056             :
1057           elif test $ac_prog = install &&
1058             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # program-specific install script used by HP pwplus--don't use.
1060             :
1061           else
1062             ac_cv_path_install="$ac_dir/$ac_prog -c"
1063             break 2
1064           fi
1065         fi
1066       done
1067       ;;
1068     esac
1069   done
1070   IFS="$ac_save_IFS"
1071
1072 fi
1073   if test "${ac_cv_path_install+set}" = set; then
1074     INSTALL="$ac_cv_path_install"
1075   else
1076     # As a last resort, use the slow shell script.  We don't cache a
1077     # path for INSTALL within a source directory, because that will
1078     # break other packages using the cache if that directory is
1079     # removed, or if the path is relative.
1080     INSTALL="$ac_install_sh"
1081   fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether build environment is sane" >&5
1095 # Just in case
1096 sleep 1
1097 echo timestamp > conftestfile
1098 # Do `set' in a subshell so we don't clobber the current shell's
1099 # arguments.  Must try -L first in case configure is actually a
1100 # symlink; some systems play weird games with the mod time of symlinks
1101 # (eg FreeBSD returns the mod time of the symlink's containing
1102 # directory).
1103 if (
1104    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1105    if test "$*" = "X"; then
1106       # -L didn't work.
1107       set X `ls -t $srcdir/configure conftestfile`
1108    fi
1109    if test "$*" != "X $srcdir/configure conftestfile" \
1110       && test "$*" != "X conftestfile $srcdir/configure"; then
1111
1112       # If neither matched, then we have a broken ls.  This can happen
1113       # if, for instance, CONFIG_SHELL is bash and it inherits a
1114       # broken ls alias from the environment.  This has actually
1115       # happened.  Such a system could not be considered "sane".
1116       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1117 alias in your environment" 1>&2; exit 1; }
1118    fi
1119
1120    test "$2" = conftestfile
1121    )
1122 then
1123    # Ok.
1124    :
1125 else
1126    { echo "configure: error: newly created file is older than distributed files!
1127 Check your system clock" 1>&2; exit 1; }
1128 fi
1129 rm -f conftest*
1130 echo "$ac_t""yes" 1>&6
1131 if test "$program_transform_name" = s,x,x,; then
1132   program_transform_name=
1133 else
1134   # Double any \ or $.  echo might interpret backslashes.
1135   cat <<\EOF_SED > conftestsed
1136 s,\\,\\\\,g; s,\$,$$,g
1137 EOF_SED
1138   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1139   rm -f conftestsed
1140 fi
1141 test "$program_prefix" != NONE &&
1142   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1143 # Use a double $ so make ignores it.
1144 test "$program_suffix" != NONE &&
1145   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1146
1147 # sed with no file args requires a program.
1148 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1149
1150 for ac_prog in mawk gawk nawk awk
1151 do
1152 # Extract the first word of "$ac_prog", so it can be a program name with args.
1153 set dummy $ac_prog; ac_word=$2
1154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1155 echo "configure:1156: checking for $ac_word" >&5
1156 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$AWK"; then
1160   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1161 else
1162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1163   ac_dummy="$PATH"
1164   for ac_dir in $ac_dummy; do
1165     test -z "$ac_dir" && ac_dir=.
1166     if test -f $ac_dir/$ac_word; then
1167       ac_cv_prog_AWK="$ac_prog"
1168       break
1169     fi
1170   done
1171   IFS="$ac_save_ifs"
1172 fi
1173 fi
1174 AWK="$ac_cv_prog_AWK"
1175 if test -n "$AWK"; then
1176   echo "$ac_t""$AWK" 1>&6
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 test -n "$AWK" && break
1182 done
1183
1184 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1185 echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5
1186 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1187 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftestmake <<\EOF
1191 all:
1192         @echo 'ac_maketemp="${MAKE}"'
1193 EOF
1194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1195 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1196 if test -n "$ac_maketemp"; then
1197   eval ac_cv_prog_make_${ac_make}_set=yes
1198 else
1199   eval ac_cv_prog_make_${ac_make}_set=no
1200 fi
1201 rm -f conftestmake
1202 fi
1203 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205   SET_MAKE=
1206 else
1207   echo "$ac_t""no" 1>&6
1208   SET_MAKE="MAKE=${MAKE-make}"
1209 fi
1210
1211
1212
1213 PACKAGE=$OL_PACKAGE
1214
1215 VERSION=$OL_VERSION
1216
1217 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1218   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1219 fi
1220
1221
1222
1223 missing_dir=`cd $ac_aux_dir && pwd`
1224 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1225 echo "configure:1226: checking for working aclocal" >&5
1226 # Run test in a subshell; some versions of sh will print an error if
1227 # an executable is not found, even if stderr is redirected.
1228 # Redirect stdin to placate older versions of autoconf.  Sigh.
1229 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1230    ACLOCAL=aclocal
1231    echo "$ac_t""found" 1>&6
1232 else
1233    ACLOCAL="$missing_dir/missing aclocal"
1234    echo "$ac_t""missing" 1>&6
1235 fi
1236
1237 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working autoconf" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1243    AUTOCONF=autoconf
1244    echo "$ac_t""found" 1>&6
1245 else
1246    AUTOCONF="$missing_dir/missing autoconf"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working automake" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (automake --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOMAKE=automake
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOMAKE="$missing_dir/missing automake"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working autoheader" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOHEADER=autoheader
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOHEADER="$missing_dir/missing autoheader"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working makeinfo" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1282    MAKEINFO=makeinfo
1283    echo "$ac_t""found" 1>&6
1284 else
1285    MAKEINFO="$missing_dir/missing makeinfo"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 install_sh="$missing_dir/install-sh"
1290 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1291
1292 for ac_prog in gnutar gtar tar
1293 do
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_word" >&5
1298 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   if test -n "$AMTAR"; then
1302   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1303 else
1304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1305   ac_dummy="$PATH"
1306   for ac_dir in $ac_dummy; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_AMTAR="$ac_prog"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314 fi
1315 fi
1316 AMTAR="$ac_cv_prog_AMTAR"
1317 if test -n "$AMTAR"; then
1318   echo "$ac_t""$AMTAR" 1>&6
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 test -n "$AMTAR" && break
1324 done
1325
1326
1327 AMTARFLAGS=
1328 if test -n "$AMTAR"; then
1329   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1330         AMTARFLAGS=o
1331   fi
1332 fi
1333
1334 cat >> confdefs.h <<EOF
1335 #define OPENLDAP_PACKAGE "$PACKAGE"
1336 EOF
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_VERSION "$VERSION"
1340 EOF
1341
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION $OL_API_INC
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1357 EOF
1358
1359
1360 OPENLDAP_LIBVERSION=$OL_API_LIB
1361
1362 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1363
1364
1365
1366 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1367 echo "configure:1368: checking configure arguments" >&5
1368
1369
1370 top_builddir=`pwd`
1371
1372 ldap_subdir="/openldap"
1373
1374 # Check whether --with-subdir or --without-subdir was given.
1375 if test "${with_subdir+set}" = set; then
1376   withval="$with_subdir"
1377   case "$withval" in
1378         no) ldap_subdir=""
1379                 ;;
1380         yes)
1381                 ;;
1382         /*|\\*)
1383                 ldap_subdir="$withval"
1384                 ;;
1385         *)
1386                 ldap_subdir="/$withval"
1387                 ;;
1388 esac
1389
1390 fi
1391
1392
1393 # OpenLDAP --enable-debug
1394         # Check whether --enable-debug or --disable-debug was given.
1395 if test "${enable_debug+set}" = set; then
1396   enableval="$enable_debug"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no ; do
1400                 if test "$enableval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1406         fi
1407         ol_enable_debug="$ol_arg"
1408
1409 else
1410         ol_enable_debug="yes"
1411 fi
1412 # end --enable-debug
1413 # OpenLDAP --enable-dynamic
1414         # Check whether --enable-dynamic or --disable-dynamic was given.
1415 if test "${enable_dynamic+set}" = set; then
1416   enableval="$enable_dynamic"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1426         fi
1427         ol_enable_dynamic="$ol_arg"
1428
1429 else
1430         ol_enable_dynamic="no"
1431 fi
1432 # end --enable-dynamic
1433 # OpenLDAP --enable-syslog
1434         # Check whether --enable-syslog or --disable-syslog was given.
1435 if test "${enable_syslog+set}" = set; then
1436   enableval="$enable_syslog"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1446         fi
1447         ol_enable_syslog="$ol_arg"
1448
1449 else
1450         ol_enable_syslog="auto"
1451 fi
1452 # end --enable-syslog
1453 # OpenLDAP --enable-proctitle
1454         # Check whether --enable-proctitle or --disable-proctitle was given.
1455 if test "${enable_proctitle+set}" = set; then
1456   enableval="$enable_proctitle"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1466         fi
1467         ol_enable_proctitle="$ol_arg"
1468
1469 else
1470         ol_enable_proctitle="yes"
1471 fi
1472 # end --enable-proctitle
1473 ol_enable_referrals=${ol_enable_referrals-no}
1474 ol_enable_kbind=${ol_enable_kbind-no}
1475 # OpenLDAP --enable-ipv6
1476         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1477 if test "${enable_ipv6+set}" = set; then
1478   enableval="$enable_ipv6"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ipv6="$ol_arg"
1490
1491 else
1492         ol_enable_ipv6="auto"
1493 fi
1494 # end --enable-ipv6
1495 # OpenLDAP --enable-local
1496         # Check whether --enable-local or --disable-local was given.
1497 if test "${enable_local+set}" = set; then
1498   enableval="$enable_local"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1508         fi
1509         ol_enable_local="$ol_arg"
1510
1511 else
1512         ol_enable_local="auto"
1513 fi
1514 # end --enable-local
1515 # OpenLDAP --enable-x_compile
1516         # Check whether --enable-x_compile or --disable-x_compile was given.
1517 if test "${enable_x_compile+set}" = set; then
1518   enableval="$enable_x_compile"
1519   
1520         ol_arg=invalid
1521         for ol_val in yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1528         fi
1529         ol_enable_x_compile="$ol_arg"
1530
1531 else
1532         ol_enable_x_compile="no"
1533 fi
1534 # end --enable-x_compile
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 ol_with_kerbersos=${ol_with_kerberos-auto}
1580 # OpenLDAP --with-threads
1581         # Check whether --with-threads or --without-threads was given.
1582 if test "${with_threads+set}" = set; then
1583   withval="$with_threads"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1593         fi
1594         ol_with_threads="$ol_arg"
1595
1596 else
1597         ol_with_threads="auto"
1598 fi
1599 # end --with-threads
1600
1601 # OpenLDAP --with-tls
1602         # Check whether --with-tls or --without-tls was given.
1603 if test "${with_tls+set}" = set; then
1604   withval="$with_tls"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto ssleay openssl yes no  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1614         fi
1615         ol_with_tls="$ol_arg"
1616
1617 else
1618         ol_with_tls="auto"
1619 fi
1620 # end --with-tls
1621
1622 # OpenLDAP --with-yielding_select
1623         # Check whether --with-yielding_select or --without-yielding_select was given.
1624 if test "${with_yielding_select+set}" = set; then
1625   withval="$with_yielding_select"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no manual  ; do
1629                 if test "$withval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1635         fi
1636         ol_with_yielding_select="$ol_arg"
1637
1638 else
1639         ol_with_yielding_select="auto"
1640 fi
1641 # end --with-yielding_select
1642
1643
1644
1645 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1646 if test "${with_xxslapdoptions+set}" = set; then
1647   withval="$with_xxslapdoptions"
1648   :
1649 fi
1650
1651 # OpenLDAP --enable-slapd
1652         # Check whether --enable-slapd or --disable-slapd was given.
1653 if test "${enable_slapd+set}" = set; then
1654   enableval="$enable_slapd"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1664         fi
1665         ol_enable_slapd="$ol_arg"
1666
1667 else
1668         ol_enable_slapd="yes"
1669 fi
1670 # end --enable-slapd
1671 # OpenLDAP --enable-aci
1672         # Check whether --enable-aci or --disable-aci was given.
1673 if test "${enable_aci+set}" = set; then
1674   enableval="$enable_aci"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$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 $enableval for --enable-aci" 1>&2; exit 1; }
1684         fi
1685         ol_enable_aci="$ol_arg"
1686
1687 else
1688         ol_enable_aci="no"
1689 fi
1690 # end --enable-aci
1691 # OpenLDAP --enable-cleartext
1692         # Check whether --enable-cleartext or --disable-cleartext was given.
1693 if test "${enable_cleartext+set}" = set; then
1694   enableval="$enable_cleartext"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1704         fi
1705         ol_enable_cleartext="$ol_arg"
1706
1707 else
1708         ol_enable_cleartext="yes"
1709 fi
1710 # end --enable-cleartext
1711 # OpenLDAP --enable-crypt
1712         # Check whether --enable-crypt or --disable-crypt was given.
1713 if test "${enable_crypt+set}" = set; then
1714   enableval="$enable_crypt"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1724         fi
1725         ol_enable_crypt="$ol_arg"
1726
1727 else
1728         ol_enable_crypt="no"
1729 fi
1730 # end --enable-crypt
1731 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1732 # OpenLDAP --enable-lmpasswd
1733         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1734 if test "${enable_lmpasswd+set}" = set; then
1735   enableval="$enable_lmpasswd"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1745         fi
1746         ol_enable_lmpasswd="$ol_arg"
1747
1748 else
1749         ol_enable_lmpasswd="no"
1750 fi
1751 # end --enable-lmpasswd
1752 # OpenLDAP --enable-spasswd
1753         # Check whether --enable-spasswd or --disable-spasswd was given.
1754 if test "${enable_spasswd+set}" = set; then
1755   enableval="$enable_spasswd"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1765         fi
1766         ol_enable_spasswd="$ol_arg"
1767
1768 else
1769         ol_enable_spasswd="no"
1770 fi
1771 # end --enable-spasswd
1772 # OpenLDAP --enable-modules
1773         # Check whether --enable-modules or --disable-modules was given.
1774 if test "${enable_modules+set}" = set; then
1775   enableval="$enable_modules"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1785         fi
1786         ol_enable_modules="$ol_arg"
1787
1788 else
1789         ol_enable_modules="no"
1790 fi
1791 # end --enable-modules
1792 ol_enable_multimaster=${ol_enable_multimaster-no}
1793 # OpenLDAP --enable-rewrite
1794         # Check whether --enable-rewrite or --disable-rewrite was given.
1795 if test "${enable_rewrite+set}" = set; then
1796   enableval="$enable_rewrite"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1806         fi
1807         ol_enable_rewrite="$ol_arg"
1808
1809 else
1810         ol_enable_rewrite="no"
1811 fi
1812 # end --enable-rewrite
1813 # OpenLDAP --enable-rlookups
1814         # Check whether --enable-rlookups or --disable-rlookups was given.
1815 if test "${enable_rlookups+set}" = set; then
1816   enableval="$enable_rlookups"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1826         fi
1827         ol_enable_rlookups="$ol_arg"
1828
1829 else
1830         ol_enable_rlookups="no"
1831 fi
1832 # end --enable-rlookups
1833 # OpenLDAP --enable-slapi
1834         # Check whether --enable-slapi or --disable-slapi was given.
1835 if test "${enable_slapi+set}" = set; then
1836   enableval="$enable_slapi"
1837   
1838         ol_arg=invalid
1839         for ol_val in auto yes no ; do
1840                 if test "$enableval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1846         fi
1847         ol_enable_slapi="$ol_arg"
1848
1849 else
1850         ol_enable_slapi="no"
1851 fi
1852 # end --enable-slapi
1853 # OpenLDAP --enable-slp
1854         # Check whether --enable-slp or --disable-slp was given.
1855 if test "${enable_slp+set}" = set; then
1856   enableval="$enable_slp"
1857   
1858         ol_arg=invalid
1859         for ol_val in auto yes no ; do
1860                 if test "$enableval" = "$ol_val" ; then
1861                         ol_arg="$ol_val"
1862                 fi
1863         done
1864         if test "$ol_arg" = "invalid" ; then
1865                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1866         fi
1867         ol_enable_slp="$ol_arg"
1868
1869 else
1870         ol_enable_slp="no"
1871 fi
1872 # end --enable-slp
1873 # OpenLDAP --enable-wrappers
1874         # Check whether --enable-wrappers or --disable-wrappers was given.
1875 if test "${enable_wrappers+set}" = set; then
1876   enableval="$enable_wrappers"
1877   
1878         ol_arg=invalid
1879         for ol_val in auto yes no ; do
1880                 if test "$enableval" = "$ol_val" ; then
1881                         ol_arg="$ol_val"
1882                 fi
1883         done
1884         if test "$ol_arg" = "invalid" ; then
1885                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1886         fi
1887         ol_enable_wrappers="$ol_arg"
1888
1889 else
1890         ol_enable_wrappers="no"
1891 fi
1892 # end --enable-wrappers
1893
1894
1895 # OpenLDAP --enable-bdb
1896         # Check whether --enable-bdb or --disable-bdb was given.
1897 if test "${enable_bdb+set}" = set; then
1898   enableval="$enable_bdb"
1899   
1900         ol_arg=invalid
1901         for ol_val in auto yes no ; do
1902                 if test "$enableval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1908         fi
1909         ol_enable_bdb="$ol_arg"
1910
1911 else
1912         ol_enable_bdb="yes"
1913 fi
1914 # end --enable-bdb
1915 # OpenLDAP --with-bdb_module
1916         # Check whether --with-bdb_module or --without-bdb_module was given.
1917 if test "${with_bdb_module+set}" = set; then
1918   withval="$with_bdb_module"
1919   
1920         ol_arg=invalid
1921         for ol_val in static dynamic ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1928         fi
1929         ol_with_bdb_module="$ol_arg"
1930
1931 else
1932         ol_with_bdb_module="static"
1933 fi
1934 # end --with-bdb_module
1935
1936 # OpenLDAP --enable-dnssrv
1937         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1938 if test "${enable_dnssrv+set}" = set; then
1939   enableval="$enable_dnssrv"
1940   
1941         ol_arg=invalid
1942         for ol_val in auto yes no ; do
1943                 if test "$enableval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1949         fi
1950         ol_enable_dnssrv="$ol_arg"
1951
1952 else
1953         ol_enable_dnssrv="no"
1954 fi
1955 # end --enable-dnssrv
1956 # OpenLDAP --with-dnssrv_module
1957         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1958 if test "${with_dnssrv_module+set}" = set; then
1959   withval="$with_dnssrv_module"
1960   
1961         ol_arg=invalid
1962         for ol_val in static dynamic ; do
1963                 if test "$withval" = "$ol_val" ; then
1964                         ol_arg="$ol_val"
1965                 fi
1966         done
1967         if test "$ol_arg" = "invalid" ; then
1968                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1969         fi
1970         ol_with_dnssrv_module="$ol_arg"
1971
1972 else
1973         ol_with_dnssrv_module="static"
1974 fi
1975 # end --with-dnssrv_module
1976
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in auto yes no ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --with-hdb_module
1998         # Check whether --with-hdb_module or --without-hdb_module was given.
1999 if test "${with_hdb_module+set}" = set; then
2000   withval="$with_hdb_module"
2001   
2002         ol_arg=invalid
2003         for ol_val in static dynamic ; do
2004                 if test "$withval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2010         fi
2011         ol_with_hdb_module="$ol_arg"
2012
2013 else
2014         ol_with_hdb_module="static"
2015 fi
2016 # end --with-hdb_module
2017
2018 # OpenLDAP --enable-ldap
2019         # Check whether --enable-ldap or --disable-ldap was given.
2020 if test "${enable_ldap+set}" = set; then
2021   enableval="$enable_ldap"
2022   
2023         ol_arg=invalid
2024         for ol_val in auto yes no ; do
2025                 if test "$enableval" = "$ol_val" ; then
2026                         ol_arg="$ol_val"
2027                 fi
2028         done
2029         if test "$ol_arg" = "invalid" ; then
2030                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2031         fi
2032         ol_enable_ldap="$ol_arg"
2033
2034 else
2035         ol_enable_ldap="no"
2036 fi
2037 # end --enable-ldap
2038 # OpenLDAP --with-ldap_module
2039         # Check whether --with-ldap_module or --without-ldap_module was given.
2040 if test "${with_ldap_module+set}" = set; then
2041   withval="$with_ldap_module"
2042   
2043         ol_arg=invalid
2044         for ol_val in static dynamic ; do
2045                 if test "$withval" = "$ol_val" ; then
2046                         ol_arg="$ol_val"
2047                 fi
2048         done
2049         if test "$ol_arg" = "invalid" ; then
2050                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2051         fi
2052         ol_with_ldap_module="$ol_arg"
2053
2054 else
2055         ol_with_ldap_module="static"
2056 fi
2057 # end --with-ldap_module
2058
2059 # OpenLDAP --enable-ldbm
2060         # Check whether --enable-ldbm or --disable-ldbm was given.
2061 if test "${enable_ldbm+set}" = set; then
2062   enableval="$enable_ldbm"
2063   
2064         ol_arg=invalid
2065         for ol_val in auto yes no ; do
2066                 if test "$enableval" = "$ol_val" ; then
2067                         ol_arg="$ol_val"
2068                 fi
2069         done
2070         if test "$ol_arg" = "invalid" ; then
2071                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2072         fi
2073         ol_enable_ldbm="$ol_arg"
2074
2075 else
2076         ol_enable_ldbm="no"
2077 fi
2078 # end --enable-ldbm
2079 # OpenLDAP --with-ldbm_api
2080         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2081 if test "${with_ldbm_api+set}" = set; then
2082   withval="$with_ldbm_api"
2083   
2084         ol_arg=invalid
2085         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2086                 if test "$withval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2092         fi
2093         ol_with_ldbm_api="$ol_arg"
2094
2095 else
2096         ol_with_ldbm_api="auto"
2097 fi
2098 # end --with-ldbm_api
2099
2100 # OpenLDAP --with-ldbm_module
2101         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2102 if test "${with_ldbm_module+set}" = set; then
2103   withval="$with_ldbm_module"
2104   
2105         ol_arg=invalid
2106         for ol_val in static dynamic ; do
2107                 if test "$withval" = "$ol_val" ; then
2108                         ol_arg="$ol_val"
2109                 fi
2110         done
2111         if test "$ol_arg" = "invalid" ; then
2112                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2113         fi
2114         ol_with_ldbm_module="$ol_arg"
2115
2116 else
2117         ol_with_ldbm_module="static"
2118 fi
2119 # end --with-ldbm_module
2120
2121 # OpenLDAP --with-ldbm_type
2122         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2123 if test "${with_ldbm_type+set}" = set; then
2124   withval="$with_ldbm_type"
2125   
2126         ol_arg=invalid
2127         for ol_val in auto btree hash ; do
2128                 if test "$withval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2134         fi
2135         ol_with_ldbm_type="$ol_arg"
2136
2137 else
2138         ol_with_ldbm_type="auto"
2139 fi
2140 # end --with-ldbm_type
2141
2142 # OpenLDAP --enable-meta
2143         # Check whether --enable-meta or --disable-meta was given.
2144 if test "${enable_meta+set}" = set; then
2145   enableval="$enable_meta"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto yes no ; do
2149                 if test "$enableval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2155         fi
2156         ol_enable_meta="$ol_arg"
2157
2158 else
2159         ol_enable_meta="no"
2160 fi
2161 # end --enable-meta
2162 # OpenLDAP --with-meta_module
2163         # Check whether --with-meta_module or --without-meta_module was given.
2164 if test "${with_meta_module+set}" = set; then
2165   withval="$with_meta_module"
2166   
2167         ol_arg=invalid
2168         for ol_val in static dynamic ; do
2169                 if test "$withval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2175         fi
2176         ol_with_meta_module="$ol_arg"
2177
2178 else
2179         ol_with_meta_module="static"
2180 fi
2181 # end --with-meta_module
2182
2183 # OpenLDAP --enable-monitor
2184         # Check whether --enable-monitor or --disable-monitor was given.
2185 if test "${enable_monitor+set}" = set; then
2186   enableval="$enable_monitor"
2187   
2188         ol_arg=invalid
2189         for ol_val in auto yes no ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2196         fi
2197         ol_enable_monitor="$ol_arg"
2198
2199 else
2200         ol_enable_monitor="yes"
2201 fi
2202 # end --enable-monitor
2203 # OpenLDAP --with-monitor_module
2204         # Check whether --with-monitor_module or --without-monitor_module was given.
2205 if test "${with_monitor_module+set}" = set; then
2206   withval="$with_monitor_module"
2207   
2208         ol_arg=invalid
2209         for ol_val in static dynamic ; do
2210                 if test "$withval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2216         fi
2217         ol_with_monitor_module="$ol_arg"
2218
2219 else
2220         ol_with_monitor_module="static"
2221 fi
2222 # end --with-monitor_module
2223
2224 # OpenLDAP --enable-null
2225         # Check whether --enable-null or --disable-null was given.
2226 if test "${enable_null+set}" = set; then
2227   enableval="$enable_null"
2228   
2229         ol_arg=invalid
2230         for ol_val in auto yes no ; do
2231                 if test "$enableval" = "$ol_val" ; then
2232                         ol_arg="$ol_val"
2233                 fi
2234         done
2235         if test "$ol_arg" = "invalid" ; then
2236                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2237         fi
2238         ol_enable_null="$ol_arg"
2239
2240 else
2241         ol_enable_null="no"
2242 fi
2243 # end --enable-null
2244 # OpenLDAP --with-null_module
2245         # Check whether --with-null_module or --without-null_module was given.
2246 if test "${with_null_module+set}" = set; then
2247   withval="$with_null_module"
2248   
2249         ol_arg=invalid
2250         for ol_val in static dynamic ; do
2251                 if test "$withval" = "$ol_val" ; then
2252                         ol_arg="$ol_val"
2253                 fi
2254         done
2255         if test "$ol_arg" = "invalid" ; then
2256                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2257         fi
2258         ol_with_null_module="$ol_arg"
2259
2260 else
2261         ol_with_null_module="static"
2262 fi
2263 # end --with-null_module
2264
2265 # OpenLDAP --enable-passwd
2266         # Check whether --enable-passwd or --disable-passwd was given.
2267 if test "${enable_passwd+set}" = set; then
2268   enableval="$enable_passwd"
2269   
2270         ol_arg=invalid
2271         for ol_val in auto yes no ; do
2272                 if test "$enableval" = "$ol_val" ; then
2273                         ol_arg="$ol_val"
2274                 fi
2275         done
2276         if test "$ol_arg" = "invalid" ; then
2277                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2278         fi
2279         ol_enable_passwd="$ol_arg"
2280
2281 else
2282         ol_enable_passwd="no"
2283 fi
2284 # end --enable-passwd
2285 # OpenLDAP --with-passwd_module
2286         # Check whether --with-passwd_module or --without-passwd_module was given.
2287 if test "${with_passwd_module+set}" = set; then
2288   withval="$with_passwd_module"
2289   
2290         ol_arg=invalid
2291         for ol_val in static dynamic ; do
2292                 if test "$withval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2298         fi
2299         ol_with_passwd_module="$ol_arg"
2300
2301 else
2302         ol_with_passwd_module="static"
2303 fi
2304 # end --with-passwd_module
2305
2306 # OpenLDAP --enable-perl
2307         # Check whether --enable-perl or --disable-perl was given.
2308 if test "${enable_perl+set}" = set; then
2309   enableval="$enable_perl"
2310   
2311         ol_arg=invalid
2312         for ol_val in auto yes no ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2319         fi
2320         ol_enable_perl="$ol_arg"
2321
2322 else
2323         ol_enable_perl="no"
2324 fi
2325 # end --enable-perl
2326 # OpenLDAP --with-perl_module
2327         # Check whether --with-perl_module or --without-perl_module was given.
2328 if test "${with_perl_module+set}" = set; then
2329   withval="$with_perl_module"
2330   
2331         ol_arg=invalid
2332         for ol_val in static dynamic ; do
2333                 if test "$withval" = "$ol_val" ; then
2334                         ol_arg="$ol_val"
2335                 fi
2336         done
2337         if test "$ol_arg" = "invalid" ; then
2338                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2339         fi
2340         ol_with_perl_module="$ol_arg"
2341
2342 else
2343         ol_with_perl_module="static"
2344 fi
2345 # end --with-perl_module
2346
2347 # OpenLDAP --enable-shell
2348         # Check whether --enable-shell or --disable-shell was given.
2349 if test "${enable_shell+set}" = set; then
2350   enableval="$enable_shell"
2351   
2352         ol_arg=invalid
2353         for ol_val in auto yes no ; do
2354                 if test "$enableval" = "$ol_val" ; then
2355                         ol_arg="$ol_val"
2356                 fi
2357         done
2358         if test "$ol_arg" = "invalid" ; then
2359                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2360         fi
2361         ol_enable_shell="$ol_arg"
2362
2363 else
2364         ol_enable_shell="no"
2365 fi
2366 # end --enable-shell
2367 # OpenLDAP --with-shell_module
2368         # Check whether --with-shell_module or --without-shell_module was given.
2369 if test "${with_shell_module+set}" = set; then
2370   withval="$with_shell_module"
2371   
2372         ol_arg=invalid
2373         for ol_val in static dynamic ; do
2374                 if test "$withval" = "$ol_val" ; then
2375                         ol_arg="$ol_val"
2376                 fi
2377         done
2378         if test "$ol_arg" = "invalid" ; then
2379                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2380         fi
2381         ol_with_shell_module="$ol_arg"
2382
2383 else
2384         ol_with_shell_module="static"
2385 fi
2386 # end --with-shell_module
2387
2388 # OpenLDAP --enable-sql
2389         # Check whether --enable-sql or --disable-sql was given.
2390 if test "${enable_sql+set}" = set; then
2391   enableval="$enable_sql"
2392   
2393         ol_arg=invalid
2394         for ol_val in auto yes no ; do
2395                 if test "$enableval" = "$ol_val" ; then
2396                         ol_arg="$ol_val"
2397                 fi
2398         done
2399         if test "$ol_arg" = "invalid" ; then
2400                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2401         fi
2402         ol_enable_sql="$ol_arg"
2403
2404 else
2405         ol_enable_sql="no"
2406 fi
2407 # end --enable-sql
2408 # OpenLDAP --with-sql_module
2409         # Check whether --with-sql_module or --without-sql_module was given.
2410 if test "${with_sql_module+set}" = set; then
2411   withval="$with_sql_module"
2412   
2413         ol_arg=invalid
2414         for ol_val in static dynamic ; do
2415                 if test "$withval" = "$ol_val" ; then
2416                         ol_arg="$ol_val"
2417                 fi
2418         done
2419         if test "$ol_arg" = "invalid" ; then
2420                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2421         fi
2422         ol_with_sql_module="$ol_arg"
2423
2424 else
2425         ol_with_sql_module="static"
2426 fi
2427 # end --with-sql_module
2428
2429 # OpenLDAP --enable-tcl
2430         # Check whether --enable-tcl or --disable-tcl was given.
2431 if test "${enable_tcl+set}" = set; then
2432   enableval="$enable_tcl"
2433   
2434         ol_arg=invalid
2435         for ol_val in auto yes no ; do
2436                 if test "$enableval" = "$ol_val" ; then
2437                         ol_arg="$ol_val"
2438                 fi
2439         done
2440         if test "$ol_arg" = "invalid" ; then
2441                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2442         fi
2443         ol_enable_tcl="$ol_arg"
2444
2445 else
2446         ol_enable_tcl="no"
2447 fi
2448 # end --enable-tcl
2449 # OpenLDAP --with-tcl_module
2450         # Check whether --with-tcl_module or --without-tcl_module was given.
2451 if test "${with_tcl_module+set}" = set; then
2452   withval="$with_tcl_module"
2453   
2454         ol_arg=invalid
2455         for ol_val in static dynamic ; do
2456                 if test "$withval" = "$ol_val" ; then
2457                         ol_arg="$ol_val"
2458                 fi
2459         done
2460         if test "$ol_arg" = "invalid" ; then
2461                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2462         fi
2463         ol_with_tcl_module="$ol_arg"
2464
2465 else
2466         ol_with_tcl_module="static"
2467 fi
2468 # end --with-tcl_module
2469
2470
2471 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2472 if test "${with_xxslurpdoptions+set}" = set; then
2473   withval="$with_xxslurpdoptions"
2474   :
2475 fi
2476
2477 # OpenLDAP --enable-slurpd
2478         # Check whether --enable-slurpd or --disable-slurpd was given.
2479 if test "${enable_slurpd+set}" = set; then
2480   enableval="$enable_slurpd"
2481   
2482         ol_arg=invalid
2483         for ol_val in auto yes no ; do
2484                 if test "$enableval" = "$ol_val" ; then
2485                         ol_arg="$ol_val"
2486                 fi
2487         done
2488         if test "$ol_arg" = "invalid" ; then
2489                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2490         fi
2491         ol_enable_slurpd="$ol_arg"
2492
2493 else
2494         ol_enable_slurpd="auto"
2495 fi
2496 # end --enable-slurpd
2497
2498 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2499 if test "${with_xxliboptions+set}" = set; then
2500   withval="$with_xxliboptions"
2501   :
2502 fi
2503
2504 # Check whether --enable-static or --disable-static was given.
2505 if test "${enable_static+set}" = set; then
2506   enableval="$enable_static"
2507   p=${PACKAGE-default}
2508 case $enableval in
2509 yes) enable_static=yes ;;
2510 no) enable_static=no ;;
2511 *)
2512   enable_static=no
2513   # Look at the argument we got.  We use all the common list separators.
2514   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2515   for pkg in $enableval; do
2516     if test "X$pkg" = "X$p"; then
2517       enable_static=yes
2518     fi
2519   done
2520   IFS="$ac_save_ifs"
2521   ;;
2522 esac
2523 else
2524   enable_static=yes
2525 fi
2526
2527 # Check whether --enable-shared or --disable-shared was given.
2528 if test "${enable_shared+set}" = set; then
2529   enableval="$enable_shared"
2530   p=${PACKAGE-default}
2531 case $enableval in
2532 yes) enable_shared=yes ;;
2533 no) enable_shared=no ;;
2534 *)
2535   enable_shared=no
2536   # Look at the argument we got.  We use all the common list separators.
2537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2538   for pkg in $enableval; do
2539     if test "X$pkg" = "X$p"; then
2540       enable_shared=yes
2541     fi
2542   done
2543   IFS="$ac_save_ifs"
2544   ;;
2545 esac
2546 else
2547   enable_shared=yes
2548 fi
2549
2550
2551
2552 # validate options
2553 if test $ol_enable_slapd = no ; then
2554                 if test $ol_enable_slapi = yes ; then
2555                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2556         fi
2557         if test $ol_enable_bdb = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2559         fi
2560         if test $ol_enable_dnssrv = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2562         fi
2563         if test $ol_enable_hdb = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2565         fi
2566         if test $ol_enable_ldap = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2568         fi
2569         if test $ol_enable_ldbm = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2571         fi
2572         if test $ol_enable_meta = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2574         fi
2575         if test $ol_enable_monitor = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2577         fi
2578         if test $ol_enable_null = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2580         fi
2581         if test $ol_enable_passwd = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2583         fi
2584         if test $ol_enable_perl = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2586         fi
2587         if test $ol_enable_shell = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2589         fi
2590         if test $ol_enable_tcl = yes ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2592         fi
2593         if test $ol_enable_sql = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2595         fi
2596         if test $ol_enable_modules = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2598         fi
2599         if test $ol_enable_multimaster = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2601         fi
2602         if test $ol_enable_wrappers = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2604         fi
2605         if test $ol_enable_rlookups = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2607         fi
2608         if test $ol_enable_aci = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2610         fi
2611         if test $ol_with_ldbm_api != auto ; then
2612                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2613         fi
2614         if test $ol_with_ldbm_type != auto ; then
2615                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2616         fi
2617         if test $ol_with_bdb_module != static ; then
2618                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2619         fi
2620         if test $ol_with_dnssrv_module != static ; then
2621                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2622         fi
2623         if test $ol_with_hdb_module != static ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2625         fi
2626         if test $ol_with_ldap_module != static ; then
2627                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2628         fi
2629         if test $ol_with_ldbm_module != static ; then
2630                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2631         fi
2632         if test $ol_with_meta_module != static ; then
2633                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2634         fi
2635         if test $ol_with_monitor_module != static ; then
2636                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2637         fi
2638         if test $ol_with_null_module != static ; then
2639                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2640         fi
2641         if test $ol_with_passwd_module != static ; then
2642                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2643         fi
2644         if test $ol_with_perl_module != static ; then
2645                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2646         fi
2647         if test $ol_with_shell_module != static ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2649         fi
2650         if test $ol_with_tcl_module != static ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2652         fi
2653         if test $ol_with_sql_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2655         fi
2656         if test $ol_enable_slurpd = yes ; then
2657                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2658         fi
2659         if test $ol_enable_rewrite = yes ; then
2660                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2661         fi
2662
2663         # force settings to no
2664         ol_enable_slapi=no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_hdb=no
2668         ol_enable_ldap=no
2669         ol_enable_ldbm=no
2670         ol_enable_meta=no
2671         ol_enable_monitor=no
2672         ol_enable_null=no
2673         ol_enable_passwd=no
2674         ol_enable_perl=no
2675         ol_enable_shell=no
2676         ol_enable_tcl=no
2677         ol_enable_sql=no
2678
2679         ol_enable_modules=no
2680         ol_enable_multimaster=no
2681         ol_enable_rlookups=no
2682         ol_enable_aci=no
2683         ol_enable_wrappers=no
2684         ol_enable_dynamic=no
2685
2686         ol_with_ldbm_api=no
2687         ol_with_ldbm_type=no
2688
2689         ol_with_bdb_module=static
2690         ol_with_dnssrv_module=static
2691         ol_with_hdb_module=static
2692         ol_with_ldap_module=static
2693         ol_with_ldbm_module=static
2694         ol_with_meta_module=static
2695         ol_with_monitor_module=static
2696         ol_with_null_module=static
2697         ol_with_passwd_module=static
2698         ol_with_perl_module=static
2699         ol_with_shell_module=static
2700         ol_with_tcl_module=static
2701         ol_with_sql_module=static
2702
2703         ol_enable_slurpd=no
2704
2705         ol_enable_rewrite=no
2706
2707 elif test $ol_enable_ldbm = no ; then
2708         
2709         if test $ol_with_ldbm_api != auto ; then
2710                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2711         fi
2712
2713         if test $ol_with_ldbm_type != auto ; then
2714                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2715         fi
2716
2717         if test $ol_with_ldbm_module != static ; then
2718                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2719         fi
2720
2721         if test $ol_enable_modules != yes -a \
2722                 $ol_enable_bdb = no -a \
2723                 $ol_enable_dnssrv = no -a \
2724                 $ol_enable_hdb = no -a \
2725                 $ol_enable_ldap = no -a \
2726                 $ol_enable_meta = no -a \
2727                 $ol_enable_monitor = no -a \
2728                 $ol_enable_null = no -a \
2729                 $ol_enable_passwd = no -a \
2730                 $ol_enable_perl = no -a \
2731                 $ol_enable_shell = no -a \
2732                 $ol_enable_sql = no -a \
2733                 $ol_enable_tcl = no ; then
2734
2735                 if test $ol_enable_slapd = yes ; then
2736                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2737                 else
2738                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2739                         ol_enable_slapd=no
2740                 fi
2741         fi
2742
2743         ol_with_ldbm_api=no
2744         ol_with_ldbm_type=no
2745         ol_with_ldbm_module=static
2746
2747         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2748                 ol_with_ldbm_api=berkeley
2749         fi
2750
2751 else
2752                 if test $ol_with_ldbm_api = gdbm -a \
2753                 $ol_with_ldbm_type = btree ; then
2754                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2755         fi
2756         if test $ol_with_ldbm_api = mdbm -a \
2757                 $ol_with_ldbm_type = btree ; then
2758                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2759         fi
2760         if test $ol_with_ldbm_api = ndbm -a \
2761                 $ol_with_ldbm_type = btree ; then
2762                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2763         fi
2764
2765         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2766                 if test $ol_with_ldbm_api = auto ; then
2767                         ol_with_ldbm_api=berkeley
2768                 elif test $ol_with_ldbm_api != berkeley ; then
2769                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2770                 fi
2771
2772         elif test $ol_enable_bdb = auto ; then
2773                 if test $ol_with_ldbm_api != berkeley \
2774                         -o $ol_with_ldbm_api != auto ; then
2775                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2776                         ol_enable_bdb=no
2777                 fi
2778         fi
2779 fi
2780
2781 if test $ol_enable_slurpd = yes ; then
2782                 if test $ol_with_threads = no ; then
2783                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2784         fi
2785 fi
2786
2787 if test $ol_enable_lmpasswd = yes ; then
2788         if test $ol_with_tls = no ; then
2789                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2790         fi
2791 fi
2792
2793 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2794         if test $ol_with_kerberos = no ; then
2795                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2796         elif test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=yes
2798         fi
2799
2800 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2801         if test $ol_with_kerberos = auto ; then
2802                 ol_with_kerberos=no
2803         elif test $ol_with_kerberos != no ; then
2804                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2805                 ol_with_kerberos=no
2806         fi
2807 fi
2808
2809 if test $ol_enable_spasswd = yes ; then
2810         if test $ol_with_cyrus_sasl = no ; then
2811                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2812         fi
2813         ol_with_cyrus_sasl=yes
2814 fi
2815
2816 echo "$ac_t""done" 1>&6
2817
2818 LDAP_LIBS=
2819 LDIF_LIBS=
2820 LDBM_LIBS=
2821 LTHREAD_LIBS=
2822 LUTIL_LIBS=
2823
2824 SLAPD_LIBS=
2825 SLURPD_LIBS=
2826
2827 BUILD_SLAPD=no
2828 BUILD_SLURPD=no
2829
2830 BUILD_THREAD=no
2831
2832 BUILD_SLAPI=no
2833 SLAPD_SLAPI_DEPEND=
2834
2835 BUILD_BDB=no
2836 BUILD_DNSSRV=no
2837 BUILD_HDB=no
2838 BUILD_LDAP=no
2839 BUILD_LDBM=no
2840 BUILD_META=no
2841 BUILD_MONITOR=no
2842 BUILD_CACHE=no
2843 BUILD_NULL=no
2844 BUILD_PASSWD=no
2845 BUILD_PERL=no
2846 BUILD_SHELL=no
2847 BUILD_SQL=no
2848 BUILD_TCL=no
2849
2850 BUILD_BDB_DYNAMIC=static
2851 BUILD_DNSSRV_DYNAMIC=static
2852 BUILD_HDB_DYNAMIC=static
2853 BUILD_LDAP_DYNAMIC=static
2854 BUILD_LDBM_DYNAMIC=static
2855 BUILD_META_DYNAMIC=static
2856 BUILD_MONITOR_DYNAMIC=static
2857 BUILD_NULL_DYNAMIC=static
2858 BUILD_PASSWD_DYNAMIC=static
2859 BUILD_PERL_DYNAMIC=static
2860 BUILD_SHELL_DYNAMIC=static
2861 BUILD_TCL_DYNAMIC=static
2862 BUILD_SQL_DYNAMIC=static
2863
2864 SLAPD_MODULES_LDFLAGS=
2865 SLAPD_MODULES_CPPFLAGS=
2866
2867 SLAPD_STATIC_BACKENDS=
2868 SLAPD_DYNAMIC_BACKENDS=
2869
2870 SLAPD_PERL_LDFLAGS=
2871 MOD_PERL_LDFLAGS=
2872 PERL_CPPFLAGS=
2873
2874 SLAPD_SQL_LDFLAGS=
2875 SLAPD_SQL_LIBS=
2876 SLAPD_SQL_INCLUDES=
2877
2878 MOD_TCL_LIB=
2879 KRB4_LIBS=
2880 KRB5_LIBS=
2881 SASL_LIBS=
2882 TERMCAP_LIBS=
2883 TLS_LIBS=
2884 MODULES_LIBS=
2885 SLAPI_LIBS=
2886 LIBSLAPI=
2887 LIBSLAPITOOLS=
2888 AUTH_LIBS=
2889
2890 SLAPD_SLP_LIBS=
2891
2892
2893 # Find a good install program.  We prefer a C program (faster),
2894 # so one script is as good as another.  But avoid the broken or
2895 # incompatible versions:
2896 # SysV /etc/install, /usr/sbin/install
2897 # SunOS /usr/etc/install
2898 # IRIX /sbin/install
2899 # AIX /bin/install
2900 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2901 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2902 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2903 # ./install, which can be erroneously created by make from ./install.sh.
2904 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2905 echo "configure:2906: checking for a BSD compatible install" >&5
2906 if test -z "$INSTALL"; then
2907 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2911   for ac_dir in $PATH; do
2912     # Account for people who put trailing slashes in PATH elements.
2913     case "$ac_dir/" in
2914     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2915     *)
2916       # OSF1 and SCO ODT 3.0 have their own names for install.
2917       # Don't use installbsd from OSF since it installs stuff as root
2918       # by default.
2919       for ac_prog in ginstall scoinst install; do
2920         if test -f $ac_dir/$ac_prog; then
2921           if test $ac_prog = install &&
2922             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2923             # AIX install.  It has an incompatible calling convention.
2924             :
2925           elif test $ac_prog = install &&
2926             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2927             # program-specific install script used by HP pwplus--don't use.
2928             :
2929           else
2930             ac_cv_path_install="$ac_dir/$ac_prog -c"
2931             break 2
2932           fi
2933         fi
2934       done
2935       ;;
2936     esac
2937   done
2938   IFS="$ac_save_IFS"
2939
2940 fi
2941   if test "${ac_cv_path_install+set}" = set; then
2942     INSTALL="$ac_cv_path_install"
2943   else
2944     # As a last resort, use the slow shell script.  We don't cache a
2945     # path for INSTALL within a source directory, because that will
2946     # break other packages using the cache if that directory is
2947     # removed, or if the path is relative.
2948     INSTALL="$ac_install_sh"
2949   fi
2950 fi
2951 echo "$ac_t""$INSTALL" 1>&6
2952
2953 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2954 # It thinks the first close brace ends the variable substitution.
2955 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2956
2957 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2958
2959 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2960
2961
2962 cat >> confdefs.h <<\EOF
2963 #define HAVE_MKVERSION 1
2964 EOF
2965
2966
2967
2968
2969 ol_aix_threads=no
2970 case "$target" in
2971 *-*-aix*)       if test -z "$CC" ; then
2972                 case "$ol_with_threads" in
2973                 auto | yes |  posix) ol_aix_threads=yes ;;
2974                 esac
2975         fi
2976 ;;
2977 esac
2978
2979 if test $ol_aix_threads = yes ; then
2980         if test -z "${CC}" ; then
2981                 for ac_prog in cc_r xlc_r cc
2982 do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984 set dummy $ac_prog; ac_word=$2
2985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2986 echo "configure:2987: checking for $ac_word" >&5
2987 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   if test -n "$CC"; then
2991   ac_cv_prog_CC="$CC" # Let the user override the test.
2992 else
2993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2994   ac_dummy="$PATH"
2995   for ac_dir in $ac_dummy; do
2996     test -z "$ac_dir" && ac_dir=.
2997     if test -f $ac_dir/$ac_word; then
2998       ac_cv_prog_CC="$ac_prog"
2999       break
3000     fi
3001   done
3002   IFS="$ac_save_ifs"
3003 fi
3004 fi
3005 CC="$ac_cv_prog_CC"
3006 if test -n "$CC"; then
3007   echo "$ac_t""$CC" 1>&6
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012 test -n "$CC" && break
3013 done
3014
3015
3016                 if test "$CC" = cc ; then
3017                                                 if test $ol_with_threads != auto ; then
3018                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3019                         else
3020                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3021                         fi
3022                         ol_with_threads=no
3023                 fi
3024         fi
3025
3026         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3027                 ol_with_threads=posix
3028                 ol_cv_pthread_create=yes
3029         fi
3030 fi
3031
3032 if test -z "${CC}"; then
3033         for ac_prog in cc gcc
3034 do
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3038 echo "configure:3039: checking for $ac_word" >&5
3039 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   if test -n "$CC"; then
3043   ac_cv_prog_CC="$CC" # Let the user override the test.
3044 else
3045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3046   ac_dummy="$PATH"
3047   for ac_dir in $ac_dummy; do
3048     test -z "$ac_dir" && ac_dir=.
3049     if test -f $ac_dir/$ac_word; then
3050       ac_cv_prog_CC="$ac_prog"
3051       break
3052     fi
3053   done
3054   IFS="$ac_save_ifs"
3055 fi
3056 fi
3057 CC="$ac_cv_prog_CC"
3058 if test -n "$CC"; then
3059   echo "$ac_t""$CC" 1>&6
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063
3064 test -n "$CC" && break
3065 done
3066 test -n "$CC" || CC="missing"
3067
3068
3069         if test "${CC}" = "missing" ; then
3070                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3071         fi
3072 fi
3073
3074 if test -z "${AR}"; then
3075         for ac_prog in ar gar
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$AR"; then
3085   ac_cv_prog_AR="$AR" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_AR="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 AR="$ac_cv_prog_AR"
3100 if test -n "$AR"; then
3101   echo "$ac_t""$AR" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$AR" && break
3107 done
3108 test -n "$AR" || AR="missing"
3109
3110
3111         if test "${AR}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116
3117
3118 # Find the correct PATH separator.  Usually this is `:', but
3119 # DJGPP uses `;' like DOS.
3120 if test "X${PATH_SEPARATOR+set}" != Xset; then
3121   UNAME=${UNAME-`uname 2>/dev/null`}
3122   case X$UNAME in
3123     *-DOS) lt_cv_sys_path_separator=';' ;;
3124     *)     lt_cv_sys_path_separator=':' ;;
3125   esac
3126   PATH_SEPARATOR=$lt_cv_sys_path_separator
3127 fi
3128
3129 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3130 echo "configure:3131: checking for Cygwin environment" >&5
3131 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137
3138 int main() {
3139
3140 #ifndef __CYGWIN__
3141 #define __CYGWIN__ __CYGWIN32__
3142 #endif
3143 return __CYGWIN__;
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3147   rm -rf conftest*
3148   ac_cv_cygwin=yes
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   ac_cv_cygwin=no
3154 fi
3155 rm -f conftest*
3156 fi
3157
3158 echo "$ac_t""$ac_cv_cygwin" 1>&6
3159 CYGWIN=
3160 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3161 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3162 echo "configure:3163: checking for mingw32 environment" >&5
3163 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166   cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169
3170 int main() {
3171 return __MINGW32__;
3172 ; return 0; }
3173 EOF
3174 if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3175   rm -rf conftest*
3176   ac_cv_mingw32=yes
3177 else
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   ac_cv_mingw32=no
3182 fi
3183 rm -f conftest*
3184 fi
3185
3186 echo "$ac_t""$ac_cv_mingw32" 1>&6
3187 MINGW32=
3188 test "$ac_cv_mingw32" = yes && MINGW32=yes
3189 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3190 echo "configure:3191: checking for EMX OS/2 environment" >&5
3191 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197
3198 int main() {
3199 return __EMX__;
3200 ; return 0; }
3201 EOF
3202 if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3203   rm -rf conftest*
3204   ac_cv_emxos2=yes
3205 else
3206   echo "configure: failed program was:" >&5
3207   cat conftest.$ac_ext >&5
3208   rm -rf conftest*
3209   ac_cv_emxos2=no
3210 fi
3211 rm -f conftest*
3212 fi
3213
3214 echo "$ac_t""$ac_cv_emxos2" 1>&6
3215 EMXOS2=
3216 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3218 echo "configure:3219: checking how to run the C preprocessor" >&5
3219 # On Suns, sometimes $CPP names a directory.
3220 if test -n "$CPP" && test -d "$CPP"; then
3221   CPP=
3222 fi
3223 if test -z "$CPP"; then
3224 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227     # This must be in double quotes, not single quotes, because CPP may get
3228   # substituted into the Makefile and "${CC-cc}" will confuse make.
3229   CPP="${CC-cc} -E"
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp.
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <assert.h>
3236 Syntax Error
3237 EOF
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3242   :
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   CPP="${CC-cc} -E -traditional-cpp"
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <assert.h>
3253 Syntax Error
3254 EOF
3255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3256 { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3258 if test -z "$ac_err"; then
3259   :
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   CPP="${CC-cc} -nologo -E"
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <assert.h>
3270 Syntax Error
3271 EOF
3272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3273 { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275 if test -z "$ac_err"; then
3276   :
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   CPP=/lib/cpp
3283 fi
3284 rm -f conftest*
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289   ac_cv_prog_CPP="$CPP"
3290 fi
3291   CPP="$ac_cv_prog_CPP"
3292 else
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295 echo "$ac_t""$CPP" 1>&6
3296
3297 # Check whether --enable-fast-install or --disable-fast-install was given.
3298 if test "${enable_fast_install+set}" = set; then
3299   enableval="$enable_fast_install"
3300   p=${PACKAGE-default}
3301 case $enableval in
3302 yes) enable_fast_install=yes ;;
3303 no) enable_fast_install=no ;;
3304 *)
3305   enable_fast_install=no
3306   # Look at the argument we got.  We use all the common list separators.
3307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3308   for pkg in $enableval; do
3309     if test "X$pkg" = "X$p"; then
3310       enable_fast_install=yes
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314   ;;
3315 esac
3316 else
3317   enable_fast_install=yes
3318 fi
3319
3320 # Extract the first word of "gcc", so it can be a program name with args.
3321 set dummy gcc; ac_word=$2
3322 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3323 echo "configure:3324: checking for $ac_word" >&5
3324 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   if test -n "$CC"; then
3328   ac_cv_prog_CC="$CC" # Let the user override the test.
3329 else
3330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3331   ac_dummy="$PATH"
3332   for ac_dir in $ac_dummy; do
3333     test -z "$ac_dir" && ac_dir=.
3334     if test -f $ac_dir/$ac_word; then
3335       ac_cv_prog_CC="gcc"
3336       break
3337     fi
3338   done
3339   IFS="$ac_save_ifs"
3340 fi
3341 fi
3342 CC="$ac_cv_prog_CC"
3343 if test -n "$CC"; then
3344   echo "$ac_t""$CC" 1>&6
3345 else
3346   echo "$ac_t""no" 1>&6
3347 fi
3348
3349 if test -z "$CC"; then
3350   # Extract the first word of "cc", so it can be a program name with args.
3351 set dummy cc; ac_word=$2
3352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3353 echo "configure:3354: checking for $ac_word" >&5
3354 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   if test -n "$CC"; then
3358   ac_cv_prog_CC="$CC" # Let the user override the test.
3359 else
3360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3361   ac_prog_rejected=no
3362   ac_dummy="$PATH"
3363   for ac_dir in $ac_dummy; do
3364     test -z "$ac_dir" && ac_dir=.
3365     if test -f $ac_dir/$ac_word; then
3366       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3367         ac_prog_rejected=yes
3368         continue
3369       fi
3370       ac_cv_prog_CC="cc"
3371       break
3372     fi
3373   done
3374   IFS="$ac_save_ifs"
3375 if test $ac_prog_rejected = yes; then
3376   # We found a bogon in the path, so make sure we never use it.
3377   set dummy $ac_cv_prog_CC
3378   shift
3379   if test $# -gt 0; then
3380     # We chose a different compiler from the bogus one.
3381     # However, it has the same basename, so the bogon will be chosen
3382     # first if we set CC to just the basename; use the full file name.
3383     shift
3384     set dummy "$ac_dir/$ac_word" "$@"
3385     shift
3386     ac_cv_prog_CC="$@"
3387   fi
3388 fi
3389 fi
3390 fi
3391 CC="$ac_cv_prog_CC"
3392 if test -n "$CC"; then
3393   echo "$ac_t""$CC" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398   if test -z "$CC"; then
3399     case "`uname -s`" in
3400     *win32* | *WIN32* | *CYGWIN*)
3401       # Extract the first word of "cl", so it can be a program name with args.
3402 set dummy cl; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   if test -n "$CC"; then
3409   ac_cv_prog_CC="$CC" # Let the user override the test.
3410 else
3411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3412   ac_dummy="$PATH"
3413   for ac_dir in $ac_dummy; do
3414     test -z "$ac_dir" && ac_dir=.
3415     if test -f $ac_dir/$ac_word; then
3416       ac_cv_prog_CC="cl"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 fi
3422 fi
3423 CC="$ac_cv_prog_CC"
3424 if test -n "$CC"; then
3425   echo "$ac_t""$CC" 1>&6
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429  ;;
3430     esac
3431   fi
3432   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3433 fi
3434
3435 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3436 echo "configure:3437: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3437
3438 ac_ext=c
3439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3440 ac_cpp='$CPP $CPPFLAGS'
3441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3443 cross_compiling=$ac_cv_prog_cc_cross
3444
3445 cat > conftest.$ac_ext << EOF
3446
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449
3450 main(){return(0);}
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3453   ac_cv_prog_cc_works=yes
3454   # If we can't run a trivial program, we are probably using a cross compiler.
3455   if (./conftest; exit) 2>/dev/null; then
3456     ac_cv_prog_cc_cross=no
3457   else
3458     ac_cv_prog_cc_cross=yes
3459   fi
3460 else
3461   echo "configure: failed program was:" >&5
3462   cat conftest.$ac_ext >&5
3463   ac_cv_prog_cc_works=no
3464 fi
3465 rm -fr conftest*
3466 ac_ext=c
3467 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3468 ac_cpp='$CPP $CPPFLAGS'
3469 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3470 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3471 cross_compiling=$ac_cv_prog_cc_cross
3472
3473 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3474 if test $ac_cv_prog_cc_works = no; then
3475   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3476 fi
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3479 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3480 cross_compiling=$ac_cv_prog_cc_cross
3481
3482 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether we are using GNU C" >&5
3484 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   cat > conftest.c <<EOF
3488 #ifdef __GNUC__
3489   yes;
3490 #endif
3491 EOF
3492 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3493   ac_cv_prog_gcc=yes
3494 else
3495   ac_cv_prog_gcc=no
3496 fi
3497 fi
3498
3499 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3500
3501 if test $ac_cv_prog_gcc = yes; then
3502   GCC=yes
3503 else
3504   GCC=
3505 fi
3506
3507 ac_test_CFLAGS="${CFLAGS+set}"
3508 ac_save_CFLAGS="$CFLAGS"
3509 CFLAGS=
3510 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3511 echo "configure:3512: checking whether ${CC-cc} accepts -g" >&5
3512 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   echo 'void f(){}' > conftest.c
3516 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3517   ac_cv_prog_cc_g=yes
3518 else
3519   ac_cv_prog_cc_g=no
3520 fi
3521 rm -f conftest*
3522
3523 fi
3524
3525 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3526 if test "$ac_test_CFLAGS" = set; then
3527   CFLAGS="$ac_save_CFLAGS"
3528 elif test $ac_cv_prog_cc_g = yes; then
3529   if test "$GCC" = yes; then
3530     CFLAGS="-g -O2"
3531   else
3532     CFLAGS="-g"
3533   fi
3534 else
3535   if test "$GCC" = yes; then
3536     CFLAGS="-O2"
3537   else
3538     CFLAGS=
3539   fi
3540 fi
3541
3542 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3543 if test "${with_gnu_ld+set}" = set; then
3544   withval="$with_gnu_ld"
3545   test "$withval" = no || with_gnu_ld=yes
3546 else
3547   with_gnu_ld=no
3548 fi
3549
3550 ac_prog=ld
3551 if test "$GCC" = yes; then
3552   # Check if gcc -print-prog-name=ld gives a path.
3553   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3554 echo "configure:3555: checking for ld used by GCC" >&5
3555   case $host in
3556   *-*-mingw*)
3557     # gcc leaves a trailing carriage return which upsets mingw
3558     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3559   *)
3560     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3561   esac
3562   case $ac_prog in
3563     # Accept absolute paths.
3564     [\\/]* | [A-Za-z]:[\\/]*)
3565       re_direlt='/[^/][^/]*/\.\./'
3566       # Canonicalize the path of ld
3567       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3568       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3569         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3570       done
3571       test -z "$LD" && LD="$ac_prog"
3572       ;;
3573   "")
3574     # If it fails, then pretend we aren't using GCC.
3575     ac_prog=ld
3576     ;;
3577   *)
3578     # If it is relative, then search for the first ld in PATH.
3579     with_gnu_ld=unknown
3580     ;;
3581   esac
3582 elif test "$with_gnu_ld" = yes; then
3583   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3584 echo "configure:3585: checking for GNU ld" >&5
3585 else
3586   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3587 echo "configure:3588: checking for non-GNU ld" >&5
3588 fi
3589 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   if test -z "$LD"; then
3593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3594   for ac_dir in $PATH; do
3595     test -z "$ac_dir" && ac_dir=.
3596     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3597       lt_cv_path_LD="$ac_dir/$ac_prog"
3598       # Check to see if the program is GNU ld.  I'd rather use --version,
3599       # but apparently some GNU ld's only accept -v.
3600       # Break only if it was the GNU/non-GNU ld that we prefer.
3601       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3602         test "$with_gnu_ld" != no && break
3603       else
3604         test "$with_gnu_ld" != yes && break
3605       fi
3606     fi
3607   done
3608   IFS="$ac_save_ifs"
3609 else
3610   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3611 fi
3612 fi
3613
3614 LD="$lt_cv_path_LD"
3615 if test -n "$LD"; then
3616   echo "$ac_t""$LD" 1>&6
3617 else
3618   echo "$ac_t""no" 1>&6
3619 fi
3620 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3621 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3622 echo "configure:3623: checking if the linker ($LD) is GNU ld" >&5
3623 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3627 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3628   lt_cv_prog_gnu_ld=yes
3629 else
3630   lt_cv_prog_gnu_ld=no
3631 fi
3632 fi
3633
3634 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3635 with_gnu_ld=$lt_cv_prog_gnu_ld
3636
3637
3638 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3639 echo "configure:3640: checking for $LD option to reload object files" >&5
3640 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   lt_cv_ld_reload_flag='-r'
3644 fi
3645
3646 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3647 reload_flag=$lt_cv_ld_reload_flag
3648 test -n "$reload_flag" && reload_flag=" $reload_flag"
3649
3650 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3651 echo "configure:3652: checking for BSD-compatible nm" >&5
3652 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   if test -n "$NM"; then
3656   # Let the user override the test.
3657   lt_cv_path_NM="$NM"
3658 else
3659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3660   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3661     test -z "$ac_dir" && ac_dir=.
3662     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3663     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3664       # Check to see if the nm accepts a BSD-compat flag.
3665       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3666       #   nm: unknown option "B" ignored
3667       # Tru64's nm complains that /dev/null is an invalid object file
3668       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3669         lt_cv_path_NM="$tmp_nm -B"
3670         break
3671       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3672         lt_cv_path_NM="$tmp_nm -p"
3673         break
3674       else
3675         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3676         continue # so that we can try to find one that supports BSD flags
3677       fi
3678     fi
3679   done
3680   IFS="$ac_save_ifs"
3681   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3682 fi
3683 fi
3684
3685 NM="$lt_cv_path_NM"
3686 echo "$ac_t""$NM" 1>&6
3687
3688 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3689 echo "configure:3690: checking for a sed that does not truncate output" >&5
3690 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   # Loop through the user's path and test for sed and gsed.
3694 # Then use that list of sed's as ones to test for truncation.
3695 as_executable_p="test -f"
3696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697 for as_dir in $PATH
3698 do
3699   IFS=$as_save_IFS
3700   test -z "$as_dir" && as_dir=.
3701   for ac_prog in sed gsed; do
3702     for ac_exec_ext in '' $ac_executable_extensions; do
3703       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3704         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3705       fi
3706     done
3707   done
3708 done
3709
3710   # Create a temporary directory, and hook for its removal unless debugging.
3711 $debug ||
3712 {
3713   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3714   trap '{ (exit 1); exit 1; }' 1 2 13 15
3715 }
3716
3717 # Create a (secure) tmp directory for tmp files.
3718 : ${TMPDIR=/tmp}
3719 {
3720   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3721   test -n "$tmp" && test -d "$tmp"
3722 }  ||
3723 {
3724   tmp=$TMPDIR/sed$$-$RANDOM
3725   (umask 077 && mkdir $tmp)
3726 } ||
3727 {
3728    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3729    { (exit 1); exit 1; }
3730 }
3731   _max=0
3732   _count=0
3733   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3734   # along with /bin/sed that truncates output.
3735   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3736     test ! -f ${_sed} && break
3737     cat /dev/null > "$tmp/sed.in"
3738     _count=0
3739     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3740     # Check for GNU sed and select it if it is found.
3741     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3742       lt_cv_path_SED=${_sed}
3743       break
3744     fi
3745     while true; do
3746       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3747       mv "$tmp/sed.tmp" "$tmp/sed.in"
3748       cp "$tmp/sed.in" "$tmp/sed.nl"
3749       echo >>"$tmp/sed.nl"
3750       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3751       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3752       # 40000 chars as input seems more than enough
3753       test $_count -gt 10 && break
3754       _count=`expr $_count + 1`
3755       if test $_count -gt $_max; then
3756         _max=$_count
3757         lt_cv_path_SED=$_sed
3758       fi
3759     done
3760   done
3761   rm -rf "$tmp"
3762
3763 fi
3764
3765 if test "X$SED" != "X"; then
3766   lt_cv_path_SED=$SED
3767 else
3768   SED=$lt_cv_path_SED
3769 fi
3770 echo "$ac_t""$SED" 1>&6
3771
3772 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3773 echo "configure:3774: checking whether ln -s works" >&5
3774 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3775   echo $ac_n "(cached) $ac_c" 1>&6
3776 else
3777   rm -f conftestdata
3778 if ln -s X conftestdata 2>/dev/null
3779 then
3780   rm -f conftestdata
3781   ac_cv_prog_LN_S="ln -s"
3782 else
3783   ac_cv_prog_LN_S=ln
3784 fi
3785 fi
3786 LN_S="$ac_cv_prog_LN_S"
3787 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3788   echo "$ac_t""yes" 1>&6
3789 else
3790   echo "$ac_t""no" 1>&6
3791 fi
3792
3793 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3794 echo "configure:3795: checking how to recognise dependent libraries" >&5
3795 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   lt_cv_file_magic_cmd='$MAGIC_CMD'
3799 lt_cv_file_magic_test_file=
3800 lt_cv_deplibs_check_method='unknown'
3801 # Need to set the preceding variable on all platforms that support
3802 # interlibrary dependencies.
3803 # 'none' -- dependencies not supported.
3804 # `unknown' -- same as none, but documents that we really don't know.
3805 # 'pass_all' -- all dependencies passed with no checks.
3806 # 'test_compile' -- check by making test program.
3807 # 'file_magic [[regex]]' -- check by looking for files in library path
3808 # which responds to the $file_magic_cmd with a given egrep regex.
3809 # If you have `file' or equivalent on your system and you're not sure
3810 # whether `pass_all' will *always* work, you probably want this one.
3811
3812 case $host_os in
3813 aix4* | aix5*)
3814   lt_cv_deplibs_check_method=pass_all
3815   ;;
3816
3817 beos*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 bsdi4*)
3822   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3823   lt_cv_file_magic_cmd='/usr/bin/file -L'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   ;;
3826
3827 cygwin* | mingw* | pw32*)
3828   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3829   lt_cv_file_magic_cmd='$OBJDUMP -f'
3830   ;;
3831
3832 darwin* | rhapsody*)
3833   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3834   lt_cv_file_magic_cmd='/usr/bin/file -L'
3835   case "$host_os" in
3836   rhapsody* | darwin1.[012])
3837     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3838     ;;
3839   *) # Darwin 1.3 on
3840     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3841     ;;
3842   esac
3843   ;;
3844
3845 freebsd*)
3846   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3847     case $host_cpu in
3848     i*86 )
3849       # Not sure whether the presence of OpenBSD here was a mistake.
3850       # Let's accept both of them until this is cleared up.
3851       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3852       lt_cv_file_magic_cmd=/usr/bin/file
3853       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3854       ;;
3855     esac
3856   else
3857     lt_cv_deplibs_check_method=pass_all
3858   fi
3859   ;;
3860
3861 gnu*)
3862   lt_cv_deplibs_check_method=pass_all
3863   ;;
3864
3865 hpux10.20*|hpux11*)
3866   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3867   lt_cv_file_magic_cmd=/usr/bin/file
3868   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3869   ;;
3870
3871 irix5* | irix6* | nonstopux*)
3872   case $host_os in
3873   irix5* | nonstopux*)
3874     # this will be overridden with pass_all, but let us keep it just in case
3875     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3876     ;;
3877   *)
3878     case $LD in
3879     *-32|*"-32 ") libmagic=32-bit;;
3880     *-n32|*"-n32 ") libmagic=N32;;
3881     *-64|*"-64 ") libmagic=64-bit;;
3882     *) libmagic=never-match;;
3883     esac
3884     # this will be overridden with pass_all, but let us keep it just in case
3885     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3886     ;;
3887   esac
3888   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3889   lt_cv_deplibs_check_method=pass_all
3890   ;;
3891
3892 # This must be Linux ELF.
3893 linux-gnu*)
3894   case $host_cpu in
3895   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3896     lt_cv_deplibs_check_method=pass_all ;;
3897   *)
3898     # glibc up to 2.1.1 does not perform some relocations on ARM
3899     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3900   esac
3901   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3902   ;;
3903
3904 netbsd*)
3905   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3906     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3907   else
3908     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3909   fi
3910   ;;
3911
3912 newos6*)
3913   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3914   lt_cv_file_magic_cmd=/usr/bin/file
3915   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3916   ;;
3917
3918 openbsd*)
3919   lt_cv_file_magic_cmd=/usr/bin/file
3920   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3921   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3922     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3923   else
3924     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3925   fi
3926   ;;
3927
3928 osf3* | osf4* | osf5*)
3929   # this will be overridden with pass_all, but let us keep it just in case
3930   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3931   lt_cv_file_magic_test_file=/shlib/libc.so
3932   lt_cv_deplibs_check_method=pass_all
3933   ;;
3934
3935 sco3.2v5*)
3936   lt_cv_deplibs_check_method=pass_all
3937   ;;
3938
3939 solaris*)
3940   lt_cv_deplibs_check_method=pass_all
3941   lt_cv_file_magic_test_file=/lib/libc.so
3942   ;;
3943
3944 sysv5uw[78]* | sysv4*uw2*)
3945   lt_cv_deplibs_check_method=pass_all
3946   ;;
3947
3948 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3949   case $host_vendor in
3950   motorola)
3951     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]'
3952     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3953     ;;
3954   ncr)
3955     lt_cv_deplibs_check_method=pass_all
3956     ;;
3957   sequent)
3958     lt_cv_file_magic_cmd='/bin/file'
3959     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3960     ;;
3961   sni)
3962     lt_cv_file_magic_cmd='/bin/file'
3963     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3964     lt_cv_file_magic_test_file=/lib/libc.so
3965     ;;
3966   siemens)
3967     lt_cv_deplibs_check_method=pass_all
3968     ;;
3969   esac
3970   ;;
3971 esac
3972
3973 fi
3974
3975 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3976 file_magic_cmd=$lt_cv_file_magic_cmd
3977 deplibs_check_method=$lt_cv_deplibs_check_method
3978
3979 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3980 echo "configure:3981: checking for object suffix" >&5
3981 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3982   echo $ac_n "(cached) $ac_c" 1>&6
3983 else
3984   rm -f conftest*
3985 echo 'int i = 1;' > conftest.$ac_ext
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   for ac_file in conftest.*; do
3988     case $ac_file in
3989     *.c) ;;
3990     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3991     esac
3992   done
3993 else
3994   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$ac_cv_objext" 1>&6
4000 OBJEXT=$ac_cv_objext
4001 ac_objext=$ac_cv_objext
4002
4003
4004
4005
4006 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4007 echo "configure:4008: checking for executable suffix" >&5
4008 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4012   ac_cv_exeext=.exe
4013 else
4014   rm -f conftest*
4015   echo 'int main () { return 0; }' > conftest.$ac_ext
4016   ac_cv_exeext=
4017   if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4018     for file in conftest.*; do
4019       case $file in
4020       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4021       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4022       esac
4023     done
4024   else
4025     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4026   fi
4027   rm -f conftest*
4028   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4029 fi
4030 fi
4031
4032 EXEEXT=""
4033 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4034 echo "$ac_t""${ac_cv_exeext}" 1>&6
4035 ac_exeext=$EXEEXT
4036
4037 if test $host != $build; then
4038   ac_tool_prefix=${host_alias}-
4039 else
4040   ac_tool_prefix=
4041 fi
4042
4043
4044
4045
4046 # Check for command to grab the raw symbol name followed by C symbol from nm.
4047 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4048 echo "configure:4049: checking command to parse $NM output" >&5
4049 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   
4053 # These are sane defaults that work on at least a few old systems.
4054 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4055
4056 # Character class describing NM global symbol codes.
4057 symcode='[BCDEGRST]'
4058
4059 # Regexp to match symbols that can be accessed directly from C.
4060 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4061
4062 # Transform the above into a raw symbol and a C symbol.
4063 symxfrm='\1 \2\3 \3'
4064
4065 # Transform an extracted symbol line into a proper C declaration
4066 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4067
4068 # Transform an extracted symbol line into symbol name and symbol address
4069 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'"
4070
4071 # Define system-specific variables.
4072 case $host_os in
4073 aix*)
4074   symcode='[BCDT]'
4075   ;;
4076 cygwin* | mingw* | pw32*)
4077   symcode='[ABCDGISTW]'
4078   ;;
4079 hpux*) # Its linker distinguishes data from code symbols
4080   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4081   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'"
4082   ;;
4083 irix* | nonstopux*)
4084   symcode='[BCDEGRST]'
4085   ;;
4086 osf*)
4087   symcode='[BCDEGQRST]'
4088   ;;
4089 solaris* | sysv5*)
4090   symcode='[BDT]'
4091   ;;
4092 sysv4)
4093   symcode='[DFNSTU]'
4094   ;;
4095 esac
4096
4097 # Handle CRLF in mingw tool chain
4098 opt_cr=
4099 case $host_os in
4100 mingw*)
4101   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4102   ;;
4103 esac
4104
4105 # If we're using GNU nm, then use its standard symbol codes.
4106 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4107   symcode='[ABCDGISTW]'
4108 fi
4109
4110 # Try without a prefix undercore, then with it.
4111 for ac_symprfx in "" "_"; do
4112
4113   # Write the raw and C identifiers.
4114 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4115
4116   # Check to see that the pipe works correctly.
4117   pipe_works=no
4118   rm -f conftest*
4119   cat > conftest.$ac_ext <<EOF
4120 #ifdef __cplusplus
4121 extern "C" {
4122 #endif
4123 char nm_test_var;
4124 void nm_test_func(){}
4125 #ifdef __cplusplus
4126 }
4127 #endif
4128 int main(){nm_test_var='a';nm_test_func();return(0);}
4129 EOF
4130
4131   if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132     # Now try to grab the symbols.
4133     nlist=conftest.nm
4134     if { (eval echo configure:4135: \"$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
4135       # Try sorting and uniquifying the output.
4136       if sort "$nlist" | uniq > "$nlist"T; then
4137         mv -f "$nlist"T "$nlist"
4138       else
4139         rm -f "$nlist"T
4140       fi
4141
4142       # Make sure that we snagged all the symbols we need.
4143       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4144         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4145           cat <<EOF > conftest.$ac_ext
4146 #ifdef __cplusplus
4147 extern "C" {
4148 #endif
4149
4150 EOF
4151           # Now generate the symbol file.
4152           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4153
4154           cat <<EOF >> conftest.$ac_ext
4155 #if defined (__STDC__) && __STDC__
4156 # define lt_ptr void *
4157 #else
4158 # define lt_ptr char *
4159 # define const
4160 #endif
4161
4162 /* The mapping between symbol names and symbols. */
4163 const struct {
4164   const char *name;
4165   lt_ptr address;
4166 }
4167 lt_preloaded_symbols[] =
4168 {
4169 EOF
4170           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4171           cat <<\EOF >> conftest.$ac_ext
4172   {0, (lt_ptr) 0}
4173 };
4174
4175 #ifdef __cplusplus
4176 }
4177 #endif
4178 EOF
4179           # Now try linking the two files.
4180           mv conftest.$ac_objext conftstm.$ac_objext
4181           save_LIBS="$LIBS"
4182           save_CFLAGS="$CFLAGS"
4183           LIBS="conftstm.$ac_objext"
4184           CFLAGS="$CFLAGS$no_builtin_flag"
4185           if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4186             pipe_works=yes
4187           fi
4188           LIBS="$save_LIBS"
4189           CFLAGS="$save_CFLAGS"
4190         else
4191           echo "cannot find nm_test_func in $nlist" >&5
4192         fi
4193       else
4194         echo "cannot find nm_test_var in $nlist" >&5
4195       fi
4196     else
4197       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4198     fi
4199   else
4200     echo "$progname: failed program was:" >&5
4201     cat conftest.$ac_ext >&5
4202   fi
4203   rm -f conftest* conftst*
4204
4205   # Do not use the global_symbol_pipe unless it works.
4206   if test "$pipe_works" = yes; then
4207     break
4208   else
4209     lt_cv_sys_global_symbol_pipe=
4210   fi
4211 done
4212
4213 fi
4214
4215 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4216 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4217   global_symbol_to_cdecl=
4218   global_symbol_to_c_name_address=
4219 else
4220   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4221   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4222 fi
4223 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4224 then
4225   echo "$ac_t""failed" 1>&6
4226 else
4227   echo "$ac_t""ok" 1>&6
4228 fi
4229
4230 for ac_hdr in dlfcn.h
4231 do
4232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4234 echo "configure:4235: checking for $ac_hdr" >&5
4235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 #include <$ac_hdr>
4242 EOF
4243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4244 { (eval echo configure:4245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4246 if test -z "$ac_err"; then
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=yes"
4249 else
4250   echo "$ac_err" >&5
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   eval "ac_cv_header_$ac_safe=no"
4255 fi
4256 rm -f conftest*
4257 fi
4258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4259   echo "$ac_t""yes" 1>&6
4260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4261   cat >> confdefs.h <<EOF
4262 #define $ac_tr_hdr 1
4263 EOF
4264  
4265 else
4266   echo "$ac_t""no" 1>&6
4267 fi
4268 done
4269
4270
4271
4272
4273
4274
4275 # Only perform the check for file, if the check method requires it
4276 case $deplibs_check_method in
4277 file_magic*)
4278   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4279     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4280 echo "configure:4281: checking for ${ac_tool_prefix}file" >&5
4281 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   case $MAGIC_CMD in
4285   /*)
4286   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4287   ;;
4288   ?:/*)
4289   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4290   ;;
4291   *)
4292   ac_save_MAGIC_CMD="$MAGIC_CMD"
4293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4294   ac_dummy="/usr/bin:$PATH"
4295   for ac_dir in $ac_dummy; do
4296     test -z "$ac_dir" && ac_dir=.
4297     if test -f $ac_dir/${ac_tool_prefix}file; then
4298       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4299       if test -n "$file_magic_test_file"; then
4300         case $deplibs_check_method in
4301         "file_magic "*)
4302           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4303           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4304           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4305             egrep "$file_magic_regex" > /dev/null; then
4306             :
4307           else
4308             cat <<EOF 1>&2
4309
4310 *** Warning: the command libtool uses to detect shared libraries,
4311 *** $file_magic_cmd, produces output that libtool cannot recognize.
4312 *** The result is that libtool may fail to recognize shared libraries
4313 *** as such.  This will affect the creation of libtool libraries that
4314 *** depend on shared libraries, but programs linked with such libtool
4315 *** libraries will work regardless of this problem.  Nevertheless, you
4316 *** may want to report the problem to your system manager and/or to
4317 *** bug-libtool@gnu.org
4318
4319 EOF
4320           fi ;;
4321         esac
4322       fi
4323       break
4324     fi
4325   done
4326   IFS="$ac_save_ifs"
4327   MAGIC_CMD="$ac_save_MAGIC_CMD"
4328   ;;
4329 esac
4330 fi
4331
4332 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4333 if test -n "$MAGIC_CMD"; then
4334   echo "$ac_t""$MAGIC_CMD" 1>&6
4335 else
4336   echo "$ac_t""no" 1>&6
4337 fi
4338
4339 if test -z "$lt_cv_path_MAGIC_CMD"; then
4340   if test -n "$ac_tool_prefix"; then
4341     echo $ac_n "checking for file""... $ac_c" 1>&6
4342 echo "configure:4343: checking for file" >&5
4343 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   case $MAGIC_CMD in
4347   /*)
4348   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4349   ;;
4350   ?:/*)
4351   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4352   ;;
4353   *)
4354   ac_save_MAGIC_CMD="$MAGIC_CMD"
4355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4356   ac_dummy="/usr/bin:$PATH"
4357   for ac_dir in $ac_dummy; do
4358     test -z "$ac_dir" && ac_dir=.
4359     if test -f $ac_dir/file; then
4360       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4361       if test -n "$file_magic_test_file"; then
4362         case $deplibs_check_method in
4363         "file_magic "*)
4364           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4365           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4366           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4367             egrep "$file_magic_regex" > /dev/null; then
4368             :
4369           else
4370             cat <<EOF 1>&2
4371
4372 *** Warning: the command libtool uses to detect shared libraries,
4373 *** $file_magic_cmd, produces output that libtool cannot recognize.
4374 *** The result is that libtool may fail to recognize shared libraries
4375 *** as such.  This will affect the creation of libtool libraries that
4376 *** depend on shared libraries, but programs linked with such libtool
4377 *** libraries will work regardless of this problem.  Nevertheless, you
4378 *** may want to report the problem to your system manager and/or to
4379 *** bug-libtool@gnu.org
4380
4381 EOF
4382           fi ;;
4383         esac
4384       fi
4385       break
4386     fi
4387   done
4388   IFS="$ac_save_ifs"
4389   MAGIC_CMD="$ac_save_MAGIC_CMD"
4390   ;;
4391 esac
4392 fi
4393
4394 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4395 if test -n "$MAGIC_CMD"; then
4396   echo "$ac_t""$MAGIC_CMD" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401   else
4402     MAGIC_CMD=:
4403   fi
4404 fi
4405
4406   fi
4407   ;;
4408 esac
4409
4410 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4411 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_word" >&5
4414 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   if test -n "$RANLIB"; then
4418   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4419 else
4420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4421   ac_dummy="$PATH"
4422   for ac_dir in $ac_dummy; do
4423     test -z "$ac_dir" && ac_dir=.
4424     if test -f $ac_dir/$ac_word; then
4425       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4426       break
4427     fi
4428   done
4429   IFS="$ac_save_ifs"
4430 fi
4431 fi
4432 RANLIB="$ac_cv_prog_RANLIB"
4433 if test -n "$RANLIB"; then
4434   echo "$ac_t""$RANLIB" 1>&6
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439
4440 if test -z "$ac_cv_prog_RANLIB"; then
4441 if test -n "$ac_tool_prefix"; then
4442   # Extract the first word of "ranlib", so it can be a program name with args.
4443 set dummy ranlib; ac_word=$2
4444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_word" >&5
4446 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   if test -n "$RANLIB"; then
4450   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4451 else
4452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4453   ac_dummy="$PATH"
4454   for ac_dir in $ac_dummy; do
4455     test -z "$ac_dir" && ac_dir=.
4456     if test -f $ac_dir/$ac_word; then
4457       ac_cv_prog_RANLIB="ranlib"
4458       break
4459     fi
4460   done
4461   IFS="$ac_save_ifs"
4462   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4463 fi
4464 fi
4465 RANLIB="$ac_cv_prog_RANLIB"
4466 if test -n "$RANLIB"; then
4467   echo "$ac_t""$RANLIB" 1>&6
4468 else
4469   echo "$ac_t""no" 1>&6
4470 fi
4471
4472 else
4473   RANLIB=":"
4474 fi
4475 fi
4476
4477 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4478 set dummy ${ac_tool_prefix}strip; ac_word=$2
4479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_word" >&5
4481 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   if test -n "$STRIP"; then
4485   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4486 else
4487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4488   ac_dummy="$PATH"
4489   for ac_dir in $ac_dummy; do
4490     test -z "$ac_dir" && ac_dir=.
4491     if test -f $ac_dir/$ac_word; then
4492       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4493       break
4494     fi
4495   done
4496   IFS="$ac_save_ifs"
4497 fi
4498 fi
4499 STRIP="$ac_cv_prog_STRIP"
4500 if test -n "$STRIP"; then
4501   echo "$ac_t""$STRIP" 1>&6
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506
4507 if test -z "$ac_cv_prog_STRIP"; then
4508 if test -n "$ac_tool_prefix"; then
4509   # Extract the first word of "strip", so it can be a program name with args.
4510 set dummy strip; ac_word=$2
4511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_word" >&5
4513 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   if test -n "$STRIP"; then
4517   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4518 else
4519   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4520   ac_dummy="$PATH"
4521   for ac_dir in $ac_dummy; do
4522     test -z "$ac_dir" && ac_dir=.
4523     if test -f $ac_dir/$ac_word; then
4524       ac_cv_prog_STRIP="strip"
4525       break
4526     fi
4527   done
4528   IFS="$ac_save_ifs"
4529   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4530 fi
4531 fi
4532 STRIP="$ac_cv_prog_STRIP"
4533 if test -n "$STRIP"; then
4534   echo "$ac_t""$STRIP" 1>&6
4535 else
4536   echo "$ac_t""no" 1>&6
4537 fi
4538
4539 else
4540   STRIP=":"
4541 fi
4542 fi
4543
4544
4545 enable_dlopen=yes
4546 enable_win32_dll=yes
4547
4548 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4549 if test "${enable_libtool_lock+set}" = set; then
4550   enableval="$enable_libtool_lock"
4551   :
4552 fi
4553
4554 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4555
4556 # Some flags need to be propagated to the compiler or linker for good
4557 # libtool support.
4558 case $host in
4559 *-*-irix6*)
4560   # Find out which ABI we are using.
4561   echo '#line 4562 "configure"' > conftest.$ac_ext
4562   if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4563     case `/usr/bin/file conftest.$ac_objext` in
4564     *32-bit*)
4565       LD="${LD-ld} -32"
4566       ;;
4567     *N32*)
4568       LD="${LD-ld} -n32"
4569       ;;
4570     *64-bit*)
4571       LD="${LD-ld} -64"
4572       ;;
4573     esac
4574   fi
4575   rm -rf conftest*
4576   ;;
4577
4578 *-*-sco3.2v5*)
4579   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4580   SAVE_CFLAGS="$CFLAGS"
4581   CFLAGS="$CFLAGS -belf"
4582   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4583 echo "configure:4584: checking whether the C compiler needs -belf" >&5
4584 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   
4588      ac_ext=c
4589 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4590 ac_cpp='$CPP $CPPFLAGS'
4591 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4592 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4593 cross_compiling=$ac_cv_prog_cc_cross
4594
4595      cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598
4599 int main() {
4600
4601 ; return 0; }
4602 EOF
4603 if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4604   rm -rf conftest*
4605   lt_cv_cc_needs_belf=yes
4606 else
4607   echo "configure: failed program was:" >&5
4608   cat conftest.$ac_ext >&5
4609   rm -rf conftest*
4610   lt_cv_cc_needs_belf=no
4611 fi
4612 rm -f conftest*
4613      ac_ext=c
4614 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4615 ac_cpp='$CPP $CPPFLAGS'
4616 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4617 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4618 cross_compiling=$ac_cv_prog_cc_cross
4619
4620 fi
4621
4622 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4623   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4624     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4625     CFLAGS="$SAVE_CFLAGS"
4626   fi
4627   ;;
4628
4629 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4630   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4631 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_word" >&5
4634 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   if test -n "$DLLTOOL"; then
4638   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4639 else
4640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4641   ac_dummy="$PATH"
4642   for ac_dir in $ac_dummy; do
4643     test -z "$ac_dir" && ac_dir=.
4644     if test -f $ac_dir/$ac_word; then
4645       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4646       break
4647     fi
4648   done
4649   IFS="$ac_save_ifs"
4650 fi
4651 fi
4652 DLLTOOL="$ac_cv_prog_DLLTOOL"
4653 if test -n "$DLLTOOL"; then
4654   echo "$ac_t""$DLLTOOL" 1>&6
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659
4660 if test -z "$ac_cv_prog_DLLTOOL"; then
4661 if test -n "$ac_tool_prefix"; then
4662   # Extract the first word of "dlltool", so it can be a program name with args.
4663 set dummy dlltool; ac_word=$2
4664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_word" >&5
4666 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   if test -n "$DLLTOOL"; then
4670   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4671 else
4672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4673   ac_dummy="$PATH"
4674   for ac_dir in $ac_dummy; do
4675     test -z "$ac_dir" && ac_dir=.
4676     if test -f $ac_dir/$ac_word; then
4677       ac_cv_prog_DLLTOOL="dlltool"
4678       break
4679     fi
4680   done
4681   IFS="$ac_save_ifs"
4682   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4683 fi
4684 fi
4685 DLLTOOL="$ac_cv_prog_DLLTOOL"
4686 if test -n "$DLLTOOL"; then
4687   echo "$ac_t""$DLLTOOL" 1>&6
4688 else
4689   echo "$ac_t""no" 1>&6
4690 fi
4691
4692 else
4693   DLLTOOL="false"
4694 fi
4695 fi
4696
4697   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4698 set dummy ${ac_tool_prefix}as; ac_word=$2
4699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_word" >&5
4701 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   if test -n "$AS"; then
4705   ac_cv_prog_AS="$AS" # Let the user override the test.
4706 else
4707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4708   ac_dummy="$PATH"
4709   for ac_dir in $ac_dummy; do
4710     test -z "$ac_dir" && ac_dir=.
4711     if test -f $ac_dir/$ac_word; then
4712       ac_cv_prog_AS="${ac_tool_prefix}as"
4713       break
4714     fi
4715   done
4716   IFS="$ac_save_ifs"
4717 fi
4718 fi
4719 AS="$ac_cv_prog_AS"
4720 if test -n "$AS"; then
4721   echo "$ac_t""$AS" 1>&6
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725
4726
4727 if test -z "$ac_cv_prog_AS"; then
4728 if test -n "$ac_tool_prefix"; then
4729   # Extract the first word of "as", so it can be a program name with args.
4730 set dummy as; ac_word=$2
4731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_word" >&5
4733 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   if test -n "$AS"; then
4737   ac_cv_prog_AS="$AS" # Let the user override the test.
4738 else
4739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4740   ac_dummy="$PATH"
4741   for ac_dir in $ac_dummy; do
4742     test -z "$ac_dir" && ac_dir=.
4743     if test -f $ac_dir/$ac_word; then
4744       ac_cv_prog_AS="as"
4745       break
4746     fi
4747   done
4748   IFS="$ac_save_ifs"
4749   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4750 fi
4751 fi
4752 AS="$ac_cv_prog_AS"
4753 if test -n "$AS"; then
4754   echo "$ac_t""$AS" 1>&6
4755 else
4756   echo "$ac_t""no" 1>&6
4757 fi
4758
4759 else
4760   AS="false"
4761 fi
4762 fi
4763
4764   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4765 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4767 echo "configure:4768: checking for $ac_word" >&5
4768 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   if test -n "$OBJDUMP"; then
4772   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4773 else
4774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4775   ac_dummy="$PATH"
4776   for ac_dir in $ac_dummy; do
4777     test -z "$ac_dir" && ac_dir=.
4778     if test -f $ac_dir/$ac_word; then
4779       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4780       break
4781     fi
4782   done
4783   IFS="$ac_save_ifs"
4784 fi
4785 fi
4786 OBJDUMP="$ac_cv_prog_OBJDUMP"
4787 if test -n "$OBJDUMP"; then
4788   echo "$ac_t""$OBJDUMP" 1>&6
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792
4793
4794 if test -z "$ac_cv_prog_OBJDUMP"; then
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "objdump", so it can be a program name with args.
4797 set dummy objdump; ac_word=$2
4798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4799 echo "configure:4800: checking for $ac_word" >&5
4800 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   if test -n "$OBJDUMP"; then
4804   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4805 else
4806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4807   ac_dummy="$PATH"
4808   for ac_dir in $ac_dummy; do
4809     test -z "$ac_dir" && ac_dir=.
4810     if test -f $ac_dir/$ac_word; then
4811       ac_cv_prog_OBJDUMP="objdump"
4812       break
4813     fi
4814   done
4815   IFS="$ac_save_ifs"
4816   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4817 fi
4818 fi
4819 OBJDUMP="$ac_cv_prog_OBJDUMP"
4820 if test -n "$OBJDUMP"; then
4821   echo "$ac_t""$OBJDUMP" 1>&6
4822 else
4823   echo "$ac_t""no" 1>&6
4824 fi
4825
4826 else
4827   OBJDUMP="false"
4828 fi
4829 fi
4830
4831
4832   # recent cygwin and mingw systems supply a stub DllMain which the user
4833   # can override, but on older systems we have to supply one
4834   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4835 echo "configure:4836: checking if libtool should supply DllMain function" >&5
4836 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842
4843 int main() {
4844 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4845       DllMain (0, 0, 0);
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   lt_cv_need_dllmain=no
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   lt_cv_need_dllmain=yes
4856 fi
4857 rm -f conftest*
4858 fi
4859
4860 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4861
4862   case $host/$CC in
4863   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4864     # old mingw systems require "-dll" to link a DLL, while more recent ones
4865     # require "-mdll"
4866     SAVE_CFLAGS="$CFLAGS"
4867     CFLAGS="$CFLAGS -mdll"
4868     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4869 echo "configure:4870: checking how to link DLLs" >&5
4870 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876
4877 int main() {
4878
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   lt_cv_cc_dll_switch=-mdll
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   lt_cv_cc_dll_switch=-dll
4889 fi
4890 rm -f conftest*
4891 fi
4892
4893 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4894     CFLAGS="$SAVE_CFLAGS" ;;
4895   *-*-cygwin* | *-*-pw32*)
4896     # cygwin systems need to pass --dll to the linker, and not link
4897     # crt.o which will require a WinMain@16 definition.
4898     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4899   esac
4900   ;;
4901   
4902 esac
4903
4904 # Sed substitution that helps us do robust quoting.  It backslashifies
4905 # metacharacters that are still active within double-quoted strings.
4906 Xsed='sed -e s/^X//'
4907 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4908
4909 # Same as above, but do not quote variable references.
4910 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4911
4912 # Sed substitution to delay expansion of an escaped shell variable in a
4913 # double_quote_subst'ed string.
4914 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4915
4916 # Constants:
4917 rm="rm -f"
4918
4919 # Global variables:
4920 default_ofile=libtool
4921 can_build_shared=yes
4922
4923 # All known linkers require a `.a' archive for static linking (except M$VC,
4924 # which needs '.lib').
4925 libext=a
4926 ltmain="$ac_aux_dir/ltmain.sh"
4927 ofile="$default_ofile"
4928 with_gnu_ld="$lt_cv_prog_gnu_ld"
4929 need_locks="$enable_libtool_lock"
4930
4931 old_CC="$CC"
4932 old_CFLAGS="$CFLAGS"
4933
4934 # Set sane defaults for various variables
4935 test -z "$AR" && AR=ar
4936 test -z "$AR_FLAGS" && AR_FLAGS=cru
4937 test -z "$AS" && AS=as
4938 test -z "$CC" && CC=cc
4939 test -z "$DLLTOOL" && DLLTOOL=dlltool
4940 test -z "$LD" && LD=ld
4941 test -z "$LN_S" && LN_S="ln -s"
4942 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4943 test -z "$NM" && NM=nm
4944 test -z "$OBJDUMP" && OBJDUMP=objdump
4945 test -z "$RANLIB" && RANLIB=:
4946 test -z "$STRIP" && STRIP=:
4947 test -z "$ac_objext" && ac_objext=o
4948
4949 if test x"$host" != x"$build"; then
4950   ac_tool_prefix=${host_alias}-
4951 else
4952   ac_tool_prefix=
4953 fi
4954
4955 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4956 case $host_os in
4957 linux-gnu*) ;;
4958 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4959 esac
4960
4961 case $host_os in
4962 aix3*)
4963   # AIX sometimes has problems with the GCC collect2 program.  For some
4964   # reason, if we set the COLLECT_NAMES environment variable, the problems
4965   # vanish in a puff of smoke.
4966   if test "X${COLLECT_NAMES+set}" != Xset; then
4967     COLLECT_NAMES=
4968     export COLLECT_NAMES
4969   fi
4970   ;;
4971 esac
4972
4973 # Determine commands to create old-style static archives.
4974 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4975 old_postinstall_cmds='chmod 644 $oldlib'
4976 old_postuninstall_cmds=
4977
4978 if test -n "$RANLIB"; then
4979   case $host_os in
4980   openbsd*)
4981     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4982     ;;
4983   *)
4984     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4985     ;;
4986   esac
4987   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4988 fi
4989
4990 # Allow CC to be a program name with arguments.
4991 set dummy $CC
4992 compiler="$2"
4993
4994 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4995 echo "configure:4996: checking for objdir" >&5
4996 rm -f .libs 2>/dev/null
4997 mkdir .libs 2>/dev/null
4998 if test -d .libs; then
4999   objdir=.libs
5000 else
5001   # MS-DOS does not allow filenames that begin with a dot.
5002   objdir=_libs
5003 fi
5004 rmdir .libs 2>/dev/null
5005 echo "$ac_t""$objdir" 1>&6
5006
5007
5008 # Check whether --with-pic or --without-pic was given.
5009 if test "${with_pic+set}" = set; then
5010   withval="$with_pic"
5011   pic_mode="$withval"
5012 else
5013   pic_mode=default
5014 fi
5015
5016 test -z "$pic_mode" && pic_mode=default
5017
5018 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5019 # in isolation, and that seeing it set (from the cache) indicates that
5020 # the associated values are set (in the cache) correctly too.
5021 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5022 echo "configure:5023: checking for $compiler option to produce PIC" >&5
5023 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5024   echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026    lt_cv_prog_cc_pic=
5027   lt_cv_prog_cc_shlib=
5028   lt_cv_prog_cc_wl=
5029   lt_cv_prog_cc_static=
5030   lt_cv_prog_cc_no_builtin=
5031   lt_cv_prog_cc_can_build_shared=$can_build_shared
5032
5033   if test "$GCC" = yes; then
5034     lt_cv_prog_cc_wl='-Wl,'
5035     lt_cv_prog_cc_static='-static'
5036
5037     case $host_os in
5038     aix*)
5039       # Below there is a dirty hack to force normal static linking with -ldl
5040       # The problem is because libdl dynamically linked with both libc and
5041       # libC (AIX C++ library), which obviously doesn't included in libraries
5042       # list by gcc. This cause undefined symbols with -static flags.
5043       # This hack allows C programs to be linked with "-static -ldl", but
5044       # not sure about C++ programs.
5045       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5046       ;;
5047     amigaos*)
5048       # FIXME: we need at least 68020 code to build shared libraries, but
5049       # adding the `-m68020' flag to GCC prevents building anything better,
5050       # like `-m68040'.
5051       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5052       ;;
5053     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5054       # PIC is the default for these OSes.
5055       ;;
5056     darwin* | rhapsody*)
5057       # PIC is the default on this platform
5058       # Common symbols not allowed in MH_DYLIB files
5059       lt_cv_prog_cc_pic='-fno-common'
5060       ;;
5061     cygwin* | mingw* | pw32* | os2*)
5062       # This hack is so that the source file can tell whether it is being
5063       # built for inclusion in a dll (and should export symbols for example).
5064       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5065       ;;
5066     sysv4*MP*)
5067       if test -d /usr/nec; then
5068          lt_cv_prog_cc_pic=-Kconform_pic
5069       fi
5070       ;;
5071     *)
5072       lt_cv_prog_cc_pic='-fPIC'
5073       ;;
5074     esac
5075   else
5076     # PORTME Check for PIC flags for the system compiler.
5077     case $host_os in
5078     aix3* | aix4* | aix5*)
5079       lt_cv_prog_cc_wl='-Wl,'
5080       # All AIX code is PIC.
5081       if test "$host_cpu" = ia64; then
5082         # AIX 5 now supports IA64 processor
5083         lt_cv_prog_cc_static='-Bstatic'
5084       else
5085         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5086       fi
5087       ;;
5088
5089     hpux9* | hpux10* | hpux11*)
5090       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5091       lt_cv_prog_cc_wl='-Wl,'
5092       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5093       lt_cv_prog_cc_pic='+Z'
5094       ;;
5095
5096     irix5* | irix6* | nonstopux*)
5097       lt_cv_prog_cc_wl='-Wl,'
5098       lt_cv_prog_cc_static='-non_shared'
5099       # PIC (with -KPIC) is the default.
5100       ;;
5101
5102     cygwin* | mingw* | pw32* | os2*)
5103       # This hack is so that the source file can tell whether it is being
5104       # built for inclusion in a dll (and should export symbols for example).
5105       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5106       ;;
5107
5108     newsos6)
5109       lt_cv_prog_cc_pic='-KPIC'
5110       lt_cv_prog_cc_static='-Bstatic'
5111       ;;
5112
5113     osf3* | osf4* | osf5*)
5114       # All OSF/1 code is PIC.
5115       lt_cv_prog_cc_wl='-Wl,'
5116       lt_cv_prog_cc_static='-non_shared'
5117       ;;
5118
5119     sco3.2v5*)
5120       lt_cv_prog_cc_pic='-Kpic'
5121       lt_cv_prog_cc_static='-dn'
5122       lt_cv_prog_cc_shlib='-belf'
5123       ;;
5124
5125     solaris*)
5126       lt_cv_prog_cc_pic='-KPIC'
5127       lt_cv_prog_cc_static='-Bstatic'
5128       lt_cv_prog_cc_wl='-Wl,'
5129       ;;
5130
5131     sunos4*)
5132       lt_cv_prog_cc_pic='-PIC'
5133       lt_cv_prog_cc_static='-Bstatic'
5134       lt_cv_prog_cc_wl='-Qoption ld '
5135       ;;
5136
5137     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5138       lt_cv_prog_cc_pic='-KPIC'
5139       lt_cv_prog_cc_static='-Bstatic'
5140       lt_cv_prog_cc_wl='-Wl,'
5141       ;;
5142
5143     uts4*)
5144       lt_cv_prog_cc_pic='-pic'
5145       lt_cv_prog_cc_static='-Bstatic'
5146       ;;
5147
5148     sysv4*MP*)
5149       if test -d /usr/nec ;then
5150         lt_cv_prog_cc_pic='-Kconform_pic'
5151         lt_cv_prog_cc_static='-Bstatic'
5152       fi
5153       ;;
5154
5155     *)
5156       lt_cv_prog_cc_can_build_shared=no
5157       ;;
5158     esac
5159   fi
5160
5161 fi
5162
5163 if test -z "$lt_cv_prog_cc_pic"; then
5164   echo "$ac_t""none" 1>&6
5165 else
5166   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5167
5168   # Check to make sure the pic_flag actually works.
5169   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5170 echo "configure:5171: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5171   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174       save_CFLAGS="$CFLAGS"
5175     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5176     cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179
5180 int main() {
5181
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5185   rm -rf conftest*
5186         case $host_os in
5187       hpux9* | hpux10* | hpux11*)
5188         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5189         # they create non-PIC objects.  So, if there were any warnings, we
5190         # assume that PIC is not supported.
5191         if test -s conftest.err; then
5192           lt_cv_prog_cc_pic_works=no
5193         else
5194           lt_cv_prog_cc_pic_works=yes
5195         fi
5196         ;;
5197       *)
5198         lt_cv_prog_cc_pic_works=yes
5199         ;;
5200       esac
5201     
5202 else
5203   echo "configure: failed program was:" >&5
5204   cat conftest.$ac_ext >&5
5205   rm -rf conftest*
5206         lt_cv_prog_cc_pic_works=no
5207     
5208 fi
5209 rm -f conftest*
5210     CFLAGS="$save_CFLAGS"
5211   
5212 fi
5213
5214
5215   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5216     lt_cv_prog_cc_pic=
5217     lt_cv_prog_cc_can_build_shared=no
5218   else
5219     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5220   fi
5221
5222   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5223 fi
5224
5225 # Check for any special shared library compilation flags.
5226 if test -n "$lt_cv_prog_cc_shlib"; then
5227   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5228   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5229   else
5230    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5231     lt_cv_prog_cc_can_build_shared=no
5232   fi
5233 fi
5234
5235 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5236 echo "configure:5237: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5237 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240     lt_cv_prog_cc_static_works=no
5241   save_LDFLAGS="$LDFLAGS"
5242   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5243   cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246
5247 int main() {
5248
5249 ; return 0; }
5250 EOF
5251 if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5252   rm -rf conftest*
5253   lt_cv_prog_cc_static_works=yes
5254 else
5255   echo "configure: failed program was:" >&5
5256   cat conftest.$ac_ext >&5
5257 fi
5258 rm -f conftest*
5259   LDFLAGS="$save_LDFLAGS"
5260
5261 fi
5262
5263
5264 # Belt *and* braces to stop my trousers falling down:
5265 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5266 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5267
5268 pic_flag="$lt_cv_prog_cc_pic"
5269 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5270 wl="$lt_cv_prog_cc_wl"
5271 link_static_flag="$lt_cv_prog_cc_static"
5272 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5273 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5274
5275
5276 # Check to see if options -o and -c are simultaneously supported by compiler
5277 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler supports -c -o file.$ac_objext" >&5
5279 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282   
5283 $rm -r conftest 2>/dev/null
5284 mkdir conftest
5285 cd conftest
5286 echo "int some_variable = 0;" > conftest.$ac_ext
5287 mkdir out
5288 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5289 # that will create temporary files in the current directory regardless of
5290 # the output directory.  Thus, making CWD read-only will cause this test
5291 # to fail, enabling locking or at least warning the user not to do parallel
5292 # builds.
5293 chmod -w .
5294 save_CFLAGS="$CFLAGS"
5295 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5296 compiler_c_o=no
5297 if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5298   # The compiler can only warn and ignore the option if not recognized
5299   # So say no if there are warnings
5300   if test -s out/conftest.err; then
5301     lt_cv_compiler_c_o=no
5302   else
5303     lt_cv_compiler_c_o=yes
5304   fi
5305 else
5306   # Append any errors to the config.log.
5307   cat out/conftest.err 1>&5
5308   lt_cv_compiler_c_o=no
5309 fi
5310 CFLAGS="$save_CFLAGS"
5311 chmod u+w .
5312 $rm conftest* out/*
5313 rmdir out
5314 cd ..
5315 rmdir conftest
5316 $rm -r conftest 2>/dev/null
5317
5318 fi
5319
5320 compiler_c_o=$lt_cv_compiler_c_o
5321 echo "$ac_t""$compiler_c_o" 1>&6
5322
5323 if test x"$compiler_c_o" = x"yes"; then
5324   # Check to see if we can write to a .lo
5325   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5326 echo "configure:5327: checking if $compiler supports -c -o file.lo" >&5
5327   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5328   echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330   
5331   lt_cv_compiler_o_lo=no
5332   save_CFLAGS="$CFLAGS"
5333   CFLAGS="$CFLAGS -c -o conftest.lo"
5334   save_objext="$ac_objext"
5335   ac_objext=lo
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 int main() {
5341 int some_variable = 0;
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5345   rm -rf conftest*
5346       # The compiler can only warn and ignore the option if not recognized
5347     # So say no if there are warnings
5348     if test -s conftest.err; then
5349       lt_cv_compiler_o_lo=no
5350     else
5351       lt_cv_compiler_o_lo=yes
5352     fi
5353   
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357 fi
5358 rm -f conftest*
5359   ac_objext="$save_objext"
5360   CFLAGS="$save_CFLAGS"
5361   
5362 fi
5363
5364   compiler_o_lo=$lt_cv_compiler_o_lo
5365   echo "$ac_t""$compiler_o_lo" 1>&6
5366 else
5367   compiler_o_lo=no
5368 fi
5369
5370 # Check to see if we can do hard links to lock some files if needed
5371 hard_links="nottested"
5372 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5373   # do not overwrite the value of need_locks provided by the user
5374   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5375 echo "configure:5376: checking if we can lock with hard links" >&5
5376   hard_links=yes
5377   $rm conftest*
5378   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5379   touch conftest.a
5380   ln conftest.a conftest.b 2>&5 || hard_links=no
5381   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5382   echo "$ac_t""$hard_links" 1>&6
5383   if test "$hard_links" = no; then
5384     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5385     need_locks=warn
5386   fi
5387 else
5388   need_locks=no
5389 fi
5390
5391 if test "$GCC" = yes; then
5392   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5393   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5394 echo "configure:5395: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5395   echo "int some_variable = 0;" > conftest.$ac_ext
5396   save_CFLAGS="$CFLAGS"
5397   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5398   compiler_rtti_exceptions=no
5399   cat > conftest.$ac_ext <<EOF
5400 #line 5401 "configure"
5401 #include "confdefs.h"
5402
5403 int main() {
5404 int some_variable = 0;
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5408   rm -rf conftest*
5409       # The compiler can only warn and ignore the option if not recognized
5410     # So say no if there are warnings
5411     if test -s conftest.err; then
5412       compiler_rtti_exceptions=no
5413     else
5414       compiler_rtti_exceptions=yes
5415     fi
5416   
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420 fi
5421 rm -f conftest*
5422   CFLAGS="$save_CFLAGS"
5423   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5424
5425   if test "$compiler_rtti_exceptions" = "yes"; then
5426     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5427   else
5428     no_builtin_flag=' -fno-builtin'
5429   fi
5430 fi
5431
5432 # See if the linker supports building shared libraries.
5433 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5434 echo "configure:5435: checking whether the linker ($LD) supports shared libraries" >&5
5435
5436 allow_undefined_flag=
5437 no_undefined_flag=
5438 need_lib_prefix=unknown
5439 need_version=unknown
5440 # when you set need_version to no, make sure it does not cause -set_version
5441 # flags to be left without arguments
5442 archive_cmds=
5443 archive_expsym_cmds=
5444 old_archive_from_new_cmds=
5445 old_archive_from_expsyms_cmds=
5446 export_dynamic_flag_spec=
5447 whole_archive_flag_spec=
5448 thread_safe_flag_spec=
5449 hardcode_into_libs=no
5450 hardcode_libdir_flag_spec=
5451 hardcode_libdir_separator=
5452 hardcode_direct=no
5453 hardcode_minus_L=no
5454 hardcode_shlibpath_var=unsupported
5455 runpath_var=
5456 link_all_deplibs=unknown
5457 always_export_symbols=no
5458 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5459 # include_expsyms should be a list of space-separated symbols to be *always*
5460 # included in the symbol list
5461 include_expsyms=
5462 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5463 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5464 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5465 # as well as any symbol that contains `d'.
5466 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5467 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5468 # platforms (ab)use it in PIC code, but their linkers get confused if
5469 # the symbol is explicitly referenced.  Since portable code cannot
5470 # rely on this symbol name, it's probably fine to never include it in
5471 # preloaded symbol tables.
5472 extract_expsyms_cmds=
5473
5474 case $host_os in
5475 cygwin* | mingw* | pw32*)
5476   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5477   # When not using gcc, we currently assume that we are using
5478   # Microsoft Visual C++.
5479   if test "$GCC" != yes; then
5480     with_gnu_ld=no
5481   fi
5482   ;;
5483 openbsd*)
5484   with_gnu_ld=no
5485   ;;
5486 esac
5487
5488 ld_shlibs=yes
5489 if test "$with_gnu_ld" = yes; then
5490   # If archive_cmds runs LD, not CC, wlarc should be empty
5491   wlarc='${wl}'
5492
5493   # See if GNU ld supports shared libraries.
5494   case $host_os in
5495   aix3* | aix4* | aix5*)
5496     # On AIX, the GNU linker is very broken
5497     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5498     ld_shlibs=no
5499     cat <<EOF 1>&2
5500
5501 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5502 *** to be unable to reliably create shared libraries on AIX.
5503 *** Therefore, libtool is disabling shared libraries support.  If you
5504 *** really care for shared libraries, you may want to modify your PATH
5505 *** so that a non-GNU linker is found, and then restart.
5506
5507 EOF
5508     ;;
5509
5510   amigaos*)
5511     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)'
5512     hardcode_libdir_flag_spec='-L$libdir'
5513     hardcode_minus_L=yes
5514
5515     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5516     # that the semantics of dynamic libraries on AmigaOS, at least up
5517     # to version 4, is to share data among multiple programs linked
5518     # with the same dynamic library.  Since this doesn't match the
5519     # behavior of shared libraries on other platforms, we can use
5520     # them.
5521     ld_shlibs=no
5522     ;;
5523
5524   beos*)
5525     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5526       allow_undefined_flag=unsupported
5527       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5528       # support --undefined.  This deserves some investigation.  FIXME
5529       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5530     else
5531       ld_shlibs=no
5532     fi
5533     ;;
5534
5535   cygwin* | mingw* | pw32*)
5536     # hardcode_libdir_flag_spec is actually meaningless, as there is
5537     # no search path for DLLs.
5538     hardcode_libdir_flag_spec='-L$libdir'
5539     allow_undefined_flag=unsupported
5540     always_export_symbols=yes
5541
5542     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5543       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5544       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5545       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5546       else $CC -o impgen impgen.c ; fi)~
5547       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5548
5549     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5550
5551     # cygwin and mingw dlls have different entry points and sets of symbols
5552     # to exclude.
5553     # FIXME: what about values for MSVC?
5554     dll_entry=__cygwin_dll_entry@12
5555     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5556     case $host_os in
5557     mingw*)
5558       # mingw values
5559       dll_entry=_DllMainCRTStartup@12
5560       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5561       ;;
5562     esac
5563
5564     # mingw and cygwin differ, and it's simplest to just exclude the union
5565     # of the two symbol sets.
5566     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5567
5568     # recent cygwin and mingw systems supply a stub DllMain which the user
5569     # can override, but on older systems we have to supply one (in ltdll.c)
5570     if test "x$lt_cv_need_dllmain" = "xyes"; then
5571       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5572       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~
5573         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5574     else
5575       ltdll_obj=
5576       ltdll_cmds=
5577     fi
5578
5579     # Extract the symbol export list from an `--export-all' def file,
5580     # then regenerate the def file from the symbol export list, so that
5581     # the compiled dll only exports the symbol export list.
5582     # Be careful not to strip the DATA tag left be newer dlltools.
5583     export_symbols_cmds="$ltdll_cmds"'
5584       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5585       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5586
5587     # If the export-symbols file already is a .def file (1st line
5588     # is EXPORTS), use it as is.
5589     # If DATA tags from a recent dlltool are present, honour them!
5590     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5591         cp $export_symbols $output_objdir/$soname-def;
5592       else
5593         echo EXPORTS > $output_objdir/$soname-def;
5594         _lt_hint=1;
5595         cat $export_symbols | while read symbol; do
5596          set dummy \$symbol;
5597          case \$# in
5598            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5599            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5600            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5601          esac;
5602          _lt_hint=`expr 1 + \$_lt_hint`;
5603         done;
5604       fi~
5605       '"$ltdll_cmds"'
5606       $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~
5607       $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~
5608       $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~
5609       $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~
5610       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5611     ;;
5612
5613   netbsd*)
5614     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5615       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5616       wlarc=
5617     else
5618       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5620     fi
5621     ;;
5622
5623   solaris* | sysv5*)
5624     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5625       ld_shlibs=no
5626       cat <<EOF 1>&2
5627
5628 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5629 *** create shared libraries on Solaris systems.  Therefore, libtool
5630 *** is disabling shared libraries support.  We urge you to upgrade GNU
5631 *** binutils to release 2.9.1 or newer.  Another option is to modify
5632 *** your PATH or compiler configuration so that the native linker is
5633 *** used, and then restart.
5634
5635 EOF
5636     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5637       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5638       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5639     else
5640       ld_shlibs=no
5641     fi
5642     ;;
5643
5644   sunos4*)
5645     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5646     wlarc=
5647     hardcode_direct=yes
5648     hardcode_shlibpath_var=no
5649     ;;
5650
5651   *)
5652     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5653       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5654       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5655     else
5656       ld_shlibs=no
5657     fi
5658     ;;
5659   esac
5660
5661   if test "$ld_shlibs" = yes; then
5662     runpath_var=LD_RUN_PATH
5663     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5664     export_dynamic_flag_spec='${wl}--export-dynamic'
5665     case $host_os in
5666     cygwin* | mingw* | pw32*)
5667       # dlltool doesn't understand --whole-archive et. al.
5668       whole_archive_flag_spec=
5669       ;;
5670     *)
5671       # ancient GNU ld didn't support --whole-archive et. al.
5672       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5673         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5674       else
5675         whole_archive_flag_spec=
5676       fi
5677       ;;
5678     esac
5679   fi
5680 else
5681   # PORTME fill in a description of your system's linker (not GNU ld)
5682   case $host_os in
5683   aix3*)
5684     allow_undefined_flag=unsupported
5685     always_export_symbols=yes
5686     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'
5687     # Note: this linker hardcodes the directories in LIBPATH if there
5688     # are no directories specified by -L.
5689     hardcode_minus_L=yes
5690     if test "$GCC" = yes && test -z "$link_static_flag"; then
5691       # Neither direct hardcoding nor static linking is supported with a
5692       # broken collect2.
5693       hardcode_direct=unsupported
5694     fi
5695     ;;
5696
5697   aix4* | aix5*)
5698     if test "$host_cpu" = ia64; then
5699       # On IA64, the linker does run time linking by default, so we don't
5700       # have to do anything special.
5701       aix_use_runtimelinking=no
5702       exp_sym_flag='-Bexport'
5703       no_entry_flag=""
5704     else
5705       aix_use_runtimelinking=no
5706
5707       # Test if we are trying to use run time linking or normal
5708       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5709       # need to do runtime linking.
5710       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5711         for ld_flag in $LDFLAGS; do
5712           case $ld_flag in
5713           *-brtl*)
5714             aix_use_runtimelinking=yes
5715             break
5716           ;;
5717           esac
5718         done
5719       esac
5720
5721       exp_sym_flag='-bexport'
5722       no_entry_flag='-bnoentry'
5723     fi
5724
5725     # When large executables or shared objects are built, AIX ld can
5726     # have problems creating the table of contents.  If linking a library
5727     # or program results in "error TOC overflow" add -mminimal-toc to
5728     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5729     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5730
5731     hardcode_direct=yes
5732     archive_cmds=''
5733     hardcode_libdir_separator=':'
5734     if test "$GCC" = yes; then
5735       case $host_os in aix4.[012]|aix4.[012].*)
5736         collect2name=`${CC} -print-prog-name=collect2`
5737         if test -f "$collect2name" && \
5738           strings "$collect2name" | grep resolve_lib_name >/dev/null
5739         then
5740           # We have reworked collect2
5741           hardcode_direct=yes
5742         else
5743           # We have old collect2
5744           hardcode_direct=unsupported
5745           # It fails to find uninstalled libraries when the uninstalled
5746           # path is not listed in the libpath.  Setting hardcode_minus_L
5747           # to unsupported forces relinking
5748           hardcode_minus_L=yes
5749           hardcode_libdir_flag_spec='-L$libdir'
5750           hardcode_libdir_separator=
5751         fi
5752       esac
5753
5754       shared_flag='-shared'
5755     else
5756       # not using gcc
5757       if test "$host_cpu" = ia64; then
5758         shared_flag='${wl}-G'
5759       else
5760         if test "$aix_use_runtimelinking" = yes; then
5761           shared_flag='${wl}-G'
5762         else
5763           shared_flag='${wl}-bM:SRE'
5764         fi
5765       fi
5766     fi
5767
5768     # It seems that -bexpall can do strange things, so it is better to
5769     # generate a list of symbols to export.
5770     always_export_symbols=yes
5771     if test "$aix_use_runtimelinking" = yes; then
5772       # Warning - without using the other runtime loading flags (-brtl),
5773       # -berok will link without error, but may produce a broken library.
5774       allow_undefined_flag='-berok'
5775       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5776       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"
5777     else
5778       if test "$host_cpu" = ia64; then
5779         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5780         allow_undefined_flag="-z nodefs"
5781         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"
5782       else
5783         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5784         # Warning - without using the other run time loading flags,
5785         # -berok will link without error, but may produce a broken library.
5786         allow_undefined_flag='${wl}-berok'
5787         # This is a bit strange, but is similar to how AIX traditionally builds
5788         # it's shared libraries.
5789         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'
5790       fi
5791     fi
5792     ;;
5793
5794   amigaos*)
5795     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)'
5796     hardcode_libdir_flag_spec='-L$libdir'
5797     hardcode_minus_L=yes
5798     # see comment about different semantics on the GNU ld section
5799     ld_shlibs=no
5800     ;;
5801
5802   cygwin* | mingw* | pw32*)
5803     # When not using gcc, we currently assume that we are using
5804     # Microsoft Visual C++.
5805     # hardcode_libdir_flag_spec is actually meaningless, as there is
5806     # no search path for DLLs.
5807     hardcode_libdir_flag_spec=' '
5808     allow_undefined_flag=unsupported
5809     # Tell ltmain to make .lib files, not .a files.
5810     libext=lib
5811     # FIXME: Setting linknames here is a bad hack.
5812     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5813     # The linker will automatically build a .lib file if we build a DLL.
5814     old_archive_from_new_cmds='true'
5815     # FIXME: Should let the user specify the lib program.
5816     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5817     fix_srcfile_path='`cygpath -w "$srcfile"`'
5818     ;;
5819
5820   darwin* | rhapsody*)
5821     case "$host_os" in
5822     rhapsody* | darwin1.[012])
5823       allow_undefined_flag='-undefined suppress'
5824       ;;
5825     *) # Darwin 1.3 on
5826       allow_undefined_flag='-flat_namespace -undefined suppress'
5827       ;;
5828     esac
5829     # FIXME: Relying on posixy $() will cause problems for
5830     #        cross-compilation, but unfortunately the echo tests do not
5831     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5832     #        `"' quotes if we put them in here... so don't!
5833     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)'
5834     # We need to add '_' to the symbols in $export_symbols first
5835     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5836     hardcode_direct=yes
5837     hardcode_shlibpath_var=no
5838     whole_archive_flag_spec='-all_load $convenience'
5839     ;;
5840
5841   freebsd1*)
5842     ld_shlibs=no
5843     ;;
5844
5845   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5846   # support.  Future versions do this automatically, but an explicit c++rt0.o
5847   # does not break anything, and helps significantly (at the cost of a little
5848   # extra space).
5849   freebsd2.2*)
5850     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5851     hardcode_libdir_flag_spec='-R$libdir'
5852     hardcode_direct=yes
5853     hardcode_shlibpath_var=no
5854     ;;
5855
5856   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5857   freebsd2*)
5858     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_minus_L=yes
5861     hardcode_shlibpath_var=no
5862     ;;
5863
5864   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5865   freebsd*)
5866     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_direct=yes
5869     hardcode_shlibpath_var=no
5870     ;;
5871
5872   hpux9* | hpux10* | hpux11*)
5873     case $host_os in
5874     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' ;;
5875     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5876     esac
5877     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5878     hardcode_libdir_separator=:
5879     hardcode_direct=yes
5880     hardcode_minus_L=yes # Not in the search PATH, but as the default
5881                          # location of the library.
5882     export_dynamic_flag_spec='${wl}-E'
5883     ;;
5884
5885   irix5* | irix6* | nonstopux*)
5886     if test "$GCC" = yes; then
5887       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'
5888       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5889     else
5890       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'
5891       hardcode_libdir_flag_spec='-rpath $libdir'
5892     fi
5893     hardcode_libdir_separator=:
5894     link_all_deplibs=yes
5895     ;;
5896
5897   netbsd*)
5898     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5899       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5900     else
5901       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5902     fi
5903     hardcode_libdir_flag_spec='-R$libdir'
5904     hardcode_direct=yes
5905     hardcode_shlibpath_var=no
5906     ;;
5907
5908   newsos6)
5909     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5910     hardcode_direct=yes
5911     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5912     hardcode_libdir_separator=:
5913     hardcode_shlibpath_var=no
5914     ;;
5915
5916   openbsd*)
5917     hardcode_direct=yes
5918     hardcode_shlibpath_var=no
5919     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5920       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5921       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5922       export_dynamic_flag_spec='${wl}-E'
5923     else
5924       case "$host_os" in
5925       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5926         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5927         hardcode_libdir_flag_spec='-R$libdir'
5928         ;;
5929       *)
5930         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5931         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5932         ;;
5933       esac
5934     fi
5935     ;;
5936
5937   os2*)
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_minus_L=yes
5940     allow_undefined_flag=unsupported
5941     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'
5942     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5943     ;;
5944
5945   osf3*)
5946     if test "$GCC" = yes; then
5947       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5948       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'
5949     else
5950       allow_undefined_flag=' -expect_unresolved \*'
5951       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'
5952     fi
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     ;;
5956
5957   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5958     if test "$GCC" = yes; then
5959       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5960       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'
5961       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     else
5963       allow_undefined_flag=' -expect_unresolved \*'
5964       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'
5965       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5966       $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'
5967
5968       #Both c and cxx compiler support -rpath directly
5969       hardcode_libdir_flag_spec='-rpath $libdir'
5970     fi
5971     hardcode_libdir_separator=:
5972     ;;
5973
5974   sco3.2v5*)
5975     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976     hardcode_shlibpath_var=no
5977     runpath_var=LD_RUN_PATH
5978     hardcode_runpath_var=yes
5979     export_dynamic_flag_spec='${wl}-Bexport'
5980     ;;
5981
5982   solaris*)
5983     # gcc --version < 3.0 without binutils cannot create self contained
5984     # shared libraries reliably, requiring libgcc.a to resolve some of
5985     # the object symbols generated in some cases.  Libraries that use
5986     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5987     # a copy of libgcc.a into every shared library to guarantee resolving
5988     # such symbols causes other problems:  According to Tim Van Holder
5989     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5990     # (to the application) exception stack for one thing.
5991     no_undefined_flag=' -z defs'
5992     if test "$GCC" = yes; then
5993       case `$CC --version 2>/dev/null` in
5994       [12].*)
5995         cat <<EOF 1>&2
5996
5997 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5998 *** create self contained shared libraries on Solaris systems, without
5999 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6000 *** -no-undefined support, which will at least allow you to build shared
6001 *** libraries.  However, you may find that when you link such libraries
6002 *** into an application without using GCC, you have to manually add
6003 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6004 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6005 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6006
6007 EOF
6008         no_undefined_flag=
6009         ;;
6010       esac
6011     fi
6012     # $CC -shared without GNU ld will not create a library from C++
6013     # object files and a static libstdc++, better avoid it by now
6014     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6016                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6017     hardcode_libdir_flag_spec='-R$libdir'
6018     hardcode_shlibpath_var=no
6019     case $host_os in
6020     solaris2.[0-5] | solaris2.[0-5].*) ;;
6021     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6022       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6023     esac
6024     link_all_deplibs=yes
6025     ;;
6026
6027   sunos4*)
6028     if test "x$host_vendor" = xsequent; then
6029       # Use $CC to link under sequent, because it throws in some extra .o
6030       # files that make .init and .fini sections work.
6031       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6032     else
6033       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6034     fi
6035     hardcode_libdir_flag_spec='-L$libdir'
6036     hardcode_direct=yes
6037     hardcode_minus_L=yes
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   sysv4)
6042     case $host_vendor in
6043       sni)
6044         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6045         hardcode_direct=yes # is this really true???
6046         ;;
6047       siemens)
6048         ## LD is ld it makes a PLAMLIB
6049         ## CC just makes a GrossModule.
6050         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6051         reload_cmds='$CC -r -o $output$reload_objs'
6052         hardcode_direct=no
6053         ;;
6054       motorola)
6055         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6056         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6057         ;;
6058     esac
6059     runpath_var='LD_RUN_PATH'
6060     hardcode_shlibpath_var=no
6061     ;;
6062
6063   sysv4.3*)
6064     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6065     hardcode_shlibpath_var=no
6066     export_dynamic_flag_spec='-Bexport'
6067     ;;
6068
6069   sysv5*)
6070     no_undefined_flag=' -z text'
6071     # $CC -shared without GNU ld will not create a library from C++
6072     # object files and a static libstdc++, better avoid it by now
6073     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6075                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6076     hardcode_libdir_flag_spec=
6077     hardcode_shlibpath_var=no
6078     runpath_var='LD_RUN_PATH'
6079     ;;
6080
6081   uts4*)
6082     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083     hardcode_libdir_flag_spec='-L$libdir'
6084     hardcode_shlibpath_var=no
6085     ;;
6086
6087   dgux*)
6088     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6089     hardcode_libdir_flag_spec='-L$libdir'
6090     hardcode_shlibpath_var=no
6091     ;;
6092
6093   sysv4*MP*)
6094     if test -d /usr/nec; then
6095       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6096       hardcode_shlibpath_var=no
6097       runpath_var=LD_RUN_PATH
6098       hardcode_runpath_var=yes
6099       ld_shlibs=yes
6100     fi
6101     ;;
6102
6103   sysv4.2uw2*)
6104     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6105     hardcode_direct=yes
6106     hardcode_minus_L=no
6107     hardcode_shlibpath_var=no
6108     hardcode_runpath_var=yes
6109     runpath_var=LD_RUN_PATH
6110     ;;
6111
6112   sysv5uw7* | unixware7*)
6113     no_undefined_flag='${wl}-z ${wl}text'
6114     if test "$GCC" = yes; then
6115       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6116     else
6117       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6118     fi
6119     runpath_var='LD_RUN_PATH'
6120     hardcode_shlibpath_var=no
6121     ;;
6122
6123   *)
6124     ld_shlibs=no
6125     ;;
6126   esac
6127 fi
6128 echo "$ac_t""$ld_shlibs" 1>&6
6129 test "$ld_shlibs" = no && can_build_shared=no
6130
6131 # Check hardcoding attributes.
6132 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6133 echo "configure:6134: checking how to hardcode library paths into programs" >&5
6134 hardcode_action=
6135 if test -n "$hardcode_libdir_flag_spec" || \
6136    test -n "$runpath_var"; then
6137
6138   # We can hardcode non-existant directories.
6139   if test "$hardcode_direct" != no &&
6140      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6141      # have to relink, otherwise we might link with an installed library
6142      # when we should be linking with a yet-to-be-installed one
6143      ## test "$hardcode_shlibpath_var" != no &&
6144      test "$hardcode_minus_L" != no; then
6145     # Linking always hardcodes the temporary library directory.
6146     hardcode_action=relink
6147   else
6148     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6149     hardcode_action=immediate
6150   fi
6151 else
6152   # We cannot hardcode anything, or else we can only hardcode existing
6153   # directories.
6154   hardcode_action=unsupported
6155 fi
6156 echo "$ac_t""$hardcode_action" 1>&6
6157
6158 striplib=
6159 old_striplib=
6160 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6161 echo "configure:6162: checking whether stripping libraries is possible" >&5
6162 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6163   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6164   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6165   echo "$ac_t""yes" 1>&6
6166 else
6167   echo "$ac_t""no" 1>&6
6168 fi
6169
6170 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6171 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6172
6173 # PORTME Fill in your ld.so characteristics
6174 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6175 echo "configure:6176: checking dynamic linker characteristics" >&5
6176 library_names_spec=
6177 libname_spec='lib$name'
6178 soname_spec=
6179 postinstall_cmds=
6180 postuninstall_cmds=
6181 finish_cmds=
6182 finish_eval=
6183 shlibpath_var=
6184 shlibpath_overrides_runpath=unknown
6185 version_type=none
6186 dynamic_linker="$host_os ld.so"
6187 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6188 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6189
6190 case $host_os in
6191 aix3*)
6192   version_type=linux
6193   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6194   shlibpath_var=LIBPATH
6195
6196   # AIX has no versioning support, so we append a major version to the name.
6197   soname_spec='${libname}${release}.so$major'
6198   ;;
6199
6200 aix4* | aix5*)
6201   version_type=linux
6202   need_lib_prefix=no
6203   need_version=no
6204   hardcode_into_libs=yes
6205   if test "$host_cpu" = ia64; then
6206     # AIX 5 supports IA64
6207     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6208     shlibpath_var=LD_LIBRARY_PATH
6209   else
6210     # With GCC up to 2.95.x, collect2 would create an import file
6211     # for dependence libraries.  The import file would start with
6212     # the line `#! .'.  This would cause the generated library to
6213     # depend on `.', always an invalid library.  This was fixed in
6214     # development snapshots of GCC prior to 3.0.
6215     case $host_os in
6216       aix4 | aix4.[01] | aix4.[01].*)
6217         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6218              echo ' yes '
6219              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6220           :
6221         else
6222           can_build_shared=no
6223         fi
6224         ;;
6225     esac
6226     # AIX (on Power*) has no versioning support, so currently we can
6227     # not hardcode correct soname into executable. Probably we can
6228     # add versioning support to collect2, so additional links can
6229     # be useful in future.
6230     if test "$aix_use_runtimelinking" = yes; then
6231       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6232       # instead of lib<name>.a to let people know that these are not
6233       # typical AIX shared libraries.
6234       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6235     else
6236       # We preserve .a as extension for shared libraries through AIX4.2
6237       # and later when we are not doing run time linking.
6238       library_names_spec='${libname}${release}.a $libname.a'
6239       soname_spec='${libname}${release}.so$major'
6240     fi
6241     shlibpath_var=LIBPATH
6242   fi
6243   hardcode_into_libs=yes
6244   ;;
6245
6246 amigaos*)
6247   library_names_spec='$libname.ixlibrary $libname.a'
6248   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6249   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'
6250   ;;
6251
6252 beos*)
6253   library_names_spec='${libname}.so'
6254   dynamic_linker="$host_os ld.so"
6255   shlibpath_var=LIBRARY_PATH
6256   ;;
6257
6258 bsdi4*)
6259   version_type=linux
6260   need_version=no
6261   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6262   soname_spec='${libname}${release}.so$major'
6263   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6264   shlibpath_var=LD_LIBRARY_PATH
6265   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6266   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6267   export_dynamic_flag_spec=-rdynamic
6268   # the default ld.so.conf also contains /usr/contrib/lib and
6269   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6270   # libtool to hard-code these into programs
6271   ;;
6272
6273 cygwin* | mingw* | pw32*)
6274   version_type=windows
6275   need_version=no
6276   need_lib_prefix=no
6277   case $GCC,$host_os in
6278   yes,cygwin*)
6279     library_names_spec='$libname.dll.a'
6280     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6281     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6282       dldir=$destdir/`dirname \$dlpath`~
6283       test -d \$dldir || mkdir -p \$dldir~
6284       $install_prog .libs/$dlname \$dldir/$dlname'
6285     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6286       dlpath=$dir/\$dldll~
6287        $rm \$dlpath'
6288     ;;
6289   yes,mingw*)
6290     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6291     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6292     ;;
6293   yes,pw32*)
6294     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6295     ;;
6296   *)
6297     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6298     ;;
6299   esac
6300   dynamic_linker='Win32 ld.exe'
6301   # FIXME: first we should search . and the directory the executable is in
6302   shlibpath_var=PATH
6303   ;;
6304
6305 darwin* | rhapsody*)
6306   dynamic_linker="$host_os dyld"
6307   version_type=darwin
6308   need_lib_prefix=no
6309   need_version=no
6310   # FIXME: Relying on posixy $() will cause problems for
6311   #        cross-compilation, but unfortunately the echo tests do not
6312   #        yet detect zsh echo's removal of \ escapes.
6313   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)'
6314   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6315   shlibpath_overrides_runpath=yes
6316   shlibpath_var=DYLD_LIBRARY_PATH
6317   ;;
6318
6319 freebsd1*)
6320   dynamic_linker=no
6321   ;;
6322
6323 freebsd*)
6324   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6325   version_type=freebsd-$objformat
6326   case $version_type in
6327     freebsd-elf*)
6328       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6329       need_version=no
6330       need_lib_prefix=no
6331       ;;
6332     freebsd-*)
6333       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6334       need_version=yes
6335       ;;
6336   esac
6337   shlibpath_var=LD_LIBRARY_PATH
6338   case $host_os in
6339   freebsd2*)
6340     shlibpath_overrides_runpath=yes
6341     ;;
6342   *)
6343     shlibpath_overrides_runpath=no
6344     hardcode_into_libs=yes
6345     ;;
6346   esac
6347   ;;
6348
6349 gnu*)
6350   version_type=linux
6351   need_lib_prefix=no
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   shlibpath_var=LD_LIBRARY_PATH
6356   hardcode_into_libs=yes
6357   ;;
6358
6359 hpux9* | hpux10* | hpux11*)
6360   # Give a soname corresponding to the major version so that dld.sl refuses to
6361   # link against other versions.
6362   dynamic_linker="$host_os dld.sl"
6363   version_type=sunos
6364   need_lib_prefix=no
6365   need_version=no
6366   shlibpath_var=SHLIB_PATH
6367   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6368   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6369   soname_spec='${libname}${release}.sl$major'
6370   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6371   postinstall_cmds='chmod 555 $lib'
6372   ;;
6373
6374 irix5* | irix6* | nonstopux*)
6375   case $host_os in
6376     nonstopux*) version_type=nonstopux ;;
6377     *)          version_type=irix ;;
6378   esac
6379   need_lib_prefix=no
6380   need_version=no
6381   soname_spec='${libname}${release}.so$major'
6382   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6383   case $host_os in
6384   irix5* | nonstopux*)
6385     libsuff= shlibsuff=
6386     ;;
6387   *)
6388     case $LD in # libtool.m4 will add one of these switches to LD
6389     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6390     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6391     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6392     *) libsuff= shlibsuff= libmagic=never-match;;
6393     esac
6394     ;;
6395   esac
6396   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6397   shlibpath_overrides_runpath=no
6398   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6399   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6400   ;;
6401
6402 # No shared lib support for Linux oldld, aout, or coff.
6403 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6404   dynamic_linker=no
6405   ;;
6406
6407 # This must be Linux ELF.
6408 linux-gnu*)
6409   version_type=linux
6410   need_lib_prefix=no
6411   need_version=no
6412   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6413   soname_spec='${libname}${release}.so$major'
6414   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   shlibpath_overrides_runpath=no
6417   # This implies no fast_install, which is unacceptable.
6418   # Some rework will be needed to allow for fast_install
6419   # before this can be enabled.
6420   hardcode_into_libs=yes
6421
6422   # We used to test for /lib/ld.so.1 and disable shared libraries on
6423   # powerpc, because MkLinux only supported shared libraries with the
6424   # GNU dynamic linker.  Since this was broken with cross compilers,
6425   # most powerpc-linux boxes support dynamic linking these days and
6426   # people can always --disable-shared, the test was removed, and we
6427   # assume the GNU/Linux dynamic linker is in use.
6428   dynamic_linker='GNU/Linux ld.so'
6429   ;;
6430
6431 netbsd*)
6432   version_type=sunos
6433   need_lib_prefix=no
6434   need_version=no
6435   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6436     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6437     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6438     dynamic_linker='NetBSD (a.out) ld.so'
6439   else
6440     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6441     soname_spec='${libname}${release}.so$major'
6442     dynamic_linker='NetBSD ld.elf_so'
6443   fi
6444   shlibpath_var=LD_LIBRARY_PATH
6445   shlibpath_overrides_runpath=yes
6446   hardcode_into_libs=yes
6447   ;;
6448
6449 newsos6)
6450   version_type=linux
6451   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   ;;
6455
6456 openbsd*)
6457   version_type=sunos
6458   need_lib_prefix=no
6459   need_version=no
6460   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6461     case "$host_os" in
6462     openbsd2.[89] | openbsd2.[89].*)
6463       shlibpath_overrides_runpath=no
6464       ;;
6465     *)
6466       shlibpath_overrides_runpath=yes
6467       ;;
6468     esac
6469   else
6470     shlibpath_overrides_runpath=yes
6471   fi
6472   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6473   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   ;;
6476
6477 os2*)
6478   libname_spec='$name'
6479   need_lib_prefix=no
6480   library_names_spec='$libname.dll $libname.a'
6481   dynamic_linker='OS/2 ld.exe'
6482   shlibpath_var=LIBPATH
6483   ;;
6484
6485 osf3* | osf4* | osf5*)
6486   version_type=osf
6487   need_version=no
6488   soname_spec='${libname}${release}.so$major'
6489   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6492   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6493   hardcode_into_libs=yes
6494   ;;
6495
6496 sco3.2v5*)
6497   version_type=osf
6498   soname_spec='${libname}${release}.so$major'
6499   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6500   shlibpath_var=LD_LIBRARY_PATH
6501   ;;
6502
6503 solaris*)
6504   version_type=linux
6505   need_lib_prefix=no
6506   need_version=no
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   soname_spec='${libname}${release}.so$major'
6509   shlibpath_var=LD_LIBRARY_PATH
6510   shlibpath_overrides_runpath=yes
6511   hardcode_into_libs=yes
6512   # ldd complains unless libraries are executable
6513   postinstall_cmds='chmod +x $lib'
6514   ;;
6515
6516 sunos4*)
6517   version_type=sunos
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6519   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   shlibpath_overrides_runpath=yes
6522   if test "$with_gnu_ld" = yes; then
6523     need_lib_prefix=no
6524   fi
6525   need_version=yes
6526   ;;
6527
6528 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6529   version_type=linux
6530   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6531   soname_spec='${libname}${release}.so$major'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   case $host_vendor in
6534     sni)
6535       shlibpath_overrides_runpath=no
6536       need_lib_prefix=no
6537       export_dynamic_flag_spec='${wl}-Blargedynsym'
6538       runpath_var=LD_RUN_PATH
6539       ;;
6540     siemens)
6541       need_lib_prefix=no
6542       ;;
6543     motorola)
6544       need_lib_prefix=no
6545       need_version=no
6546       shlibpath_overrides_runpath=no
6547       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6548       ;;
6549   esac
6550   ;;
6551
6552 uts4*)
6553   version_type=linux
6554   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6555   soname_spec='${libname}${release}.so$major'
6556   shlibpath_var=LD_LIBRARY_PATH
6557   ;;
6558
6559 dgux*)
6560   version_type=linux
6561   need_lib_prefix=no
6562   need_version=no
6563   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6564   soname_spec='${libname}${release}.so$major'
6565   shlibpath_var=LD_LIBRARY_PATH
6566   ;;
6567
6568 sysv4*MP*)
6569   if test -d /usr/nec ;then
6570     version_type=linux
6571     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6572     soname_spec='$libname.so.$major'
6573     shlibpath_var=LD_LIBRARY_PATH
6574   fi
6575   ;;
6576
6577 *)
6578   dynamic_linker=no
6579   ;;
6580 esac
6581 echo "$ac_t""$dynamic_linker" 1>&6
6582 test "$dynamic_linker" = no && can_build_shared=no
6583
6584 # Report the final consequences.
6585 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6586 echo "configure:6587: checking if libtool supports shared libraries" >&5
6587 echo "$ac_t""$can_build_shared" 1>&6
6588
6589 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6590 echo "configure:6591: checking whether to build shared libraries" >&5
6591 test "$can_build_shared" = "no" && enable_shared=no
6592
6593 # On AIX, shared libraries and static libraries use the same namespace, and
6594 # are all built from PIC.
6595 case "$host_os" in
6596 aix3*)
6597   test "$enable_shared" = yes && enable_static=no
6598   if test -n "$RANLIB"; then
6599     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6600     postinstall_cmds='$RANLIB $lib'
6601   fi
6602   ;;
6603
6604 aix4*)
6605   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6606     test "$enable_shared" = yes && enable_static=no
6607   fi
6608   ;;
6609 esac
6610 echo "$ac_t""$enable_shared" 1>&6
6611
6612 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6613 echo "configure:6614: checking whether to build static libraries" >&5
6614 # Make sure either enable_shared or enable_static is yes.
6615 test "$enable_shared" = yes || enable_static=yes
6616 echo "$ac_t""$enable_static" 1>&6
6617
6618 if test "$hardcode_action" = relink; then
6619   # Fast installation is not supported
6620   enable_fast_install=no
6621 elif test "$shlibpath_overrides_runpath" = yes ||
6622      test "$enable_shared" = no; then
6623   # Fast installation is not necessary
6624   enable_fast_install=needless
6625 fi
6626
6627 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6628 if test "$GCC" = yes; then
6629   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6630 fi
6631
6632 if test "x$enable_dlopen" != xyes; then
6633   enable_dlopen=unknown
6634   enable_dlopen_self=unknown
6635   enable_dlopen_self_static=unknown
6636 else
6637   lt_cv_dlopen=no
6638   lt_cv_dlopen_libs=
6639
6640   case $host_os in
6641   beos*)
6642     lt_cv_dlopen="load_add_on"
6643     lt_cv_dlopen_libs=
6644     lt_cv_dlopen_self=yes
6645     ;;
6646
6647   cygwin* | mingw* | pw32*)
6648     lt_cv_dlopen="LoadLibrary"
6649     lt_cv_dlopen_libs=
6650    ;;
6651
6652   *)
6653     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6654 echo "configure:6655: checking for shl_load" >&5
6655 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6656   echo $ac_n "(cached) $ac_c" 1>&6
6657 else
6658   cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662     which can conflict with char shl_load(); below.  */
6663 #include <assert.h>
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char shl_load();
6668 char (*f)();
6669
6670 int main() {
6671
6672 /* The GNU C library defines this for functions which it implements
6673     to always fail with ENOSYS.  Some functions are actually named
6674     something starting with __ and the normal name is an alias.  */
6675 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6676 choke me
6677 #else
6678 f = shl_load;
6679 #endif
6680
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   eval "ac_cv_func_shl_load=yes"
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   eval "ac_cv_func_shl_load=no"
6691 fi
6692 rm -f conftest*
6693 fi
6694
6695 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   lt_cv_dlopen="shl_load"
6698 else
6699   echo "$ac_t""no" 1>&6
6700 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6701 echo "configure:6702: checking for shl_load in -ldld" >&5
6702 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   ac_save_LIBS="$LIBS"
6707 LIBS="-ldld  $LIBS"
6708 cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* Override any gcc2 internal prototype to avoid an error.  */
6712 /* We use char because int might match the return type of a gcc2
6713     builtin and then its argument prototype would still apply.  */
6714 char shl_load();
6715
6716 int main() {
6717 shl_load()
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721   rm -rf conftest*
6722   eval "ac_cv_lib_$ac_lib_var=yes"
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   eval "ac_cv_lib_$ac_lib_var=no"
6728 fi
6729 rm -f conftest*
6730 LIBS="$ac_save_LIBS"
6731
6732 fi
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6736 else
6737   echo "$ac_t""no" 1>&6
6738 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6739 echo "configure:6740: checking for dlopen" >&5
6740 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char dlopen(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char dlopen();
6753 char (*f)();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6761 choke me
6762 #else
6763 f = dlopen;
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_dlopen=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_dlopen=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782   lt_cv_dlopen="dlopen"
6783 else
6784   echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6786 echo "configure:6787: checking for dlopen in -ldl" >&5
6787 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   ac_save_LIBS="$LIBS"
6792 LIBS="-ldl  $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char dlopen();
6800
6801 int main() {
6802 dlopen()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 LIBS="$ac_save_LIBS"
6816
6817 fi
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6821 else
6822   echo "$ac_t""no" 1>&6
6823 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6824 echo "configure:6825: checking for dlopen in -lsvld" >&5
6825 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   ac_save_LIBS="$LIBS"
6830 LIBS="-lsvld  $LIBS"
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char dlopen();
6838
6839 int main() {
6840 dlopen()
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=no"
6851 fi
6852 rm -f conftest*
6853 LIBS="$ac_save_LIBS"
6854
6855 fi
6856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6859 else
6860   echo "$ac_t""no" 1>&6
6861 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6862 echo "configure:6863: checking for dld_link in -ldld" >&5
6863 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6865   echo $ac_n "(cached) $ac_c" 1>&6
6866 else
6867   ac_save_LIBS="$LIBS"
6868 LIBS="-ldld  $LIBS"
6869 cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 /* We use char because int might match the return type of a gcc2
6874     builtin and then its argument prototype would still apply.  */
6875 char dld_link();
6876
6877 int main() {
6878 dld_link()
6879 ; return 0; }
6880 EOF
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882   rm -rf conftest*
6883   eval "ac_cv_lib_$ac_lib_var=yes"
6884 else
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_lib_$ac_lib_var=no"
6889 fi
6890 rm -f conftest*
6891 LIBS="$ac_save_LIBS"
6892
6893 fi
6894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6897 else
6898   echo "$ac_t""no" 1>&6
6899 fi
6900
6901               
6902 fi
6903
6904             
6905 fi
6906
6907           
6908 fi
6909
6910         
6911 fi
6912
6913       
6914 fi
6915
6916     ;;
6917   esac
6918
6919   if test "x$lt_cv_dlopen" != xno; then
6920     enable_dlopen=yes
6921   else
6922     enable_dlopen=no
6923   fi
6924
6925   case $lt_cv_dlopen in
6926   dlopen)
6927     save_CPPFLAGS="$CPPFLAGS"
6928         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6929
6930     save_LDFLAGS="$LDFLAGS"
6931     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6932
6933     save_LIBS="$LIBS"
6934     LIBS="$lt_cv_dlopen_libs $LIBS"
6935
6936     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6937 echo "configure:6938: checking whether a program can dlopen itself" >&5
6938 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941           if test "$cross_compiling" = yes; then :
6942   lt_cv_dlopen_self=cross
6943 else
6944     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6945   lt_status=$lt_dlunknown
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949
6950 #if HAVE_DLFCN_H
6951 #include <dlfcn.h>
6952 #endif
6953
6954 #include <stdio.h>
6955
6956 #ifdef RTLD_GLOBAL
6957 #  define LT_DLGLOBAL           RTLD_GLOBAL
6958 #else
6959 #  ifdef DL_GLOBAL
6960 #    define LT_DLGLOBAL         DL_GLOBAL
6961 #  else
6962 #    define LT_DLGLOBAL         0
6963 #  endif
6964 #endif
6965
6966 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6967    find out it does not work in some platform. */
6968 #ifndef LT_DLLAZY_OR_NOW
6969 #  ifdef RTLD_LAZY
6970 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6971 #  else
6972 #    ifdef DL_LAZY
6973 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6974 #    else
6975 #      ifdef RTLD_NOW
6976 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6977 #      else
6978 #        ifdef DL_NOW
6979 #          define LT_DLLAZY_OR_NOW      DL_NOW
6980 #        else
6981 #          define LT_DLLAZY_OR_NOW      0
6982 #        endif
6983 #      endif
6984 #    endif
6985 #  endif
6986 #endif
6987
6988 #ifdef __cplusplus
6989 extern "C" void exit (int);
6990 #endif
6991
6992 void fnord() { int i=42;}
6993 int main ()
6994 {
6995   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6996   int status = $lt_dlunknown;
6997
6998   if (self)
6999     {
7000       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7001       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7002       /* dlclose (self); */
7003     }
7004
7005     exit (status);
7006 }
7007 EOF
7008   if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7009     (./conftest; exit; ) 2>/dev/null
7010     lt_status=$?
7011     case x$lt_status in
7012       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7013       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7014       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7015     esac
7016   else :
7017     # compilation failed
7018     lt_cv_dlopen_self=no
7019   fi
7020 fi
7021 rm -fr conftest*
7022
7023     
7024 fi
7025
7026 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7027
7028     if test "x$lt_cv_dlopen_self" = xyes; then
7029       LDFLAGS="$LDFLAGS $link_static_flag"
7030       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7031 echo "configure:7032: checking whether a statically linked program can dlopen itself" >&5
7032 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7033   echo $ac_n "(cached) $ac_c" 1>&6
7034 else
7035           if test "$cross_compiling" = yes; then :
7036   lt_cv_dlopen_self_static=cross
7037 else
7038     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7039   lt_status=$lt_dlunknown
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043
7044 #if HAVE_DLFCN_H
7045 #include <dlfcn.h>
7046 #endif
7047
7048 #include <stdio.h>
7049
7050 #ifdef RTLD_GLOBAL
7051 #  define LT_DLGLOBAL           RTLD_GLOBAL
7052 #else
7053 #  ifdef DL_GLOBAL
7054 #    define LT_DLGLOBAL         DL_GLOBAL
7055 #  else
7056 #    define LT_DLGLOBAL         0
7057 #  endif
7058 #endif
7059
7060 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7061    find out it does not work in some platform. */
7062 #ifndef LT_DLLAZY_OR_NOW
7063 #  ifdef RTLD_LAZY
7064 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7065 #  else
7066 #    ifdef DL_LAZY
7067 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7068 #    else
7069 #      ifdef RTLD_NOW
7070 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7071 #      else
7072 #        ifdef DL_NOW
7073 #          define LT_DLLAZY_OR_NOW      DL_NOW
7074 #        else
7075 #          define LT_DLLAZY_OR_NOW      0
7076 #        endif
7077 #      endif
7078 #    endif
7079 #  endif
7080 #endif
7081
7082 #ifdef __cplusplus
7083 extern "C" void exit (int);
7084 #endif
7085
7086 void fnord() { int i=42;}
7087 int main ()
7088 {
7089   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7090   int status = $lt_dlunknown;
7091
7092   if (self)
7093     {
7094       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7095       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7096       /* dlclose (self); */
7097     }
7098
7099     exit (status);
7100 }
7101 EOF
7102   if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7103     (./conftest; exit; ) 2>/dev/null
7104     lt_status=$?
7105     case x$lt_status in
7106       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7107       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7108       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7109     esac
7110   else :
7111     # compilation failed
7112     lt_cv_dlopen_self_static=no
7113   fi
7114 fi
7115 rm -fr conftest*
7116
7117       
7118 fi
7119
7120 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7121     fi
7122
7123     CPPFLAGS="$save_CPPFLAGS"
7124     LDFLAGS="$save_LDFLAGS"
7125     LIBS="$save_LIBS"
7126     ;;
7127   esac
7128
7129   case $lt_cv_dlopen_self in
7130   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7131   *) enable_dlopen_self=unknown ;;
7132   esac
7133
7134   case $lt_cv_dlopen_self_static in
7135   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7136   *) enable_dlopen_self_static=unknown ;;
7137   esac
7138 fi
7139
7140
7141 if test "$enable_shared" = yes && test "$GCC" = yes; then
7142   case $archive_cmds in
7143   *'~'*)
7144     # FIXME: we may have to deal with multi-command sequences.
7145     ;;
7146   '$CC '*)
7147     # Test whether the compiler implicitly links with -lc since on some
7148     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7149     # to ld, don't add -lc before -lgcc.
7150     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7151 echo "configure:7152: checking whether -lc should be explicitly linked in" >&5
7152     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   $rm conftest*
7156     echo 'static int dummy;' > conftest.$ac_ext
7157
7158     if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7159       soname=conftest
7160       lib=conftest
7161       libobjs=conftest.$ac_objext
7162       deplibs=
7163       wl=$lt_cv_prog_cc_wl
7164       compiler_flags=-v
7165       linker_flags=-v
7166       verstring=
7167       output_objdir=.
7168       libname=conftest
7169       save_allow_undefined_flag=$allow_undefined_flag
7170       allow_undefined_flag=
7171       if { (eval echo configure:7172: \"$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; }
7172       then
7173         lt_cv_archive_cmds_need_lc=no
7174       else
7175         lt_cv_archive_cmds_need_lc=yes
7176       fi
7177       allow_undefined_flag=$save_allow_undefined_flag
7178     else
7179       cat conftest.err 1>&5
7180     fi
7181 fi
7182
7183     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7184     ;;
7185   esac
7186 fi
7187 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7188
7189 # The second clause should only fire when bootstrapping the
7190 # libtool distribution, otherwise you forgot to ship ltmain.sh
7191 # with your package, and you will get complaints that there are
7192 # no rules to generate ltmain.sh.
7193 if test -f "$ltmain"; then
7194   :
7195 else
7196   # If there is no Makefile yet, we rely on a make rule to execute
7197   # `config.status --recheck' to rerun these tests and create the
7198   # libtool script then.
7199   test -f Makefile && make "$ltmain"
7200 fi
7201
7202 if test -f "$ltmain"; then
7203   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7204   $rm -f "${ofile}T"
7205
7206   echo creating $ofile
7207
7208   # Now quote all the things that may contain metacharacters while being
7209   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7210   # variables and quote the copies for generation of the libtool script.
7211   for var in echo old_CC old_CFLAGS SED \
7212     AR AR_FLAGS CC LD LN_S NM SHELL \
7213     reload_flag reload_cmds wl \
7214     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7215     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7216     library_names_spec soname_spec \
7217     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7218     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7219     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7220     old_striplib striplib file_magic_cmd export_symbols_cmds \
7221     deplibs_check_method allow_undefined_flag no_undefined_flag \
7222     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7223     global_symbol_to_c_name_address \
7224     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7225     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7226     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7227
7228     case $var in
7229     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7230     old_postinstall_cmds | old_postuninstall_cmds | \
7231     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7232     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7233     postinstall_cmds | postuninstall_cmds | \
7234     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7235       # Double-quote double-evaled strings.
7236       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7237       ;;
7238     *)
7239       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7240       ;;
7241     esac
7242   done
7243
7244   cat <<__EOF__ > "${ofile}T"
7245 #! $SHELL
7246
7247 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7248 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7249 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7250 #
7251 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7252 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7253 #
7254 # This program is free software; you can redistribute it and/or modify
7255 # it under the terms of the GNU General Public License as published by
7256 # the Free Software Foundation; either version 2 of the License, or
7257 # (at your option) any later version.
7258 #
7259 # This program is distributed in the hope that it will be useful, but
7260 # WITHOUT ANY WARRANTY; without even the implied warranty of
7261 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7262 # General Public License for more details.
7263 #
7264 # You should have received a copy of the GNU General Public License
7265 # along with this program; if not, write to the Free Software
7266 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7267 #
7268 # As a special exception to the GNU General Public License, if you
7269 # distribute this file as part of a program that contains a
7270 # configuration script generated by Autoconf, you may include it under
7271 # the same distribution terms that you use for the rest of that program.
7272
7273 # A sed that does not truncate output.
7274 SED=$lt_SED
7275
7276 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7277 Xsed="${SED} -e s/^X//"
7278
7279 # The HP-UX ksh and POSIX shell print the target directory to stdout
7280 # if CDPATH is set.
7281 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7282
7283 # ### BEGIN LIBTOOL CONFIG
7284
7285 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7286
7287 # Shell to use when invoking shell scripts.
7288 SHELL=$lt_SHELL
7289
7290 # Whether or not to build shared libraries.
7291 build_libtool_libs=$enable_shared
7292
7293 # Whether or not to build static libraries.
7294 build_old_libs=$enable_static
7295
7296 # Whether or not to add -lc for building shared libraries.
7297 build_libtool_need_lc=$need_lc
7298
7299 # Whether or not to optimize for fast installation.
7300 fast_install=$enable_fast_install
7301
7302 # The host system.
7303 host_alias=$host_alias
7304 host=$host
7305
7306 # An echo program that does not interpret backslashes.
7307 echo=$lt_echo
7308
7309 # The archiver.
7310 AR=$lt_AR
7311 AR_FLAGS=$lt_AR_FLAGS
7312
7313 # The default C compiler.
7314 CC=$lt_CC
7315
7316 # Is the compiler the GNU C compiler?
7317 with_gcc=$GCC
7318
7319 # The linker used to build libraries.
7320 LD=$lt_LD
7321
7322 # Whether we need hard or soft links.
7323 LN_S=$lt_LN_S
7324
7325 # A BSD-compatible nm program.
7326 NM=$lt_NM
7327
7328 # A symbol stripping program
7329 STRIP=$STRIP
7330
7331 # Used to examine libraries when file_magic_cmd begins "file"
7332 MAGIC_CMD=$MAGIC_CMD
7333
7334 # Used on cygwin: DLL creation program.
7335 DLLTOOL="$DLLTOOL"
7336
7337 # Used on cygwin: object dumper.
7338 OBJDUMP="$OBJDUMP"
7339
7340 # Used on cygwin: assembler.
7341 AS="$AS"
7342
7343 # The name of the directory that contains temporary libtool files.
7344 objdir=$objdir
7345
7346 # How to create reloadable object files.
7347 reload_flag=$lt_reload_flag
7348 reload_cmds=$lt_reload_cmds
7349
7350 # How to pass a linker flag through the compiler.
7351 wl=$lt_wl
7352
7353 # Object file suffix (normally "o").
7354 objext="$ac_objext"
7355
7356 # Old archive suffix (normally "a").
7357 libext="$libext"
7358
7359 # Executable file suffix (normally "").
7360 exeext="$exeext"
7361
7362 # Additional compiler flags for building library objects.
7363 pic_flag=$lt_pic_flag
7364 pic_mode=$pic_mode
7365
7366 # Does compiler simultaneously support -c and -o options?
7367 compiler_c_o=$lt_compiler_c_o
7368
7369 # Can we write directly to a .lo ?
7370 compiler_o_lo=$lt_compiler_o_lo
7371
7372 # Must we lock files when doing compilation ?
7373 need_locks=$lt_need_locks
7374
7375 # Do we need the lib prefix for modules?
7376 need_lib_prefix=$need_lib_prefix
7377
7378 # Do we need a version for libraries?
7379 need_version=$need_version
7380
7381 # Whether dlopen is supported.
7382 dlopen_support=$enable_dlopen
7383
7384 # Whether dlopen of programs is supported.
7385 dlopen_self=$enable_dlopen_self
7386
7387 # Whether dlopen of statically linked programs is supported.
7388 dlopen_self_static=$enable_dlopen_self_static
7389
7390 # Compiler flag to prevent dynamic linking.
7391 link_static_flag=$lt_link_static_flag
7392
7393 # Compiler flag to turn off builtin functions.
7394 no_builtin_flag=$lt_no_builtin_flag
7395
7396 # Compiler flag to allow reflexive dlopens.
7397 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7398
7399 # Compiler flag to generate shared objects directly from archives.
7400 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7401
7402 # Compiler flag to generate thread-safe objects.
7403 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7404
7405 # Library versioning type.
7406 version_type=$version_type
7407
7408 # Format of library name prefix.
7409 libname_spec=$lt_libname_spec
7410
7411 # List of archive names.  First name is the real one, the rest are links.
7412 # The last name is the one that the linker finds with -lNAME.
7413 library_names_spec=$lt_library_names_spec
7414
7415 # The coded name of the library, if different from the real name.
7416 soname_spec=$lt_soname_spec
7417
7418 # Commands used to build and install an old-style archive.
7419 RANLIB=$lt_RANLIB
7420 old_archive_cmds=$lt_old_archive_cmds
7421 old_postinstall_cmds=$lt_old_postinstall_cmds
7422 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7423
7424 # Create an old-style archive from a shared archive.
7425 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7426
7427 # Create a temporary old-style archive to link instead of a shared archive.
7428 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7429
7430 # Commands used to build and install a shared archive.
7431 archive_cmds=$lt_archive_cmds
7432 archive_expsym_cmds=$lt_archive_expsym_cmds
7433 postinstall_cmds=$lt_postinstall_cmds
7434 postuninstall_cmds=$lt_postuninstall_cmds
7435
7436 # Commands to strip libraries.
7437 old_striplib=$lt_old_striplib
7438 striplib=$lt_striplib
7439
7440 # Method to check whether dependent libraries are shared objects.
7441 deplibs_check_method=$lt_deplibs_check_method
7442
7443 # Command to use when deplibs_check_method == file_magic.
7444 file_magic_cmd=$lt_file_magic_cmd
7445
7446 # Flag that allows shared libraries with undefined symbols to be built.
7447 allow_undefined_flag=$lt_allow_undefined_flag
7448
7449 # Flag that forces no undefined symbols.
7450 no_undefined_flag=$lt_no_undefined_flag
7451
7452 # Commands used to finish a libtool library installation in a directory.
7453 finish_cmds=$lt_finish_cmds
7454
7455 # Same as above, but a single script fragment to be evaled but not shown.
7456 finish_eval=$lt_finish_eval
7457
7458 # Take the output of nm and produce a listing of raw symbols and C names.
7459 global_symbol_pipe=$lt_global_symbol_pipe
7460
7461 # Transform the output of nm in a proper C declaration
7462 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7463
7464 # Transform the output of nm in a C name address pair
7465 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7466
7467 # This is the shared library runtime path variable.
7468 runpath_var=$runpath_var
7469
7470 # This is the shared library path variable.
7471 shlibpath_var=$shlibpath_var
7472
7473 # Is shlibpath searched before the hard-coded library search path?
7474 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7475
7476 # How to hardcode a shared library path into an executable.
7477 hardcode_action=$hardcode_action
7478
7479 # Whether we should hardcode library paths into libraries.
7480 hardcode_into_libs=$hardcode_into_libs
7481
7482 # Flag to hardcode \$libdir into a binary during linking.
7483 # This must work even if \$libdir does not exist.
7484 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7485
7486 # Whether we need a single -rpath flag with a separated argument.
7487 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7488
7489 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7490 # resulting binary.
7491 hardcode_direct=$hardcode_direct
7492
7493 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_minus_L=$hardcode_minus_L
7496
7497 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7498 # the resulting binary.
7499 hardcode_shlibpath_var=$hardcode_shlibpath_var
7500
7501 # Variables whose values should be saved in libtool wrapper scripts and
7502 # restored at relink time.
7503 variables_saved_for_relink="$variables_saved_for_relink"
7504
7505 # Whether libtool must link a program against all its dependency libraries.
7506 link_all_deplibs=$link_all_deplibs
7507
7508 # Compile-time system search path for libraries
7509 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7510
7511 # Run-time system search path for libraries
7512 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7513
7514 # Fix the shell variable \$srcfile for the compiler.
7515 fix_srcfile_path="$fix_srcfile_path"
7516
7517 # Set to yes if exported symbols are required.
7518 always_export_symbols=$always_export_symbols
7519
7520 # The commands to list exported symbols.
7521 export_symbols_cmds=$lt_export_symbols_cmds
7522
7523 # The commands to extract the exported symbol list from a shared archive.
7524 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7525
7526 # Symbols that should not be listed in the preloaded symbols.
7527 exclude_expsyms=$lt_exclude_expsyms
7528
7529 # Symbols that must always be exported.
7530 include_expsyms=$lt_include_expsyms
7531
7532 # ### END LIBTOOL CONFIG
7533
7534 __EOF__
7535
7536   case $host_os in
7537   aix3*)
7538     cat <<\EOF >> "${ofile}T"
7539
7540 # AIX sometimes has problems with the GCC collect2 program.  For some
7541 # reason, if we set the COLLECT_NAMES environment variable, the problems
7542 # vanish in a puff of smoke.
7543 if test "X${COLLECT_NAMES+set}" != Xset; then
7544   COLLECT_NAMES=
7545   export COLLECT_NAMES
7546 fi
7547 EOF
7548     ;;
7549   esac
7550
7551   case $host_os in
7552   cygwin* | mingw* | pw32* | os2*)
7553     cat <<'EOF' >> "${ofile}T"
7554       # This is a source program that is used to create dlls on Windows
7555       # Don't remove nor modify the starting and closing comments
7556 # /* ltdll.c starts here */
7557 # #define WIN32_LEAN_AND_MEAN
7558 # #include <windows.h>
7559 # #undef WIN32_LEAN_AND_MEAN
7560 # #include <stdio.h>
7561 #
7562 # #ifndef __CYGWIN__
7563 # #  ifdef __CYGWIN32__
7564 # #    define __CYGWIN__ __CYGWIN32__
7565 # #  endif
7566 # #endif
7567 #
7568 # #ifdef __cplusplus
7569 # extern "C" {
7570 # #endif
7571 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7572 # #ifdef __cplusplus
7573 # }
7574 # #endif
7575 #
7576 # #ifdef __CYGWIN__
7577 # #include <cygwin/cygwin_dll.h>
7578 # DECLARE_CYGWIN_DLL( DllMain );
7579 # #endif
7580 # HINSTANCE __hDllInstance_base;
7581 #
7582 # BOOL APIENTRY
7583 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7584 # {
7585 #   __hDllInstance_base = hInst;
7586 #   return TRUE;
7587 # }
7588 # /* ltdll.c ends here */
7589         # This is a source program that is used to create import libraries
7590         # on Windows for dlls which lack them. Don't remove nor modify the
7591         # starting and closing comments
7592 # /* impgen.c starts here */
7593 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7594 #
7595 #  This file is part of GNU libtool.
7596 #
7597 #  This program is free software; you can redistribute it and/or modify
7598 #  it under the terms of the GNU General Public License as published by
7599 #  the Free Software Foundation; either version 2 of the License, or
7600 #  (at your option) any later version.
7601 #
7602 #  This program is distributed in the hope that it will be useful,
7603 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7604 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7605 #  GNU General Public License for more details.
7606 #
7607 #  You should have received a copy of the GNU General Public License
7608 #  along with this program; if not, write to the Free Software
7609 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7610 #  */
7611 #
7612 # #include <stdio.h>            /* for printf() */
7613 # #include <unistd.h>           /* for open(), lseek(), read() */
7614 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7615 # #include <string.h>           /* for strdup() */
7616 #
7617 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7618 # #ifndef O_BINARY
7619 # #define O_BINARY 0
7620 # #endif
7621 #
7622 # static unsigned int
7623 # pe_get16 (fd, offset)
7624 #      int fd;
7625 #      int offset;
7626 # {
7627 #   unsigned char b[2];
7628 #   lseek (fd, offset, SEEK_SET);
7629 #   read (fd, b, 2);
7630 #   return b[0] + (b[1]<<8);
7631 # }
7632 #
7633 # static unsigned int
7634 # pe_get32 (fd, offset)
7635 #     int fd;
7636 #     int offset;
7637 # {
7638 #   unsigned char b[4];
7639 #   lseek (fd, offset, SEEK_SET);
7640 #   read (fd, b, 4);
7641 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7642 # }
7643 #
7644 # static unsigned int
7645 # pe_as32 (ptr)
7646 #      void *ptr;
7647 # {
7648 #   unsigned char *b = ptr;
7649 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7650 # }
7651 #
7652 # int
7653 # main (argc, argv)
7654 #     int argc;
7655 #     char *argv[];
7656 # {
7657 #     int dll;
7658 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7659 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7660 #     unsigned long name_rvas, nexp;
7661 #     unsigned char *expdata, *erva;
7662 #     char *filename, *dll_name;
7663 #
7664 #     filename = argv[1];
7665 #
7666 #     dll = open(filename, O_RDONLY|O_BINARY);
7667 #     if (dll < 1)
7668 #       return 1;
7669 #
7670 #     dll_name = filename;
7671 #
7672 #     for (i=0; filename[i]; i++)
7673 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7674 #           dll_name = filename + i +1;
7675 #
7676 #     pe_header_offset = pe_get32 (dll, 0x3c);
7677 #     opthdr_ofs = pe_header_offset + 4 + 20;
7678 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7679 #
7680 #     if (num_entries < 1) /* no exports */
7681 #       return 1;
7682 #
7683 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7684 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7685 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7686 #     secptr = (pe_header_offset + 4 + 20 +
7687 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7688 #
7689 #     expptr = 0;
7690 #     for (i = 0; i < nsections; i++)
7691 #     {
7692 #       char sname[8];
7693 #       unsigned long secptr1 = secptr + 40 * i;
7694 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7695 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7696 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7697 #       lseek(dll, secptr1, SEEK_SET);
7698 #       read(dll, sname, 8);
7699 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7700 #       {
7701 #           expptr = fptr + (export_rva - vaddr);
7702 #           if (export_rva + export_size > vaddr + vsize)
7703 #               export_size = vsize - (export_rva - vaddr);
7704 #           break;
7705 #       }
7706 #     }
7707 #
7708 #     expdata = (unsigned char*)malloc(export_size);
7709 #     lseek (dll, expptr, SEEK_SET);
7710 #     read (dll, expdata, export_size);
7711 #     erva = expdata - export_rva;
7712 #
7713 #     nexp = pe_as32 (expdata+24);
7714 #     name_rvas = pe_as32 (expdata+32);
7715 #
7716 #     printf ("EXPORTS\n");
7717 #     for (i = 0; i<nexp; i++)
7718 #     {
7719 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7720 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7721 #     }
7722 #
7723 #     return 0;
7724 # }
7725 # /* impgen.c ends here */
7726
7727 EOF
7728     ;;
7729   esac
7730
7731   # We use sed instead of cat because bash on DJGPP gets confused if
7732   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7733   # text mode, it properly converts lines to CR/LF.  This bash problem
7734   # is reportedly fixed, but why not run on old versions too?
7735   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7736
7737   mv -f "${ofile}T" "$ofile" || \
7738     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7739   chmod +x "$ofile"
7740 fi
7741
7742
7743
7744
7745
7746 # This can be used to rebuild libtool when needed
7747 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7748
7749 # Always use our own libtool.
7750 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7751
7752 # Prevent multiple expansion
7753
7754
7755
7756 # test for ln hardlink support
7757 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7758 echo "configure:7759: checking whether ln works" >&5
7759 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   rm -f conftest.src conftest.dst
7763 echo "conftest" > conftest.src
7764 if ln conftest.src conftest.dst 2>/dev/null
7765 then
7766   ol_cv_prog_LN_H="ln"
7767 else
7768   ol_cv_prog_LN_H="cp"
7769 fi
7770 rm -f conftest.src conftest.dst
7771
7772 fi
7773 LN_H="$ol_cv_prog_LN_H"
7774 if test "$ol_cv_prog_LN_H" = "ln"; then
7775         echo "$ac_t""yes" 1>&6
7776 else
7777         echo "$ac_t""no" 1>&6
7778 fi
7779
7780 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7781 echo "configure:7782: checking whether ln -s works" >&5
7782 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7783   echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785   rm -f conftestdata
7786 if ln -s X conftestdata 2>/dev/null
7787 then
7788   rm -f conftestdata
7789   ac_cv_prog_LN_S="ln -s"
7790 else
7791   ac_cv_prog_LN_S=ln
7792 fi
7793 fi
7794 LN_S="$ac_cv_prog_LN_S"
7795 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7796   echo "$ac_t""yes" 1>&6
7797 else
7798   echo "$ac_t""no" 1>&6
7799 fi
7800
7801
7802 ol_link_perl=no
7803 if test $ol_enable_perl != no ; then
7804         # Extract the first word of "perl", so it can be a program name with args.
7805 set dummy perl; ac_word=$2
7806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $ac_word" >&5
7808 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7809   echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811   case "$PERLBIN" in
7812   /*)
7813   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7814   ;;
7815   ?:/*)
7816   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7817   ;;
7818   *)
7819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7820   ac_dummy="$PATH"
7821   for ac_dir in $ac_dummy; do 
7822     test -z "$ac_dir" && ac_dir=.
7823     if test -f $ac_dir/$ac_word; then
7824       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7825       break
7826     fi
7827   done
7828   IFS="$ac_save_ifs"
7829   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7830   ;;
7831 esac
7832 fi
7833 PERLBIN="$ac_cv_path_PERLBIN"
7834 if test -n "$PERLBIN"; then
7835   echo "$ac_t""$PERLBIN" 1>&6
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839
7840
7841         if test "no$PERLBIN" = "no" ; then
7842                 if test $ol_enable_perl = yes ; then
7843                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7844                 fi
7845
7846         else
7847                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7848                 if test x"$ol_with_perl_module" = "xstatic" ; then
7849                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7850                 else
7851                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7852                 fi
7853                                 ol_link_perl=yes
7854         fi
7855 fi
7856
7857 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7858 echo "configure:7859: checking how to run the C preprocessor" >&5
7859 # On Suns, sometimes $CPP names a directory.
7860 if test -n "$CPP" && test -d "$CPP"; then
7861   CPP=
7862 fi
7863 if test -z "$CPP"; then
7864 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7865   echo $ac_n "(cached) $ac_c" 1>&6
7866 else
7867     # This must be in double quotes, not single quotes, because CPP may get
7868   # substituted into the Makefile and "${CC-cc}" will confuse make.
7869   CPP="${CC-cc} -E"
7870   # On the NeXT, cc -E runs the code through the compiler's parser,
7871   # not just through cpp.
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <assert.h>
7876 Syntax Error
7877 EOF
7878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7879 { (eval echo configure:7880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7881 if test -z "$ac_err"; then
7882   :
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   CPP="${CC-cc} -E -traditional-cpp"
7889   cat > conftest.$ac_ext <<EOF
7890 #line 7891 "configure"
7891 #include "confdefs.h"
7892 #include <assert.h>
7893 Syntax Error
7894 EOF
7895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7896 { (eval echo configure:7897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7898 if test -z "$ac_err"; then
7899   :
7900 else
7901   echo "$ac_err" >&5
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   CPP="${CC-cc} -nologo -E"
7906   cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 #include <assert.h>
7910 Syntax Error
7911 EOF
7912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7913 { (eval echo configure:7914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7915 if test -z "$ac_err"; then
7916   :
7917 else
7918   echo "$ac_err" >&5
7919   echo "configure: failed program was:" >&5
7920   cat conftest.$ac_ext >&5
7921   rm -rf conftest*
7922   CPP=/lib/cpp
7923 fi
7924 rm -f conftest*
7925 fi
7926 rm -f conftest*
7927 fi
7928 rm -f conftest*
7929   ac_cv_prog_CPP="$CPP"
7930 fi
7931   CPP="$ac_cv_prog_CPP"
7932 else
7933   ac_cv_prog_CPP="$CPP"
7934 fi
7935 echo "$ac_t""$CPP" 1>&6
7936
7937
7938 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7939         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7940
7941 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7942         echo "configure: warning: programs compiled here do run here..." 1>&2
7943         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7944
7945 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7946         echo "configure: warning: programs compiled here do not run here..." 1>&2
7947         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7948 fi
7949
7950
7951 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7952 echo "configure:7953: checking for Cygwin environment" >&5
7953 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7954   echo $ac_n "(cached) $ac_c" 1>&6
7955 else
7956   cat > conftest.$ac_ext <<EOF
7957 #line 7958 "configure"
7958 #include "confdefs.h"
7959
7960 int main() {
7961
7962 #ifndef __CYGWIN__
7963 #define __CYGWIN__ __CYGWIN32__
7964 #endif
7965 return __CYGWIN__;
7966 ; return 0; }
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7969   rm -rf conftest*
7970   ac_cv_cygwin=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   ac_cv_cygwin=no
7976 fi
7977 rm -f conftest*
7978 fi
7979
7980 echo "$ac_t""$ac_cv_cygwin" 1>&6
7981 CYGWIN=
7982 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7983 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7984 echo "configure:7985: checking for mingw32 environment" >&5
7985 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7986   echo $ac_n "(cached) $ac_c" 1>&6
7987 else
7988   cat > conftest.$ac_ext <<EOF
7989 #line 7990 "configure"
7990 #include "confdefs.h"
7991
7992 int main() {
7993 return __MINGW32__;
7994 ; return 0; }
7995 EOF
7996 if { (eval echo configure:7997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7997   rm -rf conftest*
7998   ac_cv_mingw32=yes
7999 else
8000   echo "configure: failed program was:" >&5
8001   cat conftest.$ac_ext >&5
8002   rm -rf conftest*
8003   ac_cv_mingw32=no
8004 fi
8005 rm -f conftest*
8006 fi
8007
8008 echo "$ac_t""$ac_cv_mingw32" 1>&6
8009 MINGW32=
8010 test "$ac_cv_mingw32" = yes && MINGW32=yes
8011
8012
8013
8014 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8015 echo "configure:8016: checking for executable suffix" >&5
8016 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8017   echo $ac_n "(cached) $ac_c" 1>&6
8018 else
8019   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8020   ac_cv_exeext=.exe
8021 else
8022   rm -f conftest*
8023   echo 'int main () { return 0; }' > conftest.$ac_ext
8024   ac_cv_exeext=
8025   if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8026     for file in conftest.*; do
8027       case $file in
8028       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8029       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8030       esac
8031     done
8032   else
8033     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8034   fi
8035   rm -f conftest*
8036   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8037 fi
8038 fi
8039
8040 EXEEXT=""
8041 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8042 echo "$ac_t""${ac_cv_exeext}" 1>&6
8043 ac_exeext=$EXEEXT
8044
8045 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8046 echo "configure:8047: checking for object suffix" >&5
8047 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8048   echo $ac_n "(cached) $ac_c" 1>&6
8049 else
8050   rm -f conftest*
8051 echo 'int i = 1;' > conftest.$ac_ext
8052 if { (eval echo configure:8053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8053   for ac_file in conftest.*; do
8054     case $ac_file in
8055     *.c) ;;
8056     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8057     esac
8058   done
8059 else
8060   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8061 fi
8062 rm -f conftest*
8063 fi
8064
8065 echo "$ac_t""$ac_cv_objext" 1>&6
8066 OBJEXT=$ac_cv_objext
8067 ac_objext=$ac_cv_objext
8068
8069
8070 cat >> confdefs.h <<EOF
8071 #define EXEEXT "${EXEEXT}"
8072 EOF
8073
8074
8075 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8076 echo "configure:8077: checking for be_app in -lbe" >&5
8077 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8079   echo $ac_n "(cached) $ac_c" 1>&6
8080 else
8081   ac_save_LIBS="$LIBS"
8082 LIBS="-lbe -lroot -lnet $LIBS"
8083 cat > conftest.$ac_ext <<EOF
8084 #line 8085 "configure"
8085 #include "confdefs.h"
8086 /* Override any gcc2 internal prototype to avoid an error.  */
8087 /* We use char because int might match the return type of a gcc2
8088     builtin and then its argument prototype would still apply.  */
8089 char be_app();
8090
8091 int main() {
8092 be_app()
8093 ; return 0; }
8094 EOF
8095 if { (eval echo configure:8096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8096   rm -rf conftest*
8097   eval "ac_cv_lib_$ac_lib_var=yes"
8098 else
8099   echo "configure: failed program was:" >&5
8100   cat conftest.$ac_ext >&5
8101   rm -rf conftest*
8102   eval "ac_cv_lib_$ac_lib_var=no"
8103 fi
8104 rm -f conftest*
8105 LIBS="$ac_save_LIBS"
8106
8107 fi
8108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8109   echo "$ac_t""yes" 1>&6
8110   LIBS="$LIBS -lbe -lroot -lnet"
8111 else
8112   echo "$ac_t""no" 1>&6
8113 :
8114 fi
8115
8116
8117
8118
8119
8120 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8121 echo "configure:8122: checking for ${CC-cc} option to accept ANSI C" >&5
8122 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8123   echo $ac_n "(cached) $ac_c" 1>&6
8124 else
8125   am_cv_prog_cc_stdc=no
8126 ac_save_CC="$CC"
8127 # Don't try gcc -ansi; that turns off useful extensions and
8128 # breaks some systems' header files.
8129 # AIX                   -qlanglvl=ansi
8130 # Ultrix and OSF/1      -std1
8131 # HP-UX 10.20 and later -Ae
8132 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8133 # SVR4                  -Xc -D__EXTENSIONS__
8134 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8135 do
8136   CC="$ac_save_CC $ac_arg"
8137   cat > conftest.$ac_ext <<EOF
8138 #line 8139 "configure"
8139 #include "confdefs.h"
8140 #include <stdarg.h>
8141 #include <stdio.h>
8142 #include <sys/types.h>
8143 #include <sys/stat.h>
8144 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8145 struct buf { int x; };
8146 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8147 static char *e (p, i)
8148      char **p;
8149      int i;
8150 {
8151   return p[i];
8152 }
8153 static char *f (char * (*g) (char **, int), char **p, ...)
8154 {
8155   char *s;
8156   va_list v;
8157   va_start (v,p);
8158   s = g (p, va_arg (v,int));
8159   va_end (v);
8160   return s;
8161 }
8162 int test (int i, double x);
8163 struct s1 {int (*f) (int a);};
8164 struct s2 {int (*f) (double a);};
8165 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8166 int argc;
8167 char **argv;
8168
8169 int main() {
8170
8171 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8172
8173 ; return 0; }
8174 EOF
8175 if { (eval echo configure:8176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8176   rm -rf conftest*
8177   am_cv_prog_cc_stdc="$ac_arg"; break
8178 else
8179   echo "configure: failed program was:" >&5
8180   cat conftest.$ac_ext >&5
8181 fi
8182 rm -f conftest*
8183 done
8184 CC="$ac_save_CC"
8185
8186 fi
8187
8188 if test -z "$am_cv_prog_cc_stdc"; then
8189   echo "$ac_t""none needed" 1>&6
8190 else
8191   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8192 fi
8193 case "x$am_cv_prog_cc_stdc" in
8194   x|xno) ;;
8195   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8196 esac
8197
8198 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8199         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8200 fi
8201
8202 # test for make depend flag
8203 OL_MKDEP=
8204 OL_MKDEP_FLAGS=
8205 if test -z "${MKDEP}"; then
8206         OL_MKDEP="${CC-cc}"
8207         if test -z "${MKDEP_FLAGS}"; then
8208                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8209 echo "configure:8210: checking for ${OL_MKDEP} depend flag" >&5
8210 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8211   echo $ac_n "(cached) $ac_c" 1>&6
8212 else
8213   
8214                         ol_cv_mkdep=no
8215                         for flag in "-M" "-xM"; do
8216                                 cat > conftest.c <<EOF
8217  noCode;
8218 EOF
8219                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8220                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8221                                 then
8222                                         if test ! -f conftest."${ac_object}" ; then
8223                                                 ol_cv_mkdep=$flag
8224                                                 OL_MKDEP_FLAGS="$flag"
8225                                                 break
8226                                         fi
8227                                 fi
8228                         done
8229                         rm -f conftest*
8230                 
8231 fi
8232
8233 echo "$ac_t""$ol_cv_mkdep" 1>&6
8234         else
8235                 cc_cv_mkdep=yes
8236                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8237         fi
8238 else
8239         cc_cv_mkdep=yes
8240         OL_MKDEP="${MKDEP}"
8241         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8242 fi
8243
8244
8245
8246 if test "${ol_cv_mkdep}" = no ; then
8247         # this will soon become an error
8248         echo "configure: warning: do not know how to generate dependencies" 1>&2
8249 fi
8250
8251 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8252 echo "configure:8253: checking for afopen in -ls" >&5
8253 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8255   echo $ac_n "(cached) $ac_c" 1>&6
8256 else
8257   ac_save_LIBS="$LIBS"
8258 LIBS="-ls  $LIBS"
8259 cat > conftest.$ac_ext <<EOF
8260 #line 8261 "configure"
8261 #include "confdefs.h"
8262 /* Override any gcc2 internal prototype to avoid an error.  */
8263 /* We use char because int might match the return type of a gcc2
8264     builtin and then its argument prototype would still apply.  */
8265 char afopen();
8266
8267 int main() {
8268 afopen()
8269 ; return 0; }
8270 EOF
8271 if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=yes"
8274 else
8275   echo "configure: failed program was:" >&5
8276   cat conftest.$ac_ext >&5
8277   rm -rf conftest*
8278   eval "ac_cv_lib_$ac_lib_var=no"
8279 fi
8280 rm -f conftest*
8281 LIBS="$ac_save_LIBS"
8282
8283 fi
8284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8285   echo "$ac_t""yes" 1>&6
8286   
8287         AUTH_LIBS=-ls
8288         cat >> confdefs.h <<\EOF
8289 #define HAVE_AIX_SECURITY 1
8290 EOF
8291
8292
8293 else
8294   echo "$ac_t""no" 1>&6
8295 fi
8296
8297
8298 case "$target" in
8299 *-ibm-openedition)
8300         ac_cv_func_getopt=no
8301         cat >> confdefs.h <<\EOF
8302 #define BOTH_STRINGS_H 1
8303 EOF
8304
8305         ;;
8306 esac
8307
8308 ol_link_modules=no
8309 if test $ol_enable_modules != no ; then
8310         for ac_hdr in ltdl.h
8311 do
8312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8314 echo "configure:8315: checking for $ac_hdr" >&5
8315 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8316   echo $ac_n "(cached) $ac_c" 1>&6
8317 else
8318   cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321 #include <$ac_hdr>
8322 EOF
8323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8324 { (eval echo configure:8325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8326 if test -z "$ac_err"; then
8327   rm -rf conftest*
8328   eval "ac_cv_header_$ac_safe=yes"
8329 else
8330   echo "$ac_err" >&5
8331   echo "configure: failed program was:" >&5
8332   cat conftest.$ac_ext >&5
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=no"
8335 fi
8336 rm -f conftest*
8337 fi
8338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8339   echo "$ac_t""yes" 1>&6
8340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8341   cat >> confdefs.h <<EOF
8342 #define $ac_tr_hdr 1
8343 EOF
8344  
8345 else
8346   echo "$ac_t""no" 1>&6
8347 fi
8348 done
8349
8350
8351         if test $ac_cv_header_ltdl_h = no ; then
8352                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8353         fi
8354
8355         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8356 echo "configure:8357: checking for lt_dlinit in -lltdl" >&5
8357 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   ac_save_LIBS="$LIBS"
8362 LIBS="-lltdl  $LIBS"
8363 cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char lt_dlinit();
8370
8371 int main() {
8372 lt_dlinit()
8373 ; return 0; }
8374 EOF
8375 if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=yes"
8378 else
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=no"
8383 fi
8384 rm -f conftest*
8385 LIBS="$ac_save_LIBS"
8386
8387 fi
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   
8391                 MODULES_LIBS=-lltdl
8392                 cat >> confdefs.h <<\EOF
8393 #define HAVE_LIBLTDL 1
8394 EOF
8395
8396         
8397 else
8398   echo "$ac_t""no" 1>&6
8399 fi
8400
8401
8402         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8403                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8404         fi
8405         ol_link_modules=yes
8406 else
8407         ol_with_bdb_module=static
8408         ol_with_dnssrv_module=static
8409         ol_with_hdb_module=static
8410         ol_with_ldap_module=static
8411         ol_with_ldbm_module=static
8412         ol_with_meta_module=static
8413         ol_with_monitor_module=static
8414         ol_with_null_module=static
8415         ol_with_passwd_module=static
8416         ol_with_perl_module=static
8417         ol_with_shell_module=static
8418         ol_with_tcl_module=static
8419         ol_with_sql_module=static
8420 fi
8421
8422 # test for EBCDIC
8423 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8424 echo "configure:8425: checking for EBCDIC" >&5
8425 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8426   echo $ac_n "(cached) $ac_c" 1>&6
8427 else
8428   
8429         cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432
8433 #if !('M' == 0xd4)
8434 #include <__ASCII__/generate_error.h>
8435 #endif
8436
8437 EOF
8438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8439 { (eval echo configure:8440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8441 if test -z "$ac_err"; then
8442   rm -rf conftest*
8443   ol_cv_cpp_ebcdic=yes
8444 else
8445   echo "$ac_err" >&5
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   ol_cv_cpp_ebcdic=no
8450 fi
8451 rm -f conftest*
8452 fi
8453
8454 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8455 if test $ol_cv_cpp_ebcdic = yes ; then
8456         cat >> confdefs.h <<\EOF
8457 #define HAVE_EBCDIC 1
8458 EOF
8459
8460 fi
8461
8462 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8463 echo "configure:8464: checking for ANSI C header files" >&5
8464 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8465   echo $ac_n "(cached) $ac_c" 1>&6
8466 else
8467   cat > conftest.$ac_ext <<EOF
8468 #line 8469 "configure"
8469 #include "confdefs.h"
8470 #include <stdlib.h>
8471 #include <stdarg.h>
8472 #include <string.h>
8473 #include <float.h>
8474 EOF
8475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8476 { (eval echo configure:8477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8478 if test -z "$ac_err"; then
8479   rm -rf conftest*
8480   ol_cv_header_stdc=yes
8481 else
8482   echo "$ac_err" >&5
8483   echo "configure: failed program was:" >&5
8484   cat conftest.$ac_ext >&5
8485   rm -rf conftest*
8486   ol_cv_header_stdc=no
8487 fi
8488 rm -f conftest*
8489
8490 if test $ol_cv_header_stdc = yes; then
8491   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8492 cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <string.h>
8496 EOF
8497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8498   egrep "memchr" >/dev/null 2>&1; then
8499   :
8500 else
8501   rm -rf conftest*
8502   ol_cv_header_stdc=no
8503 fi
8504 rm -f conftest*
8505
8506 fi
8507
8508 if test $ol_cv_header_stdc = yes; then
8509   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8510 cat > conftest.$ac_ext <<EOF
8511 #line 8512 "configure"
8512 #include "confdefs.h"
8513 #include <stdlib.h>
8514 EOF
8515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8516   egrep "free" >/dev/null 2>&1; then
8517   :
8518 else
8519   rm -rf conftest*
8520   ol_cv_header_stdc=no
8521 fi
8522 rm -f conftest*
8523
8524 fi
8525
8526 if test $ol_cv_header_stdc = yes; then
8527   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8528 if test "$cross_compiling" = yes; then
8529   :
8530 else
8531   cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8534 #include <ctype.h>
8535 #ifndef HAVE_EBCDIC
8536 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8537 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8538 #else
8539 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8540                 || ('j' <= (c) && (c) <= 'r') \
8541                 || ('s' <= (c) && (c) <= 'z'))
8542 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8543 #endif
8544 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8545 int main () { int i; for (i = 0; i < 256; i++)
8546 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8547 exit (0); }
8548
8549 EOF
8550 if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8551 then
8552   :
8553 else
8554   echo "configure: failed program was:" >&5
8555   cat conftest.$ac_ext >&5
8556   rm -fr conftest*
8557   ol_cv_header_stdc=no
8558 fi
8559 rm -fr conftest*
8560 fi
8561
8562 fi
8563 fi
8564
8565 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8566 if test $ol_cv_header_stdc = yes; then
8567   cat >> confdefs.h <<\EOF
8568 #define STDC_HEADERS 1
8569 EOF
8570
8571 fi
8572 ac_cv_header_stdc=disable
8573
8574
8575 if test $ol_cv_header_stdc != yes; then
8576         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8577 fi
8578
8579 ac_header_dirent=no
8580 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8581 do
8582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8583 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8584 echo "configure:8585: checking for $ac_hdr that defines DIR" >&5
8585 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <sys/types.h>
8592 #include <$ac_hdr>
8593 int main() {
8594 DIR *dirp = 0;
8595 ; return 0; }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8598   rm -rf conftest*
8599   eval "ac_cv_header_dirent_$ac_safe=yes"
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_header_dirent_$ac_safe=no"
8605 fi
8606 rm -f conftest*
8607 fi
8608 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8611   cat >> confdefs.h <<EOF
8612 #define $ac_tr_hdr 1
8613 EOF
8614  ac_header_dirent=$ac_hdr; break
8615 else
8616   echo "$ac_t""no" 1>&6
8617 fi
8618 done
8619 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8620 if test $ac_header_dirent = dirent.h; then
8621 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8622 echo "configure:8623: checking for opendir in -ldir" >&5
8623 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8625   echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627   ac_save_LIBS="$LIBS"
8628 LIBS="-ldir  $LIBS"
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 /* Override any gcc2 internal prototype to avoid an error.  */
8633 /* We use char because int might match the return type of a gcc2
8634     builtin and then its argument prototype would still apply.  */
8635 char opendir();
8636
8637 int main() {
8638 opendir()
8639 ; return 0; }
8640 EOF
8641 if { (eval echo configure:8642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8642   rm -rf conftest*
8643   eval "ac_cv_lib_$ac_lib_var=yes"
8644 else
8645   echo "configure: failed program was:" >&5
8646   cat conftest.$ac_ext >&5
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=no"
8649 fi
8650 rm -f conftest*
8651 LIBS="$ac_save_LIBS"
8652
8653 fi
8654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8655   echo "$ac_t""yes" 1>&6
8656   LIBS="$LIBS -ldir"
8657 else
8658   echo "$ac_t""no" 1>&6
8659 fi
8660
8661 else
8662 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8663 echo "configure:8664: checking for opendir in -lx" >&5
8664 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8665 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   ac_save_LIBS="$LIBS"
8669 LIBS="-lx  $LIBS"
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char opendir();
8677
8678 int main() {
8679 opendir()
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683   rm -rf conftest*
8684   eval "ac_cv_lib_$ac_lib_var=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=no"
8690 fi
8691 rm -f conftest*
8692 LIBS="$ac_save_LIBS"
8693
8694 fi
8695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8696   echo "$ac_t""yes" 1>&6
8697   LIBS="$LIBS -lx"
8698 else
8699   echo "$ac_t""no" 1>&6
8700 fi
8701
8702 fi
8703
8704 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8705 echo "configure:8706: checking for sys/wait.h that is POSIX.1 compatible" >&5
8706 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8707   echo $ac_n "(cached) $ac_c" 1>&6
8708 else
8709   cat > conftest.$ac_ext <<EOF
8710 #line 8711 "configure"
8711 #include "confdefs.h"
8712 #include <sys/types.h>
8713 #include <sys/wait.h>
8714 #ifndef WEXITSTATUS
8715 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8716 #endif
8717 #ifndef WIFEXITED
8718 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8719 #endif
8720 int main() {
8721 int s;
8722 wait (&s);
8723 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8727   rm -rf conftest*
8728   ac_cv_header_sys_wait_h=yes
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   ac_cv_header_sys_wait_h=no
8734 fi
8735 rm -f conftest*
8736 fi
8737
8738 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8739 if test $ac_cv_header_sys_wait_h = yes; then
8740   cat >> confdefs.h <<\EOF
8741 #define HAVE_SYS_WAIT_H 1
8742 EOF
8743
8744 fi
8745
8746 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8747 echo "configure:8748: checking POSIX termios" >&5
8748 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8749   echo $ac_n "(cached) $ac_c" 1>&6
8750 else
8751   cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 #include <sys/types.h>
8755 #include <unistd.h>
8756 #include <termios.h>
8757 int main() {
8758 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8759    tcgetattr(0, 0);
8760 ; return 0; }
8761 EOF
8762 if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8763   rm -rf conftest*
8764   am_cv_sys_posix_termios=yes
8765 else
8766   echo "configure: failed program was:" >&5
8767   cat conftest.$ac_ext >&5
8768   rm -rf conftest*
8769   am_cv_sys_posix_termios=no
8770 fi
8771 rm -f conftest*
8772 fi
8773
8774 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8775
8776
8777  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8778 echo "configure:8779: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8779 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8783
8784   gwinsz_in_termios_h=no
8785   if test $am_cv_sys_posix_termios = yes; then
8786     cat > conftest.$ac_ext <<EOF
8787 #line 8788 "configure"
8788 #include "confdefs.h"
8789 #include <sys/types.h>
8790 #     include <termios.h>
8791 #     ifdef TIOCGWINSZ
8792         yes
8793 #     endif
8794     
8795 EOF
8796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8797   egrep "yes" >/dev/null 2>&1; then
8798   rm -rf conftest*
8799   gwinsz_in_termios_h=yes
8800 fi
8801 rm -f conftest*
8802
8803   fi
8804
8805   if test $gwinsz_in_termios_h = no; then
8806     cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #     include <sys/ioctl.h>
8811 #     ifdef TIOCGWINSZ
8812         yes
8813 #     endif
8814     
8815 EOF
8816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8817   egrep "yes" >/dev/null 2>&1; then
8818   rm -rf conftest*
8819   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8820 fi
8821 rm -f conftest*
8822
8823   fi
8824   
8825 fi
8826
8827 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8828   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8829     cat >> confdefs.h <<\EOF
8830 #define GWINSZ_IN_SYS_IOCTL 1
8831 EOF
8832
8833   fi
8834
8835 if test $am_cv_sys_posix_termios = yes ; then
8836         cat >> confdefs.h <<\EOF
8837 #define HAVE_POSIX_TERMIOS 1
8838 EOF
8839
8840 fi
8841
8842 for ac_hdr in \
8843         arpa/inet.h             \
8844         arpa/nameser.h  \
8845         assert.h                \
8846         conio.h                 \
8847         crypt.h                 \
8848         direct.h                \
8849         errno.h                 \
8850         fcntl.h                 \
8851         filio.h                 \
8852         getopt.h                \
8853         grp.h                   \
8854         io.h                    \
8855         libutil.h               \
8856         limits.h                \
8857         locale.h                \
8858         netinet/tcp.h   \
8859         malloc.h                \
8860         memory.h                \
8861         psap.h                  \
8862         pwd.h                   \
8863         process.h               \
8864         resolv.h                \
8865         sgtty.h                 \
8866         shadow.h                \
8867         stddef.h                \
8868         string.h                \
8869         strings.h               \
8870         sysexits.h              \
8871         sys/file.h              \
8872         sys/filio.h             \
8873         sys/errno.h             \
8874         sys/ioctl.h             \
8875         sys/param.h             \
8876         sys/resource.h  \
8877         sys/select.h    \
8878         sys/socket.h    \
8879         sys/stat.h              \
8880         sys/syslog.h    \
8881         sys/time.h              \
8882         sys/types.h             \
8883         sys/ucred.h             \
8884         sys/uio.h               \
8885         syslog.h                \
8886         termios.h               \
8887         unistd.h                \
8888         winsock.h               \
8889         winsock2.h              \
8890
8891 do
8892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8894 echo "configure:8895: checking for $ac_hdr" >&5
8895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 #include <$ac_hdr>
8902 EOF
8903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8904 { (eval echo configure:8905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8906 if test -z "$ac_err"; then
8907   rm -rf conftest*
8908   eval "ac_cv_header_$ac_safe=yes"
8909 else
8910   echo "$ac_err" >&5
8911   echo "configure: failed program was:" >&5
8912   cat conftest.$ac_ext >&5
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=no"
8915 fi
8916 rm -f conftest*
8917 fi
8918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8919   echo "$ac_t""yes" 1>&6
8920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8921   cat >> confdefs.h <<EOF
8922 #define $ac_tr_hdr 1
8923 EOF
8924  
8925 else
8926   echo "$ac_t""no" 1>&6
8927 fi
8928 done
8929
8930
8931
8932
8933 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8934 echo "configure:8935: checking for dlopen" >&5
8935 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8936   echo $ac_n "(cached) $ac_c" 1>&6
8937 else
8938   cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 /* System header to define __stub macros and hopefully few prototypes,
8942     which can conflict with char dlopen(); below.  */
8943 #include <assert.h>
8944 /* Override any gcc2 internal prototype to avoid an error.  */
8945 /* We use char because int might match the return type of a gcc2
8946     builtin and then its argument prototype would still apply.  */
8947 char dlopen();
8948 char (*f)();
8949
8950 int main() {
8951
8952 /* The GNU C library defines this for functions which it implements
8953     to always fail with ENOSYS.  Some functions are actually named
8954     something starting with __ and the normal name is an alias.  */
8955 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8956 choke me
8957 #else
8958 f = dlopen;
8959 #endif
8960
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964   rm -rf conftest*
8965   eval "ac_cv_func_dlopen=yes"
8966 else
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_func_dlopen=no"
8971 fi
8972 rm -f conftest*
8973 fi
8974
8975 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977   :
8978 else
8979   echo "$ac_t""no" 1>&6
8980 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8981 echo "configure:8982: checking for dlopen in -ldl" >&5
8982 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8984   echo $ac_n "(cached) $ac_c" 1>&6
8985 else
8986   ac_save_LIBS="$LIBS"
8987 LIBS="-ldl  $LIBS"
8988 cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991 /* Override any gcc2 internal prototype to avoid an error.  */
8992 /* We use char because int might match the return type of a gcc2
8993     builtin and then its argument prototype would still apply.  */
8994 char dlopen();
8995
8996 int main() {
8997 dlopen()
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9001   rm -rf conftest*
9002   eval "ac_cv_lib_$ac_lib_var=yes"
9003 else
9004   echo "configure: failed program was:" >&5
9005   cat conftest.$ac_ext >&5
9006   rm -rf conftest*
9007   eval "ac_cv_lib_$ac_lib_var=no"
9008 fi
9009 rm -f conftest*
9010 LIBS="$ac_save_LIBS"
9011
9012 fi
9013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9014   echo "$ac_t""yes" 1>&6
9015     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9016     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9017   cat >> confdefs.h <<EOF
9018 #define $ac_tr_lib 1
9019 EOF
9020
9021   LIBS="-ldl $LIBS"
9022
9023 else
9024   echo "$ac_t""no" 1>&6
9025 fi
9026
9027 fi
9028
9029
9030 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9031 echo "configure:9032: checking for sigset in -lV3" >&5
9032 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   ac_save_LIBS="$LIBS"
9037 LIBS="-lV3  $LIBS"
9038 cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041 /* Override any gcc2 internal prototype to avoid an error.  */
9042 /* We use char because int might match the return type of a gcc2
9043     builtin and then its argument prototype would still apply.  */
9044 char sigset();
9045
9046 int main() {
9047 sigset()
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9051   rm -rf conftest*
9052   eval "ac_cv_lib_$ac_lib_var=yes"
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   eval "ac_cv_lib_$ac_lib_var=no"
9058 fi
9059 rm -f conftest*
9060 LIBS="$ac_save_LIBS"
9061
9062 fi
9063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9064   echo "$ac_t""yes" 1>&6
9065     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9066     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9067   cat >> confdefs.h <<EOF
9068 #define $ac_tr_lib 1
9069 EOF
9070
9071   LIBS="-lV3 $LIBS"
9072
9073 else
9074   echo "$ac_t""no" 1>&6
9075 fi
9076
9077
9078 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9079 echo "configure:9080: checking for winsock" >&5
9080 save_LIBS="$LIBS"
9081 for curlib in ws2_32 wsock32; do
9082         LIBS="$LIBS -l$curlib"
9083         cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086
9087                         char socket@12();
9088                         char select@20();
9089                         char closesocket@4();
9090                         char gethostname@8();
9091                         
9092 int main() {
9093
9094                         socket@12();
9095                         select@20();
9096                         closesocket@4();
9097                         gethostname@8();
9098                         
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9102   rm -rf conftest*
9103   have_winsock=yes
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   have_winsock=no
9109 fi
9110 rm -f conftest*
9111
9112         if test $have_winsock = yes; then
9113                 cat >> confdefs.h <<\EOF
9114 #define HAVE_WINSOCK 1
9115 EOF
9116
9117                 ac_cv_func_socket=yes
9118                 ac_cv_func_select=yes
9119                 ac_cv_func_closesocket=yes
9120                 ac_cv_func_gethostname=yes
9121                 if test $curlib = ws2_32; then
9122                         have_winsock=winsock2
9123                         cat >> confdefs.h <<\EOF
9124 #define HAVE_WINSOCK2 1
9125 EOF
9126
9127                 fi
9128                 break
9129         fi
9130         LIBS="$save_LIBS"
9131 done
9132 echo "$ac_t""$have_winsock" 1>&6
9133
9134
9135 echo $ac_n "checking for socket""... $ac_c" 1>&6
9136 echo "configure:9137: checking for socket" >&5
9137 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9138   echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140   cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143 /* System header to define __stub macros and hopefully few prototypes,
9144     which can conflict with char socket(); below.  */
9145 #include <assert.h>
9146 /* Override any gcc2 internal prototype to avoid an error.  */
9147 /* We use char because int might match the return type of a gcc2
9148     builtin and then its argument prototype would still apply.  */
9149 char socket();
9150 char (*f)();
9151
9152 int main() {
9153
9154 /* The GNU C library defines this for functions which it implements
9155     to always fail with ENOSYS.  Some functions are actually named
9156     something starting with __ and the normal name is an alias.  */
9157 #if defined (__stub_socket) || defined (__stub___socket)
9158 choke me
9159 #else
9160 f = socket;
9161 #endif
9162
9163 ; return 0; }
9164 EOF
9165 if { (eval echo configure:9166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9166   rm -rf conftest*
9167   eval "ac_cv_func_socket=yes"
9168 else
9169   echo "configure: failed program was:" >&5
9170   cat conftest.$ac_ext >&5
9171   rm -rf conftest*
9172   eval "ac_cv_func_socket=no"
9173 fi
9174 rm -f conftest*
9175 fi
9176
9177 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9178   echo "$ac_t""yes" 1>&6
9179   :
9180 else
9181   echo "$ac_t""no" 1>&6
9182         
9183         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9184 echo "configure:9185: checking for main in -lsocket" >&5
9185 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9187   echo $ac_n "(cached) $ac_c" 1>&6
9188 else
9189   ac_save_LIBS="$LIBS"
9190 LIBS="-lsocket  $LIBS"
9191 cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194
9195 int main() {
9196 main()
9197 ; return 0; }
9198 EOF
9199 if { (eval echo configure:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9200   rm -rf conftest*
9201   eval "ac_cv_lib_$ac_lib_var=yes"
9202 else
9203   echo "configure: failed program was:" >&5
9204   cat conftest.$ac_ext >&5
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=no"
9207 fi
9208 rm -f conftest*
9209 LIBS="$ac_save_LIBS"
9210
9211 fi
9212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9215     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9216   cat >> confdefs.h <<EOF
9217 #define $ac_tr_lib 1
9218 EOF
9219
9220   LIBS="-lsocket $LIBS"
9221
9222 else
9223   echo "$ac_t""no" 1>&6
9224 fi
9225
9226         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9227 echo "configure:9228: checking for main in -lnet" >&5
9228 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   ac_save_LIBS="$LIBS"
9233 LIBS="-lnet  $LIBS"
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9236 "configure"
9236 #include "confdefs.h"
9237
9238 int main() {
9239 main()
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=yes"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=no"
9250 fi
9251 rm -f conftest*
9252 LIBS="$ac_save_LIBS"
9253
9254 fi
9255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_lib 1
9261 EOF
9262
9263   LIBS="-lnet $LIBS"
9264
9265 else
9266   echo "$ac_t""no" 1>&6
9267 fi
9268
9269         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9270 echo "configure:9271: checking for main in -lnsl_s" >&5
9271 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   ac_save_LIBS="$LIBS"
9276 LIBS="-lnsl_s  $LIBS"
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280
9281 int main() {
9282 main()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 LIBS="$ac_save_LIBS"
9296
9297 fi
9298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_lib 1
9304 EOF
9305
9306   LIBS="-lnsl_s $LIBS"
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9313 echo "configure:9314: checking for main in -lnsl" >&5
9314 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   ac_save_LIBS="$LIBS"
9319 LIBS="-lnsl  $LIBS"
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323
9324 int main() {
9325 main()
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329   rm -rf conftest*
9330   eval "ac_cv_lib_$ac_lib_var=yes"
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=no"
9336 fi
9337 rm -f conftest*
9338 LIBS="$ac_save_LIBS"
9339
9340 fi
9341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9342   echo "$ac_t""yes" 1>&6
9343     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345   cat >> confdefs.h <<EOF
9346 #define $ac_tr_lib 1
9347 EOF
9348
9349   LIBS="-lnsl $LIBS"
9350
9351 else
9352   echo "$ac_t""no" 1>&6
9353 fi
9354
9355         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9356 echo "configure:9357: checking for socket in -linet" >&5
9357 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   ac_save_LIBS="$LIBS"
9362 LIBS="-linet  $LIBS"
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char socket();
9370
9371 int main() {
9372 socket()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 LIBS="$ac_save_LIBS"
9386
9387 fi
9388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9389   echo "$ac_t""yes" 1>&6
9390     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9392   cat >> confdefs.h <<EOF
9393 #define $ac_tr_lib 1
9394 EOF
9395
9396   LIBS="-linet $LIBS"
9397
9398 else
9399   echo "$ac_t""no" 1>&6
9400 fi
9401
9402         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9403 echo "configure:9404: checking for main in -lgen" >&5
9404 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   ac_save_LIBS="$LIBS"
9409 LIBS="-lgen  $LIBS"
9410 cat > conftest.$ac_ext <<EOF
9411 #line 9412 "configure"
9412 #include "confdefs.h"
9413
9414 int main() {
9415 main()
9416 ; return 0; }
9417 EOF
9418 if { (eval echo configure:9419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9419   rm -rf conftest*
9420   eval "ac_cv_lib_$ac_lib_var=yes"
9421 else
9422   echo "configure: failed program was:" >&5
9423   cat conftest.$ac_ext >&5
9424   rm -rf conftest*
9425   eval "ac_cv_lib_$ac_lib_var=no"
9426 fi
9427 rm -f conftest*
9428 LIBS="$ac_save_LIBS"
9429
9430 fi
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9432   echo "$ac_t""yes" 1>&6
9433     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9435   cat >> confdefs.h <<EOF
9436 #define $ac_tr_lib 1
9437 EOF
9438
9439   LIBS="-lgen $LIBS"
9440
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444
9445
9446 fi
9447
9448
9449 echo $ac_n "checking for select""... $ac_c" 1>&6
9450 echo "configure:9451: checking for select" >&5
9451 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457 /* System header to define __stub macros and hopefully few prototypes,
9458     which can conflict with char select(); below.  */
9459 #include <assert.h>
9460 /* Override any gcc2 internal prototype to avoid an error.  */
9461 /* We use char because int might match the return type of a gcc2
9462     builtin and then its argument prototype would still apply.  */
9463 char select();
9464 char (*f)();
9465
9466 int main() {
9467
9468 /* The GNU C library defines this for functions which it implements
9469     to always fail with ENOSYS.  Some functions are actually named
9470     something starting with __ and the normal name is an alias.  */
9471 #if defined (__stub_select) || defined (__stub___select)
9472 choke me
9473 #else
9474 f = select;
9475 #endif
9476
9477 ; return 0; }
9478 EOF
9479 if { (eval echo configure:9480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9480   rm -rf conftest*
9481   eval "ac_cv_func_select=yes"
9482 else
9483   echo "configure: failed program was:" >&5
9484   cat conftest.$ac_ext >&5
9485   rm -rf conftest*
9486   eval "ac_cv_func_select=no"
9487 fi
9488 rm -f conftest*
9489 fi
9490
9491 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9492   echo "$ac_t""yes" 1>&6
9493   :
9494 else
9495   echo "$ac_t""no" 1>&6
9496 { echo "configure: error: select() required." 1>&2; exit 1; }
9497 fi
9498
9499
9500 if test "${ac_cv_header_winsock_h}" != yes; then
9501                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9502 echo "configure:9503: checking types of arguments for select()" >&5
9503  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9504   echo $ac_n "(cached) $ac_c" 1>&6
9505 else
9506    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9507   echo $ac_n "(cached) $ac_c" 1>&6
9508 else
9509     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9513      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9514       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9515        cat > conftest.$ac_ext <<EOF
9516 #line 9517 "configure"
9517 #include "confdefs.h"
9518 #ifdef HAVE_SYS_TYPES_H
9519 #include <sys/types.h>
9520 #endif
9521 #ifdef HAVE_SYS_TIME_H
9522 #include <sys/time.h>
9523 #endif
9524 #ifdef HAVE_SYS_SELECT_H
9525 #include <sys/select.h>
9526 #endif
9527 #ifdef HAVE_SYS_SOCKET_H
9528 #include <sys/socket.h>
9529 #endif
9530 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);
9531 int main() {
9532
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9536   rm -rf conftest*
9537           ac_not_found=no ; break 3
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   ac_not_found=yes
9543 fi
9544 rm -f conftest*
9545       done
9546      done
9547     done
9548    
9549 fi
9550   
9551 fi
9552  
9553 fi
9554  if test "$ac_not_found" = yes; then
9555   ac_cv_func_select_arg1=int 
9556   ac_cv_func_select_arg234='int *' 
9557   ac_cv_func_select_arg5='struct timeval *'
9558  fi
9559  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9560  cat >> confdefs.h <<EOF
9561 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9562 EOF
9563
9564  cat >> confdefs.h <<EOF
9565 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9566 EOF
9567
9568  cat >> confdefs.h <<EOF
9569 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9570 EOF
9571
9572
9573 fi
9574
9575
9576 for ac_hdr in regex.h 
9577 do
9578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9580 echo "configure:9581: checking for $ac_hdr" >&5
9581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 #include <$ac_hdr>
9588 EOF
9589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9590 { (eval echo configure:9591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9592 if test -z "$ac_err"; then
9593   rm -rf conftest*
9594   eval "ac_cv_header_$ac_safe=yes"
9595 else
9596   echo "$ac_err" >&5
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   eval "ac_cv_header_$ac_safe=no"
9601 fi
9602 rm -f conftest*
9603 fi
9604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9607   cat >> confdefs.h <<EOF
9608 #define $ac_tr_hdr 1
9609 EOF
9610  
9611 else
9612   echo "$ac_t""no" 1>&6
9613 fi
9614 done
9615
9616 if test "$ac_cv_header_regex_h" != yes ; then
9617         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9618 fi
9619
9620 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9621 echo "configure:9622: checking for library containing regfree" >&5
9622 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9623   echo $ac_n "(cached) $ac_c" 1>&6
9624 else
9625   ac_func_search_save_LIBS="$LIBS"
9626 ac_cv_search_regfree="no"
9627 cat > conftest.$ac_ext <<EOF
9628 #line 9629 "configure"
9629 #include "confdefs.h"
9630 /* Override any gcc2 internal prototype to avoid an error.  */
9631 /* We use char because int might match the return type of a gcc2
9632     builtin and then its argument prototype would still apply.  */
9633 char regfree();
9634
9635 int main() {
9636 regfree()
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9640   rm -rf conftest*
9641   ac_cv_search_regfree="none required"
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645 fi
9646 rm -f conftest*
9647 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9648 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 /* Override any gcc2 internal prototype to avoid an error.  */
9653 /* We use char because int might match the return type of a gcc2
9654     builtin and then its argument prototype would still apply.  */
9655 char regfree();
9656
9657 int main() {
9658 regfree()
9659 ; return 0; }
9660 EOF
9661 if { (eval echo configure:9662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9662   rm -rf conftest*
9663   ac_cv_search_regfree="-l$ac_lib"
9664 break
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668 fi
9669 rm -f conftest*
9670 done
9671 LIBS="$ac_func_search_save_LIBS"
9672 fi
9673
9674 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9675 if test "$ac_cv_search_regfree" != "no"; then
9676   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9677   :
9678 else :
9679   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9680 fi
9681
9682
9683 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9684 echo "configure:9685: checking for compatible POSIX regex" >&5
9685 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9686   echo $ac_n "(cached) $ac_c" 1>&6
9687 else
9688   
9689         if test "$cross_compiling" = yes; then
9690   ol_cv_c_posix_regex=cross
9691 else
9692   cat > conftest.$ac_ext <<EOF
9693 #line 9694 "configure"
9694 #include "confdefs.h"
9695
9696 #include <sys/types.h>
9697 #include <regex.h>
9698 static char *pattern, *string;
9699 main()
9700 {
9701         int rc;
9702         regex_t re;
9703
9704         pattern = "^A";
9705
9706         if(regcomp(&re, pattern, 0)) {
9707                 return -1;
9708         }
9709         
9710         string = "ALL MATCH";
9711         
9712         rc = regexec(&re, string, 0, (void*)0, 0);
9713
9714         regfree(&re);
9715
9716         return rc;
9717 }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9720 then
9721   ol_cv_c_posix_regex=yes
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -fr conftest*
9726   ol_cv_c_posix_regex=no
9727 fi
9728 rm -fr conftest*
9729 fi
9730
9731 fi
9732
9733 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9734
9735 if test "$ol_cv_c_posix_regex" = no ; then
9736         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9737 fi
9738
9739
9740 have_uuid=no
9741 for ac_hdr in sys/uuid.h
9742 do
9743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9745 echo "configure:9746: checking for $ac_hdr" >&5
9746 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9747   echo $ac_n "(cached) $ac_c" 1>&6
9748 else
9749   cat > conftest.$ac_ext <<EOF
9750 #line 9751 "configure"
9751 #include "confdefs.h"
9752 #include <$ac_hdr>
9753 EOF
9754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9755 { (eval echo configure:9756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9757 if test -z "$ac_err"; then
9758   rm -rf conftest*
9759   eval "ac_cv_header_$ac_safe=yes"
9760 else
9761   echo "$ac_err" >&5
9762   echo "configure: failed program was:" >&5
9763   cat conftest.$ac_ext >&5
9764   rm -rf conftest*
9765   eval "ac_cv_header_$ac_safe=no"
9766 fi
9767 rm -f conftest*
9768 fi
9769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9770   echo "$ac_t""yes" 1>&6
9771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9772   cat >> confdefs.h <<EOF
9773 #define $ac_tr_hdr 1
9774 EOF
9775  
9776 else
9777   echo "$ac_t""no" 1>&6
9778 fi
9779 done
9780
9781 if test $ac_cv_header_sys_uuid_h = yes ; then
9782         save_LIBS="$LIBS"
9783         
9784 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9785 echo "configure:9786: checking for library containing uuid_to_str" >&5
9786 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9787   echo $ac_n "(cached) $ac_c" 1>&6
9788 else
9789   ac_func_search_save_LIBS="$LIBS"
9790 ac_cv_search_uuid_to_str="no"
9791 cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 /* Override any gcc2 internal prototype to avoid an error.  */
9795 /* We use char because int might match the return type of a gcc2
9796     builtin and then its argument prototype would still apply.  */
9797 char uuid_to_str();
9798
9799 int main() {
9800 uuid_to_str()
9801 ; return 0; }
9802 EOF
9803 if { (eval echo configure:9804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9804   rm -rf conftest*
9805   ac_cv_search_uuid_to_str="none required"
9806 else
9807   echo "configure: failed program was:" >&5
9808   cat conftest.$ac_ext >&5
9809 fi
9810 rm -f conftest*
9811 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9812 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9813 cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* Override any gcc2 internal prototype to avoid an error.  */
9817 /* We use char because int might match the return type of a gcc2
9818     builtin and then its argument prototype would still apply.  */
9819 char uuid_to_str();
9820
9821 int main() {
9822 uuid_to_str()
9823 ; return 0; }
9824 EOF
9825 if { (eval echo configure:9826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9826   rm -rf conftest*
9827   ac_cv_search_uuid_to_str="-l$ac_lib"
9828 break
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832 fi
9833 rm -f conftest*
9834 done
9835 LIBS="$ac_func_search_save_LIBS"
9836 fi
9837
9838 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9839 if test "$ac_cv_search_uuid_to_str" != "no"; then
9840   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9841   have_uuid=yes
9842 else :
9843   :
9844 fi
9845         LIBS="$save_LIBS"
9846
9847         if test have_uuid = yes ; then
9848                 cat >> confdefs.h <<\EOF
9849 #define HAVE_UUID_TO_STR 1
9850 EOF
9851
9852
9853                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9854                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9855         fi
9856 fi
9857
9858 if test $have_uuid = no ; then
9859         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9860 echo "configure:9861: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9861         save_LIBS="$LIBS"
9862         LIBS="$LIBS -lrpcrt4"
9863         cat > conftest.$ac_ext <<EOF
9864 #line 9865 "configure"
9865 #include "confdefs.h"
9866
9867                 char UuidCreate@4();
9868                 char UuidToStringA@8();
9869                 
9870 int main() {
9871
9872                 UuidCreate@4();
9873                 UuidToStringA@8();
9874                 
9875 ; return 0; }
9876 EOF
9877 if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9878   rm -rf conftest*
9879   need_rpcrt=yes
9880 else
9881   echo "configure: failed program was:" >&5
9882   cat conftest.$ac_ext >&5
9883   rm -rf conftest*
9884   need_rpcrt=no
9885 fi
9886 rm -f conftest*
9887         if test $need_rpcrt = yes; then
9888                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9889         fi
9890         LIBS="$save_LIBS"
9891         echo "$ac_t""$need_rpcrt" 1>&6
9892 fi
9893
9894 ol_link_dnssrv=no
9895 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9896 echo "configure:9897: checking for res_query" >&5
9897 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9898   echo $ac_n "(cached) $ac_c" 1>&6
9899 else
9900   cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 /* System header to define __stub macros and hopefully few prototypes,
9904     which can conflict with char res_query(); below.  */
9905 #include <assert.h>
9906 /* Override any gcc2 internal prototype to avoid an error.  */
9907 /* We use char because int might match the return type of a gcc2
9908     builtin and then its argument prototype would still apply.  */
9909 char res_query();
9910 char (*f)();
9911
9912 int main() {
9913
9914 /* The GNU C library defines this for functions which it implements
9915     to always fail with ENOSYS.  Some functions are actually named
9916     something starting with __ and the normal name is an alias.  */
9917 #if defined (__stub_res_query) || defined (__stub___res_query)
9918 choke me
9919 #else
9920 f = res_query;
9921 #endif
9922
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9926   rm -rf conftest*
9927   eval "ac_cv_func_res_query=yes"
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   eval "ac_cv_func_res_query=no"
9933 fi
9934 rm -f conftest*
9935 fi
9936
9937 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9938   echo "$ac_t""yes" 1>&6
9939   :
9940 else
9941   echo "$ac_t""no" 1>&6
9942 fi
9943
9944 if test $ac_cv_func_res_query = no ; then 
9945         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9946 echo "configure:9947: checking for __res_query" >&5
9947 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9948   echo $ac_n "(cached) $ac_c" 1>&6
9949 else
9950   cat > conftest.$ac_ext <<EOF
9951 #line 9952 "configure"
9952 #include "confdefs.h"
9953 /* System header to define __stub macros and hopefully few prototypes,
9954     which can conflict with char __res_query(); below.  */
9955 #include <assert.h>
9956 /* Override any gcc2 internal prototype to avoid an error.  */
9957 /* We use char because int might match the return type of a gcc2
9958     builtin and then its argument prototype would still apply.  */
9959 char __res_query();
9960 char (*f)();
9961
9962 int main() {
9963
9964 /* The GNU C library defines this for functions which it implements
9965     to always fail with ENOSYS.  Some functions are actually named
9966     something starting with __ and the normal name is an alias.  */
9967 #if defined (__stub___res_query) || defined (__stub_____res_query)
9968 choke me
9969 #else
9970 f = __res_query;
9971 #endif
9972
9973 ; return 0; }
9974 EOF
9975 if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9976   rm -rf conftest*
9977   eval "ac_cv_func___res_query=yes"
9978 else
9979   echo "configure: failed program was:" >&5
9980   cat conftest.$ac_ext >&5
9981   rm -rf conftest*
9982   eval "ac_cv_func___res_query=no"
9983 fi
9984 rm -f conftest*
9985 fi
9986
9987 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9988   echo "$ac_t""yes" 1>&6
9989   :
9990 else
9991   echo "$ac_t""no" 1>&6
9992 fi
9993
9994         ac_cv_func_res_query=$ac_cv_func___res_query
9995 fi
9996
9997 if test $ac_cv_func_res_query = no ; then 
9998         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9999 echo "configure:10000: checking for res_query in -lbind" >&5
10000 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10002   echo $ac_n "(cached) $ac_c" 1>&6
10003 else
10004   ac_save_LIBS="$LIBS"
10005 LIBS="-lbind  $LIBS"
10006 cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009 /* Override any gcc2 internal prototype to avoid an error.  */
10010 /* We use char because int might match the return type of a gcc2
10011     builtin and then its argument prototype would still apply.  */
10012 char res_query();
10013
10014 int main() {
10015 res_query()
10016 ; return 0; }
10017 EOF
10018 if { (eval echo configure:10019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10019   rm -rf conftest*
10020   eval "ac_cv_lib_$ac_lib_var=yes"
10021 else
10022   echo "configure: failed program was:" >&5
10023   cat conftest.$ac_ext >&5
10024   rm -rf conftest*
10025   eval "ac_cv_lib_$ac_lib_var=no"
10026 fi
10027 rm -f conftest*
10028 LIBS="$ac_save_LIBS"
10029
10030 fi
10031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10032   echo "$ac_t""yes" 1>&6
10033     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10035   cat >> confdefs.h <<EOF
10036 #define $ac_tr_lib 1
10037 EOF
10038
10039   LIBS="-lbind $LIBS"
10040
10041 else
10042   echo "$ac_t""no" 1>&6
10043 fi
10044
10045         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10046 fi
10047
10048 if test $ac_cv_func_res_query = no ; then 
10049         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10050 echo "configure:10051: checking for __res_query in -lbind" >&5
10051 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   ac_save_LIBS="$LIBS"
10056 LIBS="-lbind  $LIBS"
10057 cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* Override any gcc2 internal prototype to avoid an error.  */
10061 /* We use char because int might match the return type of a gcc2
10062     builtin and then its argument prototype would still apply.  */
10063 char __res_query();
10064
10065 int main() {
10066 __res_query()
10067 ; return 0; }
10068 EOF
10069 if { (eval echo configure:10070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10070   rm -rf conftest*
10071   eval "ac_cv_lib_$ac_lib_var=yes"
10072 else
10073   echo "configure: failed program was:" >&5
10074   cat conftest.$ac_ext >&5
10075   rm -rf conftest*
10076   eval "ac_cv_lib_$ac_lib_var=no"
10077 fi
10078 rm -f conftest*
10079 LIBS="$ac_save_LIBS"
10080
10081 fi
10082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10083   echo "$ac_t""yes" 1>&6
10084     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10085     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10086   cat >> confdefs.h <<EOF
10087 #define $ac_tr_lib 1
10088 EOF
10089
10090   LIBS="-lbind $LIBS"
10091
10092 else
10093   echo "$ac_t""no" 1>&6
10094 fi
10095
10096         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10097 fi
10098
10099 if test $ac_cv_func_res_query = no ; then 
10100         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10101 echo "configure:10102: checking for res_query in -lresolv" >&5
10102 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10103 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   ac_save_LIBS="$LIBS"
10107 LIBS="-lresolv  $LIBS"
10108 cat > conftest.$ac_ext <<EOF
10109 #line 10110 "configure"
10110 #include "confdefs.h"
10111 /* Override any gcc2 internal prototype to avoid an error.  */
10112 /* We use char because int might match the return type of a gcc2
10113     builtin and then its argument prototype would still apply.  */
10114 char res_query();
10115
10116 int main() {
10117 res_query()
10118 ; return 0; }
10119 EOF
10120 if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10121   rm -rf conftest*
10122   eval "ac_cv_lib_$ac_lib_var=yes"
10123 else
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   eval "ac_cv_lib_$ac_lib_var=no"
10128 fi
10129 rm -f conftest*
10130 LIBS="$ac_save_LIBS"
10131
10132 fi
10133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10134   echo "$ac_t""yes" 1>&6
10135     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10137   cat >> confdefs.h <<EOF
10138 #define $ac_tr_lib 1
10139 EOF
10140
10141   LIBS="-lresolv $LIBS"
10142
10143 else
10144   echo "$ac_t""no" 1>&6
10145 fi
10146
10147         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10148 fi
10149
10150 if test $ac_cv_func_res_query = no ; then 
10151         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10152 echo "configure:10153: checking for __res_query in -lresolv" >&5
10153 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10155   echo $ac_n "(cached) $ac_c" 1>&6
10156 else
10157   ac_save_LIBS="$LIBS"
10158 LIBS="-lresolv  $LIBS"
10159 cat > conftest.$ac_ext <<EOF
10160 #line 10161 "configure"
10161 #include "confdefs.h"
10162 /* Override any gcc2 internal prototype to avoid an error.  */
10163 /* We use char because int might match the return type of a gcc2
10164     builtin and then its argument prototype would still apply.  */
10165 char __res_query();
10166
10167 int main() {
10168 __res_query()
10169 ; return 0; }
10170 EOF
10171 if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10172   rm -rf conftest*
10173   eval "ac_cv_lib_$ac_lib_var=yes"
10174 else
10175   echo "configure: failed program was:" >&5
10176   cat conftest.$ac_ext >&5
10177   rm -rf conftest*
10178   eval "ac_cv_lib_$ac_lib_var=no"
10179 fi
10180 rm -f conftest*
10181 LIBS="$ac_save_LIBS"
10182
10183 fi
10184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10185   echo "$ac_t""yes" 1>&6
10186     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10187     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10188   cat >> confdefs.h <<EOF
10189 #define $ac_tr_lib 1
10190 EOF
10191
10192   LIBS="-lresolv $LIBS"
10193
10194 else
10195   echo "$ac_t""no" 1>&6
10196 fi
10197
10198         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10199 fi
10200
10201 if test "$ac_cv_func_res_query" = yes ; then
10202         cat >> confdefs.h <<\EOF
10203 #define HAVE_RES_QUERY 1
10204 EOF
10205
10206
10207         if test $ol_enable_dnssrv != no ; then
10208                 ol_link_dnssrv=yes
10209         fi
10210 fi
10211
10212 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10213         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10214 fi
10215
10216 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10217 do
10218 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10219 echo "configure:10220: checking for $ac_func" >&5
10220 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10221   echo $ac_n "(cached) $ac_c" 1>&6
10222 else
10223   cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226 /* System header to define __stub macros and hopefully few prototypes,
10227     which can conflict with char $ac_func(); below.  */
10228 #include <assert.h>
10229 /* Override any gcc2 internal prototype to avoid an error.  */
10230 /* We use char because int might match the return type of a gcc2
10231     builtin and then its argument prototype would still apply.  */
10232 char $ac_func();
10233 char (*f)();
10234
10235 int main() {
10236
10237 /* The GNU C library defines this for functions which it implements
10238     to always fail with ENOSYS.  Some functions are actually named
10239     something starting with __ and the normal name is an alias.  */
10240 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10241 choke me
10242 #else
10243 f = $ac_func;
10244 #endif
10245
10246 ; return 0; }
10247 EOF
10248 if { (eval echo configure:10249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10249   rm -rf conftest*
10250   eval "ac_cv_func_$ac_func=yes"
10251 else
10252   echo "configure: failed program was:" >&5
10253   cat conftest.$ac_ext >&5
10254   rm -rf conftest*
10255   eval "ac_cv_func_$ac_func=no"
10256 fi
10257 rm -f conftest*
10258 fi
10259
10260 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10261   echo "$ac_t""yes" 1>&6
10262     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10263   cat >> confdefs.h <<EOF
10264 #define $ac_tr_func 1
10265 EOF
10266  
10267 else
10268   echo "$ac_t""no" 1>&6
10269 fi
10270 done
10271
10272
10273 ol_link_ipv6=no
10274 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10275         if test $ol_enable_ipv6 = yes ; then
10276                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10277         fi
10278 elif test $ol_enable_ipv6 != no ; then
10279         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10280 echo "configure:10281: checking INET6_ADDRSTRLEN" >&5
10281 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10282   echo $ac_n "(cached) $ac_c" 1>&6
10283 else
10284   
10285                 cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288
10289 #                       include <netinet/in.h>
10290 #                       ifdef INET6_ADDRSTRLEN
10291                                 __has_inet6_addrstrlen__;
10292 #                       endif
10293                 
10294 EOF
10295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10296   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10297   rm -rf conftest*
10298   ol_cv_inet6_addrstrlen=yes
10299 else
10300   rm -rf conftest*
10301   ol_cv_inet6_addrstrlen=no
10302 fi
10303 rm -f conftest*
10304
10305 fi
10306
10307 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10308
10309
10310         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10311 echo "configure:10312: checking struct sockaddr_storage" >&5
10312 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10313   echo $ac_n "(cached) $ac_c" 1>&6
10314 else
10315   
10316                 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319
10320 #include <sys/types.h>
10321 #include <sys/socket.h>
10322
10323 int main() {
10324
10325                         struct sockaddr_storage ss;
10326
10327 ; return 0; }
10328 EOF
10329 if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10330   rm -rf conftest*
10331   ol_cv_struct_sockaddr_storage=yes
10332 else
10333   echo "configure: failed program was:" >&5
10334   cat conftest.$ac_ext >&5
10335   rm -rf conftest*
10336   ol_cv_struct_sockaddr_storage=no
10337 fi
10338 rm -f conftest*
10339 fi
10340
10341 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10342
10343         if test $ol_cv_inet6_addrstrlen = yes \
10344                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10345                 ol_link_ipv6=yes
10346         elif test $ol_enable_ipv6 = yes \
10347                         -a $ol_cv_inet6_addrstrlen = no ; then
10348                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10349         elif test $ol_enable_ipv6 = yes \
10350                         -a $ol_cv_struct_sockaddr_storage = no ; then
10351                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10352         fi
10353 fi
10354
10355 if test $ol_enable_local != no ; then
10356         for ac_hdr in sys/un.h 
10357 do
10358 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10359 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10360 echo "configure:10361: checking for $ac_hdr" >&5
10361 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10362   echo $ac_n "(cached) $ac_c" 1>&6
10363 else
10364   cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 #include <$ac_hdr>
10368 EOF
10369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10370 { (eval echo configure:10371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10372 if test -z "$ac_err"; then
10373   rm -rf conftest*
10374   eval "ac_cv_header_$ac_safe=yes"
10375 else
10376   echo "$ac_err" >&5
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   eval "ac_cv_header_$ac_safe=no"
10381 fi
10382 rm -f conftest*
10383 fi
10384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10385   echo "$ac_t""yes" 1>&6
10386     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10387   cat >> confdefs.h <<EOF
10388 #define $ac_tr_hdr 1
10389 EOF
10390  
10391 else
10392   echo "$ac_t""no" 1>&6
10393 fi
10394 done
10395
10396
10397         if test $ol_enable_local = auto ; then
10398                 ol_enable_local=$ac_cv_header_sys_un_h
10399         elif test $ac_cv_header_sys_un_h = no ; then
10400                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10401         fi
10402 fi
10403
10404 ol_link_kbind=no
10405 ol_link_kpasswd=no
10406 ol_link_krb5=no
10407 ol_link_krb4=no
10408
10409 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10410         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10411         -o $ol_with_kerberos = k425 ; then
10412
10413         for ac_hdr in krb5.h
10414 do
10415 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10416 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10417 echo "configure:10418: checking for $ac_hdr" >&5
10418 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10419   echo $ac_n "(cached) $ac_c" 1>&6
10420 else
10421   cat > conftest.$ac_ext <<EOF
10422 #line 10423 "configure"
10423 #include "confdefs.h"
10424 #include <$ac_hdr>
10425 EOF
10426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10427 { (eval echo configure:10428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10429 if test -z "$ac_err"; then
10430   rm -rf conftest*
10431   eval "ac_cv_header_$ac_safe=yes"
10432 else
10433   echo "$ac_err" >&5
10434   echo "configure: failed program was:" >&5
10435   cat conftest.$ac_ext >&5
10436   rm -rf conftest*
10437   eval "ac_cv_header_$ac_safe=no"
10438 fi
10439 rm -f conftest*
10440 fi
10441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10444   cat >> confdefs.h <<EOF
10445 #define $ac_tr_hdr 1
10446 EOF
10447  
10448 else
10449   echo "$ac_t""no" 1>&6
10450 fi
10451 done
10452
10453
10454         if test $ac_cv_header_krb5_h = yes ; then
10455                                 for ac_hdr in heim_err.h
10456 do
10457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10459 echo "configure:10460: checking for $ac_hdr" >&5
10460 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10461   echo $ac_n "(cached) $ac_c" 1>&6
10462 else
10463   cat > conftest.$ac_ext <<EOF
10464 #line 10465 "configure"
10465 #include "confdefs.h"
10466 #include <$ac_hdr>
10467 EOF
10468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10469 { (eval echo configure:10470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10471 if test -z "$ac_err"; then
10472   rm -rf conftest*
10473   eval "ac_cv_header_$ac_safe=yes"
10474 else
10475   echo "$ac_err" >&5
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=no"
10480 fi
10481 rm -f conftest*
10482 fi
10483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10484   echo "$ac_t""yes" 1>&6
10485     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10486   cat >> confdefs.h <<EOF
10487 #define $ac_tr_hdr 1
10488 EOF
10489  
10490 else
10491   echo "$ac_t""no" 1>&6
10492 fi
10493 done
10494
10495                 if test $ac_cv_header_heim_err_h = yes ; then
10496                         krb5_impl=heimdal
10497                 else
10498                         krb5_impl=mit
10499                 fi
10500
10501                 if test $krb5_impl = mit; then
10502                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10503 echo "configure:10504: checking for main in -lk5crypto" >&5
10504 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10505 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   ac_save_LIBS="$LIBS"
10509 LIBS="-lk5crypto  $LIBS"
10510 cat > conftest.$ac_ext <<EOF
10511 #line 10512 "configure"
10512 #include "confdefs.h"
10513
10514 int main() {
10515 main()
10516 ; return 0; }
10517 EOF
10518 if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10519   rm -rf conftest*
10520   eval "ac_cv_lib_$ac_lib_var=yes"
10521 else
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=no"
10526 fi
10527 rm -f conftest*
10528 LIBS="$ac_save_LIBS"
10529
10530 fi
10531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533   krb5crypto=k5crypto
10534 else
10535   echo "$ac_t""no" 1>&6
10536 krb5crypto=crypto
10537 fi
10538
10539
10540                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10541 echo "configure:10542: checking for main in -lkrb5" >&5
10542 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   ac_save_LIBS="$LIBS"
10547 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551
10552 int main() {
10553 main()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 LIBS="$ac_save_LIBS"
10567
10568 fi
10569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571   have_krb5=yes
10572                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10573 else
10574   echo "$ac_t""no" 1>&6
10575 have_krb5=no
10576 fi
10577
10578
10579                 elif test $krb5_impl = heimdal; then
10580                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10581 echo "configure:10582: checking for main in -ldes" >&5
10582 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   ac_save_LIBS="$LIBS"
10587 LIBS="-ldes  $LIBS"
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 int main() {
10593 main()
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10597   rm -rf conftest*
10598   eval "ac_cv_lib_$ac_lib_var=yes"
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=no"
10604 fi
10605 rm -f conftest*
10606 LIBS="$ac_save_LIBS"
10607
10608 fi
10609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10610   echo "$ac_t""yes" 1>&6
10611   krb5crypto=des
10612 else
10613   echo "$ac_t""no" 1>&6
10614 krb5crypto=crypto
10615 fi
10616
10617
10618                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10619 echo "configure:10620: checking for main in -lkrb5" >&5
10620 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10622   echo $ac_n "(cached) $ac_c" 1>&6
10623 else
10624   ac_save_LIBS="$LIBS"
10625 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10626 cat > conftest.$ac_ext <<EOF
10627 #line 10628 "configure"
10628 #include "confdefs.h"
10629
10630 int main() {
10631 main()
10632 ; return 0; }
10633 EOF
10634 if { (eval echo configure:10635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10635   rm -rf conftest*
10636   eval "ac_cv_lib_$ac_lib_var=yes"
10637 else
10638   echo "configure: failed program was:" >&5
10639   cat conftest.$ac_ext >&5
10640   rm -rf conftest*
10641   eval "ac_cv_lib_$ac_lib_var=no"
10642 fi
10643 rm -f conftest*
10644 LIBS="$ac_save_LIBS"
10645
10646 fi
10647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10648   echo "$ac_t""yes" 1>&6
10649   have_krb5=yes
10650                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10651 else
10652   echo "$ac_t""no" 1>&6
10653 have_krb5=no
10654 fi
10655
10656
10657                         cat >> confdefs.h <<\EOF
10658 #define HAVE_HEIMDAL_KERBEROS 1
10659 EOF
10660
10661
10662                 else
10663                         have_krb5=no
10664                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10665                 fi
10666
10667                 if test $have_krb5 = yes ; then
10668                         ol_link_krb5=yes
10669
10670                         cat >> confdefs.h <<\EOF
10671 #define HAVE_KRB5 1
10672 EOF
10673
10674
10675                         if test $ol_enable_kpasswd != no ; then
10676                                 ol_link_kpasswd=yes;
10677                         fi
10678
10679                         if test $ol_with_kerberos = k5only ; then
10680                                 ol_with_kerberos=found
10681                         fi
10682
10683                 elif test $ol_with_kerberos != auto ; then
10684                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10685                 fi
10686
10687         fi
10688 fi
10689
10690 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10691         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10692
10693         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10694 do
10695 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10696 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10697 echo "configure:10698: checking for $ac_hdr" >&5
10698 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   cat > conftest.$ac_ext <<EOF
10702 #line 10703 "configure"
10703 #include "confdefs.h"
10704 #include <$ac_hdr>
10705 EOF
10706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10707 { (eval echo configure:10708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10709 if test -z "$ac_err"; then
10710   rm -rf conftest*
10711   eval "ac_cv_header_$ac_safe=yes"
10712 else
10713   echo "$ac_err" >&5
10714   echo "configure: failed program was:" >&5
10715   cat conftest.$ac_ext >&5
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=no"
10718 fi
10719 rm -f conftest*
10720 fi
10721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10722   echo "$ac_t""yes" 1>&6
10723     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10724   cat >> confdefs.h <<EOF
10725 #define $ac_tr_hdr 1
10726 EOF
10727  
10728 else
10729   echo "$ac_t""no" 1>&6
10730 fi
10731 done
10732
10733
10734         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10735                 if test $krb5_impl = mit; then
10736                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -lkrb4" >&5
10738 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   have_k425=yes
10768                                 KRB4_LIBS="-lkrb4 -ldes425"
10769 else
10770   echo "$ac_t""no" 1>&6
10771 have_k425=no
10772 fi
10773
10774
10775                 elif test $krb5_impl = heimdal; then
10776                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10777 echo "configure:10778: checking for main in -lkrb4" >&5
10778 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10779 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10780   echo $ac_n "(cached) $ac_c" 1>&6
10781 else
10782   ac_save_LIBS="$LIBS"
10783 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10784 cat > conftest.$ac_ext <<EOF
10785 #line 10786 "configure"
10786 #include "confdefs.h"
10787
10788 int main() {
10789 main()
10790 ; return 0; }
10791 EOF
10792 if { (eval echo configure:10793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10793   rm -rf conftest*
10794   eval "ac_cv_lib_$ac_lib_var=yes"
10795 else
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   eval "ac_cv_lib_$ac_lib_var=no"
10800 fi
10801 rm -f conftest*
10802 LIBS="$ac_save_LIBS"
10803
10804 fi
10805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10806   echo "$ac_t""yes" 1>&6
10807   have_k425=yes
10808                                 KRB4_LIBS="-lkrb4"
10809 else
10810   echo "$ac_t""no" 1>&6
10811 have_k425=no
10812 fi
10813
10814
10815                 else
10816                         have_425=no
10817                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10818                 fi
10819
10820                 if test $have_k425 = yes ; then
10821                         ol_with_kerberos=found
10822                         ol_link_krb4=yes
10823
10824                         cat >> confdefs.h <<\EOF
10825 #define HAVE_KRB425 1
10826 EOF
10827
10828                         cat >> confdefs.h <<\EOF
10829 #define HAVE_KRB4 1
10830 EOF
10831
10832
10833                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10834 echo "configure:10835: checking for des_debug in Kerberos libraries" >&5
10835 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10836   echo $ac_n "(cached) $ac_c" 1>&6
10837 else
10838   
10839                                                                 save_LIBS="$LIBS"
10840                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10841                                 cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844
10845 #include <kerberosIV/krb.h>
10846 #include <kerberosIV/des.h>
10847 extern int des_debug;
10848
10849 int main() {
10850
10851 des_debug = 1;
10852
10853 ; return 0; }
10854 EOF
10855 if { (eval echo configure:10856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10856   rm -rf conftest*
10857   ol_cv_var_des_debug=yes
10858 else
10859   echo "configure: failed program was:" >&5
10860   cat conftest.$ac_ext >&5
10861   rm -rf conftest*
10862   ol_cv_var_des_debug=no
10863 fi
10864 rm -f conftest*
10865                                                                 LIBS="$save_LIBS"
10866                         
10867 fi
10868
10869 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10870
10871                         if test $ol_cv_var_des_debug = yes ; then
10872                                 cat >> confdefs.h <<\EOF
10873 #define HAVE_DES_DEBUG 1
10874 EOF
10875
10876                         fi
10877
10878                         LIBS="$save_LIBS"
10879                 fi
10880         fi
10881 fi
10882
10883 if test $ol_link_krb5 = yes ; then
10884         ol_with_kerberos=found
10885 fi
10886
10887 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10888         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10889
10890         for ac_hdr in krb.h des.h krb-archaeology.h 
10891 do
10892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10894 echo "configure:10895: checking for $ac_hdr" >&5
10895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10896   echo $ac_n "(cached) $ac_c" 1>&6
10897 else
10898   cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 #include <$ac_hdr>
10902 EOF
10903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10904 { (eval echo configure:10905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10906 if test -z "$ac_err"; then
10907   rm -rf conftest*
10908   eval "ac_cv_header_$ac_safe=yes"
10909 else
10910   echo "$ac_err" >&5
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   eval "ac_cv_header_$ac_safe=no"
10915 fi
10916 rm -f conftest*
10917 fi
10918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10919   echo "$ac_t""yes" 1>&6
10920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10921   cat >> confdefs.h <<EOF
10922 #define $ac_tr_hdr 1
10923 EOF
10924  
10925 else
10926   echo "$ac_t""no" 1>&6
10927 fi
10928 done
10929
10930
10931         if test $ac_cv_header_krb_h = yes ; then
10932                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10933 echo "configure:10934: checking for main in -lkrb" >&5
10934 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10936   echo $ac_n "(cached) $ac_c" 1>&6
10937 else
10938   ac_save_LIBS="$LIBS"
10939 LIBS="-lkrb -ldes $LIBS"
10940 cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943
10944 int main() {
10945 main()
10946 ; return 0; }
10947 EOF
10948 if { (eval echo configure:10949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=yes"
10951 else
10952   echo "configure: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=no"
10956 fi
10957 rm -f conftest*
10958 LIBS="$ac_save_LIBS"
10959
10960 fi
10961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10962   echo "$ac_t""yes" 1>&6
10963   have_k4=yes
10964 else
10965   echo "$ac_t""no" 1>&6
10966 have_k4=no
10967 fi
10968
10969
10970                 if test $have_k4 = yes ; then
10971                         ol_with_kerberos=found
10972                         ol_link_krb4=yes
10973
10974                         cat >> confdefs.h <<\EOF
10975 #define HAVE_KRB4 1
10976 EOF
10977
10978
10979                         KRB4_LIBS="-lkrb -ldes"
10980
10981                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10982                                 cat >> confdefs.h <<\EOF
10983 #define HAVE_KTH_KERBEROS 1
10984 EOF
10985
10986                         fi
10987                 fi
10988         fi
10989 fi
10990
10991 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10992         ol_link_kpasswd=yes
10993 fi
10994
10995 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10996         ol_link_kbind=yes
10997
10998 elif test $ol_enable_kbind = yes ; then
10999         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11000 fi
11001
11002 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11003         cat >> confdefs.h <<\EOF
11004 #define HAVE_KERBEROS 1
11005 EOF
11006
11007
11008 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11009         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11010 fi
11011
11012 ol_link_tls=no
11013 if test $ol_with_tls != no ; then
11014         for ac_hdr in openssl/ssl.h ssl.h
11015 do
11016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11018 echo "configure:11019: checking for $ac_hdr" >&5
11019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11020   echo $ac_n "(cached) $ac_c" 1>&6
11021 else
11022   cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 #include <$ac_hdr>
11026 EOF
11027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11028 { (eval echo configure:11029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11030 if test -z "$ac_err"; then
11031   rm -rf conftest*
11032   eval "ac_cv_header_$ac_safe=yes"
11033 else
11034   echo "$ac_err" >&5
11035   echo "configure: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   rm -rf conftest*
11038   eval "ac_cv_header_$ac_safe=no"
11039 fi
11040 rm -f conftest*
11041 fi
11042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11043   echo "$ac_t""yes" 1>&6
11044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11045   cat >> confdefs.h <<EOF
11046 #define $ac_tr_hdr 1
11047 EOF
11048  
11049 else
11050   echo "$ac_t""no" 1>&6
11051 fi
11052 done
11053
11054         
11055         if test $ac_cv_header_openssl_ssl_h = yes \
11056                 -o $ac_cv_header_ssl_h = yes ; then
11057                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11058 echo "configure:11059: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11059 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11061   echo $ac_n "(cached) $ac_c" 1>&6
11062 else
11063   ac_save_LIBS="$LIBS"
11064 LIBS="-lssl -lcrypto $LIBS"
11065 cat > conftest.$ac_ext <<EOF
11066 #line 11067 "configure"
11067 #include "confdefs.h"
11068 /* Override any gcc2 internal prototype to avoid an error.  */
11069 /* We use char because int might match the return type of a gcc2
11070     builtin and then its argument prototype would still apply.  */
11071 char SSLeay_add_ssl_algorithms();
11072
11073 int main() {
11074 SSLeay_add_ssl_algorithms()
11075 ; return 0; }
11076 EOF
11077 if { (eval echo configure:11078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11078   rm -rf conftest*
11079   eval "ac_cv_lib_$ac_lib_var=yes"
11080 else
11081   echo "configure: failed program was:" >&5
11082   cat conftest.$ac_ext >&5
11083   rm -rf conftest*
11084   eval "ac_cv_lib_$ac_lib_var=no"
11085 fi
11086 rm -f conftest*
11087 LIBS="$ac_save_LIBS"
11088
11089 fi
11090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11091   echo "$ac_t""yes" 1>&6
11092   have_ssleay=yes
11093                         need_rsaref=no
11094 else
11095   echo "$ac_t""no" 1>&6
11096 have_ssleay=no
11097 fi
11098
11099                         
11100                 if test $have_ssleay = no ; then
11101                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11102 echo "configure:11103: checking for SSL_library_init in -lssl" >&5
11103 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11105   echo $ac_n "(cached) $ac_c" 1>&6
11106 else
11107   ac_save_LIBS="$LIBS"
11108 LIBS="-lssl -lcrypto $LIBS"
11109 cat > conftest.$ac_ext <<EOF
11110 #line 11111 "configure"
11111 #include "confdefs.h"
11112 /* Override any gcc2 internal prototype to avoid an error.  */
11113 /* We use char because int might match the return type of a gcc2
11114     builtin and then its argument prototype would still apply.  */
11115 char SSL_library_init();
11116
11117 int main() {
11118 SSL_library_init()
11119 ; return 0; }
11120 EOF
11121 if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11122   rm -rf conftest*
11123   eval "ac_cv_lib_$ac_lib_var=yes"
11124 else
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   eval "ac_cv_lib_$ac_lib_var=no"
11129 fi
11130 rm -f conftest*
11131 LIBS="$ac_save_LIBS"
11132
11133 fi
11134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11135   echo "$ac_t""yes" 1>&6
11136   have_ssleay=yes
11137                                 need_rsaref=no
11138 else
11139   echo "$ac_t""no" 1>&6
11140 have_ssleay=no
11141 fi
11142
11143                 fi
11144
11145                 if test $have_ssleay = no ; then
11146                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11147 echo "configure:11148: checking for ssl3_accept in -lssl" >&5
11148 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   ac_save_LIBS="$LIBS"
11153 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11154 cat > conftest.$ac_ext <<EOF
11155 #line 11156 "configure"
11156 #include "confdefs.h"
11157 /* Override any gcc2 internal prototype to avoid an error.  */
11158 /* We use char because int might match the return type of a gcc2
11159     builtin and then its argument prototype would still apply.  */
11160 char ssl3_accept();
11161
11162 int main() {
11163 ssl3_accept()
11164 ; return 0; }
11165 EOF
11166 if { (eval echo configure:11167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11167   rm -rf conftest*
11168   eval "ac_cv_lib_$ac_lib_var=yes"
11169 else
11170   echo "configure: failed program was:" >&5
11171   cat conftest.$ac_ext >&5
11172   rm -rf conftest*
11173   eval "ac_cv_lib_$ac_lib_var=no"
11174 fi
11175 rm -f conftest*
11176 LIBS="$ac_save_LIBS"
11177
11178 fi
11179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11180   echo "$ac_t""yes" 1>&6
11181   have_ssleay=yes
11182                                 need_rsaref=yes
11183 else
11184   echo "$ac_t""no" 1>&6
11185 have_ssleay=no
11186 fi
11187
11188                 fi
11189
11190                 if test $have_ssleay = yes ; then
11191                         ol_with_tls=found
11192                         ol_link_tls=yes
11193
11194                         cat >> confdefs.h <<\EOF
11195 #define HAVE_SSLEAY 1
11196 EOF
11197
11198
11199                         if test $need_rsaref = yes; then
11200                                 cat >> confdefs.h <<\EOF
11201 #define HAVE_RSAREF 1
11202 EOF
11203
11204
11205                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11206                         else
11207                                 TLS_LIBS="-lssl -lcrypto"
11208                         fi
11209                 fi
11210         fi
11211
11212 else
11213         echo "configure: warning: TLS data protection not supported!" 1>&2
11214 fi
11215
11216 if test $ol_link_tls = yes ; then
11217         cat >> confdefs.h <<\EOF
11218 #define HAVE_TLS 1
11219 EOF
11220
11221
11222 elif test $ol_with_tls = auto ; then
11223         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11224         echo "configure: warning: TLS data protection not supported!" 1>&2
11225
11226 elif test $ol_with_tls != no ; then
11227         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11228 fi
11229
11230 if test $ol_enable_lmpasswd != no; then
11231         if test $ol_link_tls != yes ; then
11232                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11233         fi
11234
11235         cat >> confdefs.h <<\EOF
11236 #define SLAPD_LMHASH 1
11237 EOF
11238
11239 fi
11240
11241 ol_link_threads=no
11242
11243 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11244         -o $ol_with_threads = nt ; then
11245
11246         
11247         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11248 echo "configure:11249: checking for _beginthread" >&5
11249 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11250   echo $ac_n "(cached) $ac_c" 1>&6
11251 else
11252   cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 /* System header to define __stub macros and hopefully few prototypes,
11256     which can conflict with char _beginthread(); below.  */
11257 #include <assert.h>
11258 /* Override any gcc2 internal prototype to avoid an error.  */
11259 /* We use char because int might match the return type of a gcc2
11260     builtin and then its argument prototype would still apply.  */
11261 char _beginthread();
11262 char (*f)();
11263
11264 int main() {
11265
11266 /* The GNU C library defines this for functions which it implements
11267     to always fail with ENOSYS.  Some functions are actually named
11268     something starting with __ and the normal name is an alias.  */
11269 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11270 choke me
11271 #else
11272 f = _beginthread;
11273 #endif
11274
11275 ; return 0; }
11276 EOF
11277 if { (eval echo configure:11278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11278   rm -rf conftest*
11279   eval "ac_cv_func__beginthread=yes"
11280 else
11281   echo "configure: failed program was:" >&5
11282   cat conftest.$ac_ext >&5
11283   rm -rf conftest*
11284   eval "ac_cv_func__beginthread=no"
11285 fi
11286 rm -f conftest*
11287 fi
11288
11289 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11290   echo "$ac_t""yes" 1>&6
11291   :
11292 else
11293   echo "$ac_t""no" 1>&6
11294 fi
11295
11296
11297         if test $ac_cv_func__beginthread = yes ; then
11298                 cat >> confdefs.h <<\EOF
11299 #define HAVE_NT_THREADS 1
11300 EOF
11301
11302                 ol_cv_nt_threads=yes
11303         fi
11304
11305
11306         if test "$ol_cv_nt_threads" = yes ; then
11307                 ol_link_threads=nt
11308                 ol_with_threads=found
11309                 ol_with_yielding_select=yes
11310
11311                 cat >> confdefs.h <<\EOF
11312 #define HAVE_NT_SERVICE_MANAGER 1
11313 EOF
11314
11315                 cat >> confdefs.h <<\EOF
11316 #define HAVE_NT_EVENT_LOG 1
11317 EOF
11318
11319         fi
11320
11321         if test $ol_with_threads = nt ; then
11322                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11323         fi
11324 fi
11325
11326 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11327         -o $ol_with_threads = posix ; then
11328
11329         for ac_hdr in pthread.h
11330 do
11331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11333 echo "configure:11334: checking for $ac_hdr" >&5
11334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11335   echo $ac_n "(cached) $ac_c" 1>&6
11336 else
11337   cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340 #include <$ac_hdr>
11341 EOF
11342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11343 { (eval echo configure:11344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11345 if test -z "$ac_err"; then
11346   rm -rf conftest*
11347   eval "ac_cv_header_$ac_safe=yes"
11348 else
11349   echo "$ac_err" >&5
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -rf conftest*
11353   eval "ac_cv_header_$ac_safe=no"
11354 fi
11355 rm -f conftest*
11356 fi
11357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11358   echo "$ac_t""yes" 1>&6
11359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11360   cat >> confdefs.h <<EOF
11361 #define $ac_tr_hdr 1
11362 EOF
11363  
11364 else
11365   echo "$ac_t""no" 1>&6
11366 fi
11367 done
11368
11369
11370         if test $ac_cv_header_pthread_h = yes ; then
11371                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11372 echo "configure:11373: checking POSIX thread version" >&5
11373 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11374   echo $ac_n "(cached) $ac_c" 1>&6
11375 else
11376   
11377         cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380
11381 #               include <pthread.h>
11382         
11383 int main() {
11384
11385                 int i = PTHREAD_CREATE_JOINABLE;
11386         
11387 ; return 0; }
11388 EOF
11389 if { (eval echo configure:11390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11390   rm -rf conftest*
11391   
11392         cat > conftest.$ac_ext <<EOF
11393 #line 11394 "configure"
11394 #include "confdefs.h"
11395 #include <pthread.h>
11396 EOF
11397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11398   egrep "pthread_detach" >/dev/null 2>&1; then
11399   rm -rf conftest*
11400   ol_cv_pthread_version=10
11401 else
11402   rm -rf conftest*
11403   ol_cv_pthread_version=8
11404 fi
11405 rm -f conftest*
11406
11407 else
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   
11412         cat > conftest.$ac_ext <<EOF
11413 #line 11414 "configure"
11414 #include "confdefs.h"
11415
11416 #               include <pthread.h>
11417 #               ifdef PTHREAD_CREATE_UNDETACHED
11418                 draft7
11419 #               endif
11420         
11421 EOF
11422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11423   egrep "draft7" >/dev/null 2>&1; then
11424   rm -rf conftest*
11425   ol_cv_pthread_version=7
11426 else
11427   rm -rf conftest*
11428   
11429         cat > conftest.$ac_ext <<EOF
11430 #line 11431 "configure"
11431 #include "confdefs.h"
11432 #include <pthread.h>
11433 EOF
11434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11435   egrep "pthread_attr_init" >/dev/null 2>&1; then
11436   rm -rf conftest*
11437   ol_cv_pthread_version=6
11438 else
11439   rm -rf conftest*
11440   
11441         cat > conftest.$ac_ext <<EOF
11442 #line 11443 "configure"
11443 #include "confdefs.h"
11444
11445 #               include <pthread.h>
11446 #ifdef          PTHREAD_MUTEX_INITIALIZER
11447                 draft5
11448 #endif
11449         
11450 EOF
11451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11452   egrep "draft5" >/dev/null 2>&1; then
11453   rm -rf conftest*
11454   ol_cv_pthread_version=5
11455 else
11456   rm -rf conftest*
11457   ol_cv_pthread_version=4
11458 fi
11459 rm -f conftest*
11460  
11461 fi
11462 rm -f conftest*
11463  
11464 fi
11465 rm -f conftest*
11466  
11467 fi
11468 rm -f conftest*
11469
11470 fi
11471
11472 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11473
11474
11475                 if test $ol_cv_pthread_version != 0 ; then
11476                         cat >> confdefs.h <<EOF
11477 #define HAVE_PTHREADS $ol_cv_pthread_version
11478 EOF
11479
11480                 else
11481                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11482                 fi
11483
11484                 # consider threads found
11485                 ol_with_threads=found
11486
11487                 
11488         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11489 echo "configure:11490: checking for LinuxThreads pthread.h" >&5
11490 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11491   echo $ac_n "(cached) $ac_c" 1>&6
11492 else
11493   cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 #include <pthread.h>
11497 EOF
11498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11499   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11500   rm -rf conftest*
11501   ol_cv_header_linux_threads=yes
11502 else
11503   rm -rf conftest*
11504   ol_cv_header_linux_threads=no
11505 fi
11506 rm -f conftest*
11507
11508                 
11509 fi
11510
11511 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11512         if test $ol_cv_header_linux_threads = yes; then
11513                 cat >> confdefs.h <<\EOF
11514 #define HAVE_LINUX_THREADS 1
11515 EOF
11516
11517         fi
11518
11519                 
11520         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11521 echo "configure:11522: checking for GNU Pth pthread.h" >&5
11522 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 #include <pthread.h>
11529 #ifdef _POSIX_THREAD_IS_GNU_PTH
11530         __gnu_pth__;
11531 #endif
11532
11533 EOF
11534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11535   egrep "__gnu_pth__" >/dev/null 2>&1; then
11536   rm -rf conftest*
11537   ol_cv_header_gnu_pth_pthread_h=yes
11538 else
11539   rm -rf conftest*
11540   ol_cv_header_gnu_pth_pthread_h=no
11541 fi
11542 rm -f conftest*
11543
11544                 
11545 fi
11546
11547 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11548
11549
11550                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11551                         for ac_hdr in sched.h
11552 do
11553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11555 echo "configure:11556: checking for $ac_hdr" >&5
11556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11557   echo $ac_n "(cached) $ac_c" 1>&6
11558 else
11559   cat > conftest.$ac_ext <<EOF
11560 #line 11561 "configure"
11561 #include "confdefs.h"
11562 #include <$ac_hdr>
11563 EOF
11564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11565 { (eval echo configure:11566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11567 if test -z "$ac_err"; then
11568   rm -rf conftest*
11569   eval "ac_cv_header_$ac_safe=yes"
11570 else
11571   echo "$ac_err" >&5
11572   echo "configure: failed program was:" >&5
11573   cat conftest.$ac_ext >&5
11574   rm -rf conftest*
11575   eval "ac_cv_header_$ac_safe=no"
11576 fi
11577 rm -f conftest*
11578 fi
11579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11580   echo "$ac_t""yes" 1>&6
11581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11582   cat >> confdefs.h <<EOF
11583 #define $ac_tr_hdr 1
11584 EOF
11585  
11586 else
11587   echo "$ac_t""no" 1>&6
11588 fi
11589 done
11590
11591                 fi
11592
11593                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11594                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11595 echo "configure:11596: checking for pthread_create in default libraries" >&5
11596 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11597   echo $ac_n "(cached) $ac_c" 1>&6
11598 else
11599   
11600                 if test "$cross_compiling" = yes; then
11601   cat > conftest.$ac_ext <<EOF
11602 #line 11603 "configure"
11603 #include "confdefs.h"
11604 /* pthread test headers */
11605 #include <pthread.h>
11606 #if HAVE_PTHREADS < 7
11607 #include <errno.h>
11608 #endif
11609 #ifndef NULL
11610 #define NULL (void*)0
11611 #endif
11612
11613 static void *task(p)
11614         void *p;
11615 {
11616         return (void *) (p == NULL);
11617 }
11618
11619 int main() {
11620
11621         /* pthread test function */
11622 #ifndef PTHREAD_CREATE_DETACHED
11623 #define PTHREAD_CREATE_DETACHED 1
11624 #endif
11625         pthread_t t;
11626         int status;
11627         int detach = PTHREAD_CREATE_DETACHED;
11628
11629 #if HAVE_PTHREADS > 4
11630         /* Final pthreads */
11631         pthread_attr_t attr;
11632
11633         status = pthread_attr_init(&attr);
11634         if( status ) return status;
11635
11636 #if HAVE_PTHREADS < 7
11637         status = pthread_attr_setdetachstate(&attr, &detach);
11638         if( status < 0 ) status = errno;
11639 #else
11640         status = pthread_attr_setdetachstate(&attr, detach);
11641 #endif
11642         if( status ) return status;
11643         status = pthread_create( &t, &attr, task, NULL );
11644 #if HAVE_PTHREADS < 7
11645         if( status < 0 ) status = errno;
11646 #endif
11647         if( status ) return status;
11648 #else
11649         /* Draft 4 pthreads */
11650         status = pthread_create( &t, pthread_attr_default, task, NULL );
11651         if( status ) return errno;
11652
11653         /* give thread a chance to complete */
11654         /* it should remain joinable and hence detachable */
11655         sleep( 1 );
11656
11657         status = pthread_detach( &t );
11658         if( status ) return errno;
11659 #endif
11660
11661 #ifdef HAVE_LINUX_THREADS
11662         pthread_kill_other_threads_np();
11663 #endif
11664
11665         return 0;
11666
11667 ; return 0; }
11668 EOF
11669 if { (eval echo configure:11670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11670   rm -rf conftest*
11671   ol_cv_pthread_create=yes
11672 else
11673   echo "configure: failed program was:" >&5
11674   cat conftest.$ac_ext >&5
11675   rm -rf conftest*
11676   ol_cv_pthread_create=no
11677 fi
11678 rm -f conftest*
11679 else
11680   cat > conftest.$ac_ext <<EOF
11681 #line 11682 "configure"
11682 #include "confdefs.h"
11683 /* pthread test headers */
11684 #include <pthread.h>
11685 #if HAVE_PTHREADS < 7
11686 #include <errno.h>
11687 #endif
11688 #ifndef NULL
11689 #define NULL (void*)0
11690 #endif
11691
11692 static void *task(p)
11693         void *p;
11694 {
11695         return (void *) (p == NULL);
11696 }
11697
11698
11699 int main(argc, argv)
11700         int argc;
11701         char **argv;
11702 {
11703
11704         /* pthread test function */
11705 #ifndef PTHREAD_CREATE_DETACHED
11706 #define PTHREAD_CREATE_DETACHED 1
11707 #endif
11708         pthread_t t;
11709         int status;
11710         int detach = PTHREAD_CREATE_DETACHED;
11711
11712 #if HAVE_PTHREADS > 4
11713         /* Final pthreads */
11714         pthread_attr_t attr;
11715
11716         status = pthread_attr_init(&attr);
11717         if( status ) return status;
11718
11719 #if HAVE_PTHREADS < 7
11720         status = pthread_attr_setdetachstate(&attr, &detach);
11721         if( status < 0 ) status = errno;
11722 #else
11723         status = pthread_attr_setdetachstate(&attr, detach);
11724 #endif
11725         if( status ) return status;
11726         status = pthread_create( &t, &attr, task, NULL );
11727 #if HAVE_PTHREADS < 7
11728         if( status < 0 ) status = errno;
11729 #endif
11730         if( status ) return status;
11731 #else
11732         /* Draft 4 pthreads */
11733         status = pthread_create( &t, pthread_attr_default, task, NULL );
11734         if( status ) return errno;
11735
11736         /* give thread a chance to complete */
11737         /* it should remain joinable and hence detachable */
11738         sleep( 1 );
11739
11740         status = pthread_detach( &t );
11741         if( status ) return errno;
11742 #endif
11743
11744 #ifdef HAVE_LINUX_THREADS
11745         pthread_kill_other_threads_np();
11746 #endif
11747
11748         return 0;
11749
11750 }
11751
11752 EOF
11753 if { (eval echo configure:11754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11754 then
11755   ol_cv_pthread_create=yes
11756 else
11757   echo "configure: failed program was:" >&5
11758   cat conftest.$ac_ext >&5
11759   rm -fr conftest*
11760   ol_cv_pthread_create=no
11761 fi
11762 rm -fr conftest*
11763 fi
11764
11765 fi
11766
11767 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11768
11769                 if test $ol_cv_pthread_create != no ; then
11770                         ol_link_threads=posix
11771                         ol_link_pthreads=""
11772                 fi
11773                 
11774                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11775 if test "$ol_link_threads" = no ; then
11776         # try -kthread
11777         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11778 echo "configure:11779: checking for pthread link with -kthread" >&5
11779 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11780   echo $ac_n "(cached) $ac_c" 1>&6
11781 else
11782   
11783                 # save the flags
11784                 ol_LIBS="$LIBS"
11785                 LIBS="-kthread $LIBS"
11786
11787                 if test "$cross_compiling" = yes; then
11788   cat > conftest.$ac_ext <<EOF
11789 #line 11790 "configure"
11790 #include "confdefs.h"
11791 /* pthread test headers */
11792 #include <pthread.h>
11793 #if HAVE_PTHREADS < 7
11794 #include <errno.h>
11795 #endif
11796 #ifndef NULL
11797 #define NULL (void*)0
11798 #endif
11799
11800 static void *task(p)
11801         void *p;
11802 {
11803         return (void *) (p == NULL);
11804 }
11805
11806 int main() {
11807
11808         /* pthread test function */
11809 #ifndef PTHREAD_CREATE_DETACHED
11810 #define PTHREAD_CREATE_DETACHED 1
11811 #endif
11812         pthread_t t;
11813         int status;
11814         int detach = PTHREAD_CREATE_DETACHED;
11815
11816 #if HAVE_PTHREADS > 4
11817         /* Final pthreads */
11818         pthread_attr_t attr;
11819
11820         status = pthread_attr_init(&attr);
11821         if( status ) return status;
11822
11823 #if HAVE_PTHREADS < 7
11824         status = pthread_attr_setdetachstate(&attr, &detach);
11825         if( status < 0 ) status = errno;
11826 #else
11827         status = pthread_attr_setdetachstate(&attr, detach);
11828 #endif
11829         if( status ) return status;
11830         status = pthread_create( &t, &attr, task, NULL );
11831 #if HAVE_PTHREADS < 7
11832         if( status < 0 ) status = errno;
11833 #endif
11834         if( status ) return status;
11835 #else
11836         /* Draft 4 pthreads */
11837         status = pthread_create( &t, pthread_attr_default, task, NULL );
11838         if( status ) return errno;
11839
11840         /* give thread a chance to complete */
11841         /* it should remain joinable and hence detachable */
11842         sleep( 1 );
11843
11844         status = pthread_detach( &t );
11845         if( status ) return errno;
11846 #endif
11847
11848 #ifdef HAVE_LINUX_THREADS
11849         pthread_kill_other_threads_np();
11850 #endif
11851
11852         return 0;
11853
11854 ; return 0; }
11855 EOF
11856 if { (eval echo configure:11857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11857   rm -rf conftest*
11858   ol_cv_pthread_kthread=yes
11859 else
11860   echo "configure: failed program was:" >&5
11861   cat conftest.$ac_ext >&5
11862   rm -rf conftest*
11863   ol_cv_pthread_kthread=no
11864 fi
11865 rm -f conftest*
11866 else
11867   cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 /* pthread test headers */
11871 #include <pthread.h>
11872 #if HAVE_PTHREADS < 7
11873 #include <errno.h>
11874 #endif
11875 #ifndef NULL
11876 #define NULL (void*)0
11877 #endif
11878
11879 static void *task(p)
11880         void *p;
11881 {
11882         return (void *) (p == NULL);
11883 }
11884
11885
11886 int main(argc, argv)
11887         int argc;
11888         char **argv;
11889 {
11890
11891         /* pthread test function */
11892 #ifndef PTHREAD_CREATE_DETACHED
11893 #define PTHREAD_CREATE_DETACHED 1
11894 #endif
11895         pthread_t t;
11896         int status;
11897         int detach = PTHREAD_CREATE_DETACHED;
11898
11899 #if HAVE_PTHREADS > 4
11900         /* Final pthreads */
11901         pthread_attr_t attr;
11902
11903         status = pthread_attr_init(&attr);
11904         if( status ) return status;
11905
11906 #if HAVE_PTHREADS < 7
11907         status = pthread_attr_setdetachstate(&attr, &detach);
11908         if( status < 0 ) status = errno;
11909 #else
11910         status = pthread_attr_setdetachstate(&attr, detach);
11911 #endif
11912         if( status ) return status;
11913         status = pthread_create( &t, &attr, task, NULL );
11914 #if HAVE_PTHREADS < 7
11915         if( status < 0 ) status = errno;
11916 #endif
11917         if( status ) return status;
11918 #else
11919         /* Draft 4 pthreads */
11920         status = pthread_create( &t, pthread_attr_default, task, NULL );
11921         if( status ) return errno;
11922
11923         /* give thread a chance to complete */
11924         /* it should remain joinable and hence detachable */
11925         sleep( 1 );
11926
11927         status = pthread_detach( &t );
11928         if( status ) return errno;
11929 #endif
11930
11931 #ifdef HAVE_LINUX_THREADS
11932         pthread_kill_other_threads_np();
11933 #endif
11934
11935         return 0;
11936
11937 }
11938
11939 EOF
11940 if { (eval echo configure:11941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11941 then
11942   ol_cv_pthread_kthread=yes
11943 else
11944   echo "configure: failed program was:" >&5
11945   cat conftest.$ac_ext >&5
11946   rm -fr conftest*
11947   ol_cv_pthread_kthread=no
11948 fi
11949 rm -fr conftest*
11950 fi
11951
11952
11953                 # restore the LIBS
11954                 LIBS="$ol_LIBS"
11955         
11956 fi
11957
11958 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11959
11960         if test $ol_cv_pthread_kthread = yes ; then
11961                 ol_link_pthreads="-kthread"
11962                 ol_link_threads=posix
11963         fi
11964 fi
11965
11966                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11967 if test "$ol_link_threads" = no ; then
11968         # try -pthread
11969         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11970 echo "configure:11971: checking for pthread link with -pthread" >&5
11971 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11972   echo $ac_n "(cached) $ac_c" 1>&6
11973 else
11974   
11975                 # save the flags
11976                 ol_LIBS="$LIBS"
11977                 LIBS="-pthread $LIBS"
11978
11979                 if test "$cross_compiling" = yes; then
11980   cat > conftest.$ac_ext <<EOF
11981 #line 11982 "configure"
11982 #include "confdefs.h"
11983 /* pthread test headers */
11984 #include <pthread.h>
11985 #if HAVE_PTHREADS < 7
11986 #include <errno.h>
11987 #endif
11988 #ifndef NULL
11989 #define NULL (void*)0
11990 #endif
11991
11992 static void *task(p)
11993         void *p;
11994 {
11995         return (void *) (p == NULL);
11996 }
11997
11998 int main() {
11999
12000         /* pthread test function */
12001 #ifndef PTHREAD_CREATE_DETACHED
12002 #define PTHREAD_CREATE_DETACHED 1
12003 #endif
12004         pthread_t t;
12005         int status;
12006         int detach = PTHREAD_CREATE_DETACHED;
12007
12008 #if HAVE_PTHREADS > 4
12009         /* Final pthreads */
12010         pthread_attr_t attr;
12011
12012         status = pthread_attr_init(&attr);
12013         if( status ) return status;
12014
12015 #if HAVE_PTHREADS < 7
12016         status = pthread_attr_setdetachstate(&attr, &detach);
12017         if( status < 0 ) status = errno;
12018 #else
12019         status = pthread_attr_setdetachstate(&attr, detach);
12020 #endif
12021         if( status ) return status;
12022         status = pthread_create( &t, &attr, task, NULL );
12023 #if HAVE_PTHREADS < 7
12024         if( status < 0 ) status = errno;
12025 #endif
12026         if( status ) return status;
12027 #else
12028         /* Draft 4 pthreads */
12029         status = pthread_create( &t, pthread_attr_default, task, NULL );
12030         if( status ) return errno;
12031
12032         /* give thread a chance to complete */
12033         /* it should remain joinable and hence detachable */
12034         sleep( 1 );
12035
12036         status = pthread_detach( &t );
12037         if( status ) return errno;
12038 #endif
12039
12040 #ifdef HAVE_LINUX_THREADS
12041         pthread_kill_other_threads_np();
12042 #endif
12043
12044         return 0;
12045
12046 ; return 0; }
12047 EOF
12048 if { (eval echo configure:12049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12049   rm -rf conftest*
12050   ol_cv_pthread_pthread=yes
12051 else
12052   echo "configure: failed program was:" >&5
12053   cat conftest.$ac_ext >&5
12054   rm -rf conftest*
12055   ol_cv_pthread_pthread=no
12056 fi
12057 rm -f conftest*
12058 else
12059   cat > conftest.$ac_ext <<EOF
12060 #line 12061 "configure"
12061 #include "confdefs.h"
12062 /* pthread test headers */
12063 #include <pthread.h>
12064 #if HAVE_PTHREADS < 7
12065 #include <errno.h>
12066 #endif
12067 #ifndef NULL
12068 #define NULL (void*)0
12069 #endif
12070
12071 static void *task(p)
12072         void *p;
12073 {
12074         return (void *) (p == NULL);
12075 }
12076
12077
12078 int main(argc, argv)
12079         int argc;
12080         char **argv;
12081 {
12082
12083         /* pthread test function */
12084 #ifndef PTHREAD_CREATE_DETACHED
12085 #define PTHREAD_CREATE_DETACHED 1
12086 #endif
12087         pthread_t t;
12088         int status;
12089         int detach = PTHREAD_CREATE_DETACHED;
12090
12091 #if HAVE_PTHREADS > 4
12092         /* Final pthreads */
12093         pthread_attr_t attr;
12094
12095         status = pthread_attr_init(&attr);
12096         if( status ) return status;
12097
12098 #if HAVE_PTHREADS < 7
12099         status = pthread_attr_setdetachstate(&attr, &detach);
12100         if( status < 0 ) status = errno;
12101 #else
12102         status = pthread_attr_setdetachstate(&attr, detach);
12103 #endif
12104         if( status ) return status;
12105         status = pthread_create( &t, &attr, task, NULL );
12106 #if HAVE_PTHREADS < 7
12107         if( status < 0 ) status = errno;
12108 #endif
12109         if( status ) return status;
12110 #else
12111         /* Draft 4 pthreads */
12112         status = pthread_create( &t, pthread_attr_default, task, NULL );
12113         if( status ) return errno;
12114
12115         /* give thread a chance to complete */
12116         /* it should remain joinable and hence detachable */
12117         sleep( 1 );
12118
12119         status = pthread_detach( &t );
12120         if( status ) return errno;
12121 #endif
12122
12123 #ifdef HAVE_LINUX_THREADS
12124         pthread_kill_other_threads_np();
12125 #endif
12126
12127         return 0;
12128
12129 }
12130
12131 EOF
12132 if { (eval echo configure:12133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12133 then
12134   ol_cv_pthread_pthread=yes
12135 else
12136   echo "configure: failed program was:" >&5
12137   cat conftest.$ac_ext >&5
12138   rm -fr conftest*
12139   ol_cv_pthread_pthread=no
12140 fi
12141 rm -fr conftest*
12142 fi
12143
12144
12145                 # restore the LIBS
12146                 LIBS="$ol_LIBS"
12147         
12148 fi
12149
12150 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12151
12152         if test $ol_cv_pthread_pthread = yes ; then
12153                 ol_link_pthreads="-pthread"
12154                 ol_link_threads=posix
12155         fi
12156 fi
12157
12158                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12159 if test "$ol_link_threads" = no ; then
12160         # try -pthreads
12161         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12162 echo "configure:12163: checking for pthread link with -pthreads" >&5
12163 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12164   echo $ac_n "(cached) $ac_c" 1>&6
12165 else
12166   
12167                 # save the flags
12168                 ol_LIBS="$LIBS"
12169                 LIBS="-pthreads $LIBS"
12170
12171                 if test "$cross_compiling" = yes; then
12172   cat > conftest.$ac_ext <<EOF
12173 #line 12174 "configure"
12174 #include "confdefs.h"
12175 /* pthread test headers */
12176 #include <pthread.h>
12177 #if HAVE_PTHREADS < 7
12178 #include <errno.h>
12179 #endif
12180 #ifndef NULL
12181 #define NULL (void*)0
12182 #endif
12183
12184 static void *task(p)
12185         void *p;
12186 {
12187         return (void *) (p == NULL);
12188 }
12189
12190 int main() {
12191
12192         /* pthread test function */
12193 #ifndef PTHREAD_CREATE_DETACHED
12194 #define PTHREAD_CREATE_DETACHED 1
12195 #endif
12196         pthread_t t;
12197         int status;
12198         int detach = PTHREAD_CREATE_DETACHED;
12199
12200 #if HAVE_PTHREADS > 4
12201         /* Final pthreads */
12202         pthread_attr_t attr;
12203
12204         status = pthread_attr_init(&attr);
12205         if( status ) return status;
12206
12207 #if HAVE_PTHREADS < 7
12208         status = pthread_attr_setdetachstate(&attr, &detach);
12209         if( status < 0 ) status = errno;
12210 #else
12211         status = pthread_attr_setdetachstate(&attr, detach);
12212 #endif
12213         if( status ) return status;
12214         status = pthread_create( &t, &attr, task, NULL );
12215 #if HAVE_PTHREADS < 7
12216         if( status < 0 ) status = errno;
12217 #endif
12218         if( status ) return status;
12219 #else
12220         /* Draft 4 pthreads */
12221         status = pthread_create( &t, pthread_attr_default, task, NULL );
12222         if( status ) return errno;
12223
12224         /* give thread a chance to complete */
12225         /* it should remain joinable and hence detachable */
12226         sleep( 1 );
12227
12228         status = pthread_detach( &t );
12229         if( status ) return errno;
12230 #endif
12231
12232 #ifdef HAVE_LINUX_THREADS
12233         pthread_kill_other_threads_np();
12234 #endif
12235
12236         return 0;
12237
12238 ; return 0; }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12241   rm -rf conftest*
12242   ol_cv_pthread_pthreads=yes
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -rf conftest*
12247   ol_cv_pthread_pthreads=no
12248 fi
12249 rm -f conftest*
12250 else
12251   cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254 /* pthread test headers */
12255 #include <pthread.h>
12256 #if HAVE_PTHREADS < 7
12257 #include <errno.h>
12258 #endif
12259 #ifndef NULL
12260 #define NULL (void*)0
12261 #endif
12262
12263 static void *task(p)
12264         void *p;
12265 {
12266         return (void *) (p == NULL);
12267 }
12268
12269
12270 int main(argc, argv)
12271         int argc;
12272         char **argv;
12273 {
12274
12275         /* pthread test function */
12276 #ifndef PTHREAD_CREATE_DETACHED
12277 #define PTHREAD_CREATE_DETACHED 1
12278 #endif
12279         pthread_t t;
12280         int status;
12281         int detach = PTHREAD_CREATE_DETACHED;
12282
12283 #if HAVE_PTHREADS > 4
12284         /* Final pthreads */
12285         pthread_attr_t attr;
12286
12287         status = pthread_attr_init(&attr);
12288         if( status ) return status;
12289
12290 #if HAVE_PTHREADS < 7
12291         status = pthread_attr_setdetachstate(&attr, &detach);
12292         if( status < 0 ) status = errno;
12293 #else
12294         status = pthread_attr_setdetachstate(&attr, detach);
12295 #endif
12296         if( status ) return status;
12297         status = pthread_create( &t, &attr, task, NULL );
12298 #if HAVE_PTHREADS < 7
12299         if( status < 0 ) status = errno;
12300 #endif
12301         if( status ) return status;
12302 #else
12303         /* Draft 4 pthreads */
12304         status = pthread_create( &t, pthread_attr_default, task, NULL );
12305         if( status ) return errno;
12306
12307         /* give thread a chance to complete */
12308         /* it should remain joinable and hence detachable */
12309         sleep( 1 );
12310
12311         status = pthread_detach( &t );
12312         if( status ) return errno;
12313 #endif
12314
12315 #ifdef HAVE_LINUX_THREADS
12316         pthread_kill_other_threads_np();
12317 #endif
12318
12319         return 0;
12320
12321 }
12322
12323 EOF
12324 if { (eval echo configure:12325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12325 then
12326   ol_cv_pthread_pthreads=yes
12327 else
12328   echo "configure: failed program was:" >&5
12329   cat conftest.$ac_ext >&5
12330   rm -fr conftest*
12331   ol_cv_pthread_pthreads=no
12332 fi
12333 rm -fr conftest*
12334 fi
12335
12336
12337                 # restore the LIBS
12338                 LIBS="$ol_LIBS"
12339         
12340 fi
12341
12342 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12343
12344         if test $ol_cv_pthread_pthreads = yes ; then
12345                 ol_link_pthreads="-pthreads"
12346                 ol_link_threads=posix
12347         fi
12348 fi
12349
12350                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12351 if test "$ol_link_threads" = no ; then
12352         # try -mthreads
12353         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12354 echo "configure:12355: checking for pthread link with -mthreads" >&5
12355 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12356   echo $ac_n "(cached) $ac_c" 1>&6
12357 else
12358   
12359                 # save the flags
12360                 ol_LIBS="$LIBS"
12361                 LIBS="-mthreads $LIBS"
12362
12363                 if test "$cross_compiling" = yes; then
12364   cat > conftest.$ac_ext <<EOF
12365 #line 12366 "configure"
12366 #include "confdefs.h"
12367 /* pthread test headers */
12368 #include <pthread.h>
12369 #if HAVE_PTHREADS < 7
12370 #include <errno.h>
12371 #endif
12372 #ifndef NULL
12373 #define NULL (void*)0
12374 #endif
12375
12376 static void *task(p)
12377         void *p;
12378 {
12379         return (void *) (p == NULL);
12380 }
12381
12382 int main() {
12383
12384         /* pthread test function */
12385 #ifndef PTHREAD_CREATE_DETACHED
12386 #define PTHREAD_CREATE_DETACHED 1
12387 #endif
12388         pthread_t t;
12389         int status;
12390         int detach = PTHREAD_CREATE_DETACHED;
12391
12392 #if HAVE_PTHREADS > 4
12393         /* Final pthreads */
12394         pthread_attr_t attr;
12395
12396         status = pthread_attr_init(&attr);
12397         if( status ) return status;
12398
12399 #if HAVE_PTHREADS < 7
12400         status = pthread_attr_setdetachstate(&attr, &detach);
12401         if( status < 0 ) status = errno;
12402 #else
12403         status = pthread_attr_setdetachstate(&attr, detach);
12404 #endif
12405         if( status ) return status;
12406         status = pthread_create( &t, &attr, task, NULL );
12407 #if HAVE_PTHREADS < 7
12408         if( status < 0 ) status = errno;
12409 #endif
12410         if( status ) return status;
12411 #else
12412         /* Draft 4 pthreads */
12413         status = pthread_create( &t, pthread_attr_default, task, NULL );
12414         if( status ) return errno;
12415
12416         /* give thread a chance to complete */
12417         /* it should remain joinable and hence detachable */
12418         sleep( 1 );
12419
12420         status = pthread_detach( &t );
12421         if( status ) return errno;
12422 #endif
12423
12424 #ifdef HAVE_LINUX_THREADS
12425         pthread_kill_other_threads_np();
12426 #endif
12427
12428         return 0;
12429
12430 ; return 0; }
12431 EOF
12432 if { (eval echo configure:12433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12433   rm -rf conftest*
12434   ol_cv_pthread_mthreads=yes
12435 else
12436   echo "configure: failed program was:" >&5
12437   cat conftest.$ac_ext >&5
12438   rm -rf conftest*
12439   ol_cv_pthread_mthreads=no
12440 fi
12441 rm -f conftest*
12442 else
12443   cat > conftest.$ac_ext <<EOF
12444 #line 12445 "configure"
12445 #include "confdefs.h"
12446 /* pthread test headers */
12447 #include <pthread.h>
12448 #if HAVE_PTHREADS < 7
12449 #include <errno.h>
12450 #endif
12451 #ifndef NULL
12452 #define NULL (void*)0
12453 #endif
12454
12455 static void *task(p)
12456         void *p;
12457 {
12458         return (void *) (p == NULL);
12459 }
12460
12461
12462 int main(argc, argv)
12463         int argc;
12464         char **argv;
12465 {
12466
12467         /* pthread test function */
12468 #ifndef PTHREAD_CREATE_DETACHED
12469 #define PTHREAD_CREATE_DETACHED 1
12470 #endif
12471         pthread_t t;
12472         int status;
12473         int detach = PTHREAD_CREATE_DETACHED;
12474
12475 #if HAVE_PTHREADS > 4
12476         /* Final pthreads */
12477         pthread_attr_t attr;
12478
12479         status = pthread_attr_init(&attr);
12480         if( status ) return status;
12481
12482 #if HAVE_PTHREADS < 7
12483         status = pthread_attr_setdetachstate(&attr, &detach);
12484         if( status < 0 ) status = errno;
12485 #else
12486         status = pthread_attr_setdetachstate(&attr, detach);
12487 #endif
12488         if( status ) return status;
12489         status = pthread_create( &t, &attr, task, NULL );
12490 #if HAVE_PTHREADS < 7
12491         if( status < 0 ) status = errno;
12492 #endif
12493         if( status ) return status;
12494 #else
12495         /* Draft 4 pthreads */
12496         status = pthread_create( &t, pthread_attr_default, task, NULL );
12497         if( status ) return errno;
12498
12499         /* give thread a chance to complete */
12500         /* it should remain joinable and hence detachable */
12501         sleep( 1 );
12502
12503         status = pthread_detach( &t );
12504         if( status ) return errno;
12505 #endif
12506
12507 #ifdef HAVE_LINUX_THREADS
12508         pthread_kill_other_threads_np();
12509 #endif
12510
12511         return 0;
12512
12513 }
12514
12515 EOF
12516 if { (eval echo configure:12517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12517 then
12518   ol_cv_pthread_mthreads=yes
12519 else
12520   echo "configure: failed program was:" >&5
12521   cat conftest.$ac_ext >&5
12522   rm -fr conftest*
12523   ol_cv_pthread_mthreads=no
12524 fi
12525 rm -fr conftest*
12526 fi
12527
12528
12529                 # restore the LIBS
12530                 LIBS="$ol_LIBS"
12531         
12532 fi
12533
12534 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12535
12536         if test $ol_cv_pthread_mthreads = yes ; then
12537                 ol_link_pthreads="-mthreads"
12538                 ol_link_threads=posix
12539         fi
12540 fi
12541
12542                 # Pthread try link: -thread (ol_cv_pthread_thread)
12543 if test "$ol_link_threads" = no ; then
12544         # try -thread
12545         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12546 echo "configure:12547: checking for pthread link with -thread" >&5
12547 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12548   echo $ac_n "(cached) $ac_c" 1>&6
12549 else
12550   
12551                 # save the flags
12552                 ol_LIBS="$LIBS"
12553                 LIBS="-thread $LIBS"
12554
12555                 if test "$cross_compiling" = yes; then
12556   cat > conftest.$ac_ext <<EOF
12557 #line 12558 "configure"
12558 #include "confdefs.h"
12559 /* pthread test headers */
12560 #include <pthread.h>
12561 #if HAVE_PTHREADS < 7
12562 #include <errno.h>
12563 #endif
12564 #ifndef NULL
12565 #define NULL (void*)0
12566 #endif
12567
12568 static void *task(p)
12569         void *p;
12570 {
12571         return (void *) (p == NULL);
12572 }
12573
12574 int main() {
12575
12576         /* pthread test function */
12577 #ifndef PTHREAD_CREATE_DETACHED
12578 #define PTHREAD_CREATE_DETACHED 1
12579 #endif
12580         pthread_t t;
12581         int status;
12582         int detach = PTHREAD_CREATE_DETACHED;
12583
12584 #if HAVE_PTHREADS > 4
12585         /* Final pthreads */
12586         pthread_attr_t attr;
12587
12588         status = pthread_attr_init(&attr);
12589         if( status ) return status;
12590
12591 #if HAVE_PTHREADS < 7
12592         status = pthread_attr_setdetachstate(&attr, &detach);
12593         if( status < 0 ) status = errno;
12594 #else
12595         status = pthread_attr_setdetachstate(&attr, detach);
12596 #endif
12597         if( status ) return status;
12598         status = pthread_create( &t, &attr, task, NULL );
12599 #if HAVE_PTHREADS < 7
12600         if( status < 0 ) status = errno;
12601 #endif
12602         if( status ) return status;
12603 #else
12604         /* Draft 4 pthreads */
12605         status = pthread_create( &t, pthread_attr_default, task, NULL );
12606         if( status ) return errno;
12607
12608         /* give thread a chance to complete */
12609         /* it should remain joinable and hence detachable */
12610         sleep( 1 );
12611
12612         status = pthread_detach( &t );
12613         if( status ) return errno;
12614 #endif
12615
12616 #ifdef HAVE_LINUX_THREADS
12617         pthread_kill_other_threads_np();
12618 #endif
12619
12620         return 0;
12621
12622 ; return 0; }
12623 EOF
12624 if { (eval echo configure:12625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12625   rm -rf conftest*
12626   ol_cv_pthread_thread=yes
12627 else
12628   echo "configure: failed program was:" >&5
12629   cat conftest.$ac_ext >&5
12630   rm -rf conftest*
12631   ol_cv_pthread_thread=no
12632 fi
12633 rm -f conftest*
12634 else
12635   cat > conftest.$ac_ext <<EOF
12636 #line 12637 "configure"
12637 #include "confdefs.h"
12638 /* pthread test headers */
12639 #include <pthread.h>
12640 #if HAVE_PTHREADS < 7
12641 #include <errno.h>
12642 #endif
12643 #ifndef NULL
12644 #define NULL (void*)0
12645 #endif
12646
12647 static void *task(p)
12648         void *p;
12649 {
12650         return (void *) (p == NULL);
12651 }
12652
12653
12654 int main(argc, argv)
12655         int argc;
12656         char **argv;
12657 {
12658
12659         /* pthread test function */
12660 #ifndef PTHREAD_CREATE_DETACHED
12661 #define PTHREAD_CREATE_DETACHED 1
12662 #endif
12663         pthread_t t;
12664         int status;
12665         int detach = PTHREAD_CREATE_DETACHED;
12666
12667 #if HAVE_PTHREADS > 4
12668         /* Final pthreads */
12669         pthread_attr_t attr;
12670
12671         status = pthread_attr_init(&attr);
12672         if( status ) return status;
12673
12674 #if HAVE_PTHREADS < 7
12675         status = pthread_attr_setdetachstate(&attr, &detach);
12676         if( status < 0 ) status = errno;
12677 #else
12678         status = pthread_attr_setdetachstate(&attr, detach);
12679 #endif
12680         if( status ) return status;
12681         status = pthread_create( &t, &attr, task, NULL );
12682 #if HAVE_PTHREADS < 7
12683         if( status < 0 ) status = errno;
12684 #endif
12685         if( status ) return status;
12686 #else
12687         /* Draft 4 pthreads */
12688         status = pthread_create( &t, pthread_attr_default, task, NULL );
12689         if( status ) return errno;
12690
12691         /* give thread a chance to complete */
12692         /* it should remain joinable and hence detachable */
12693         sleep( 1 );
12694
12695         status = pthread_detach( &t );
12696         if( status ) return errno;
12697 #endif
12698
12699 #ifdef HAVE_LINUX_THREADS
12700         pthread_kill_other_threads_np();
12701 #endif
12702
12703         return 0;
12704
12705 }
12706
12707 EOF
12708 if { (eval echo configure:12709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12709 then
12710   ol_cv_pthread_thread=yes
12711 else
12712   echo "configure: failed program was:" >&5
12713   cat conftest.$ac_ext >&5
12714   rm -fr conftest*
12715   ol_cv_pthread_thread=no
12716 fi
12717 rm -fr conftest*
12718 fi
12719
12720
12721                 # restore the LIBS
12722                 LIBS="$ol_LIBS"
12723         
12724 fi
12725
12726 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12727
12728         if test $ol_cv_pthread_thread = yes ; then
12729                 ol_link_pthreads="-thread"
12730                 ol_link_threads=posix
12731         fi
12732 fi
12733
12734
12735                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12736 if test "$ol_link_threads" = no ; then
12737         # try -lpthread -lmach -lexc -lc_r
12738         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12739 echo "configure:12740: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12740 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12741   echo $ac_n "(cached) $ac_c" 1>&6
12742 else
12743   
12744                 # save the flags
12745                 ol_LIBS="$LIBS"
12746                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12747
12748                 if test "$cross_compiling" = yes; then
12749   cat > conftest.$ac_ext <<EOF
12750 #line 12751 "configure"
12751 #include "confdefs.h"
12752 /* pthread test headers */
12753 #include <pthread.h>
12754 #if HAVE_PTHREADS < 7
12755 #include <errno.h>
12756 #endif
12757 #ifndef NULL
12758 #define NULL (void*)0
12759 #endif
12760
12761 static void *task(p)
12762         void *p;
12763 {
12764         return (void *) (p == NULL);
12765 }
12766
12767 int main() {
12768
12769         /* pthread test function */
12770 #ifndef PTHREAD_CREATE_DETACHED
12771 #define PTHREAD_CREATE_DETACHED 1
12772 #endif
12773         pthread_t t;
12774         int status;
12775         int detach = PTHREAD_CREATE_DETACHED;
12776
12777 #if HAVE_PTHREADS > 4
12778         /* Final pthreads */
12779         pthread_attr_t attr;
12780
12781         status = pthread_attr_init(&attr);
12782         if( status ) return status;
12783
12784 #if HAVE_PTHREADS < 7
12785         status = pthread_attr_setdetachstate(&attr, &detach);
12786         if( status < 0 ) status = errno;
12787 #else
12788         status = pthread_attr_setdetachstate(&attr, detach);
12789 #endif
12790         if( status ) return status;
12791         status = pthread_create( &t, &attr, task, NULL );
12792 #if HAVE_PTHREADS < 7
12793         if( status < 0 ) status = errno;
12794 #endif
12795         if( status ) return status;
12796 #else
12797         /* Draft 4 pthreads */
12798         status = pthread_create( &t, pthread_attr_default, task, NULL );
12799         if( status ) return errno;
12800
12801         /* give thread a chance to complete */
12802         /* it should remain joinable and hence detachable */
12803         sleep( 1 );
12804
12805         status = pthread_detach( &t );
12806         if( status ) return errno;
12807 #endif
12808
12809 #ifdef HAVE_LINUX_THREADS
12810         pthread_kill_other_threads_np();
12811 #endif
12812
12813         return 0;
12814
12815 ; return 0; }
12816 EOF
12817 if { (eval echo configure:12818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12818   rm -rf conftest*
12819   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12820 else
12821   echo "configure: failed program was:" >&5
12822   cat conftest.$ac_ext >&5
12823   rm -rf conftest*
12824   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12825 fi
12826 rm -f conftest*
12827 else
12828   cat > conftest.$ac_ext <<EOF
12829 #line 12830 "configure"
12830 #include "confdefs.h"
12831 /* pthread test headers */
12832 #include <pthread.h>
12833 #if HAVE_PTHREADS < 7
12834 #include <errno.h>
12835 #endif
12836 #ifndef NULL
12837 #define NULL (void*)0
12838 #endif
12839
12840 static void *task(p)
12841         void *p;
12842 {
12843         return (void *) (p == NULL);
12844 }
12845
12846
12847 int main(argc, argv)
12848         int argc;
12849         char **argv;
12850 {
12851
12852         /* pthread test function */
12853 #ifndef PTHREAD_CREATE_DETACHED
12854 #define PTHREAD_CREATE_DETACHED 1
12855 #endif
12856         pthread_t t;
12857         int status;
12858         int detach = PTHREAD_CREATE_DETACHED;
12859
12860 #if HAVE_PTHREADS > 4
12861         /* Final pthreads */
12862         pthread_attr_t attr;
12863
12864         status = pthread_attr_init(&attr);
12865         if( status ) return status;
12866
12867 #if HAVE_PTHREADS < 7
12868         status = pthread_attr_setdetachstate(&attr, &detach);
12869         if( status < 0 ) status = errno;
12870 #else
12871         status = pthread_attr_setdetachstate(&attr, detach);
12872 #endif
12873         if( status ) return status;
12874         status = pthread_create( &t, &attr, task, NULL );
12875 #if HAVE_PTHREADS < 7
12876         if( status < 0 ) status = errno;
12877 #endif
12878         if( status ) return status;
12879 #else
12880         /* Draft 4 pthreads */
12881         status = pthread_create( &t, pthread_attr_default, task, NULL );
12882         if( status ) return errno;
12883
12884         /* give thread a chance to complete */
12885         /* it should remain joinable and hence detachable */
12886         sleep( 1 );
12887
12888         status = pthread_detach( &t );
12889         if( status ) return errno;
12890 #endif
12891
12892 #ifdef HAVE_LINUX_THREADS
12893         pthread_kill_other_threads_np();
12894 #endif
12895
12896         return 0;
12897
12898 }
12899
12900 EOF
12901 if { (eval echo configure:12902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12902 then
12903   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12904 else
12905   echo "configure: failed program was:" >&5
12906   cat conftest.$ac_ext >&5
12907   rm -fr conftest*
12908   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12909 fi
12910 rm -fr conftest*
12911 fi
12912
12913
12914                 # restore the LIBS
12915                 LIBS="$ol_LIBS"
12916         
12917 fi
12918
12919 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12920
12921         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12922                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12923                 ol_link_threads=posix
12924         fi
12925 fi
12926
12927                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12928 if test "$ol_link_threads" = no ; then
12929         # try -lpthread -lmach -lexc
12930         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12931 echo "configure:12932: checking for pthread link with -lpthread -lmach -lexc" >&5
12932 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12933   echo $ac_n "(cached) $ac_c" 1>&6
12934 else
12935   
12936                 # save the flags
12937                 ol_LIBS="$LIBS"
12938                 LIBS="-lpthread -lmach -lexc $LIBS"
12939
12940                 if test "$cross_compiling" = yes; then
12941   cat > conftest.$ac_ext <<EOF
12942 #line 12943 "configure"
12943 #include "confdefs.h"
12944 /* pthread test headers */
12945 #include <pthread.h>
12946 #if HAVE_PTHREADS < 7
12947 #include <errno.h>
12948 #endif
12949 #ifndef NULL
12950 #define NULL (void*)0
12951 #endif
12952
12953 static void *task(p)
12954         void *p;
12955 {
12956         return (void *) (p == NULL);
12957 }
12958
12959 int main() {
12960
12961         /* pthread test function */
12962 #ifndef PTHREAD_CREATE_DETACHED
12963 #define PTHREAD_CREATE_DETACHED 1
12964 #endif
12965         pthread_t t;
12966         int status;
12967         int detach = PTHREAD_CREATE_DETACHED;
12968
12969 #if HAVE_PTHREADS > 4
12970         /* Final pthreads */
12971         pthread_attr_t attr;
12972
12973         status = pthread_attr_init(&attr);
12974         if( status ) return status;
12975
12976 #if HAVE_PTHREADS < 7
12977         status = pthread_attr_setdetachstate(&attr, &detach);
12978         if( status < 0 ) status = errno;
12979 #else
12980         status = pthread_attr_setdetachstate(&attr, detach);
12981 #endif
12982         if( status ) return status;
12983         status = pthread_create( &t, &attr, task, NULL );
12984 #if HAVE_PTHREADS < 7
12985         if( status < 0 ) status = errno;
12986 #endif
12987         if( status ) return status;
12988 #else
12989         /* Draft 4 pthreads */
12990         status = pthread_create( &t, pthread_attr_default, task, NULL );
12991         if( status ) return errno;
12992
12993         /* give thread a chance to complete */
12994         /* it should remain joinable and hence detachable */
12995         sleep( 1 );
12996
12997         status = pthread_detach( &t );
12998         if( status ) return errno;
12999 #endif
13000
13001 #ifdef HAVE_LINUX_THREADS
13002         pthread_kill_other_threads_np();
13003 #endif
13004
13005         return 0;
13006
13007 ; return 0; }
13008 EOF
13009 if { (eval echo configure:13010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13010   rm -rf conftest*
13011   ol_cv_pthread_lpthread_lmach_lexc=yes
13012 else
13013   echo "configure: failed program was:" >&5
13014   cat conftest.$ac_ext >&5
13015   rm -rf conftest*
13016   ol_cv_pthread_lpthread_lmach_lexc=no
13017 fi
13018 rm -f conftest*
13019 else
13020   cat > conftest.$ac_ext <<EOF
13021 #line 13022 "configure"
13022 #include "confdefs.h"
13023 /* pthread test headers */
13024 #include <pthread.h>
13025 #if HAVE_PTHREADS < 7
13026 #include <errno.h>
13027 #endif
13028 #ifndef NULL
13029 #define NULL (void*)0
13030 #endif
13031
13032 static void *task(p)
13033         void *p;
13034 {
13035         return (void *) (p == NULL);
13036 }
13037
13038
13039 int main(argc, argv)
13040         int argc;
13041         char **argv;
13042 {
13043
13044         /* pthread test function */
13045 #ifndef PTHREAD_CREATE_DETACHED
13046 #define PTHREAD_CREATE_DETACHED 1
13047 #endif
13048         pthread_t t;
13049         int status;
13050         int detach = PTHREAD_CREATE_DETACHED;
13051
13052 #if HAVE_PTHREADS > 4
13053         /* Final pthreads */
13054         pthread_attr_t attr;
13055
13056         status = pthread_attr_init(&attr);
13057         if( status ) return status;
13058
13059 #if HAVE_PTHREADS < 7
13060         status = pthread_attr_setdetachstate(&attr, &detach);
13061         if( status < 0 ) status = errno;
13062 #else
13063         status = pthread_attr_setdetachstate(&attr, detach);
13064 #endif
13065         if( status ) return status;
13066         status = pthread_create( &t, &attr, task, NULL );
13067 #if HAVE_PTHREADS < 7
13068         if( status < 0 ) status = errno;
13069 #endif
13070         if( status ) return status;
13071 #else
13072         /* Draft 4 pthreads */
13073         status = pthread_create( &t, pthread_attr_default, task, NULL );
13074         if( status ) return errno;
13075
13076         /* give thread a chance to complete */
13077         /* it should remain joinable and hence detachable */
13078         sleep( 1 );
13079
13080         status = pthread_detach( &t );
13081         if( status ) return errno;
13082 #endif
13083
13084 #ifdef HAVE_LINUX_THREADS
13085         pthread_kill_other_threads_np();
13086 #endif
13087
13088         return 0;
13089
13090 }
13091
13092 EOF
13093 if { (eval echo configure:13094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13094 then
13095   ol_cv_pthread_lpthread_lmach_lexc=yes
13096 else
13097   echo "configure: failed program was:" >&5
13098   cat conftest.$ac_ext >&5
13099   rm -fr conftest*
13100   ol_cv_pthread_lpthread_lmach_lexc=no
13101 fi
13102 rm -fr conftest*
13103 fi
13104
13105
13106                 # restore the LIBS
13107                 LIBS="$ol_LIBS"
13108         
13109 fi
13110
13111 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13112
13113         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13114                 ol_link_pthreads="-lpthread -lmach -lexc"
13115                 ol_link_threads=posix
13116         fi
13117 fi
13118
13119
13120                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13121 if test "$ol_link_threads" = no ; then
13122         # try -lpthread -Wl,-woff,85
13123         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13124 echo "configure:13125: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13125 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13126   echo $ac_n "(cached) $ac_c" 1>&6
13127 else
13128   
13129                 # save the flags
13130                 ol_LIBS="$LIBS"
13131                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13132
13133                 if test "$cross_compiling" = yes; then
13134   cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 /* pthread test headers */
13138 #include <pthread.h>
13139 #if HAVE_PTHREADS < 7
13140 #include <errno.h>
13141 #endif
13142 #ifndef NULL
13143 #define NULL (void*)0
13144 #endif
13145
13146 static void *task(p)
13147         void *p;
13148 {
13149         return (void *) (p == NULL);
13150 }
13151
13152 int main() {
13153
13154         /* pthread test function */
13155 #ifndef PTHREAD_CREATE_DETACHED
13156 #define PTHREAD_CREATE_DETACHED 1
13157 #endif
13158         pthread_t t;
13159         int status;
13160         int detach = PTHREAD_CREATE_DETACHED;
13161
13162 #if HAVE_PTHREADS > 4
13163         /* Final pthreads */
13164         pthread_attr_t attr;
13165
13166         status = pthread_attr_init(&attr);
13167         if( status ) return status;
13168
13169 #if HAVE_PTHREADS < 7
13170         status = pthread_attr_setdetachstate(&attr, &detach);
13171         if( status < 0 ) status = errno;
13172 #else
13173         status = pthread_attr_setdetachstate(&attr, detach);
13174 #endif
13175         if( status ) return status;
13176         status = pthread_create( &t, &attr, task, NULL );
13177 #if HAVE_PTHREADS < 7
13178         if( status < 0 ) status = errno;
13179 #endif
13180         if( status ) return status;
13181 #else
13182         /* Draft 4 pthreads */
13183         status = pthread_create( &t, pthread_attr_default, task, NULL );
13184         if( status ) return errno;
13185
13186         /* give thread a chance to complete */
13187         /* it should remain joinable and hence detachable */
13188         sleep( 1 );
13189
13190         status = pthread_detach( &t );
13191         if( status ) return errno;
13192 #endif
13193
13194 #ifdef HAVE_LINUX_THREADS
13195         pthread_kill_other_threads_np();
13196 #endif
13197
13198         return 0;
13199
13200 ; return 0; }
13201 EOF
13202 if { (eval echo configure:13203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13203   rm -rf conftest*
13204   ol_cv_pthread_lib_lpthread_woff=yes
13205 else
13206   echo "configure: failed program was:" >&5
13207   cat conftest.$ac_ext >&5
13208   rm -rf conftest*
13209   ol_cv_pthread_lib_lpthread_woff=no
13210 fi
13211 rm -f conftest*
13212 else
13213   cat > conftest.$ac_ext <<EOF
13214 #line 13215 "configure"
13215 #include "confdefs.h"
13216 /* pthread test headers */
13217 #include <pthread.h>
13218 #if HAVE_PTHREADS < 7
13219 #include <errno.h>
13220 #endif
13221 #ifndef NULL
13222 #define NULL (void*)0
13223 #endif
13224
13225 static void *task(p)
13226         void *p;
13227 {
13228         return (void *) (p == NULL);
13229 }
13230
13231
13232 int main(argc, argv)
13233         int argc;
13234         char **argv;
13235 {
13236
13237         /* pthread test function */
13238 #ifndef PTHREAD_CREATE_DETACHED
13239 #define PTHREAD_CREATE_DETACHED 1
13240 #endif
13241         pthread_t t;
13242         int status;
13243         int detach = PTHREAD_CREATE_DETACHED;
13244
13245 #if HAVE_PTHREADS > 4
13246         /* Final pthreads */
13247         pthread_attr_t attr;
13248
13249         status = pthread_attr_init(&attr);
13250         if( status ) return status;
13251
13252 #if HAVE_PTHREADS < 7
13253         status = pthread_attr_setdetachstate(&attr, &detach);
13254         if( status < 0 ) status = errno;
13255 #else
13256         status = pthread_attr_setdetachstate(&attr, detach);
13257 #endif
13258         if( status ) return status;
13259         status = pthread_create( &t, &attr, task, NULL );
13260 #if HAVE_PTHREADS < 7
13261         if( status < 0 ) status = errno;
13262 #endif
13263         if( status ) return status;
13264 #else
13265         /* Draft 4 pthreads */
13266         status = pthread_create( &t, pthread_attr_default, task, NULL );
13267         if( status ) return errno;
13268
13269         /* give thread a chance to complete */
13270         /* it should remain joinable and hence detachable */
13271         sleep( 1 );
13272
13273         status = pthread_detach( &t );
13274         if( status ) return errno;
13275 #endif
13276
13277 #ifdef HAVE_LINUX_THREADS
13278         pthread_kill_other_threads_np();
13279 #endif
13280
13281         return 0;
13282
13283 }
13284
13285 EOF
13286 if { (eval echo configure:13287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13287 then
13288   ol_cv_pthread_lib_lpthread_woff=yes
13289 else
13290   echo "configure: failed program was:" >&5
13291   cat conftest.$ac_ext >&5
13292   rm -fr conftest*
13293   ol_cv_pthread_lib_lpthread_woff=no
13294 fi
13295 rm -fr conftest*
13296 fi
13297
13298
13299                 # restore the LIBS
13300                 LIBS="$ol_LIBS"
13301         
13302 fi
13303
13304 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13305
13306         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13307                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13308                 ol_link_threads=posix
13309         fi
13310 fi
13311
13312
13313                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13314 if test "$ol_link_threads" = no ; then
13315         # try -lpthread
13316         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13317 echo "configure:13318: checking for pthread link with -lpthread" >&5
13318 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13319   echo $ac_n "(cached) $ac_c" 1>&6
13320 else
13321   
13322                 # save the flags
13323                 ol_LIBS="$LIBS"
13324                 LIBS="-lpthread $LIBS"
13325
13326                 if test "$cross_compiling" = yes; then
13327   cat > conftest.$ac_ext <<EOF
13328 #line 13329 "configure"
13329 #include "confdefs.h"
13330 /* pthread test headers */
13331 #include <pthread.h>
13332 #if HAVE_PTHREADS < 7
13333 #include <errno.h>
13334 #endif
13335 #ifndef NULL
13336 #define NULL (void*)0
13337 #endif
13338
13339 static void *task(p)
13340         void *p;
13341 {
13342         return (void *) (p == NULL);
13343 }
13344
13345 int main() {
13346
13347         /* pthread test function */
13348 #ifndef PTHREAD_CREATE_DETACHED
13349 #define PTHREAD_CREATE_DETACHED 1
13350 #endif
13351         pthread_t t;
13352         int status;
13353         int detach = PTHREAD_CREATE_DETACHED;
13354
13355 #if HAVE_PTHREADS > 4
13356         /* Final pthreads */
13357         pthread_attr_t attr;
13358
13359         status = pthread_attr_init(&attr);
13360         if( status ) return status;
13361
13362 #if HAVE_PTHREADS < 7
13363         status = pthread_attr_setdetachstate(&attr, &detach);
13364         if( status < 0 ) status = errno;
13365 #else
13366         status = pthread_attr_setdetachstate(&attr, detach);
13367 #endif
13368         if( status ) return status;
13369         status = pthread_create( &t, &attr, task, NULL );
13370 #if HAVE_PTHREADS < 7
13371         if( status < 0 ) status = errno;
13372 #endif
13373         if( status ) return status;
13374 #else
13375         /* Draft 4 pthreads */
13376         status = pthread_create( &t, pthread_attr_default, task, NULL );
13377         if( status ) return errno;
13378
13379         /* give thread a chance to complete */
13380         /* it should remain joinable and hence detachable */
13381         sleep( 1 );
13382
13383         status = pthread_detach( &t );
13384         if( status ) return errno;
13385 #endif
13386
13387 #ifdef HAVE_LINUX_THREADS
13388         pthread_kill_other_threads_np();
13389 #endif
13390
13391         return 0;
13392
13393 ; return 0; }
13394 EOF
13395 if { (eval echo configure:13396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13396   rm -rf conftest*
13397   ol_cv_pthread_lpthread=yes
13398 else
13399   echo "configure: failed program was:" >&5
13400   cat conftest.$ac_ext >&5
13401   rm -rf conftest*
13402   ol_cv_pthread_lpthread=no
13403 fi
13404 rm -f conftest*
13405 else
13406   cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 /* pthread test headers */
13410 #include <pthread.h>
13411 #if HAVE_PTHREADS < 7
13412 #include <errno.h>
13413 #endif
13414 #ifndef NULL
13415 #define NULL (void*)0
13416 #endif
13417
13418 static void *task(p)
13419         void *p;
13420 {
13421         return (void *) (p == NULL);
13422 }
13423
13424
13425 int main(argc, argv)
13426         int argc;
13427         char **argv;
13428 {
13429
13430         /* pthread test function */
13431 #ifndef PTHREAD_CREATE_DETACHED
13432 #define PTHREAD_CREATE_DETACHED 1
13433 #endif
13434         pthread_t t;
13435         int status;
13436         int detach = PTHREAD_CREATE_DETACHED;
13437
13438 #if HAVE_PTHREADS > 4
13439         /* Final pthreads */
13440         pthread_attr_t attr;
13441
13442         status = pthread_attr_init(&attr);
13443         if( status ) return status;
13444
13445 #if HAVE_PTHREADS < 7
13446         status = pthread_attr_setdetachstate(&attr, &detach);
13447         if( status < 0 ) status = errno;
13448 #else
13449         status = pthread_attr_setdetachstate(&attr, detach);
13450 #endif
13451         if( status ) return status;
13452         status = pthread_create( &t, &attr, task, NULL );
13453 #if HAVE_PTHREADS < 7
13454         if( status < 0 ) status = errno;
13455 #endif
13456         if( status ) return status;
13457 #else
13458         /* Draft 4 pthreads */
13459         status = pthread_create( &t, pthread_attr_default, task, NULL );
13460         if( status ) return errno;
13461
13462         /* give thread a chance to complete */
13463         /* it should remain joinable and hence detachable */
13464         sleep( 1 );
13465
13466         status = pthread_detach( &t );
13467         if( status ) return errno;
13468 #endif
13469
13470 #ifdef HAVE_LINUX_THREADS
13471         pthread_kill_other_threads_np();
13472 #endif
13473
13474         return 0;
13475
13476 }
13477
13478 EOF
13479 if { (eval echo configure:13480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13480 then
13481   ol_cv_pthread_lpthread=yes
13482 else
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -fr conftest*
13486   ol_cv_pthread_lpthread=no
13487 fi
13488 rm -fr conftest*
13489 fi
13490
13491
13492                 # restore the LIBS
13493                 LIBS="$ol_LIBS"
13494         
13495 fi
13496
13497 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13498
13499         if test $ol_cv_pthread_lpthread = yes ; then
13500                 ol_link_pthreads="-lpthread"
13501                 ol_link_threads=posix
13502         fi
13503 fi
13504
13505                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13506 if test "$ol_link_threads" = no ; then
13507         # try -lc_r
13508         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13509 echo "configure:13510: checking for pthread link with -lc_r" >&5
13510 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13511   echo $ac_n "(cached) $ac_c" 1>&6
13512 else
13513   
13514                 # save the flags
13515                 ol_LIBS="$LIBS"
13516                 LIBS="-lc_r $LIBS"
13517
13518                 if test "$cross_compiling" = yes; then
13519   cat > conftest.$ac_ext <<EOF
13520 #line 13521 "configure"
13521 #include "confdefs.h"
13522 /* pthread test headers */
13523 #include <pthread.h>
13524 #if HAVE_PTHREADS < 7
13525 #include <errno.h>
13526 #endif
13527 #ifndef NULL
13528 #define NULL (void*)0
13529 #endif
13530
13531 static void *task(p)
13532         void *p;
13533 {
13534         return (void *) (p == NULL);
13535 }
13536
13537 int main() {
13538
13539         /* pthread test function */
13540 #ifndef PTHREAD_CREATE_DETACHED
13541 #define PTHREAD_CREATE_DETACHED 1
13542 #endif
13543         pthread_t t;
13544         int status;
13545         int detach = PTHREAD_CREATE_DETACHED;
13546
13547 #if HAVE_PTHREADS > 4
13548         /* Final pthreads */
13549         pthread_attr_t attr;
13550
13551         status = pthread_attr_init(&attr);
13552         if( status ) return status;
13553
13554 #if HAVE_PTHREADS < 7
13555         status = pthread_attr_setdetachstate(&attr, &detach);
13556         if( status < 0 ) status = errno;
13557 #else
13558         status = pthread_attr_setdetachstate(&attr, detach);
13559 #endif
13560         if( status ) return status;
13561         status = pthread_create( &t, &attr, task, NULL );
13562 #if HAVE_PTHREADS < 7
13563         if( status < 0 ) status = errno;
13564 #endif
13565         if( status ) return status;
13566 #else
13567         /* Draft 4 pthreads */
13568         status = pthread_create( &t, pthread_attr_default, task, NULL );
13569         if( status ) return errno;
13570
13571         /* give thread a chance to complete */
13572         /* it should remain joinable and hence detachable */
13573         sleep( 1 );
13574
13575         status = pthread_detach( &t );
13576         if( status ) return errno;
13577 #endif
13578
13579 #ifdef HAVE_LINUX_THREADS
13580         pthread_kill_other_threads_np();
13581 #endif
13582
13583         return 0;
13584
13585 ; return 0; }
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13588   rm -rf conftest*
13589   ol_cv_pthread_lc_r=yes
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -rf conftest*
13594   ol_cv_pthread_lc_r=no
13595 fi
13596 rm -f conftest*
13597 else
13598   cat > conftest.$ac_ext <<EOF
13599 #line 13600 "configure"
13600 #include "confdefs.h"
13601 /* pthread test headers */
13602 #include <pthread.h>
13603 #if HAVE_PTHREADS < 7
13604 #include <errno.h>
13605 #endif
13606 #ifndef NULL
13607 #define NULL (void*)0
13608 #endif
13609
13610 static void *task(p)
13611         void *p;
13612 {
13613         return (void *) (p == NULL);
13614 }
13615
13616
13617 int main(argc, argv)
13618         int argc;
13619         char **argv;
13620 {
13621
13622         /* pthread test function */
13623 #ifndef PTHREAD_CREATE_DETACHED
13624 #define PTHREAD_CREATE_DETACHED 1
13625 #endif
13626         pthread_t t;
13627         int status;
13628         int detach = PTHREAD_CREATE_DETACHED;
13629
13630 #if HAVE_PTHREADS > 4
13631         /* Final pthreads */
13632         pthread_attr_t attr;
13633
13634         status = pthread_attr_init(&attr);
13635         if( status ) return status;
13636
13637 #if HAVE_PTHREADS < 7
13638         status = pthread_attr_setdetachstate(&attr, &detach);
13639         if( status < 0 ) status = errno;
13640 #else
13641         status = pthread_attr_setdetachstate(&attr, detach);
13642 #endif
13643         if( status ) return status;
13644         status = pthread_create( &t, &attr, task, NULL );
13645 #if HAVE_PTHREADS < 7
13646         if( status < 0 ) status = errno;
13647 #endif
13648         if( status ) return status;
13649 #else
13650         /* Draft 4 pthreads */
13651         status = pthread_create( &t, pthread_attr_default, task, NULL );
13652         if( status ) return errno;
13653
13654         /* give thread a chance to complete */
13655         /* it should remain joinable and hence detachable */
13656         sleep( 1 );
13657
13658         status = pthread_detach( &t );
13659         if( status ) return errno;
13660 #endif
13661
13662 #ifdef HAVE_LINUX_THREADS
13663         pthread_kill_other_threads_np();
13664 #endif
13665
13666         return 0;
13667
13668 }
13669
13670 EOF
13671 if { (eval echo configure:13672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13672 then
13673   ol_cv_pthread_lc_r=yes
13674 else
13675   echo "configure: failed program was:" >&5
13676   cat conftest.$ac_ext >&5
13677   rm -fr conftest*
13678   ol_cv_pthread_lc_r=no
13679 fi
13680 rm -fr conftest*
13681 fi
13682
13683
13684                 # restore the LIBS
13685                 LIBS="$ol_LIBS"
13686         
13687 fi
13688
13689 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13690
13691         if test $ol_cv_pthread_lc_r = yes ; then
13692                 ol_link_pthreads="-lc_r"
13693                 ol_link_threads=posix
13694         fi
13695 fi
13696
13697
13698                 # Pthread try link: -threads (ol_cv_pthread_threads)
13699 if test "$ol_link_threads" = no ; then
13700         # try -threads
13701         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13702 echo "configure:13703: checking for pthread link with -threads" >&5
13703 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13704   echo $ac_n "(cached) $ac_c" 1>&6
13705 else
13706   
13707                 # save the flags
13708                 ol_LIBS="$LIBS"
13709                 LIBS="-threads $LIBS"
13710
13711                 if test "$cross_compiling" = yes; then
13712   cat > conftest.$ac_ext <<EOF
13713 #line 13714 "configure"
13714 #include "confdefs.h"
13715 /* pthread test headers */
13716 #include <pthread.h>
13717 #if HAVE_PTHREADS < 7
13718 #include <errno.h>
13719 #endif
13720 #ifndef NULL
13721 #define NULL (void*)0
13722 #endif
13723
13724 static void *task(p)
13725         void *p;
13726 {
13727         return (void *) (p == NULL);
13728 }
13729
13730 int main() {
13731
13732         /* pthread test function */
13733 #ifndef PTHREAD_CREATE_DETACHED
13734 #define PTHREAD_CREATE_DETACHED 1
13735 #endif
13736         pthread_t t;
13737         int status;
13738         int detach = PTHREAD_CREATE_DETACHED;
13739
13740 #if HAVE_PTHREADS > 4
13741         /* Final pthreads */
13742         pthread_attr_t attr;
13743
13744         status = pthread_attr_init(&attr);
13745         if( status ) return status;
13746
13747 #if HAVE_PTHREADS < 7
13748         status = pthread_attr_setdetachstate(&attr, &detach);
13749         if( status < 0 ) status = errno;
13750 #else
13751         status = pthread_attr_setdetachstate(&attr, detach);
13752 #endif
13753         if( status ) return status;
13754         status = pthread_create( &t, &attr, task, NULL );
13755 #if HAVE_PTHREADS < 7
13756         if( status < 0 ) status = errno;
13757 #endif
13758         if( status ) return status;
13759 #else
13760         /* Draft 4 pthreads */
13761         status = pthread_create( &t, pthread_attr_default, task, NULL );
13762         if( status ) return errno;
13763
13764         /* give thread a chance to complete */
13765         /* it should remain joinable and hence detachable */
13766         sleep( 1 );
13767
13768         status = pthread_detach( &t );
13769         if( status ) return errno;
13770 #endif
13771
13772 #ifdef HAVE_LINUX_THREADS
13773         pthread_kill_other_threads_np();
13774 #endif
13775
13776         return 0;
13777
13778 ; return 0; }
13779 EOF
13780 if { (eval echo configure:13781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13781   rm -rf conftest*
13782   ol_cv_pthread_threads=yes
13783 else
13784   echo "configure: failed program was:" >&5
13785   cat conftest.$ac_ext >&5
13786   rm -rf conftest*
13787   ol_cv_pthread_threads=no
13788 fi
13789 rm -f conftest*
13790 else
13791   cat > conftest.$ac_ext <<EOF
13792 #line 13793 "configure"
13793 #include "confdefs.h"
13794 /* pthread test headers */
13795 #include <pthread.h>
13796 #if HAVE_PTHREADS < 7
13797 #include <errno.h>
13798 #endif
13799 #ifndef NULL
13800 #define NULL (void*)0
13801 #endif
13802
13803 static void *task(p)
13804         void *p;
13805 {
13806         return (void *) (p == NULL);
13807 }
13808
13809
13810 int main(argc, argv)
13811         int argc;
13812         char **argv;
13813 {
13814
13815         /* pthread test function */
13816 #ifndef PTHREAD_CREATE_DETACHED
13817 #define PTHREAD_CREATE_DETACHED 1
13818 #endif
13819         pthread_t t;
13820         int status;
13821         int detach = PTHREAD_CREATE_DETACHED;
13822
13823 #if HAVE_PTHREADS > 4
13824         /* Final pthreads */
13825         pthread_attr_t attr;
13826
13827         status = pthread_attr_init(&attr);
13828         if( status ) return status;
13829
13830 #if HAVE_PTHREADS < 7
13831         status = pthread_attr_setdetachstate(&attr, &detach);
13832         if( status < 0 ) status = errno;
13833 #else
13834         status = pthread_attr_setdetachstate(&attr, detach);
13835 #endif
13836         if( status ) return status;
13837         status = pthread_create( &t, &attr, task, NULL );
13838 #if HAVE_PTHREADS < 7
13839         if( status < 0 ) status = errno;
13840 #endif
13841         if( status ) return status;
13842 #else
13843         /* Draft 4 pthreads */
13844         status = pthread_create( &t, pthread_attr_default, task, NULL );
13845         if( status ) return errno;
13846
13847         /* give thread a chance to complete */
13848         /* it should remain joinable and hence detachable */
13849         sleep( 1 );
13850
13851         status = pthread_detach( &t );
13852         if( status ) return errno;
13853 #endif
13854
13855 #ifdef HAVE_LINUX_THREADS
13856         pthread_kill_other_threads_np();
13857 #endif
13858
13859         return 0;
13860
13861 }
13862
13863 EOF
13864 if { (eval echo configure:13865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13865 then
13866   ol_cv_pthread_threads=yes
13867 else
13868   echo "configure: failed program was:" >&5
13869   cat conftest.$ac_ext >&5
13870   rm -fr conftest*
13871   ol_cv_pthread_threads=no
13872 fi
13873 rm -fr conftest*
13874 fi
13875
13876
13877                 # restore the LIBS
13878                 LIBS="$ol_LIBS"
13879         
13880 fi
13881
13882 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13883
13884         if test $ol_cv_pthread_threads = yes ; then
13885                 ol_link_pthreads="-threads"
13886                 ol_link_threads=posix
13887         fi
13888 fi
13889
13890
13891                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13892 if test "$ol_link_threads" = no ; then
13893         # try -lpthreads -lmach -lexc -lc_r
13894         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13895 echo "configure:13896: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13896 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13897   echo $ac_n "(cached) $ac_c" 1>&6
13898 else
13899   
13900                 # save the flags
13901                 ol_LIBS="$LIBS"
13902                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13903
13904                 if test "$cross_compiling" = yes; then
13905   cat > conftest.$ac_ext <<EOF
13906 #line 13907 "configure"
13907 #include "confdefs.h"
13908 /* pthread test headers */
13909 #include <pthread.h>
13910 #if HAVE_PTHREADS < 7
13911 #include <errno.h>
13912 #endif
13913 #ifndef NULL
13914 #define NULL (void*)0
13915 #endif
13916
13917 static void *task(p)
13918         void *p;
13919 {
13920         return (void *) (p == NULL);
13921 }
13922
13923 int main() {
13924
13925         /* pthread test function */
13926 #ifndef PTHREAD_CREATE_DETACHED
13927 #define PTHREAD_CREATE_DETACHED 1
13928 #endif
13929         pthread_t t;
13930         int status;
13931         int detach = PTHREAD_CREATE_DETACHED;
13932
13933 #if HAVE_PTHREADS > 4
13934         /* Final pthreads */
13935         pthread_attr_t attr;
13936
13937         status = pthread_attr_init(&attr);
13938         if( status ) return status;
13939
13940 #if HAVE_PTHREADS < 7
13941         status = pthread_attr_setdetachstate(&attr, &detach);
13942         if( status < 0 ) status = errno;
13943 #else
13944         status = pthread_attr_setdetachstate(&attr, detach);
13945 #endif
13946         if( status ) return status;
13947         status = pthread_create( &t, &attr, task, NULL );
13948 #if HAVE_PTHREADS < 7
13949         if( status < 0 ) status = errno;
13950 #endif
13951         if( status ) return status;
13952 #else
13953         /* Draft 4 pthreads */
13954         status = pthread_create( &t, pthread_attr_default, task, NULL );
13955         if( status ) return errno;
13956
13957         /* give thread a chance to complete */
13958         /* it should remain joinable and hence detachable */
13959         sleep( 1 );
13960
13961         status = pthread_detach( &t );
13962         if( status ) return errno;
13963 #endif
13964
13965 #ifdef HAVE_LINUX_THREADS
13966         pthread_kill_other_threads_np();
13967 #endif
13968
13969         return 0;
13970
13971 ; return 0; }
13972 EOF
13973 if { (eval echo configure:13974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13974   rm -rf conftest*
13975   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13976 else
13977   echo "configure: failed program was:" >&5
13978   cat conftest.$ac_ext >&5
13979   rm -rf conftest*
13980   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13981 fi
13982 rm -f conftest*
13983 else
13984   cat > conftest.$ac_ext <<EOF
13985 #line 13986 "configure"
13986 #include "confdefs.h"
13987 /* pthread test headers */
13988 #include <pthread.h>
13989 #if HAVE_PTHREADS < 7
13990 #include <errno.h>
13991 #endif
13992 #ifndef NULL
13993 #define NULL (void*)0
13994 #endif
13995
13996 static void *task(p)
13997         void *p;
13998 {
13999         return (void *) (p == NULL);
14000 }
14001
14002
14003 int main(argc, argv)
14004         int argc;
14005         char **argv;
14006 {
14007
14008         /* pthread test function */
14009 #ifndef PTHREAD_CREATE_DETACHED
14010 #define PTHREAD_CREATE_DETACHED 1
14011 #endif
14012         pthread_t t;
14013         int status;
14014         int detach = PTHREAD_CREATE_DETACHED;
14015
14016 #if HAVE_PTHREADS > 4
14017         /* Final pthreads */
14018         pthread_attr_t attr;
14019
14020         status = pthread_attr_init(&attr);
14021         if( status ) return status;
14022
14023 #if HAVE_PTHREADS < 7
14024         status = pthread_attr_setdetachstate(&attr, &detach);
14025         if( status < 0 ) status = errno;
14026 #else
14027         status = pthread_attr_setdetachstate(&attr, detach);
14028 #endif
14029         if( status ) return status;
14030         status = pthread_create( &t, &attr, task, NULL );
14031 #if HAVE_PTHREADS < 7
14032         if( status < 0 ) status = errno;
14033 #endif
14034         if( status ) return status;
14035 #else
14036         /* Draft 4 pthreads */
14037         status = pthread_create( &t, pthread_attr_default, task, NULL );
14038         if( status ) return errno;
14039
14040         /* give thread a chance to complete */
14041         /* it should remain joinable and hence detachable */
14042         sleep( 1 );
14043
14044         status = pthread_detach( &t );
14045         if( status ) return errno;
14046 #endif
14047
14048 #ifdef HAVE_LINUX_THREADS
14049         pthread_kill_other_threads_np();
14050 #endif
14051
14052         return 0;
14053
14054 }
14055
14056 EOF
14057 if { (eval echo configure:14058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14058 then
14059   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14060 else
14061   echo "configure: failed program was:" >&5
14062   cat conftest.$ac_ext >&5
14063   rm -fr conftest*
14064   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14065 fi
14066 rm -fr conftest*
14067 fi
14068
14069
14070                 # restore the LIBS
14071                 LIBS="$ol_LIBS"
14072         
14073 fi
14074
14075 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14076
14077         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14078                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14079                 ol_link_threads=posix
14080         fi
14081 fi
14082
14083                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14084 if test "$ol_link_threads" = no ; then
14085         # try -lpthreads -lmach -lexc
14086         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14087 echo "configure:14088: checking for pthread link with -lpthreads -lmach -lexc" >&5
14088 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14089   echo $ac_n "(cached) $ac_c" 1>&6
14090 else
14091   
14092                 # save the flags
14093                 ol_LIBS="$LIBS"
14094                 LIBS="-lpthreads -lmach -lexc $LIBS"
14095
14096                 if test "$cross_compiling" = yes; then
14097   cat > conftest.$ac_ext <<EOF
14098 #line 14099 "configure"
14099 #include "confdefs.h"
14100 /* pthread test headers */
14101 #include <pthread.h>
14102 #if HAVE_PTHREADS < 7
14103 #include <errno.h>
14104 #endif
14105 #ifndef NULL
14106 #define NULL (void*)0
14107 #endif
14108
14109 static void *task(p)
14110         void *p;
14111 {
14112         return (void *) (p == NULL);
14113 }
14114
14115 int main() {
14116
14117         /* pthread test function */
14118 #ifndef PTHREAD_CREATE_DETACHED
14119 #define PTHREAD_CREATE_DETACHED 1
14120 #endif
14121         pthread_t t;
14122         int status;
14123         int detach = PTHREAD_CREATE_DETACHED;
14124
14125 #if HAVE_PTHREADS > 4
14126         /* Final pthreads */
14127         pthread_attr_t attr;
14128
14129         status = pthread_attr_init(&attr);
14130         if( status ) return status;
14131
14132 #if HAVE_PTHREADS < 7
14133         status = pthread_attr_setdetachstate(&attr, &detach);
14134         if( status < 0 ) status = errno;
14135 #else
14136         status = pthread_attr_setdetachstate(&attr, detach);
14137 #endif
14138         if( status ) return status;
14139         status = pthread_create( &t, &attr, task, NULL );
14140 #if HAVE_PTHREADS < 7
14141         if( status < 0 ) status = errno;
14142 #endif
14143         if( status ) return status;
14144 #else
14145         /* Draft 4 pthreads */
14146         status = pthread_create( &t, pthread_attr_default, task, NULL );
14147         if( status ) return errno;
14148
14149         /* give thread a chance to complete */
14150         /* it should remain joinable and hence detachable */
14151         sleep( 1 );
14152
14153         status = pthread_detach( &t );
14154         if( status ) return errno;
14155 #endif
14156
14157 #ifdef HAVE_LINUX_THREADS
14158         pthread_kill_other_threads_np();
14159 #endif
14160
14161         return 0;
14162
14163 ; return 0; }
14164 EOF
14165 if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14166   rm -rf conftest*
14167   ol_cv_pthread_lpthreads_lmach_lexc=yes
14168 else
14169   echo "configure: failed program was:" >&5
14170   cat conftest.$ac_ext >&5
14171   rm -rf conftest*
14172   ol_cv_pthread_lpthreads_lmach_lexc=no
14173 fi
14174 rm -f conftest*
14175 else
14176   cat > conftest.$ac_ext <<EOF
14177 #line 14178 "configure"
14178 #include "confdefs.h"
14179 /* pthread test headers */
14180 #include <pthread.h>
14181 #if HAVE_PTHREADS < 7
14182 #include <errno.h>
14183 #endif
14184 #ifndef NULL
14185 #define NULL (void*)0
14186 #endif
14187
14188 static void *task(p)
14189         void *p;
14190 {
14191         return (void *) (p == NULL);
14192 }
14193
14194
14195 int main(argc, argv)
14196         int argc;
14197         char **argv;
14198 {
14199
14200         /* pthread test function */
14201 #ifndef PTHREAD_CREATE_DETACHED
14202 #define PTHREAD_CREATE_DETACHED 1
14203 #endif
14204         pthread_t t;
14205         int status;
14206         int detach = PTHREAD_CREATE_DETACHED;
14207
14208 #if HAVE_PTHREADS > 4
14209         /* Final pthreads */
14210         pthread_attr_t attr;
14211
14212         status = pthread_attr_init(&attr);
14213         if( status ) return status;
14214
14215 #if HAVE_PTHREADS < 7
14216         status = pthread_attr_setdetachstate(&attr, &detach);
14217         if( status < 0 ) status = errno;
14218 #else
14219         status = pthread_attr_setdetachstate(&attr, detach);
14220 #endif
14221         if( status ) return status;
14222         status = pthread_create( &t, &attr, task, NULL );
14223 #if HAVE_PTHREADS < 7
14224         if( status < 0 ) status = errno;
14225 #endif
14226         if( status ) return status;
14227 #else
14228         /* Draft 4 pthreads */
14229         status = pthread_create( &t, pthread_attr_default, task, NULL );
14230         if( status ) return errno;
14231
14232         /* give thread a chance to complete */
14233         /* it should remain joinable and hence detachable */
14234         sleep( 1 );
14235
14236         status = pthread_detach( &t );
14237         if( status ) return errno;
14238 #endif
14239
14240 #ifdef HAVE_LINUX_THREADS
14241         pthread_kill_other_threads_np();
14242 #endif
14243
14244         return 0;
14245
14246 }
14247
14248 EOF
14249 if { (eval echo configure:14250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14250 then
14251   ol_cv_pthread_lpthreads_lmach_lexc=yes
14252 else
14253   echo "configure: failed program was:" >&5
14254   cat conftest.$ac_ext >&5
14255   rm -fr conftest*
14256   ol_cv_pthread_lpthreads_lmach_lexc=no
14257 fi
14258 rm -fr conftest*
14259 fi
14260
14261
14262                 # restore the LIBS
14263                 LIBS="$ol_LIBS"
14264         
14265 fi
14266
14267 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14268
14269         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14270                 ol_link_pthreads="-lpthreads -lmach -lexc"
14271                 ol_link_threads=posix
14272         fi
14273 fi
14274
14275                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14276 if test "$ol_link_threads" = no ; then
14277         # try -lpthreads -lexc
14278         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14279 echo "configure:14280: checking for pthread link with -lpthreads -lexc" >&5
14280 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14281   echo $ac_n "(cached) $ac_c" 1>&6
14282 else
14283   
14284                 # save the flags
14285                 ol_LIBS="$LIBS"
14286                 LIBS="-lpthreads -lexc $LIBS"
14287
14288                 if test "$cross_compiling" = yes; then
14289   cat > conftest.$ac_ext <<EOF
14290 #line 14291 "configure"
14291 #include "confdefs.h"
14292 /* pthread test headers */
14293 #include <pthread.h>
14294 #if HAVE_PTHREADS < 7
14295 #include <errno.h>
14296 #endif
14297 #ifndef NULL
14298 #define NULL (void*)0
14299 #endif
14300
14301 static void *task(p)
14302         void *p;
14303 {
14304         return (void *) (p == NULL);
14305 }
14306
14307 int main() {
14308
14309         /* pthread test function */
14310 #ifndef PTHREAD_CREATE_DETACHED
14311 #define PTHREAD_CREATE_DETACHED 1
14312 #endif
14313         pthread_t t;
14314         int status;
14315         int detach = PTHREAD_CREATE_DETACHED;
14316
14317 #if HAVE_PTHREADS > 4
14318         /* Final pthreads */
14319         pthread_attr_t attr;
14320
14321         status = pthread_attr_init(&attr);
14322         if( status ) return status;
14323
14324 #if HAVE_PTHREADS < 7
14325         status = pthread_attr_setdetachstate(&attr, &detach);
14326         if( status < 0 ) status = errno;
14327 #else
14328         status = pthread_attr_setdetachstate(&attr, detach);
14329 #endif
14330         if( status ) return status;
14331         status = pthread_create( &t, &attr, task, NULL );
14332 #if HAVE_PTHREADS < 7
14333         if( status < 0 ) status = errno;
14334 #endif
14335         if( status ) return status;
14336 #else
14337         /* Draft 4 pthreads */
14338         status = pthread_create( &t, pthread_attr_default, task, NULL );
14339         if( status ) return errno;
14340
14341         /* give thread a chance to complete */
14342         /* it should remain joinable and hence detachable */
14343         sleep( 1 );
14344
14345         status = pthread_detach( &t );
14346         if( status ) return errno;
14347 #endif
14348
14349 #ifdef HAVE_LINUX_THREADS
14350         pthread_kill_other_threads_np();
14351 #endif
14352
14353         return 0;
14354
14355 ; return 0; }
14356 EOF
14357 if { (eval echo configure:14358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14358   rm -rf conftest*
14359   ol_cv_pthread_lpthreads_lexc=yes
14360 else
14361   echo "configure: failed program was:" >&5
14362   cat conftest.$ac_ext >&5
14363   rm -rf conftest*
14364   ol_cv_pthread_lpthreads_lexc=no
14365 fi
14366 rm -f conftest*
14367 else
14368   cat > conftest.$ac_ext <<EOF
14369 #line 14370 "configure"
14370 #include "confdefs.h"
14371 /* pthread test headers */
14372 #include <pthread.h>
14373 #if HAVE_PTHREADS < 7
14374 #include <errno.h>
14375 #endif
14376 #ifndef NULL
14377 #define NULL (void*)0
14378 #endif
14379
14380 static void *task(p)
14381         void *p;
14382 {
14383         return (void *) (p == NULL);
14384 }
14385
14386
14387 int main(argc, argv)
14388         int argc;
14389         char **argv;
14390 {
14391
14392         /* pthread test function */
14393 #ifndef PTHREAD_CREATE_DETACHED
14394 #define PTHREAD_CREATE_DETACHED 1
14395 #endif
14396         pthread_t t;
14397         int status;
14398         int detach = PTHREAD_CREATE_DETACHED;
14399
14400 #if HAVE_PTHREADS > 4
14401         /* Final pthreads */
14402         pthread_attr_t attr;
14403
14404         status = pthread_attr_init(&attr);
14405         if( status ) return status;
14406
14407 #if HAVE_PTHREADS < 7
14408         status = pthread_attr_setdetachstate(&attr, &detach);
14409         if( status < 0 ) status = errno;
14410 #else
14411         status = pthread_attr_setdetachstate(&attr, detach);
14412 #endif
14413         if( status ) return status;
14414         status = pthread_create( &t, &attr, task, NULL );
14415 #if HAVE_PTHREADS < 7
14416         if( status < 0 ) status = errno;
14417 #endif
14418         if( status ) return status;
14419 #else
14420         /* Draft 4 pthreads */
14421         status = pthread_create( &t, pthread_attr_default, task, NULL );
14422         if( status ) return errno;
14423
14424         /* give thread a chance to complete */
14425         /* it should remain joinable and hence detachable */
14426         sleep( 1 );
14427
14428         status = pthread_detach( &t );
14429         if( status ) return errno;
14430 #endif
14431
14432 #ifdef HAVE_LINUX_THREADS
14433         pthread_kill_other_threads_np();
14434 #endif
14435
14436         return 0;
14437
14438 }
14439
14440 EOF
14441 if { (eval echo configure:14442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14442 then
14443   ol_cv_pthread_lpthreads_lexc=yes
14444 else
14445   echo "configure: failed program was:" >&5
14446   cat conftest.$ac_ext >&5
14447   rm -fr conftest*
14448   ol_cv_pthread_lpthreads_lexc=no
14449 fi
14450 rm -fr conftest*
14451 fi
14452
14453
14454                 # restore the LIBS
14455                 LIBS="$ol_LIBS"
14456         
14457 fi
14458
14459 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14460
14461         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14462                 ol_link_pthreads="-lpthreads -lexc"
14463                 ol_link_threads=posix
14464         fi
14465 fi
14466
14467
14468                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14469 if test "$ol_link_threads" = no ; then
14470         # try -lpthreads
14471         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14472 echo "configure:14473: checking for pthread link with -lpthreads" >&5
14473 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14474   echo $ac_n "(cached) $ac_c" 1>&6
14475 else
14476   
14477                 # save the flags
14478                 ol_LIBS="$LIBS"
14479                 LIBS="-lpthreads $LIBS"
14480
14481                 if test "$cross_compiling" = yes; then
14482   cat > conftest.$ac_ext <<EOF
14483 #line 14484 "configure"
14484 #include "confdefs.h"
14485 /* pthread test headers */
14486 #include <pthread.h>
14487 #if HAVE_PTHREADS < 7
14488 #include <errno.h>
14489 #endif
14490 #ifndef NULL
14491 #define NULL (void*)0
14492 #endif
14493
14494 static void *task(p)
14495         void *p;
14496 {
14497         return (void *) (p == NULL);
14498 }
14499
14500 int main() {
14501
14502         /* pthread test function */
14503 #ifndef PTHREAD_CREATE_DETACHED
14504 #define PTHREAD_CREATE_DETACHED 1
14505 #endif
14506         pthread_t t;
14507         int status;
14508         int detach = PTHREAD_CREATE_DETACHED;
14509
14510 #if HAVE_PTHREADS > 4
14511         /* Final pthreads */
14512         pthread_attr_t attr;
14513
14514         status = pthread_attr_init(&attr);
14515         if( status ) return status;
14516
14517 #if HAVE_PTHREADS < 7
14518         status = pthread_attr_setdetachstate(&attr, &detach);
14519         if( status < 0 ) status = errno;
14520 #else
14521         status = pthread_attr_setdetachstate(&attr, detach);
14522 #endif
14523         if( status ) return status;
14524         status = pthread_create( &t, &attr, task, NULL );
14525 #if HAVE_PTHREADS < 7
14526         if( status < 0 ) status = errno;
14527 #endif
14528         if( status ) return status;
14529 #else
14530         /* Draft 4 pthreads */
14531         status = pthread_create( &t, pthread_attr_default, task, NULL );
14532         if( status ) return errno;
14533
14534         /* give thread a chance to complete */
14535         /* it should remain joinable and hence detachable */
14536         sleep( 1 );
14537
14538         status = pthread_detach( &t );
14539         if( status ) return errno;
14540 #endif
14541
14542 #ifdef HAVE_LINUX_THREADS
14543         pthread_kill_other_threads_np();
14544 #endif
14545
14546         return 0;
14547
14548 ; return 0; }
14549 EOF
14550 if { (eval echo configure:14551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14551   rm -rf conftest*
14552   ol_cv_pthread_lib_lpthreads=yes
14553 else
14554   echo "configure: failed program was:" >&5
14555   cat conftest.$ac_ext >&5
14556   rm -rf conftest*
14557   ol_cv_pthread_lib_lpthreads=no
14558 fi
14559 rm -f conftest*
14560 else
14561   cat > conftest.$ac_ext <<EOF
14562 #line 14563 "configure"
14563 #include "confdefs.h"
14564 /* pthread test headers */
14565 #include <pthread.h>
14566 #if HAVE_PTHREADS < 7
14567 #include <errno.h>
14568 #endif
14569 #ifndef NULL
14570 #define NULL (void*)0
14571 #endif
14572
14573 static void *task(p)
14574         void *p;
14575 {
14576         return (void *) (p == NULL);
14577 }
14578
14579
14580 int main(argc, argv)
14581         int argc;
14582         char **argv;
14583 {
14584
14585         /* pthread test function */
14586 #ifndef PTHREAD_CREATE_DETACHED
14587 #define PTHREAD_CREATE_DETACHED 1
14588 #endif
14589         pthread_t t;
14590         int status;
14591         int detach = PTHREAD_CREATE_DETACHED;
14592
14593 #if HAVE_PTHREADS > 4
14594         /* Final pthreads */
14595         pthread_attr_t attr;
14596
14597         status = pthread_attr_init(&attr);
14598         if( status ) return status;
14599
14600 #if HAVE_PTHREADS < 7
14601         status = pthread_attr_setdetachstate(&attr, &detach);
14602         if( status < 0 ) status = errno;
14603 #else
14604         status = pthread_attr_setdetachstate(&attr, detach);
14605 #endif
14606         if( status ) return status;
14607         status = pthread_create( &t, &attr, task, NULL );
14608 #if HAVE_PTHREADS < 7
14609         if( status < 0 ) status = errno;
14610 #endif
14611         if( status ) return status;
14612 #else
14613         /* Draft 4 pthreads */
14614         status = pthread_create( &t, pthread_attr_default, task, NULL );
14615         if( status ) return errno;
14616
14617         /* give thread a chance to complete */
14618         /* it should remain joinable and hence detachable */
14619         sleep( 1 );
14620
14621         status = pthread_detach( &t );
14622         if( status ) return errno;
14623 #endif
14624
14625 #ifdef HAVE_LINUX_THREADS
14626         pthread_kill_other_threads_np();
14627 #endif
14628
14629         return 0;
14630
14631 }
14632
14633 EOF
14634 if { (eval echo configure:14635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14635 then
14636   ol_cv_pthread_lib_lpthreads=yes
14637 else
14638   echo "configure: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640   rm -fr conftest*
14641   ol_cv_pthread_lib_lpthreads=no
14642 fi
14643 rm -fr conftest*
14644 fi
14645
14646
14647                 # restore the LIBS
14648                 LIBS="$ol_LIBS"
14649         
14650 fi
14651
14652 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14653
14654         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14655                 ol_link_pthreads="-lpthreads"
14656                 ol_link_threads=posix
14657         fi
14658 fi
14659
14660
14661                 if test $ol_link_threads != no ; then
14662                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14663
14664                                                 save_CPPFLAGS="$CPPFLAGS"
14665                         save_LIBS="$LIBS"
14666                         LIBS="$LTHREAD_LIBS $LIBS"
14667
14668                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14669 do
14670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14671 echo "configure:14672: checking for $ac_func" >&5
14672 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14673   echo $ac_n "(cached) $ac_c" 1>&6
14674 else
14675   cat > conftest.$ac_ext <<EOF
14676 #line 14677 "configure"
14677 #include "confdefs.h"
14678 /* System header to define __stub macros and hopefully few prototypes,
14679     which can conflict with char $ac_func(); below.  */
14680 #include <assert.h>
14681 /* Override any gcc2 internal prototype to avoid an error.  */
14682 /* We use char because int might match the return type of a gcc2
14683     builtin and then its argument prototype would still apply.  */
14684 char $ac_func();
14685 char (*f)();
14686
14687 int main() {
14688
14689 /* The GNU C library defines this for functions which it implements
14690     to always fail with ENOSYS.  Some functions are actually named
14691     something starting with __ and the normal name is an alias.  */
14692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14693 choke me
14694 #else
14695 f = $ac_func;
14696 #endif
14697
14698 ; return 0; }
14699 EOF
14700 if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14701   rm -rf conftest*
14702   eval "ac_cv_func_$ac_func=yes"
14703 else
14704   echo "configure: failed program was:" >&5
14705   cat conftest.$ac_ext >&5
14706   rm -rf conftest*
14707   eval "ac_cv_func_$ac_func=no"
14708 fi
14709 rm -f conftest*
14710 fi
14711
14712 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14713   echo "$ac_t""yes" 1>&6
14714     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14715   cat >> confdefs.h <<EOF
14716 #define $ac_tr_func 1
14717 EOF
14718  
14719 else
14720   echo "$ac_t""no" 1>&6
14721 fi
14722 done
14723
14724
14725                         if test $ac_cv_func_sched_yield = no -a \
14726                                 $ac_cv_func_pthread_yield = no -a \
14727                                 $ac_cv_func_thr_yield = no ; then
14728                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14729 echo "configure:14730: checking for sched_yield in -lrt" >&5
14730 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14731 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14732   echo $ac_n "(cached) $ac_c" 1>&6
14733 else
14734   ac_save_LIBS="$LIBS"
14735 LIBS="-lrt  $LIBS"
14736 cat > conftest.$ac_ext <<EOF
14737 #line 14738 "configure"
14738 #include "confdefs.h"
14739 /* Override any gcc2 internal prototype to avoid an error.  */
14740 /* We use char because int might match the return type of a gcc2
14741     builtin and then its argument prototype would still apply.  */
14742 char sched_yield();
14743
14744 int main() {
14745 sched_yield()
14746 ; return 0; }
14747 EOF
14748 if { (eval echo configure:14749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14749   rm -rf conftest*
14750   eval "ac_cv_lib_$ac_lib_var=yes"
14751 else
14752   echo "configure: failed program was:" >&5
14753   cat conftest.$ac_ext >&5
14754   rm -rf conftest*
14755   eval "ac_cv_lib_$ac_lib_var=no"
14756 fi
14757 rm -f conftest*
14758 LIBS="$ac_save_LIBS"
14759
14760 fi
14761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14762   echo "$ac_t""yes" 1>&6
14763   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14764                                         cat >> confdefs.h <<\EOF
14765 #define HAVE_SCHED_YIELD 1
14766 EOF
14767
14768                                         ac_cv_func_sched_yield=yes
14769 else
14770   echo "$ac_t""no" 1>&6
14771 ac_cv_func_sched_yield=no
14772 fi
14773
14774                         fi
14775                         if test $ac_cv_func_sched_yield = no -a \
14776                                 $ac_cv_func_pthread_yield = no -a \
14777                                 "$ac_cv_func_thr_yield" = no ; then
14778                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14779                         fi
14780
14781                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14782 do
14783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14784 echo "configure:14785: checking for $ac_func" >&5
14785 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14786   echo $ac_n "(cached) $ac_c" 1>&6
14787 else
14788   cat > conftest.$ac_ext <<EOF
14789 #line 14790 "configure"
14790 #include "confdefs.h"
14791 /* System header to define __stub macros and hopefully few prototypes,
14792     which can conflict with char $ac_func(); below.  */
14793 #include <assert.h>
14794 /* Override any gcc2 internal prototype to avoid an error.  */
14795 /* We use char because int might match the return type of a gcc2
14796     builtin and then its argument prototype would still apply.  */
14797 char $ac_func();
14798 char (*f)();
14799
14800 int main() {
14801
14802 /* The GNU C library defines this for functions which it implements
14803     to always fail with ENOSYS.  Some functions are actually named
14804     something starting with __ and the normal name is an alias.  */
14805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14806 choke me
14807 #else
14808 f = $ac_func;
14809 #endif
14810
14811 ; return 0; }
14812 EOF
14813 if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14814   rm -rf conftest*
14815   eval "ac_cv_func_$ac_func=yes"
14816 else
14817   echo "configure: failed program was:" >&5
14818   cat conftest.$ac_ext >&5
14819   rm -rf conftest*
14820   eval "ac_cv_func_$ac_func=no"
14821 fi
14822 rm -f conftest*
14823 fi
14824
14825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14826   echo "$ac_t""yes" 1>&6
14827     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14828   cat >> confdefs.h <<EOF
14829 #define $ac_tr_func 1
14830 EOF
14831  
14832 else
14833   echo "$ac_t""no" 1>&6
14834 fi
14835 done
14836
14837
14838                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14839 echo "configure:14840: checking for pthread_detach with <pthread.h>" >&5
14840 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14841   echo $ac_n "(cached) $ac_c" 1>&6
14842 else
14843   
14844                                                                 cat > conftest.$ac_ext <<EOF
14845 #line 14846 "configure"
14846 #include "confdefs.h"
14847
14848 #include <pthread.h>
14849 #ifndef NULL
14850 #define NULL (void*)0
14851 #endif
14852
14853 int main() {
14854 pthread_detach(NULL);
14855 ; return 0; }
14856 EOF
14857 if { (eval echo configure:14858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14858   rm -rf conftest*
14859   ol_cv_func_pthread_detach=yes
14860 else
14861   echo "configure: failed program was:" >&5
14862   cat conftest.$ac_ext >&5
14863   rm -rf conftest*
14864   ol_cv_func_pthread_detach=no
14865 fi
14866 rm -f conftest*
14867                         
14868 fi
14869
14870 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14871
14872                         if test $ol_cv_func_pthread_detach = no ; then
14873                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14874                         fi
14875
14876                         cat >> confdefs.h <<\EOF
14877 #define HAVE_PTHREAD_DETACH 1
14878 EOF
14879
14880
14881                                                 for ac_func in \
14882                                 pthread_setconcurrency \
14883                                 pthread_getconcurrency \
14884                                 thr_setconcurrency \
14885                                 thr_getconcurrency \
14886                         
14887 do
14888 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14889 echo "configure:14890: checking for $ac_func" >&5
14890 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14891   echo $ac_n "(cached) $ac_c" 1>&6
14892 else
14893   cat > conftest.$ac_ext <<EOF
14894 #line 14895 "configure"
14895 #include "confdefs.h"
14896 /* System header to define __stub macros and hopefully few prototypes,
14897     which can conflict with char $ac_func(); below.  */
14898 #include <assert.h>
14899 /* Override any gcc2 internal prototype to avoid an error.  */
14900 /* We use char because int might match the return type of a gcc2
14901     builtin and then its argument prototype would still apply.  */
14902 char $ac_func();
14903 char (*f)();
14904
14905 int main() {
14906
14907 /* The GNU C library defines this for functions which it implements
14908     to always fail with ENOSYS.  Some functions are actually named
14909     something starting with __ and the normal name is an alias.  */
14910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14911 choke me
14912 #else
14913 f = $ac_func;
14914 #endif
14915
14916 ; return 0; }
14917 EOF
14918 if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14919   rm -rf conftest*
14920   eval "ac_cv_func_$ac_func=yes"
14921 else
14922   echo "configure: failed program was:" >&5
14923   cat conftest.$ac_ext >&5
14924   rm -rf conftest*
14925   eval "ac_cv_func_$ac_func=no"
14926 fi
14927 rm -f conftest*
14928 fi
14929
14930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14931   echo "$ac_t""yes" 1>&6
14932     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14933   cat >> confdefs.h <<EOF
14934 #define $ac_tr_func 1
14935 EOF
14936  
14937 else
14938   echo "$ac_t""no" 1>&6
14939 fi
14940 done
14941
14942
14943                         
14944         for ac_func in pthread_kill_other_threads_np
14945 do
14946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14947 echo "configure:14948: checking for $ac_func" >&5
14948 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14949   echo $ac_n "(cached) $ac_c" 1>&6
14950 else
14951   cat > conftest.$ac_ext <<EOF
14952 #line 14953 "configure"
14953 #include "confdefs.h"
14954 /* System header to define __stub macros and hopefully few prototypes,
14955     which can conflict with char $ac_func(); below.  */
14956 #include <assert.h>
14957 /* Override any gcc2 internal prototype to avoid an error.  */
14958 /* We use char because int might match the return type of a gcc2
14959     builtin and then its argument prototype would still apply.  */
14960 char $ac_func();
14961 char (*f)();
14962
14963 int main() {
14964
14965 /* The GNU C library defines this for functions which it implements
14966     to always fail with ENOSYS.  Some functions are actually named
14967     something starting with __ and the normal name is an alias.  */
14968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14969 choke me
14970 #else
14971 f = $ac_func;
14972 #endif
14973
14974 ; return 0; }
14975 EOF
14976 if { (eval echo configure:14977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14977   rm -rf conftest*
14978   eval "ac_cv_func_$ac_func=yes"
14979 else
14980   echo "configure: failed program was:" >&5
14981   cat conftest.$ac_ext >&5
14982   rm -rf conftest*
14983   eval "ac_cv_func_$ac_func=no"
14984 fi
14985 rm -f conftest*
14986 fi
14987
14988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14989   echo "$ac_t""yes" 1>&6
14990     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14991   cat >> confdefs.h <<EOF
14992 #define $ac_tr_func 1
14993 EOF
14994  
14995 else
14996   echo "$ac_t""no" 1>&6
14997 fi
14998 done
14999
15000         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15001 echo "configure:15002: checking for LinuxThreads implementation" >&5
15002 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15003   echo $ac_n "(cached) $ac_c" 1>&6
15004 else
15005   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15006 fi
15007
15008 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15009
15010                         
15011         
15012         
15013         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15014 echo "configure:15015: checking for LinuxThreads consistency" >&5
15015 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15016   echo $ac_n "(cached) $ac_c" 1>&6
15017 else
15018   
15019                 if test $ol_cv_header_linux_threads = yes -a \
15020                         $ol_cv_sys_linux_threads = yes; then
15021                         ol_cv_linux_threads=yes
15022                 elif test $ol_cv_header_linux_threads = no -a \
15023                         $ol_cv_sys_linux_threads = no; then
15024                         ol_cv_linux_threads=no
15025                 else
15026                         ol_cv_linux_threads=error
15027                 fi
15028         
15029 fi
15030
15031 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15032
15033
15034                         if test $ol_cv_linux_threads = error; then
15035                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15036                         fi
15037
15038                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15039 echo "configure:15040: checking if pthread_create() works" >&5
15040 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   
15044                         if test "$cross_compiling" = yes; then
15045                                 ol_cv_pthread_create_works=yes
15046 else
15047   cat > conftest.$ac_ext <<EOF
15048 #line 15049 "configure"
15049 #include "confdefs.h"
15050 /* pthread test headers */
15051 #include <pthread.h>
15052 #if HAVE_PTHREADS < 7
15053 #include <errno.h>
15054 #endif
15055 #ifndef NULL
15056 #define NULL (void*)0
15057 #endif
15058
15059 static void *task(p)
15060         void *p;
15061 {
15062         return (void *) (p == NULL);
15063 }
15064
15065
15066 int main(argc, argv)
15067         int argc;
15068         char **argv;
15069 {
15070
15071         /* pthread test function */
15072 #ifndef PTHREAD_CREATE_DETACHED
15073 #define PTHREAD_CREATE_DETACHED 1
15074 #endif
15075         pthread_t t;
15076         int status;
15077         int detach = PTHREAD_CREATE_DETACHED;
15078
15079 #if HAVE_PTHREADS > 4
15080         /* Final pthreads */
15081         pthread_attr_t attr;
15082
15083         status = pthread_attr_init(&attr);
15084         if( status ) return status;
15085
15086 #if HAVE_PTHREADS < 7
15087         status = pthread_attr_setdetachstate(&attr, &detach);
15088         if( status < 0 ) status = errno;
15089 #else
15090         status = pthread_attr_setdetachstate(&attr, detach);
15091 #endif
15092         if( status ) return status;
15093         status = pthread_create( &t, &attr, task, NULL );
15094 #if HAVE_PTHREADS < 7
15095         if( status < 0 ) status = errno;
15096 #endif
15097         if( status ) return status;
15098 #else
15099         /* Draft 4 pthreads */
15100         status = pthread_create( &t, pthread_attr_default, task, NULL );
15101         if( status ) return errno;
15102
15103         /* give thread a chance to complete */
15104         /* it should remain joinable and hence detachable */
15105         sleep( 1 );
15106
15107         status = pthread_detach( &t );
15108         if( status ) return errno;
15109 #endif
15110
15111 #ifdef HAVE_LINUX_THREADS
15112         pthread_kill_other_threads_np();
15113 #endif
15114
15115         return 0;
15116
15117 }
15118
15119 EOF
15120 if { (eval echo configure:15121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15121 then
15122   ol_cv_pthread_create_works=yes
15123 else
15124   echo "configure: failed program was:" >&5
15125   cat conftest.$ac_ext >&5
15126   rm -fr conftest*
15127   ol_cv_pthread_create_works=no
15128 fi
15129 rm -fr conftest*
15130 fi
15131
15132 fi
15133
15134 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15135
15136                         if test $ol_cv_pthread_create_works = no ; then
15137                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15138                         fi
15139
15140                                                 if test $ol_with_yielding_select = auto ; then
15141                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15142 echo "configure:15143: checking if select yields when using pthreads" >&5
15143 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15144   echo $ac_n "(cached) $ac_c" 1>&6
15145 else
15146   
15147                                 if test "$cross_compiling" = yes; then
15148   ol_cv_pthread_select_yields=cross
15149 else
15150   cat > conftest.$ac_ext <<EOF
15151 #line 15152 "configure"
15152 #include "confdefs.h"
15153
15154 #include <sys/types.h>
15155 #include <sys/time.h>
15156 #include <unistd.h>
15157 #include <pthread.h>
15158 #ifndef NULL
15159 #define NULL (void*) 0
15160 #endif
15161
15162 static int fildes[2];
15163
15164 static void *task(p)
15165         void *p;
15166 {
15167         int i;
15168         struct timeval tv;
15169
15170         fd_set rfds;
15171
15172         tv.tv_sec=10;
15173         tv.tv_usec=0;
15174
15175         FD_ZERO(&rfds);
15176         FD_SET(fildes[0], &rfds);
15177
15178         /* we're not interested in any fds */
15179         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15180
15181         if(i < 0) {
15182                 perror("select");
15183                 exit(10);
15184         }
15185
15186         exit(0); /* if we exit here, the select blocked the whole process */
15187 }
15188
15189 int main(argc, argv)
15190         int argc;
15191         char **argv;
15192 {
15193         pthread_t t;
15194
15195         /* create a pipe to select */
15196         if(pipe(&fildes[0])) {
15197                 perror("select");
15198                 exit(1);
15199         }
15200
15201 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15202         (void) pthread_setconcurrency(2);
15203 #else
15204 #ifdef HAVE_THR_SETCONCURRENCY
15205         /* Set Solaris LWP concurrency to 2 */
15206         thr_setconcurrency(2);
15207 #endif
15208 #endif
15209
15210 #if HAVE_PTHREADS < 6
15211         pthread_create(&t, pthread_attr_default, task, NULL);
15212 #else
15213         pthread_create(&t, NULL, task, NULL);
15214 #endif
15215
15216         /* make sure task runs first */
15217 #if HAVE_THR_YIELD
15218         thr_yield();
15219 #elif defined( HAVE_SCHED_YIELD )
15220         sched_yield();
15221 #elif defined( HAVE_PTHREAD_YIELD )
15222         pthread_yield();
15223 #endif
15224
15225         exit(2);
15226 }
15227 EOF
15228 if { (eval echo configure:15229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15229 then
15230   ol_cv_pthread_select_yields=no
15231 else
15232   echo "configure: failed program was:" >&5
15233   cat conftest.$ac_ext >&5
15234   rm -fr conftest*
15235   ol_cv_pthread_select_yields=yes
15236 fi
15237 rm -fr conftest*
15238 fi
15239
15240 fi
15241
15242 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15243
15244                                 if test $ol_cv_pthread_select_yields = cross ; then
15245                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15246                                 fi
15247
15248                                 if test $ol_cv_pthread_select_yields = yes ; then
15249                                         ol_with_yielding_select=yes
15250                                 fi
15251                         fi
15252
15253                                                 CPPFLAGS="$save_CPPFLAGS"
15254                         LIBS="$save_LIBS"
15255                 else
15256                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15257                 fi
15258         fi
15259
15260         if test $ol_with_threads = posix ; then
15261                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15262         fi
15263 fi
15264
15265 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15266         -o $ol_with_threads = mach ; then
15267
15268                 for ac_hdr in mach/cthreads.h cthreads.h
15269 do
15270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15272 echo "configure:15273: checking for $ac_hdr" >&5
15273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15274   echo $ac_n "(cached) $ac_c" 1>&6
15275 else
15276   cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279 #include <$ac_hdr>
15280 EOF
15281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15282 { (eval echo configure:15283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15284 if test -z "$ac_err"; then
15285   rm -rf conftest*
15286   eval "ac_cv_header_$ac_safe=yes"
15287 else
15288   echo "$ac_err" >&5
15289   echo "configure: failed program was:" >&5
15290   cat conftest.$ac_ext >&5
15291   rm -rf conftest*
15292   eval "ac_cv_header_$ac_safe=no"
15293 fi
15294 rm -f conftest*
15295 fi
15296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15297   echo "$ac_t""yes" 1>&6
15298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15299   cat >> confdefs.h <<EOF
15300 #define $ac_tr_hdr 1
15301 EOF
15302  
15303 else
15304   echo "$ac_t""no" 1>&6
15305 fi
15306 done
15307
15308         if test $ac_cv_header_mach_cthreads_h = yes ; then
15309                 ol_with_threads=found
15310
15311                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15312 echo "configure:15313: checking for cthread_fork" >&5
15313 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15314   echo $ac_n "(cached) $ac_c" 1>&6
15315 else
15316   cat > conftest.$ac_ext <<EOF
15317 #line 15318 "configure"
15318 #include "confdefs.h"
15319 /* System header to define __stub macros and hopefully few prototypes,
15320     which can conflict with char cthread_fork(); below.  */
15321 #include <assert.h>
15322 /* Override any gcc2 internal prototype to avoid an error.  */
15323 /* We use char because int might match the return type of a gcc2
15324     builtin and then its argument prototype would still apply.  */
15325 char cthread_fork();
15326 char (*f)();
15327
15328 int main() {
15329
15330 /* The GNU C library defines this for functions which it implements
15331     to always fail with ENOSYS.  Some functions are actually named
15332     something starting with __ and the normal name is an alias.  */
15333 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15334 choke me
15335 #else
15336 f = cthread_fork;
15337 #endif
15338
15339 ; return 0; }
15340 EOF
15341 if { (eval echo configure:15342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15342   rm -rf conftest*
15343   eval "ac_cv_func_cthread_fork=yes"
15344 else
15345   echo "configure: failed program was:" >&5
15346   cat conftest.$ac_ext >&5
15347   rm -rf conftest*
15348   eval "ac_cv_func_cthread_fork=no"
15349 fi
15350 rm -f conftest*
15351 fi
15352
15353 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15354   echo "$ac_t""yes" 1>&6
15355   ol_link_threads=yes
15356 else
15357   echo "$ac_t""no" 1>&6
15358 fi
15359
15360
15361                 if test $ol_link_threads = no ; then
15362                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15363 echo "configure:15364: checking for cthread_fork with -all_load" >&5
15364 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15365   echo $ac_n "(cached) $ac_c" 1>&6
15366 else
15367   
15368                                                                 save_LIBS="$LIBS"
15369                                 LIBS="-all_load $LIBS"
15370                                 cat > conftest.$ac_ext <<EOF
15371 #line 15372 "configure"
15372 #include "confdefs.h"
15373 #include <mach/cthreads.h>
15374 int main() {
15375
15376                                         cthread_fork((void *)0, (void *)0);
15377                                         
15378 ; return 0; }
15379 EOF
15380 if { (eval echo configure:15381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15381   rm -rf conftest*
15382   ol_cv_cthread_all_load=yes
15383 else
15384   echo "configure: failed program was:" >&5
15385   cat conftest.$ac_ext >&5
15386   rm -rf conftest*
15387   ol_cv_cthread_all_load=no
15388 fi
15389 rm -f conftest*
15390                                                                 LIBS="$save_LIBS"
15391                         
15392 fi
15393
15394 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15395
15396                         if test $ol_cv_cthread_all_load = yes ; then
15397                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15398                                 ol_link_threads=mach
15399                                 ol_with_threads=found
15400                         fi
15401                 fi
15402
15403         elif test $ac_cv_header_cthreads_h = yes ; then
15404                                 
15405                 ol_with_threads=found
15406  
15407                                 save_LIBS="$LIBS"
15408                 LIBS="$LIBS -lthreads"
15409                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15410 echo "configure:15411: checking for cthread_fork" >&5
15411 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15412   echo $ac_n "(cached) $ac_c" 1>&6
15413 else
15414   cat > conftest.$ac_ext <<EOF
15415 #line 15416 "configure"
15416 #include "confdefs.h"
15417 /* System header to define __stub macros and hopefully few prototypes,
15418     which can conflict with char cthread_fork(); below.  */
15419 #include <assert.h>
15420 /* Override any gcc2 internal prototype to avoid an error.  */
15421 /* We use char because int might match the return type of a gcc2
15422     builtin and then its argument prototype would still apply.  */
15423 char cthread_fork();
15424 char (*f)();
15425
15426 int main() {
15427
15428 /* The GNU C library defines this for functions which it implements
15429     to always fail with ENOSYS.  Some functions are actually named
15430     something starting with __ and the normal name is an alias.  */
15431 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15432 choke me
15433 #else
15434 f = cthread_fork;
15435 #endif
15436
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15440   rm -rf conftest*
15441   eval "ac_cv_func_cthread_fork=yes"
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   rm -rf conftest*
15446   eval "ac_cv_func_cthread_fork=no"
15447 fi
15448 rm -f conftest*
15449 fi
15450
15451 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453   ol_link_threads=yes
15454 else
15455   echo "$ac_t""no" 1>&6
15456 fi
15457
15458                 LIBS="$save_LIBS"
15459
15460                 if test $ol_link_threads = yes ; then
15461                         LTHREAD_LIBS="-lthreads"
15462                         ol_link_threads=mach
15463                         ol_with_threads=found
15464                 else
15465                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15466                 fi
15467
15468         elif test $ol_with_threads = mach ; then
15469                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15470         fi
15471
15472         if test $ol_link_threads = mach ; then
15473                 cat >> confdefs.h <<\EOF
15474 #define HAVE_MACH_CTHREADS 1
15475 EOF
15476
15477         elif test $ol_with_threads = found ; then
15478                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15479         fi
15480 fi
15481
15482 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15483         -o $ol_with_threads = pth ; then
15484
15485         for ac_hdr in pth.h
15486 do
15487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15489 echo "configure:15490: checking for $ac_hdr" >&5
15490 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15491   echo $ac_n "(cached) $ac_c" 1>&6
15492 else
15493   cat > conftest.$ac_ext <<EOF
15494 #line 15495 "configure"
15495 #include "confdefs.h"
15496 #include <$ac_hdr>
15497 EOF
15498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15499 { (eval echo configure:15500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15501 if test -z "$ac_err"; then
15502   rm -rf conftest*
15503   eval "ac_cv_header_$ac_safe=yes"
15504 else
15505   echo "$ac_err" >&5
15506   echo "configure: failed program was:" >&5
15507   cat conftest.$ac_ext >&5
15508   rm -rf conftest*
15509   eval "ac_cv_header_$ac_safe=no"
15510 fi
15511 rm -f conftest*
15512 fi
15513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15514   echo "$ac_t""yes" 1>&6
15515     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15516   cat >> confdefs.h <<EOF
15517 #define $ac_tr_hdr 1
15518 EOF
15519  
15520 else
15521   echo "$ac_t""no" 1>&6
15522 fi
15523 done
15524
15525
15526         if test $ac_cv_header_pth_h = yes ; then
15527                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15528 echo "configure:15529: checking for pth_version in -lpth" >&5
15529 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15531   echo $ac_n "(cached) $ac_c" 1>&6
15532 else
15533   ac_save_LIBS="$LIBS"
15534 LIBS="-lpth  $LIBS"
15535 cat > conftest.$ac_ext <<EOF
15536 #line 15537 "configure"
15537 #include "confdefs.h"
15538 /* Override any gcc2 internal prototype to avoid an error.  */
15539 /* We use char because int might match the return type of a gcc2
15540     builtin and then its argument prototype would still apply.  */
15541 char pth_version();
15542
15543 int main() {
15544 pth_version()
15545 ; return 0; }
15546 EOF
15547 if { (eval echo configure:15548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15548   rm -rf conftest*
15549   eval "ac_cv_lib_$ac_lib_var=yes"
15550 else
15551   echo "configure: failed program was:" >&5
15552   cat conftest.$ac_ext >&5
15553   rm -rf conftest*
15554   eval "ac_cv_lib_$ac_lib_var=no"
15555 fi
15556 rm -f conftest*
15557 LIBS="$ac_save_LIBS"
15558
15559 fi
15560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15561   echo "$ac_t""yes" 1>&6
15562   have_pth=yes
15563 else
15564   echo "$ac_t""no" 1>&6
15565 have_pth=no
15566 fi
15567
15568
15569                 if test $have_pth = yes ; then
15570                         cat >> confdefs.h <<\EOF
15571 #define HAVE_GNU_PTH 1
15572 EOF
15573
15574                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15575                         ol_link_threads=pth
15576                         ol_with_threads=found
15577
15578                         if test $ol_with_yielding_select = auto ; then
15579                                 ol_with_yielding_select=yes
15580                         fi
15581                 fi
15582         fi
15583 fi
15584
15585 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15586         -o $ol_with_threads = lwp ; then
15587
15588                 for ac_hdr in thread.h synch.h
15589 do
15590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15592 echo "configure:15593: checking for $ac_hdr" >&5
15593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15594   echo $ac_n "(cached) $ac_c" 1>&6
15595 else
15596   cat > conftest.$ac_ext <<EOF
15597 #line 15598 "configure"
15598 #include "confdefs.h"
15599 #include <$ac_hdr>
15600 EOF
15601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15602 { (eval echo configure:15603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15604 if test -z "$ac_err"; then
15605   rm -rf conftest*
15606   eval "ac_cv_header_$ac_safe=yes"
15607 else
15608   echo "$ac_err" >&5
15609   echo "configure: failed program was:" >&5
15610   cat conftest.$ac_ext >&5
15611   rm -rf conftest*
15612   eval "ac_cv_header_$ac_safe=no"
15613 fi
15614 rm -f conftest*
15615 fi
15616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15617   echo "$ac_t""yes" 1>&6
15618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15619   cat >> confdefs.h <<EOF
15620 #define $ac_tr_hdr 1
15621 EOF
15622  
15623 else
15624   echo "$ac_t""no" 1>&6
15625 fi
15626 done
15627
15628         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15629                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15630 echo "configure:15631: checking for thr_create in -lthread" >&5
15631 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15632 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15633   echo $ac_n "(cached) $ac_c" 1>&6
15634 else
15635   ac_save_LIBS="$LIBS"
15636 LIBS="-lthread  $LIBS"
15637 cat > conftest.$ac_ext <<EOF
15638 #line 15639 "configure"
15639 #include "confdefs.h"
15640 /* Override any gcc2 internal prototype to avoid an error.  */
15641 /* We use char because int might match the return type of a gcc2
15642     builtin and then its argument prototype would still apply.  */
15643 char thr_create();
15644
15645 int main() {
15646 thr_create()
15647 ; return 0; }
15648 EOF
15649 if { (eval echo configure:15650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15650   rm -rf conftest*
15651   eval "ac_cv_lib_$ac_lib_var=yes"
15652 else
15653   echo "configure: failed program was:" >&5
15654   cat conftest.$ac_ext >&5
15655   rm -rf conftest*
15656   eval "ac_cv_lib_$ac_lib_var=no"
15657 fi
15658 rm -f conftest*
15659 LIBS="$ac_save_LIBS"
15660
15661 fi
15662 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15663   echo "$ac_t""yes" 1>&6
15664   have_thr=yes
15665 else
15666   echo "$ac_t""no" 1>&6
15667 have_thr=no
15668 fi
15669
15670
15671                 if test $have_thr = yes ; then
15672                         cat >> confdefs.h <<\EOF
15673 #define HAVE_THR 1
15674 EOF
15675
15676                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15677                         ol_link_threads=thr
15678
15679                         if test $ol_with_yielding_select = auto ; then
15680                                 ol_with_yielding_select=yes
15681                         fi
15682
15683                                                 for ac_func in \
15684                                 thr_setconcurrency \
15685                                 thr_getconcurrency \
15686                         
15687 do
15688 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15689 echo "configure:15690: checking for $ac_func" >&5
15690 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15691   echo $ac_n "(cached) $ac_c" 1>&6
15692 else
15693   cat > conftest.$ac_ext <<EOF
15694 #line 15695 "configure"
15695 #include "confdefs.h"
15696 /* System header to define __stub macros and hopefully few prototypes,
15697     which can conflict with char $ac_func(); below.  */
15698 #include <assert.h>
15699 /* Override any gcc2 internal prototype to avoid an error.  */
15700 /* We use char because int might match the return type of a gcc2
15701     builtin and then its argument prototype would still apply.  */
15702 char $ac_func();
15703 char (*f)();
15704
15705 int main() {
15706
15707 /* The GNU C library defines this for functions which it implements
15708     to always fail with ENOSYS.  Some functions are actually named
15709     something starting with __ and the normal name is an alias.  */
15710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15711 choke me
15712 #else
15713 f = $ac_func;
15714 #endif
15715
15716 ; return 0; }
15717 EOF
15718 if { (eval echo configure:15719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15719   rm -rf conftest*
15720   eval "ac_cv_func_$ac_func=yes"
15721 else
15722   echo "configure: failed program was:" >&5
15723   cat conftest.$ac_ext >&5
15724   rm -rf conftest*
15725   eval "ac_cv_func_$ac_func=no"
15726 fi
15727 rm -f conftest*
15728 fi
15729
15730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15731   echo "$ac_t""yes" 1>&6
15732     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15733   cat >> confdefs.h <<EOF
15734 #define $ac_tr_func 1
15735 EOF
15736  
15737 else
15738   echo "$ac_t""no" 1>&6
15739 fi
15740 done
15741
15742                 fi
15743         fi
15744
15745                 for ac_hdr in lwp/lwp.h
15746 do
15747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15749 echo "configure:15750: checking for $ac_hdr" >&5
15750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15751   echo $ac_n "(cached) $ac_c" 1>&6
15752 else
15753   cat > conftest.$ac_ext <<EOF
15754 #line 15755 "configure"
15755 #include "confdefs.h"
15756 #include <$ac_hdr>
15757 EOF
15758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15759 { (eval echo configure:15760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15761 if test -z "$ac_err"; then
15762   rm -rf conftest*
15763   eval "ac_cv_header_$ac_safe=yes"
15764 else
15765   echo "$ac_err" >&5
15766   echo "configure: failed program was:" >&5
15767   cat conftest.$ac_ext >&5
15768   rm -rf conftest*
15769   eval "ac_cv_header_$ac_safe=no"
15770 fi
15771 rm -f conftest*
15772 fi
15773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15774   echo "$ac_t""yes" 1>&6
15775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15776   cat >> confdefs.h <<EOF
15777 #define $ac_tr_hdr 1
15778 EOF
15779  
15780 else
15781   echo "$ac_t""no" 1>&6
15782 fi
15783 done
15784
15785         if test $ac_cv_header_lwp_lwp_h = yes ; then
15786                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15787 echo "configure:15788: checking for lwp_create in -llwp" >&5
15788 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15790   echo $ac_n "(cached) $ac_c" 1>&6
15791 else
15792   ac_save_LIBS="$LIBS"
15793 LIBS="-llwp  $LIBS"
15794 cat > conftest.$ac_ext <<EOF
15795 #line 15796 "configure"
15796 #include "confdefs.h"
15797 /* Override any gcc2 internal prototype to avoid an error.  */
15798 /* We use char because int might match the return type of a gcc2
15799     builtin and then its argument prototype would still apply.  */
15800 char lwp_create();
15801
15802 int main() {
15803 lwp_create()
15804 ; return 0; }
15805 EOF
15806 if { (eval echo configure:15807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15807   rm -rf conftest*
15808   eval "ac_cv_lib_$ac_lib_var=yes"
15809 else
15810   echo "configure: failed program was:" >&5
15811   cat conftest.$ac_ext >&5
15812   rm -rf conftest*
15813   eval "ac_cv_lib_$ac_lib_var=no"
15814 fi
15815 rm -f conftest*
15816 LIBS="$ac_save_LIBS"
15817
15818 fi
15819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15820   echo "$ac_t""yes" 1>&6
15821   have_lwp=yes
15822 else
15823   echo "$ac_t""no" 1>&6
15824 have_lwp=no
15825 fi
15826
15827
15828                 if test $have_lwp = yes ; then
15829                         cat >> confdefs.h <<\EOF
15830 #define HAVE_LWP 1
15831 EOF
15832
15833                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15834                         ol_link_threads=lwp
15835
15836                         if test $ol_with_yielding_select = auto ; then
15837                                 ol_with_yielding_select=no
15838                         fi
15839                 fi
15840         fi
15841 fi
15842
15843 if test $ol_with_yielding_select = yes ; then
15844         cat >> confdefs.h <<\EOF
15845 #define HAVE_YIELDING_SELECT 1
15846 EOF
15847
15848 fi
15849
15850 if test $ol_with_threads = manual ; then
15851                 ol_link_threads=yes
15852
15853         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15854
15855         for ac_hdr in pthread.h sched.h
15856 do
15857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15859 echo "configure:15860: checking for $ac_hdr" >&5
15860 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15861   echo $ac_n "(cached) $ac_c" 1>&6
15862 else
15863   cat > conftest.$ac_ext <<EOF
15864 #line 15865 "configure"
15865 #include "confdefs.h"
15866 #include <$ac_hdr>
15867 EOF
15868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15869 { (eval echo configure:15870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15871 if test -z "$ac_err"; then
15872   rm -rf conftest*
15873   eval "ac_cv_header_$ac_safe=yes"
15874 else
15875   echo "$ac_err" >&5
15876   echo "configure: failed program was:" >&5
15877   cat conftest.$ac_ext >&5
15878   rm -rf conftest*
15879   eval "ac_cv_header_$ac_safe=no"
15880 fi
15881 rm -f conftest*
15882 fi
15883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15884   echo "$ac_t""yes" 1>&6
15885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15886   cat >> confdefs.h <<EOF
15887 #define $ac_tr_hdr 1
15888 EOF
15889  
15890 else
15891   echo "$ac_t""no" 1>&6
15892 fi
15893 done
15894
15895         for ac_func in sched_yield pthread_yield
15896 do
15897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15898 echo "configure:15899: checking for $ac_func" >&5
15899 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15900   echo $ac_n "(cached) $ac_c" 1>&6
15901 else
15902   cat > conftest.$ac_ext <<EOF
15903 #line 15904 "configure"
15904 #include "confdefs.h"
15905 /* System header to define __stub macros and hopefully few prototypes,
15906     which can conflict with char $ac_func(); below.  */
15907 #include <assert.h>
15908 /* Override any gcc2 internal prototype to avoid an error.  */
15909 /* We use char because int might match the return type of a gcc2
15910     builtin and then its argument prototype would still apply.  */
15911 char $ac_func();
15912 char (*f)();
15913
15914 int main() {
15915
15916 /* The GNU C library defines this for functions which it implements
15917     to always fail with ENOSYS.  Some functions are actually named
15918     something starting with __ and the normal name is an alias.  */
15919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15920 choke me
15921 #else
15922 f = $ac_func;
15923 #endif
15924
15925 ; return 0; }
15926 EOF
15927 if { (eval echo configure:15928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15928   rm -rf conftest*
15929   eval "ac_cv_func_$ac_func=yes"
15930 else
15931   echo "configure: failed program was:" >&5
15932   cat conftest.$ac_ext >&5
15933   rm -rf conftest*
15934   eval "ac_cv_func_$ac_func=no"
15935 fi
15936 rm -f conftest*
15937 fi
15938
15939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15940   echo "$ac_t""yes" 1>&6
15941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15942   cat >> confdefs.h <<EOF
15943 #define $ac_tr_func 1
15944 EOF
15945  
15946 else
15947   echo "$ac_t""no" 1>&6
15948 fi
15949 done
15950
15951         
15952         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15953 echo "configure:15954: checking for LinuxThreads pthread.h" >&5
15954 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15955   echo $ac_n "(cached) $ac_c" 1>&6
15956 else
15957   cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 #include <pthread.h>
15961 EOF
15962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15963   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15964   rm -rf conftest*
15965   ol_cv_header_linux_threads=yes
15966 else
15967   rm -rf conftest*
15968   ol_cv_header_linux_threads=no
15969 fi
15970 rm -f conftest*
15971
15972                 
15973 fi
15974
15975 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15976         if test $ol_cv_header_linux_threads = yes; then
15977                 cat >> confdefs.h <<\EOF
15978 #define HAVE_LINUX_THREADS 1
15979 EOF
15980
15981         fi
15982
15983
15984         for ac_hdr in mach/cthreads.h
15985 do
15986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15988 echo "configure:15989: checking for $ac_hdr" >&5
15989 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15990   echo $ac_n "(cached) $ac_c" 1>&6
15991 else
15992   cat > conftest.$ac_ext <<EOF
15993 #line 15994 "configure"
15994 #include "confdefs.h"
15995 #include <$ac_hdr>
15996 EOF
15997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15998 { (eval echo configure:15999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16000 if test -z "$ac_err"; then
16001   rm -rf conftest*
16002   eval "ac_cv_header_$ac_safe=yes"
16003 else
16004   echo "$ac_err" >&5
16005   echo "configure: failed program was:" >&5
16006   cat conftest.$ac_ext >&5
16007   rm -rf conftest*
16008   eval "ac_cv_header_$ac_safe=no"
16009 fi
16010 rm -f conftest*
16011 fi
16012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16013   echo "$ac_t""yes" 1>&6
16014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16015   cat >> confdefs.h <<EOF
16016 #define $ac_tr_hdr 1
16017 EOF
16018  
16019 else
16020   echo "$ac_t""no" 1>&6
16021 fi
16022 done
16023
16024         for ac_hdr in lwp/lwp.h
16025 do
16026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16028 echo "configure:16029: checking for $ac_hdr" >&5
16029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16030   echo $ac_n "(cached) $ac_c" 1>&6
16031 else
16032   cat > conftest.$ac_ext <<EOF
16033 #line 16034 "configure"
16034 #include "confdefs.h"
16035 #include <$ac_hdr>
16036 EOF
16037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16038 { (eval echo configure:16039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16040 if test -z "$ac_err"; then
16041   rm -rf conftest*
16042   eval "ac_cv_header_$ac_safe=yes"
16043 else
16044   echo "$ac_err" >&5
16045   echo "configure: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   rm -rf conftest*
16048   eval "ac_cv_header_$ac_safe=no"
16049 fi
16050 rm -f conftest*
16051 fi
16052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16053   echo "$ac_t""yes" 1>&6
16054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16055   cat >> confdefs.h <<EOF
16056 #define $ac_tr_hdr 1
16057 EOF
16058  
16059 else
16060   echo "$ac_t""no" 1>&6
16061 fi
16062 done
16063
16064         for ac_hdr in thread.h synch.h
16065 do
16066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16068 echo "configure:16069: checking for $ac_hdr" >&5
16069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16070   echo $ac_n "(cached) $ac_c" 1>&6
16071 else
16072   cat > conftest.$ac_ext <<EOF
16073 #line 16074 "configure"
16074 #include "confdefs.h"
16075 #include <$ac_hdr>
16076 EOF
16077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16078 { (eval echo configure:16079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16080 if test -z "$ac_err"; then
16081   rm -rf conftest*
16082   eval "ac_cv_header_$ac_safe=yes"
16083 else
16084   echo "$ac_err" >&5
16085   echo "configure: failed program was:" >&5
16086   cat conftest.$ac_ext >&5
16087   rm -rf conftest*
16088   eval "ac_cv_header_$ac_safe=no"
16089 fi
16090 rm -f conftest*
16091 fi
16092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16093   echo "$ac_t""yes" 1>&6
16094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16095   cat >> confdefs.h <<EOF
16096 #define $ac_tr_hdr 1
16097 EOF
16098  
16099 else
16100   echo "$ac_t""no" 1>&6
16101 fi
16102 done
16103
16104 fi
16105
16106 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16107                         cat >> confdefs.h <<\EOF
16108 #define REENTRANT 1
16109 EOF
16110
16111         cat >> confdefs.h <<\EOF
16112 #define _REENTRANT 1
16113 EOF
16114
16115         cat >> confdefs.h <<\EOF
16116 #define THREAD_SAFE 1
16117 EOF
16118
16119         cat >> confdefs.h <<\EOF
16120 #define _THREAD_SAFE 1
16121 EOF
16122
16123         cat >> confdefs.h <<\EOF
16124 #define THREADSAFE 1
16125 EOF
16126
16127         cat >> confdefs.h <<\EOF
16128 #define _THREADSAFE 1
16129 EOF
16130
16131         cat >> confdefs.h <<\EOF
16132 #define _SGI_MP_SOURCE 1
16133 EOF
16134
16135
16136                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16137 echo "configure:16138: checking for thread specific errno" >&5
16138 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16139   echo $ac_n "(cached) $ac_c" 1>&6
16140 else
16141   
16142                 cat > conftest.$ac_ext <<EOF
16143 #line 16144 "configure"
16144 #include "confdefs.h"
16145 #include <errno.h>
16146 int main() {
16147 errno = 0;
16148 ; return 0; }
16149 EOF
16150 if { (eval echo configure:16151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16151   rm -rf conftest*
16152   ol_cv_errno_thread_specific=yes
16153 else
16154   echo "configure: failed program was:" >&5
16155   cat conftest.$ac_ext >&5
16156   rm -rf conftest*
16157   ol_cv_errno_thread_specific=no
16158 fi
16159 rm -f conftest*
16160         
16161 fi
16162
16163 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16164
16165                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16166 echo "configure:16167: checking for thread specific h_errno" >&5
16167 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16168   echo $ac_n "(cached) $ac_c" 1>&6
16169 else
16170   
16171                 cat > conftest.$ac_ext <<EOF
16172 #line 16173 "configure"
16173 #include "confdefs.h"
16174 #include <netdb.h>
16175 int main() {
16176 h_errno = 0;
16177 ; return 0; }
16178 EOF
16179 if { (eval echo configure:16180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16180   rm -rf conftest*
16181   ol_cv_h_errno_thread_specific=yes
16182 else
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   ol_cv_h_errno_thread_specific=no
16187 fi
16188 rm -f conftest*
16189         
16190 fi
16191
16192 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16193
16194         if test $ol_cv_errno_thread_specific != yes \
16195                 -o $ol_cv_h_errno_thread_specific != yes ; then
16196                 LIBS="$LTHREAD_LIBS $LIBS"
16197                 LTHREAD_LIBS=""
16198         fi
16199
16200 fi  
16201
16202 if test $ol_link_threads = no ; then
16203         if test $ol_with_threads = yes ; then
16204                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16205         fi
16206
16207         if test $ol_with_threads = auto ; then
16208                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16209                 ol_with_threads=no
16210         fi
16211
16212         cat >> confdefs.h <<\EOF
16213 #define NO_THREADS 1
16214 EOF
16215
16216         LTHREAD_LIBS=""
16217 fi
16218
16219 if test $ol_link_threads != no ; then
16220         cat >> confdefs.h <<\EOF
16221 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16222 EOF
16223
16224 fi
16225
16226 for ac_func in \
16227         ctime_r                 \
16228         gethostbyname_r gethostbyaddr_r \
16229
16230 do
16231 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16232 echo "configure:16233: checking for $ac_func" >&5
16233 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16234   echo $ac_n "(cached) $ac_c" 1>&6
16235 else
16236   cat > conftest.$ac_ext <<EOF
16237 #line 16238 "configure"
16238 #include "confdefs.h"
16239 /* System header to define __stub macros and hopefully few prototypes,
16240     which can conflict with char $ac_func(); below.  */
16241 #include <assert.h>
16242 /* Override any gcc2 internal prototype to avoid an error.  */
16243 /* We use char because int might match the return type of a gcc2
16244     builtin and then its argument prototype would still apply.  */
16245 char $ac_func();
16246 char (*f)();
16247
16248 int main() {
16249
16250 /* The GNU C library defines this for functions which it implements
16251     to always fail with ENOSYS.  Some functions are actually named
16252     something starting with __ and the normal name is an alias.  */
16253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16254 choke me
16255 #else
16256 f = $ac_func;
16257 #endif
16258
16259 ; return 0; }
16260 EOF
16261 if { (eval echo configure:16262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16262   rm -rf conftest*
16263   eval "ac_cv_func_$ac_func=yes"
16264 else
16265   echo "configure: failed program was:" >&5
16266   cat conftest.$ac_ext >&5
16267   rm -rf conftest*
16268   eval "ac_cv_func_$ac_func=no"
16269 fi
16270 rm -f conftest*
16271 fi
16272
16273 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16274   echo "$ac_t""yes" 1>&6
16275     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16276   cat >> confdefs.h <<EOF
16277 #define $ac_tr_func 1
16278 EOF
16279  
16280 else
16281   echo "$ac_t""no" 1>&6
16282 fi
16283 done
16284
16285
16286 if test "$ac_cv_func_ctime_r" = no ; then
16287         ol_cv_func_ctime_r_nargs=0
16288 else
16289         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16290 echo "configure:16291: checking number of arguments of ctime_r" >&5
16291 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16292   echo $ac_n "(cached) $ac_c" 1>&6
16293 else
16294   cat > conftest.$ac_ext <<EOF
16295 #line 16296 "configure"
16296 #include "confdefs.h"
16297 #include <time.h>
16298 int main() {
16299 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16300 ; return 0; }
16301 EOF
16302 if { (eval echo configure:16303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16303   rm -rf conftest*
16304   ol_cv_func_ctime_r_nargs3=yes
16305 else
16306   echo "configure: failed program was:" >&5
16307   cat conftest.$ac_ext >&5
16308   rm -rf conftest*
16309   ol_cv_func_ctime_r_nargs3=no
16310 fi
16311 rm -f conftest*
16312
16313         cat > conftest.$ac_ext <<EOF
16314 #line 16315 "configure"
16315 #include "confdefs.h"
16316 #include <time.h>
16317 int main() {
16318 time_t ti; char *buffer; ctime_r(&ti,buffer);
16319 ; return 0; }
16320 EOF
16321 if { (eval echo configure:16322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16322   rm -rf conftest*
16323   ol_cv_func_ctime_r_nargs2=yes
16324 else
16325   echo "configure: failed program was:" >&5
16326   cat conftest.$ac_ext >&5
16327   rm -rf conftest*
16328   ol_cv_func_ctime_r_nargs2=no
16329 fi
16330 rm -f conftest*
16331
16332         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16333                 $ol_cv_func_ctime_r_nargs2 = no ; then
16334
16335                 ol_cv_func_ctime_r_nargs=3
16336
16337         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16338                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16339
16340                 ol_cv_func_ctime_r_nargs=2
16341
16342         else
16343                 ol_cv_func_ctime_r_nargs=0
16344         fi
16345   
16346 fi
16347
16348 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16349
16350   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16351         cat >> confdefs.h <<EOF
16352 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16353 EOF
16354
16355   fi
16356
16357 fi
16358
16359 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16360         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16361 echo "configure:16362: checking number of arguments of gethostbyname_r" >&5
16362 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16363   echo $ac_n "(cached) $ac_c" 1>&6
16364 else
16365   cat > conftest.$ac_ext <<EOF
16366 #line 16367 "configure"
16367 #include "confdefs.h"
16368 #include <sys/types.h>
16369 #include <sys/socket.h>
16370 #include <netinet/in.h>
16371 #include <netdb.h>
16372 #define BUFSIZE (sizeof(struct hostent)+10)
16373 int main() {
16374 struct hostent hent; char buffer[BUFSIZE];
16375                 int bufsize=BUFSIZE;int h_errno;
16376                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16377                         buffer, bufsize, &h_errno);
16378 ; return 0; }
16379 EOF
16380 if { (eval echo configure:16381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16381   rm -rf conftest*
16382   ol_cv_func_gethostbyname_r_nargs5=yes
16383 else
16384   echo "configure: failed program was:" >&5
16385   cat conftest.$ac_ext >&5
16386   rm -rf conftest*
16387   ol_cv_func_gethostbyname_r_nargs5=no
16388 fi
16389 rm -f conftest*
16390
16391         cat > conftest.$ac_ext <<EOF
16392 #line 16393 "configure"
16393 #include "confdefs.h"
16394 #include <sys/types.h>
16395 #include <sys/socket.h>
16396 #include <netinet/in.h>
16397 #include <netdb.h>
16398 #define BUFSIZE (sizeof(struct hostent)+10)
16399 int main() {
16400 struct hostent hent;struct hostent *rhent;
16401                 char buffer[BUFSIZE];
16402                 int bufsize=BUFSIZE;int h_errno;
16403                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16404                         &rhent, &h_errno);
16405 ; return 0; }
16406 EOF
16407 if { (eval echo configure:16408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16408   rm -rf conftest*
16409   ol_cv_func_gethostbyname_r_nargs6=yes
16410 else
16411   echo "configure: failed program was:" >&5
16412   cat conftest.$ac_ext >&5
16413   rm -rf conftest*
16414   ol_cv_func_gethostbyname_r_nargs6=no
16415 fi
16416 rm -f conftest*
16417
16418         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16419                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16420
16421                 ol_cv_func_gethostbyname_r_nargs=5
16422
16423         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16424                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16425
16426                 ol_cv_func_gethostbyname_r_nargs=6
16427
16428         else
16429                 ol_cv_func_gethostbyname_r_nargs=0
16430         fi
16431   
16432 fi
16433
16434 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16435   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16436         cat >> confdefs.h <<EOF
16437 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16438 EOF
16439
16440   fi
16441
16442 else
16443         ol_cv_func_gethostbyname_r_nargs=0
16444 fi
16445  
16446 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16447         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16448 echo "configure:16449: checking number of arguments of gethostbyaddr_r" >&5
16449 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16450   echo $ac_n "(cached) $ac_c" 1>&6
16451 else
16452   cat > conftest.$ac_ext <<EOF
16453 #line 16454 "configure"
16454 #include "confdefs.h"
16455 #include <sys/types.h>
16456 #include <sys/socket.h>
16457 #include <netinet/in.h>
16458 #include <netdb.h>
16459 #define BUFSIZE (sizeof(struct hostent)+10)
16460 int main() {
16461 struct hostent hent; char buffer[BUFSIZE]; 
16462             struct in_addr add;
16463             size_t alen=sizeof(struct in_addr);
16464             int bufsize=BUFSIZE;int h_errno;
16465                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16466                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16467 ; return 0; }
16468 EOF
16469 if { (eval echo configure:16470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16470   rm -rf conftest*
16471   ol_cv_func_gethostbyaddr_r_nargs7=yes
16472 else
16473   echo "configure: failed program was:" >&5
16474   cat conftest.$ac_ext >&5
16475   rm -rf conftest*
16476   ol_cv_func_gethostbyaddr_r_nargs7=no
16477 fi
16478 rm -f conftest*
16479
16480         cat > conftest.$ac_ext <<EOF
16481 #line 16482 "configure"
16482 #include "confdefs.h"
16483 #include <sys/types.h>
16484 #include <sys/socket.h>
16485 #include <netinet/in.h>
16486 #include <netdb.h>
16487 #define BUFSIZE (sizeof(struct hostent)+10)
16488 int main() {
16489 struct hostent hent;
16490                 struct hostent *rhent; char buffer[BUFSIZE]; 
16491                 struct in_addr add;
16492                 size_t alen=sizeof(struct in_addr);
16493                 int bufsize=BUFSIZE;int h_errno;
16494                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16495                         alen, AF_INET, &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_gethostbyaddr_r_nargs8=yes
16502 else
16503   echo "configure: failed program was:" >&5
16504   cat conftest.$ac_ext >&5
16505   rm -rf conftest*
16506   ol_cv_func_gethostbyaddr_r_nargs8=no
16507 fi
16508 rm -f conftest*
16509
16510         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16511                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16512
16513                 ol_cv_func_gethostbyaddr_r_nargs=7
16514
16515         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16516                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16517
16518                 ol_cv_func_gethostbyaddr_r_nargs=8
16519
16520         else
16521                 ol_cv_func_gethostbyaddr_r_nargs=0
16522         fi
16523   
16524 fi
16525
16526 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16527   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16528     cat >> confdefs.h <<EOF
16529 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16530 EOF
16531
16532   fi
16533
16534 else
16535         ol_cv_func_gethostbyaddr_r_nargs=0
16536 fi
16537
16538 ol_link_ldbm=no 
16539
16540 if test $ol_with_ldbm_api = auto \
16541         -o $ol_with_ldbm_api = berkeley \
16542         -o $ol_with_ldbm_api = bcompat ; then
16543
16544         if test $ol_with_ldbm_api = bcompat; then \
16545                 for ac_hdr in db_185.h db.h
16546 do
16547 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16548 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16549 echo "configure:16550: checking for $ac_hdr" >&5
16550 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16551   echo $ac_n "(cached) $ac_c" 1>&6
16552 else
16553   cat > conftest.$ac_ext <<EOF
16554 #line 16555 "configure"
16555 #include "confdefs.h"
16556 #include <$ac_hdr>
16557 EOF
16558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16559 { (eval echo configure:16560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16561 if test -z "$ac_err"; then
16562   rm -rf conftest*
16563   eval "ac_cv_header_$ac_safe=yes"
16564 else
16565   echo "$ac_err" >&5
16566   echo "configure: failed program was:" >&5
16567   cat conftest.$ac_ext >&5
16568   rm -rf conftest*
16569   eval "ac_cv_header_$ac_safe=no"
16570 fi
16571 rm -f conftest*
16572 fi
16573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16574   echo "$ac_t""yes" 1>&6
16575     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16576   cat >> confdefs.h <<EOF
16577 #define $ac_tr_hdr 1
16578 EOF
16579  
16580 else
16581   echo "$ac_t""no" 1>&6
16582 fi
16583 done
16584
16585 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16586         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16587 echo "configure:16588: checking if Berkeley DB header compatibility" >&5
16588 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16589   echo $ac_n "(cached) $ac_c" 1>&6
16590 else
16591   
16592                 cat > conftest.$ac_ext <<EOF
16593 #line 16594 "configure"
16594 #include "confdefs.h"
16595
16596 #if HAVE_DB_185_H
16597 #       include <db_185.h>
16598 #else
16599 #       include <db.h>
16600 #endif
16601
16602  /* this check could be improved */
16603 #ifndef DB_VERSION_MAJOR
16604 #       define DB_VERSION_MAJOR 1
16605 #endif
16606
16607 #if DB_VERSION_MAJOR == 1 
16608         __db_version_1
16609 #endif
16610
16611 EOF
16612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16613   egrep "__db_version_1" >/dev/null 2>&1; then
16614   rm -rf conftest*
16615   ol_cv_header_db1=yes
16616 else
16617   rm -rf conftest*
16618   ol_cv_header_db1=no
16619 fi
16620 rm -f conftest*
16621
16622 fi
16623
16624 echo "$ac_t""$ol_cv_header_db1" 1>&6
16625
16626         if test $ol_cv_header_db1 = yes ; then
16627                 ol_cv_lib_db=no
16628 if test $ol_cv_lib_db = no ; then
16629         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16630 echo "configure:16631: checking for Berkeley DB link (default)" >&5
16631 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16632   echo $ac_n "(cached) $ac_c" 1>&6
16633 else
16634   
16635         ol_DB_LIB=
16636         ol_LIBS=$LIBS
16637         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16638
16639         cat > conftest.$ac_ext <<EOF
16640 #line 16641 "configure"
16641 #include "confdefs.h"
16642
16643 #ifdef HAVE_DB_185_H
16644 # include <db_185.h>
16645 #else
16646 # include <db.h>
16647 #endif
16648
16649 #ifndef DB_VERSION_MAJOR
16650 # define DB_VERSION_MAJOR 1
16651 #endif
16652
16653 #ifndef NULL
16654 #define NULL ((void*)0)
16655 #endif
16656
16657 int main() {
16658
16659 #if DB_VERSION_MAJOR > 1
16660         {
16661                 char *version;
16662                 int major, minor, patch;
16663
16664                 version = db_version( &major, &minor, &patch );
16665
16666                 if( major != DB_VERSION_MAJOR ||
16667                         minor < DB_VERSION_MINOR )
16668                 {
16669                         printf("Berkeley DB version mismatch\n"
16670                                 "\texpected: %s\n\tgot: %s\n",
16671                                 DB_VERSION_STRING, version);
16672                         return 1;
16673                 }
16674         }
16675 #endif
16676
16677 #if DB_VERSION_MAJOR > 2
16678         db_env_create( NULL, 0 );
16679 #elif DB_VERSION_MAJOR > 1
16680         db_appexit( NULL );
16681 #else
16682         (void) dbopen( NULL, 0, 0, 0, NULL);
16683 #endif
16684
16685 ; return 0; }
16686 EOF
16687 if { (eval echo configure:16688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16688   rm -rf conftest*
16689   ol_cv_db_none=yes
16690 else
16691   echo "configure: failed program was:" >&5
16692   cat conftest.$ac_ext >&5
16693   rm -rf conftest*
16694   ol_cv_db_none=no
16695 fi
16696 rm -f conftest*
16697
16698         LIBS="$ol_LIBS"
16699
16700 fi
16701
16702 echo "$ac_t""$ol_cv_db_none" 1>&6
16703
16704         if test $ol_cv_db_none = yes ; then
16705                 ol_cv_lib_db=yes
16706         fi
16707 fi
16708
16709 if test $ol_cv_lib_db = no ; then
16710         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16711 echo "configure:16712: checking for Berkeley DB link (-ldb41)" >&5
16712 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16713   echo $ac_n "(cached) $ac_c" 1>&6
16714 else
16715   
16716         ol_DB_LIB=-ldb41
16717         ol_LIBS=$LIBS
16718         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16719
16720         cat > conftest.$ac_ext <<EOF
16721 #line 16722 "configure"
16722 #include "confdefs.h"
16723
16724 #ifdef HAVE_DB_185_H
16725 # include <db_185.h>
16726 #else
16727 # include <db.h>
16728 #endif
16729
16730 #ifndef DB_VERSION_MAJOR
16731 # define DB_VERSION_MAJOR 1
16732 #endif
16733
16734 #ifndef NULL
16735 #define NULL ((void*)0)
16736 #endif
16737
16738 int main() {
16739
16740 #if DB_VERSION_MAJOR > 1
16741         {
16742                 char *version;
16743                 int major, minor, patch;
16744
16745                 version = db_version( &major, &minor, &patch );
16746
16747                 if( major != DB_VERSION_MAJOR ||
16748                         minor < DB_VERSION_MINOR )
16749                 {
16750                         printf("Berkeley DB version mismatch\n"
16751                                 "\texpected: %s\n\tgot: %s\n",
16752                                 DB_VERSION_STRING, version);
16753                         return 1;
16754                 }
16755         }
16756 #endif
16757
16758 #if DB_VERSION_MAJOR > 2
16759         db_env_create( NULL, 0 );
16760 #elif DB_VERSION_MAJOR > 1
16761         db_appexit( NULL );
16762 #else
16763         (void) dbopen( NULL, 0, 0, 0, NULL);
16764 #endif
16765
16766 ; return 0; }
16767 EOF
16768 if { (eval echo configure:16769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16769   rm -rf conftest*
16770   ol_cv_db_db41=yes
16771 else
16772   echo "configure: failed program was:" >&5
16773   cat conftest.$ac_ext >&5
16774   rm -rf conftest*
16775   ol_cv_db_db41=no
16776 fi
16777 rm -f conftest*
16778
16779         LIBS="$ol_LIBS"
16780
16781 fi
16782
16783 echo "$ac_t""$ol_cv_db_db41" 1>&6
16784
16785         if test $ol_cv_db_db41 = yes ; then
16786                 ol_cv_lib_db=-ldb41
16787         fi
16788 fi
16789
16790 if test $ol_cv_lib_db = no ; then
16791         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16792 echo "configure:16793: checking for Berkeley DB link (-ldb-41)" >&5
16793 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16794   echo $ac_n "(cached) $ac_c" 1>&6
16795 else
16796   
16797         ol_DB_LIB=-ldb-41
16798         ol_LIBS=$LIBS
16799         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16800
16801         cat > conftest.$ac_ext <<EOF
16802 #line 16803 "configure"
16803 #include "confdefs.h"
16804
16805 #ifdef HAVE_DB_185_H
16806 # include <db_185.h>
16807 #else
16808 # include <db.h>
16809 #endif
16810
16811 #ifndef DB_VERSION_MAJOR
16812 # define DB_VERSION_MAJOR 1
16813 #endif
16814
16815 #ifndef NULL
16816 #define NULL ((void*)0)
16817 #endif
16818
16819 int main() {
16820
16821 #if DB_VERSION_MAJOR > 1
16822         {
16823                 char *version;
16824                 int major, minor, patch;
16825
16826                 version = db_version( &major, &minor, &patch );
16827
16828                 if( major != DB_VERSION_MAJOR ||
16829                         minor < DB_VERSION_MINOR )
16830                 {
16831                         printf("Berkeley DB version mismatch\n"
16832                                 "\texpected: %s\n\tgot: %s\n",
16833                                 DB_VERSION_STRING, version);
16834                         return 1;
16835                 }
16836         }
16837 #endif
16838
16839 #if DB_VERSION_MAJOR > 2
16840         db_env_create( NULL, 0 );
16841 #elif DB_VERSION_MAJOR > 1
16842         db_appexit( NULL );
16843 #else
16844         (void) dbopen( NULL, 0, 0, 0, NULL);
16845 #endif
16846
16847 ; return 0; }
16848 EOF
16849 if { (eval echo configure:16850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16850   rm -rf conftest*
16851   ol_cv_db_db_41=yes
16852 else
16853   echo "configure: failed program was:" >&5
16854   cat conftest.$ac_ext >&5
16855   rm -rf conftest*
16856   ol_cv_db_db_41=no
16857 fi
16858 rm -f conftest*
16859
16860         LIBS="$ol_LIBS"
16861
16862 fi
16863
16864 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16865
16866         if test $ol_cv_db_db_41 = yes ; then
16867                 ol_cv_lib_db=-ldb-41
16868         fi
16869 fi
16870
16871 if test $ol_cv_lib_db = no ; then
16872         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16873 echo "configure:16874: checking for Berkeley DB link (-ldb-4.1)" >&5
16874 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16875   echo $ac_n "(cached) $ac_c" 1>&6
16876 else
16877   
16878         ol_DB_LIB=-ldb-4.1
16879         ol_LIBS=$LIBS
16880         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16881
16882         cat > conftest.$ac_ext <<EOF
16883 #line 16884 "configure"
16884 #include "confdefs.h"
16885
16886 #ifdef HAVE_DB_185_H
16887 # include <db_185.h>
16888 #else
16889 # include <db.h>
16890 #endif
16891
16892 #ifndef DB_VERSION_MAJOR
16893 # define DB_VERSION_MAJOR 1
16894 #endif
16895
16896 #ifndef NULL
16897 #define NULL ((void*)0)
16898 #endif
16899
16900 int main() {
16901
16902 #if DB_VERSION_MAJOR > 1
16903         {
16904                 char *version;
16905                 int major, minor, patch;
16906
16907                 version = db_version( &major, &minor, &patch );
16908
16909                 if( major != DB_VERSION_MAJOR ||
16910                         minor < DB_VERSION_MINOR )
16911                 {
16912                         printf("Berkeley DB version mismatch\n"
16913                                 "\texpected: %s\n\tgot: %s\n",
16914                                 DB_VERSION_STRING, version);
16915                         return 1;
16916                 }
16917         }
16918 #endif
16919
16920 #if DB_VERSION_MAJOR > 2
16921         db_env_create( NULL, 0 );
16922 #elif DB_VERSION_MAJOR > 1
16923         db_appexit( NULL );
16924 #else
16925         (void) dbopen( NULL, 0, 0, 0, NULL);
16926 #endif
16927
16928 ; return 0; }
16929 EOF
16930 if { (eval echo configure:16931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16931   rm -rf conftest*
16932   ol_cv_db_db_4_dot_1=yes
16933 else
16934   echo "configure: failed program was:" >&5
16935   cat conftest.$ac_ext >&5
16936   rm -rf conftest*
16937   ol_cv_db_db_4_dot_1=no
16938 fi
16939 rm -f conftest*
16940
16941         LIBS="$ol_LIBS"
16942
16943 fi
16944
16945 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16946
16947         if test $ol_cv_db_db_4_dot_1 = yes ; then
16948                 ol_cv_lib_db=-ldb-4.1
16949         fi
16950 fi
16951
16952 if test $ol_cv_lib_db = no ; then
16953         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16954 echo "configure:16955: checking for Berkeley DB link (-ldb-4-1)" >&5
16955 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16956   echo $ac_n "(cached) $ac_c" 1>&6
16957 else
16958   
16959         ol_DB_LIB=-ldb-4-1
16960         ol_LIBS=$LIBS
16961         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16962
16963         cat > conftest.$ac_ext <<EOF
16964 #line 16965 "configure"
16965 #include "confdefs.h"
16966
16967 #ifdef HAVE_DB_185_H
16968 # include <db_185.h>
16969 #else
16970 # include <db.h>
16971 #endif
16972
16973 #ifndef DB_VERSION_MAJOR
16974 # define DB_VERSION_MAJOR 1
16975 #endif
16976
16977 #ifndef NULL
16978 #define NULL ((void*)0)
16979 #endif
16980
16981 int main() {
16982
16983 #if DB_VERSION_MAJOR > 1
16984         {
16985                 char *version;
16986                 int major, minor, patch;
16987
16988                 version = db_version( &major, &minor, &patch );
16989
16990                 if( major != DB_VERSION_MAJOR ||
16991                         minor < DB_VERSION_MINOR )
16992                 {
16993                         printf("Berkeley DB version mismatch\n"
16994                                 "\texpected: %s\n\tgot: %s\n",
16995                                 DB_VERSION_STRING, version);
16996                         return 1;
16997                 }
16998         }
16999 #endif
17000
17001 #if DB_VERSION_MAJOR > 2
17002         db_env_create( NULL, 0 );
17003 #elif DB_VERSION_MAJOR > 1
17004         db_appexit( NULL );
17005 #else
17006         (void) dbopen( NULL, 0, 0, 0, NULL);
17007 #endif
17008
17009 ; return 0; }
17010 EOF
17011 if { (eval echo configure:17012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17012   rm -rf conftest*
17013   ol_cv_db_db_4_1=yes
17014 else
17015   echo "configure: failed program was:" >&5
17016   cat conftest.$ac_ext >&5
17017   rm -rf conftest*
17018   ol_cv_db_db_4_1=no
17019 fi
17020 rm -f conftest*
17021
17022         LIBS="$ol_LIBS"
17023
17024 fi
17025
17026 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17027
17028         if test $ol_cv_db_db_4_1 = yes ; then
17029                 ol_cv_lib_db=-ldb-4-1
17030         fi
17031 fi
17032
17033 if test $ol_cv_lib_db = no ; then
17034         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17035 echo "configure:17036: checking for Berkeley DB link (-ldb-4)" >&5
17036 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17037   echo $ac_n "(cached) $ac_c" 1>&6
17038 else
17039   
17040         ol_DB_LIB=-ldb-4
17041         ol_LIBS=$LIBS
17042         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17043
17044         cat > conftest.$ac_ext <<EOF
17045 #line 17046 "configure"
17046 #include "confdefs.h"
17047
17048 #ifdef HAVE_DB_185_H
17049 # include <db_185.h>
17050 #else
17051 # include <db.h>
17052 #endif
17053
17054 #ifndef DB_VERSION_MAJOR
17055 # define DB_VERSION_MAJOR 1
17056 #endif
17057
17058 #ifndef NULL
17059 #define NULL ((void*)0)
17060 #endif
17061
17062 int main() {
17063
17064 #if DB_VERSION_MAJOR > 1
17065         {
17066                 char *version;
17067                 int major, minor, patch;
17068
17069                 version = db_version( &major, &minor, &patch );
17070
17071                 if( major != DB_VERSION_MAJOR ||
17072                         minor < DB_VERSION_MINOR )
17073                 {
17074                         printf("Berkeley DB version mismatch\n"
17075                                 "\texpected: %s\n\tgot: %s\n",
17076                                 DB_VERSION_STRING, version);
17077                         return 1;
17078                 }
17079         }
17080 #endif
17081
17082 #if DB_VERSION_MAJOR > 2
17083         db_env_create( NULL, 0 );
17084 #elif DB_VERSION_MAJOR > 1
17085         db_appexit( NULL );
17086 #else
17087         (void) dbopen( NULL, 0, 0, 0, NULL);
17088 #endif
17089
17090 ; return 0; }
17091 EOF
17092 if { (eval echo configure:17093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17093   rm -rf conftest*
17094   ol_cv_db_db_4=yes
17095 else
17096   echo "configure: failed program was:" >&5
17097   cat conftest.$ac_ext >&5
17098   rm -rf conftest*
17099   ol_cv_db_db_4=no
17100 fi
17101 rm -f conftest*
17102
17103         LIBS="$ol_LIBS"
17104
17105 fi
17106
17107 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17108
17109         if test $ol_cv_db_db_4 = yes ; then
17110                 ol_cv_lib_db=-ldb-4
17111         fi
17112 fi
17113
17114 if test $ol_cv_lib_db = no ; then
17115         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17116 echo "configure:17117: checking for Berkeley DB link (-ldb4)" >&5
17117 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17118   echo $ac_n "(cached) $ac_c" 1>&6
17119 else
17120   
17121         ol_DB_LIB=-ldb4
17122         ol_LIBS=$LIBS
17123         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17124
17125         cat > conftest.$ac_ext <<EOF
17126 #line 17127 "configure"
17127 #include "confdefs.h"
17128
17129 #ifdef HAVE_DB_185_H
17130 # include <db_185.h>
17131 #else
17132 # include <db.h>
17133 #endif
17134
17135 #ifndef DB_VERSION_MAJOR
17136 # define DB_VERSION_MAJOR 1
17137 #endif
17138
17139 #ifndef NULL
17140 #define NULL ((void*)0)
17141 #endif
17142
17143 int main() {
17144
17145 #if DB_VERSION_MAJOR > 1
17146         {
17147                 char *version;
17148                 int major, minor, patch;
17149
17150                 version = db_version( &major, &minor, &patch );
17151
17152                 if( major != DB_VERSION_MAJOR ||
17153                         minor < DB_VERSION_MINOR )
17154                 {
17155                         printf("Berkeley DB version mismatch\n"
17156                                 "\texpected: %s\n\tgot: %s\n",
17157                                 DB_VERSION_STRING, version);
17158                         return 1;
17159                 }
17160         }
17161 #endif
17162
17163 #if DB_VERSION_MAJOR > 2
17164         db_env_create( NULL, 0 );
17165 #elif DB_VERSION_MAJOR > 1
17166         db_appexit( NULL );
17167 #else
17168         (void) dbopen( NULL, 0, 0, 0, NULL);
17169 #endif
17170
17171 ; return 0; }
17172 EOF
17173 if { (eval echo configure:17174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17174   rm -rf conftest*
17175   ol_cv_db_db4=yes
17176 else
17177   echo "configure: failed program was:" >&5
17178   cat conftest.$ac_ext >&5
17179   rm -rf conftest*
17180   ol_cv_db_db4=no
17181 fi
17182 rm -f conftest*
17183
17184         LIBS="$ol_LIBS"
17185
17186 fi
17187
17188 echo "$ac_t""$ol_cv_db_db4" 1>&6
17189
17190         if test $ol_cv_db_db4 = yes ; then
17191                 ol_cv_lib_db=-ldb4
17192         fi
17193 fi
17194
17195 if test $ol_cv_lib_db = no ; then
17196         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17197 echo "configure:17198: checking for Berkeley DB link (-ldb)" >&5
17198 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17199   echo $ac_n "(cached) $ac_c" 1>&6
17200 else
17201   
17202         ol_DB_LIB=-ldb
17203         ol_LIBS=$LIBS
17204         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17205
17206         cat > conftest.$ac_ext <<EOF
17207 #line 17208 "configure"
17208 #include "confdefs.h"
17209
17210 #ifdef HAVE_DB_185_H
17211 # include <db_185.h>
17212 #else
17213 # include <db.h>
17214 #endif
17215
17216 #ifndef DB_VERSION_MAJOR
17217 # define DB_VERSION_MAJOR 1
17218 #endif
17219
17220 #ifndef NULL
17221 #define NULL ((void*)0)
17222 #endif
17223
17224 int main() {
17225
17226 #if DB_VERSION_MAJOR > 1
17227         {
17228                 char *version;
17229                 int major, minor, patch;
17230
17231                 version = db_version( &major, &minor, &patch );
17232
17233                 if( major != DB_VERSION_MAJOR ||
17234                         minor < DB_VERSION_MINOR )
17235                 {
17236                         printf("Berkeley DB version mismatch\n"
17237                                 "\texpected: %s\n\tgot: %s\n",
17238                                 DB_VERSION_STRING, version);
17239                         return 1;
17240                 }
17241         }
17242 #endif
17243
17244 #if DB_VERSION_MAJOR > 2
17245         db_env_create( NULL, 0 );
17246 #elif DB_VERSION_MAJOR > 1
17247         db_appexit( NULL );
17248 #else
17249         (void) dbopen( NULL, 0, 0, 0, NULL);
17250 #endif
17251
17252 ; return 0; }
17253 EOF
17254 if { (eval echo configure:17255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17255   rm -rf conftest*
17256   ol_cv_db_db=yes
17257 else
17258   echo "configure: failed program was:" >&5
17259   cat conftest.$ac_ext >&5
17260   rm -rf conftest*
17261   ol_cv_db_db=no
17262 fi
17263 rm -f conftest*
17264
17265         LIBS="$ol_LIBS"
17266
17267 fi
17268
17269 echo "$ac_t""$ol_cv_db_db" 1>&6
17270
17271         if test $ol_cv_db_db = yes ; then
17272                 ol_cv_lib_db=-ldb
17273         fi
17274 fi
17275
17276 if test $ol_cv_lib_db = no ; then
17277         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17278 echo "configure:17279: checking for Berkeley DB link (-ldb3)" >&5
17279 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17280   echo $ac_n "(cached) $ac_c" 1>&6
17281 else
17282   
17283         ol_DB_LIB=-ldb3
17284         ol_LIBS=$LIBS
17285         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17286
17287         cat > conftest.$ac_ext <<EOF
17288 #line 17289 "configure"
17289 #include "confdefs.h"
17290
17291 #ifdef HAVE_DB_185_H
17292 # include <db_185.h>
17293 #else
17294 # include <db.h>
17295 #endif
17296
17297 #ifndef DB_VERSION_MAJOR
17298 # define DB_VERSION_MAJOR 1
17299 #endif
17300
17301 #ifndef NULL
17302 #define NULL ((void*)0)
17303 #endif
17304
17305 int main() {
17306
17307 #if DB_VERSION_MAJOR > 1
17308         {
17309                 char *version;
17310                 int major, minor, patch;
17311
17312                 version = db_version( &major, &minor, &patch );
17313
17314                 if( major != DB_VERSION_MAJOR ||
17315                         minor < DB_VERSION_MINOR )
17316                 {
17317                         printf("Berkeley DB version mismatch\n"
17318                                 "\texpected: %s\n\tgot: %s\n",
17319                                 DB_VERSION_STRING, version);
17320                         return 1;
17321                 }
17322         }
17323 #endif
17324
17325 #if DB_VERSION_MAJOR > 2
17326         db_env_create( NULL, 0 );
17327 #elif DB_VERSION_MAJOR > 1
17328         db_appexit( NULL );
17329 #else
17330         (void) dbopen( NULL, 0, 0, 0, NULL);
17331 #endif
17332
17333 ; return 0; }
17334 EOF
17335 if { (eval echo configure:17336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17336   rm -rf conftest*
17337   ol_cv_db_db3=yes
17338 else
17339   echo "configure: failed program was:" >&5
17340   cat conftest.$ac_ext >&5
17341   rm -rf conftest*
17342   ol_cv_db_db3=no
17343 fi
17344 rm -f conftest*
17345
17346         LIBS="$ol_LIBS"
17347
17348 fi
17349
17350 echo "$ac_t""$ol_cv_db_db3" 1>&6
17351
17352         if test $ol_cv_db_db3 = yes ; then
17353                 ol_cv_lib_db=-ldb3
17354         fi
17355 fi
17356
17357 if test $ol_cv_lib_db = no ; then
17358         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17359 echo "configure:17360: checking for Berkeley DB link (-ldb-3)" >&5
17360 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17361   echo $ac_n "(cached) $ac_c" 1>&6
17362 else
17363   
17364         ol_DB_LIB=-ldb-3
17365         ol_LIBS=$LIBS
17366         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17367
17368         cat > conftest.$ac_ext <<EOF
17369 #line 17370 "configure"
17370 #include "confdefs.h"
17371
17372 #ifdef HAVE_DB_185_H
17373 # include <db_185.h>
17374 #else
17375 # include <db.h>
17376 #endif
17377
17378 #ifndef DB_VERSION_MAJOR
17379 # define DB_VERSION_MAJOR 1
17380 #endif
17381
17382 #ifndef NULL
17383 #define NULL ((void*)0)
17384 #endif
17385
17386 int main() {
17387
17388 #if DB_VERSION_MAJOR > 1
17389         {
17390                 char *version;
17391                 int major, minor, patch;
17392
17393                 version = db_version( &major, &minor, &patch );
17394
17395                 if( major != DB_VERSION_MAJOR ||
17396                         minor < DB_VERSION_MINOR )
17397                 {
17398                         printf("Berkeley DB version mismatch\n"
17399                                 "\texpected: %s\n\tgot: %s\n",
17400                                 DB_VERSION_STRING, version);
17401                         return 1;
17402                 }
17403         }
17404 #endif
17405
17406 #if DB_VERSION_MAJOR > 2
17407         db_env_create( NULL, 0 );
17408 #elif DB_VERSION_MAJOR > 1
17409         db_appexit( NULL );
17410 #else
17411         (void) dbopen( NULL, 0, 0, 0, NULL);
17412 #endif
17413
17414 ; return 0; }
17415 EOF
17416 if { (eval echo configure:17417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17417   rm -rf conftest*
17418   ol_cv_db_db_3=yes
17419 else
17420   echo "configure: failed program was:" >&5
17421   cat conftest.$ac_ext >&5
17422   rm -rf conftest*
17423   ol_cv_db_db_3=no
17424 fi
17425 rm -f conftest*
17426
17427         LIBS="$ol_LIBS"
17428
17429 fi
17430
17431 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17432
17433         if test $ol_cv_db_db_3 = yes ; then
17434                 ol_cv_lib_db=-ldb-3
17435         fi
17436 fi
17437
17438 if test $ol_cv_lib_db = no ; then
17439         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17440 echo "configure:17441: checking for Berkeley DB link (-ldb2)" >&5
17441 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17442   echo $ac_n "(cached) $ac_c" 1>&6
17443 else
17444   
17445         ol_DB_LIB=-ldb2
17446         ol_LIBS=$LIBS
17447         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17448
17449         cat > conftest.$ac_ext <<EOF
17450 #line 17451 "configure"
17451 #include "confdefs.h"
17452
17453 #ifdef HAVE_DB_185_H
17454 # include <db_185.h>
17455 #else
17456 # include <db.h>
17457 #endif
17458
17459 #ifndef DB_VERSION_MAJOR
17460 # define DB_VERSION_MAJOR 1
17461 #endif
17462
17463 #ifndef NULL
17464 #define NULL ((void*)0)
17465 #endif
17466
17467 int main() {
17468
17469 #if DB_VERSION_MAJOR > 1
17470         {
17471                 char *version;
17472                 int major, minor, patch;
17473
17474                 version = db_version( &major, &minor, &patch );
17475
17476                 if( major != DB_VERSION_MAJOR ||
17477                         minor < DB_VERSION_MINOR )
17478                 {
17479                         printf("Berkeley DB version mismatch\n"
17480                                 "\texpected: %s\n\tgot: %s\n",
17481                                 DB_VERSION_STRING, version);
17482                         return 1;
17483                 }
17484         }
17485 #endif
17486
17487 #if DB_VERSION_MAJOR > 2
17488         db_env_create( NULL, 0 );
17489 #elif DB_VERSION_MAJOR > 1
17490         db_appexit( NULL );
17491 #else
17492         (void) dbopen( NULL, 0, 0, 0, NULL);
17493 #endif
17494
17495 ; return 0; }
17496 EOF
17497 if { (eval echo configure:17498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17498   rm -rf conftest*
17499   ol_cv_db_db2=yes
17500 else
17501   echo "configure: failed program was:" >&5
17502   cat conftest.$ac_ext >&5
17503   rm -rf conftest*
17504   ol_cv_db_db2=no
17505 fi
17506 rm -f conftest*
17507
17508         LIBS="$ol_LIBS"
17509
17510 fi
17511
17512 echo "$ac_t""$ol_cv_db_db2" 1>&6
17513
17514         if test $ol_cv_db_db2 = yes ; then
17515                 ol_cv_lib_db=-ldb2
17516         fi
17517 fi
17518
17519 if test $ol_cv_lib_db = no ; then
17520         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17521 echo "configure:17522: checking for Berkeley DB link (-ldb-2)" >&5
17522 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17523   echo $ac_n "(cached) $ac_c" 1>&6
17524 else
17525   
17526         ol_DB_LIB=-ldb-2
17527         ol_LIBS=$LIBS
17528         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17529
17530         cat > conftest.$ac_ext <<EOF
17531 #line 17532 "configure"
17532 #include "confdefs.h"
17533
17534 #ifdef HAVE_DB_185_H
17535 # include <db_185.h>
17536 #else
17537 # include <db.h>
17538 #endif
17539
17540 #ifndef DB_VERSION_MAJOR
17541 # define DB_VERSION_MAJOR 1
17542 #endif
17543
17544 #ifndef NULL
17545 #define NULL ((void*)0)
17546 #endif
17547
17548 int main() {
17549
17550 #if DB_VERSION_MAJOR > 1
17551         {
17552                 char *version;
17553                 int major, minor, patch;
17554
17555                 version = db_version( &major, &minor, &patch );
17556
17557                 if( major != DB_VERSION_MAJOR ||
17558                         minor < DB_VERSION_MINOR )
17559                 {
17560                         printf("Berkeley DB version mismatch\n"
17561                                 "\texpected: %s\n\tgot: %s\n",
17562                                 DB_VERSION_STRING, version);
17563                         return 1;
17564                 }
17565         }
17566 #endif
17567
17568 #if DB_VERSION_MAJOR > 2
17569         db_env_create( NULL, 0 );
17570 #elif DB_VERSION_MAJOR > 1
17571         db_appexit( NULL );
17572 #else
17573         (void) dbopen( NULL, 0, 0, 0, NULL);
17574 #endif
17575
17576 ; return 0; }
17577 EOF
17578 if { (eval echo configure:17579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17579   rm -rf conftest*
17580   ol_cv_db_db_2=yes
17581 else
17582   echo "configure: failed program was:" >&5
17583   cat conftest.$ac_ext >&5
17584   rm -rf conftest*
17585   ol_cv_db_db_2=no
17586 fi
17587 rm -f conftest*
17588
17589         LIBS="$ol_LIBS"
17590
17591 fi
17592
17593 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17594
17595         if test $ol_cv_db_db_2 = yes ; then
17596                 ol_cv_lib_db=-ldb-2
17597         fi
17598 fi
17599
17600 if test $ol_cv_lib_db = no ; then
17601         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17602 echo "configure:17603: checking for Berkeley DB link (-ldb1)" >&5
17603 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17604   echo $ac_n "(cached) $ac_c" 1>&6
17605 else
17606   
17607         ol_DB_LIB=-ldb1
17608         ol_LIBS=$LIBS
17609         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17610
17611         cat > conftest.$ac_ext <<EOF
17612 #line 17613 "configure"
17613 #include "confdefs.h"
17614
17615 #ifdef HAVE_DB_185_H
17616 # include <db_185.h>
17617 #else
17618 # include <db.h>
17619 #endif
17620
17621 #ifndef DB_VERSION_MAJOR
17622 # define DB_VERSION_MAJOR 1
17623 #endif
17624
17625 #ifndef NULL
17626 #define NULL ((void*)0)
17627 #endif
17628
17629 int main() {
17630
17631 #if DB_VERSION_MAJOR > 1
17632         {
17633                 char *version;
17634                 int major, minor, patch;
17635
17636                 version = db_version( &major, &minor, &patch );
17637
17638                 if( major != DB_VERSION_MAJOR ||
17639                         minor < DB_VERSION_MINOR )
17640                 {
17641                         printf("Berkeley DB version mismatch\n"
17642                                 "\texpected: %s\n\tgot: %s\n",
17643                                 DB_VERSION_STRING, version);
17644                         return 1;
17645                 }
17646         }
17647 #endif
17648
17649 #if DB_VERSION_MAJOR > 2
17650         db_env_create( NULL, 0 );
17651 #elif DB_VERSION_MAJOR > 1
17652         db_appexit( NULL );
17653 #else
17654         (void) dbopen( NULL, 0, 0, 0, NULL);
17655 #endif
17656
17657 ; return 0; }
17658 EOF
17659 if { (eval echo configure:17660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17660   rm -rf conftest*
17661   ol_cv_db_db1=yes
17662 else
17663   echo "configure: failed program was:" >&5
17664   cat conftest.$ac_ext >&5
17665   rm -rf conftest*
17666   ol_cv_db_db1=no
17667 fi
17668 rm -f conftest*
17669
17670         LIBS="$ol_LIBS"
17671
17672 fi
17673
17674 echo "$ac_t""$ol_cv_db_db1" 1>&6
17675
17676         if test $ol_cv_db_db1 = yes ; then
17677                 ol_cv_lib_db=-ldb1
17678         fi
17679 fi
17680
17681 if test $ol_cv_lib_db = no ; then
17682         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17683 echo "configure:17684: checking for Berkeley DB link (-ldb-1)" >&5
17684 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17685   echo $ac_n "(cached) $ac_c" 1>&6
17686 else
17687   
17688         ol_DB_LIB=-ldb-1
17689         ol_LIBS=$LIBS
17690         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17691
17692         cat > conftest.$ac_ext <<EOF
17693 #line 17694 "configure"
17694 #include "confdefs.h"
17695
17696 #ifdef HAVE_DB_185_H
17697 # include <db_185.h>
17698 #else
17699 # include <db.h>
17700 #endif
17701
17702 #ifndef DB_VERSION_MAJOR
17703 # define DB_VERSION_MAJOR 1
17704 #endif
17705
17706 #ifndef NULL
17707 #define NULL ((void*)0)
17708 #endif
17709
17710 int main() {
17711
17712 #if DB_VERSION_MAJOR > 1
17713         {
17714                 char *version;
17715                 int major, minor, patch;
17716
17717                 version = db_version( &major, &minor, &patch );
17718
17719                 if( major != DB_VERSION_MAJOR ||
17720                         minor < DB_VERSION_MINOR )
17721                 {
17722                         printf("Berkeley DB version mismatch\n"
17723                                 "\texpected: %s\n\tgot: %s\n",
17724                                 DB_VERSION_STRING, version);
17725                         return 1;
17726                 }
17727         }
17728 #endif
17729
17730 #if DB_VERSION_MAJOR > 2
17731         db_env_create( NULL, 0 );
17732 #elif DB_VERSION_MAJOR > 1
17733         db_appexit( NULL );
17734 #else
17735         (void) dbopen( NULL, 0, 0, 0, NULL);
17736 #endif
17737
17738 ; return 0; }
17739 EOF
17740 if { (eval echo configure:17741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17741   rm -rf conftest*
17742   ol_cv_db_db_1=yes
17743 else
17744   echo "configure: failed program was:" >&5
17745   cat conftest.$ac_ext >&5
17746   rm -rf conftest*
17747   ol_cv_db_db_1=no
17748 fi
17749 rm -f conftest*
17750
17751         LIBS="$ol_LIBS"
17752
17753 fi
17754
17755 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17756
17757         if test $ol_cv_db_db_1 = yes ; then
17758                 ol_cv_lib_db=-ldb-1
17759         fi
17760 fi
17761
17762
17763                 if test "$ol_cv_lib_db" != no ; then
17764                         ol_cv_berkeley_db=yes
17765                 fi
17766         fi
17767 fi
17768
17769         else
17770                 ol_cv_berkeley_db=no
17771 for ac_hdr in db.h
17772 do
17773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17775 echo "configure:17776: checking for $ac_hdr" >&5
17776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17777   echo $ac_n "(cached) $ac_c" 1>&6
17778 else
17779   cat > conftest.$ac_ext <<EOF
17780 #line 17781 "configure"
17781 #include "confdefs.h"
17782 #include <$ac_hdr>
17783 EOF
17784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17785 { (eval echo configure:17786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17787 if test -z "$ac_err"; then
17788   rm -rf conftest*
17789   eval "ac_cv_header_$ac_safe=yes"
17790 else
17791   echo "$ac_err" >&5
17792   echo "configure: failed program was:" >&5
17793   cat conftest.$ac_ext >&5
17794   rm -rf conftest*
17795   eval "ac_cv_header_$ac_safe=no"
17796 fi
17797 rm -f conftest*
17798 fi
17799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17800   echo "$ac_t""yes" 1>&6
17801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17802   cat >> confdefs.h <<EOF
17803 #define $ac_tr_hdr 1
17804 EOF
17805  
17806 else
17807   echo "$ac_t""no" 1>&6
17808 fi
17809 done
17810
17811 if test $ac_cv_header_db_h = yes; then
17812         ol_cv_lib_db=no
17813 if test $ol_cv_lib_db = no ; then
17814         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17815 echo "configure:17816: checking for Berkeley DB link (default)" >&5
17816 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17817   echo $ac_n "(cached) $ac_c" 1>&6
17818 else
17819   
17820         ol_DB_LIB=
17821         ol_LIBS=$LIBS
17822         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17823
17824         cat > conftest.$ac_ext <<EOF
17825 #line 17826 "configure"
17826 #include "confdefs.h"
17827
17828 #ifdef HAVE_DB_185_H
17829 # include <db_185.h>
17830 #else
17831 # include <db.h>
17832 #endif
17833
17834 #ifndef DB_VERSION_MAJOR
17835 # define DB_VERSION_MAJOR 1
17836 #endif
17837
17838 #ifndef NULL
17839 #define NULL ((void*)0)
17840 #endif
17841
17842 int main() {
17843
17844 #if DB_VERSION_MAJOR > 1
17845         {
17846                 char *version;
17847                 int major, minor, patch;
17848
17849                 version = db_version( &major, &minor, &patch );
17850
17851                 if( major != DB_VERSION_MAJOR ||
17852                         minor < DB_VERSION_MINOR )
17853                 {
17854                         printf("Berkeley DB version mismatch\n"
17855                                 "\texpected: %s\n\tgot: %s\n",
17856                                 DB_VERSION_STRING, version);
17857                         return 1;
17858                 }
17859         }
17860 #endif
17861
17862 #if DB_VERSION_MAJOR > 2
17863         db_env_create( NULL, 0 );
17864 #elif DB_VERSION_MAJOR > 1
17865         db_appexit( NULL );
17866 #else
17867         (void) dbopen( NULL, 0, 0, 0, NULL);
17868 #endif
17869
17870 ; return 0; }
17871 EOF
17872 if { (eval echo configure:17873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17873   rm -rf conftest*
17874   ol_cv_db_none=yes
17875 else
17876   echo "configure: failed program was:" >&5
17877   cat conftest.$ac_ext >&5
17878   rm -rf conftest*
17879   ol_cv_db_none=no
17880 fi
17881 rm -f conftest*
17882
17883         LIBS="$ol_LIBS"
17884
17885 fi
17886
17887 echo "$ac_t""$ol_cv_db_none" 1>&6
17888
17889         if test $ol_cv_db_none = yes ; then
17890                 ol_cv_lib_db=yes
17891         fi
17892 fi
17893
17894 if test $ol_cv_lib_db = no ; then
17895         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17896 echo "configure:17897: checking for Berkeley DB link (-ldb41)" >&5
17897 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17898   echo $ac_n "(cached) $ac_c" 1>&6
17899 else
17900   
17901         ol_DB_LIB=-ldb41
17902         ol_LIBS=$LIBS
17903         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17904
17905         cat > conftest.$ac_ext <<EOF
17906 #line 17907 "configure"
17907 #include "confdefs.h"
17908
17909 #ifdef HAVE_DB_185_H
17910 # include <db_185.h>
17911 #else
17912 # include <db.h>
17913 #endif
17914
17915 #ifndef DB_VERSION_MAJOR
17916 # define DB_VERSION_MAJOR 1
17917 #endif
17918
17919 #ifndef NULL
17920 #define NULL ((void*)0)
17921 #endif
17922
17923 int main() {
17924
17925 #if DB_VERSION_MAJOR > 1
17926         {
17927                 char *version;
17928                 int major, minor, patch;
17929
17930                 version = db_version( &major, &minor, &patch );
17931
17932                 if( major != DB_VERSION_MAJOR ||
17933                         minor < DB_VERSION_MINOR )
17934                 {
17935                         printf("Berkeley DB version mismatch\n"
17936                                 "\texpected: %s\n\tgot: %s\n",
17937                                 DB_VERSION_STRING, version);
17938                         return 1;
17939                 }
17940         }
17941 #endif
17942
17943 #if DB_VERSION_MAJOR > 2
17944         db_env_create( NULL, 0 );
17945 #elif DB_VERSION_MAJOR > 1
17946         db_appexit( NULL );
17947 #else
17948         (void) dbopen( NULL, 0, 0, 0, NULL);
17949 #endif
17950
17951 ; return 0; }
17952 EOF
17953 if { (eval echo configure:17954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17954   rm -rf conftest*
17955   ol_cv_db_db41=yes
17956 else
17957   echo "configure: failed program was:" >&5
17958   cat conftest.$ac_ext >&5
17959   rm -rf conftest*
17960   ol_cv_db_db41=no
17961 fi
17962 rm -f conftest*
17963
17964         LIBS="$ol_LIBS"
17965
17966 fi
17967
17968 echo "$ac_t""$ol_cv_db_db41" 1>&6
17969
17970         if test $ol_cv_db_db41 = yes ; then
17971                 ol_cv_lib_db=-ldb41
17972         fi
17973 fi
17974
17975 if test $ol_cv_lib_db = no ; then
17976         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17977 echo "configure:17978: checking for Berkeley DB link (-ldb-41)" >&5
17978 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17979   echo $ac_n "(cached) $ac_c" 1>&6
17980 else
17981   
17982         ol_DB_LIB=-ldb-41
17983         ol_LIBS=$LIBS
17984         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17985
17986         cat > conftest.$ac_ext <<EOF
17987 #line 17988 "configure"
17988 #include "confdefs.h"
17989
17990 #ifdef HAVE_DB_185_H
17991 # include <db_185.h>
17992 #else
17993 # include <db.h>
17994 #endif
17995
17996 #ifndef DB_VERSION_MAJOR
17997 # define DB_VERSION_MAJOR 1
17998 #endif
17999
18000 #ifndef NULL
18001 #define NULL ((void*)0)
18002 #endif
18003
18004 int main() {
18005
18006 #if DB_VERSION_MAJOR > 1
18007         {
18008                 char *version;
18009                 int major, minor, patch;
18010
18011                 version = db_version( &major, &minor, &patch );
18012
18013                 if( major != DB_VERSION_MAJOR ||
18014                         minor < DB_VERSION_MINOR )
18015                 {
18016                         printf("Berkeley DB version mismatch\n"
18017                                 "\texpected: %s\n\tgot: %s\n",
18018                                 DB_VERSION_STRING, version);
18019                         return 1;
18020                 }
18021         }
18022 #endif
18023
18024 #if DB_VERSION_MAJOR > 2
18025         db_env_create( NULL, 0 );
18026 #elif DB_VERSION_MAJOR > 1
18027         db_appexit( NULL );
18028 #else
18029         (void) dbopen( NULL, 0, 0, 0, NULL);
18030 #endif
18031
18032 ; return 0; }
18033 EOF
18034 if { (eval echo configure:18035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18035   rm -rf conftest*
18036   ol_cv_db_db_41=yes
18037 else
18038   echo "configure: failed program was:" >&5
18039   cat conftest.$ac_ext >&5
18040   rm -rf conftest*
18041   ol_cv_db_db_41=no
18042 fi
18043 rm -f conftest*
18044
18045         LIBS="$ol_LIBS"
18046
18047 fi
18048
18049 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18050
18051         if test $ol_cv_db_db_41 = yes ; then
18052                 ol_cv_lib_db=-ldb-41
18053         fi
18054 fi
18055
18056 if test $ol_cv_lib_db = no ; then
18057         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18058 echo "configure:18059: checking for Berkeley DB link (-ldb-4.1)" >&5
18059 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18060   echo $ac_n "(cached) $ac_c" 1>&6
18061 else
18062   
18063         ol_DB_LIB=-ldb-4.1
18064         ol_LIBS=$LIBS
18065         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18066
18067         cat > conftest.$ac_ext <<EOF
18068 #line 18069 "configure"
18069 #include "confdefs.h"
18070
18071 #ifdef HAVE_DB_185_H
18072 # include <db_185.h>
18073 #else
18074 # include <db.h>
18075 #endif
18076
18077 #ifndef DB_VERSION_MAJOR
18078 # define DB_VERSION_MAJOR 1
18079 #endif
18080
18081 #ifndef NULL
18082 #define NULL ((void*)0)
18083 #endif
18084
18085 int main() {
18086
18087 #if DB_VERSION_MAJOR > 1
18088         {
18089                 char *version;
18090                 int major, minor, patch;
18091
18092                 version = db_version( &major, &minor, &patch );
18093
18094                 if( major != DB_VERSION_MAJOR ||
18095                         minor < DB_VERSION_MINOR )
18096                 {
18097                         printf("Berkeley DB version mismatch\n"
18098                                 "\texpected: %s\n\tgot: %s\n",
18099                                 DB_VERSION_STRING, version);
18100                         return 1;
18101                 }
18102         }
18103 #endif
18104
18105 #if DB_VERSION_MAJOR > 2
18106         db_env_create( NULL, 0 );
18107 #elif DB_VERSION_MAJOR > 1
18108         db_appexit( NULL );
18109 #else
18110         (void) dbopen( NULL, 0, 0, 0, NULL);
18111 #endif
18112
18113 ; return 0; }
18114 EOF
18115 if { (eval echo configure:18116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18116   rm -rf conftest*
18117   ol_cv_db_db_4_dot_1=yes
18118 else
18119   echo "configure: failed program was:" >&5
18120   cat conftest.$ac_ext >&5
18121   rm -rf conftest*
18122   ol_cv_db_db_4_dot_1=no
18123 fi
18124 rm -f conftest*
18125
18126         LIBS="$ol_LIBS"
18127
18128 fi
18129
18130 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18131
18132         if test $ol_cv_db_db_4_dot_1 = yes ; then
18133                 ol_cv_lib_db=-ldb-4.1
18134         fi
18135 fi
18136
18137 if test $ol_cv_lib_db = no ; then
18138         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18139 echo "configure:18140: checking for Berkeley DB link (-ldb-4-1)" >&5
18140 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18141   echo $ac_n "(cached) $ac_c" 1>&6
18142 else
18143   
18144         ol_DB_LIB=-ldb-4-1
18145         ol_LIBS=$LIBS
18146         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18147
18148         cat > conftest.$ac_ext <<EOF
18149 #line 18150 "configure"
18150 #include "confdefs.h"
18151
18152 #ifdef HAVE_DB_185_H
18153 # include <db_185.h>
18154 #else
18155 # include <db.h>
18156 #endif
18157
18158 #ifndef DB_VERSION_MAJOR
18159 # define DB_VERSION_MAJOR 1
18160 #endif
18161
18162 #ifndef NULL
18163 #define NULL ((void*)0)
18164 #endif
18165
18166 int main() {
18167
18168 #if DB_VERSION_MAJOR > 1
18169         {
18170                 char *version;
18171                 int major, minor, patch;
18172
18173                 version = db_version( &major, &minor, &patch );
18174
18175                 if( major != DB_VERSION_MAJOR ||
18176                         minor < DB_VERSION_MINOR )
18177                 {
18178                         printf("Berkeley DB version mismatch\n"
18179                                 "\texpected: %s\n\tgot: %s\n",
18180                                 DB_VERSION_STRING, version);
18181                         return 1;
18182                 }
18183         }
18184 #endif
18185
18186 #if DB_VERSION_MAJOR > 2
18187         db_env_create( NULL, 0 );
18188 #elif DB_VERSION_MAJOR > 1
18189         db_appexit( NULL );
18190 #else
18191         (void) dbopen( NULL, 0, 0, 0, NULL);
18192 #endif
18193
18194 ; return 0; }
18195 EOF
18196 if { (eval echo configure:18197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18197   rm -rf conftest*
18198   ol_cv_db_db_4_1=yes
18199 else
18200   echo "configure: failed program was:" >&5
18201   cat conftest.$ac_ext >&5
18202   rm -rf conftest*
18203   ol_cv_db_db_4_1=no
18204 fi
18205 rm -f conftest*
18206
18207         LIBS="$ol_LIBS"
18208
18209 fi
18210
18211 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18212
18213         if test $ol_cv_db_db_4_1 = yes ; then
18214                 ol_cv_lib_db=-ldb-4-1
18215         fi
18216 fi
18217
18218 if test $ol_cv_lib_db = no ; then
18219         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18220 echo "configure:18221: checking for Berkeley DB link (-ldb-4)" >&5
18221 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18222   echo $ac_n "(cached) $ac_c" 1>&6
18223 else
18224   
18225         ol_DB_LIB=-ldb-4
18226         ol_LIBS=$LIBS
18227         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18228
18229         cat > conftest.$ac_ext <<EOF
18230 #line 18231 "configure"
18231 #include "confdefs.h"
18232
18233 #ifdef HAVE_DB_185_H
18234 # include <db_185.h>
18235 #else
18236 # include <db.h>
18237 #endif
18238
18239 #ifndef DB_VERSION_MAJOR
18240 # define DB_VERSION_MAJOR 1
18241 #endif
18242
18243 #ifndef NULL
18244 #define NULL ((void*)0)
18245 #endif
18246
18247 int main() {
18248
18249 #if DB_VERSION_MAJOR > 1
18250         {
18251                 char *version;
18252                 int major, minor, patch;
18253
18254                 version = db_version( &major, &minor, &patch );
18255
18256                 if( major != DB_VERSION_MAJOR ||
18257                         minor < DB_VERSION_MINOR )
18258                 {
18259                         printf("Berkeley DB version mismatch\n"
18260                                 "\texpected: %s\n\tgot: %s\n",
18261                                 DB_VERSION_STRING, version);
18262                         return 1;
18263                 }
18264         }
18265 #endif
18266
18267 #if DB_VERSION_MAJOR > 2
18268         db_env_create( NULL, 0 );
18269 #elif DB_VERSION_MAJOR > 1
18270         db_appexit( NULL );
18271 #else
18272         (void) dbopen( NULL, 0, 0, 0, NULL);
18273 #endif
18274
18275 ; return 0; }
18276 EOF
18277 if { (eval echo configure:18278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18278   rm -rf conftest*
18279   ol_cv_db_db_4=yes
18280 else
18281   echo "configure: failed program was:" >&5
18282   cat conftest.$ac_ext >&5
18283   rm -rf conftest*
18284   ol_cv_db_db_4=no
18285 fi
18286 rm -f conftest*
18287
18288         LIBS="$ol_LIBS"
18289
18290 fi
18291
18292 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18293
18294         if test $ol_cv_db_db_4 = yes ; then
18295                 ol_cv_lib_db=-ldb-4
18296         fi
18297 fi
18298
18299 if test $ol_cv_lib_db = no ; then
18300         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18301 echo "configure:18302: checking for Berkeley DB link (-ldb4)" >&5
18302 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18303   echo $ac_n "(cached) $ac_c" 1>&6
18304 else
18305   
18306         ol_DB_LIB=-ldb4
18307         ol_LIBS=$LIBS
18308         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18309
18310         cat > conftest.$ac_ext <<EOF
18311 #line 18312 "configure"
18312 #include "confdefs.h"
18313
18314 #ifdef HAVE_DB_185_H
18315 # include <db_185.h>
18316 #else
18317 # include <db.h>
18318 #endif
18319
18320 #ifndef DB_VERSION_MAJOR
18321 # define DB_VERSION_MAJOR 1
18322 #endif
18323
18324 #ifndef NULL
18325 #define NULL ((void*)0)
18326 #endif
18327
18328 int main() {
18329
18330 #if DB_VERSION_MAJOR > 1
18331         {
18332                 char *version;
18333                 int major, minor, patch;
18334
18335                 version = db_version( &major, &minor, &patch );
18336
18337                 if( major != DB_VERSION_MAJOR ||
18338                         minor < DB_VERSION_MINOR )
18339                 {
18340                         printf("Berkeley DB version mismatch\n"
18341                                 "\texpected: %s\n\tgot: %s\n",
18342                                 DB_VERSION_STRING, version);
18343                         return 1;
18344                 }
18345         }
18346 #endif
18347
18348 #if DB_VERSION_MAJOR > 2
18349         db_env_create( NULL, 0 );
18350 #elif DB_VERSION_MAJOR > 1
18351         db_appexit( NULL );
18352 #else
18353         (void) dbopen( NULL, 0, 0, 0, NULL);
18354 #endif
18355
18356 ; return 0; }
18357 EOF
18358 if { (eval echo configure:18359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18359   rm -rf conftest*
18360   ol_cv_db_db4=yes
18361 else
18362   echo "configure: failed program was:" >&5
18363   cat conftest.$ac_ext >&5
18364   rm -rf conftest*
18365   ol_cv_db_db4=no
18366 fi
18367 rm -f conftest*
18368
18369         LIBS="$ol_LIBS"
18370
18371 fi
18372
18373 echo "$ac_t""$ol_cv_db_db4" 1>&6
18374
18375         if test $ol_cv_db_db4 = yes ; then
18376                 ol_cv_lib_db=-ldb4
18377         fi
18378 fi
18379
18380 if test $ol_cv_lib_db = no ; then
18381         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18382 echo "configure:18383: checking for Berkeley DB link (-ldb)" >&5
18383 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18384   echo $ac_n "(cached) $ac_c" 1>&6
18385 else
18386   
18387         ol_DB_LIB=-ldb
18388         ol_LIBS=$LIBS
18389         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18390
18391         cat > conftest.$ac_ext <<EOF
18392 #line 18393 "configure"
18393 #include "confdefs.h"
18394
18395 #ifdef HAVE_DB_185_H
18396 # include <db_185.h>
18397 #else
18398 # include <db.h>
18399 #endif
18400
18401 #ifndef DB_VERSION_MAJOR
18402 # define DB_VERSION_MAJOR 1
18403 #endif
18404
18405 #ifndef NULL
18406 #define NULL ((void*)0)
18407 #endif
18408
18409 int main() {
18410
18411 #if DB_VERSION_MAJOR > 1
18412         {
18413                 char *version;
18414                 int major, minor, patch;
18415
18416                 version = db_version( &major, &minor, &patch );
18417
18418                 if( major != DB_VERSION_MAJOR ||
18419                         minor < DB_VERSION_MINOR )
18420                 {
18421                         printf("Berkeley DB version mismatch\n"
18422                                 "\texpected: %s\n\tgot: %s\n",
18423                                 DB_VERSION_STRING, version);
18424                         return 1;
18425                 }
18426         }
18427 #endif
18428
18429 #if DB_VERSION_MAJOR > 2
18430         db_env_create( NULL, 0 );
18431 #elif DB_VERSION_MAJOR > 1
18432         db_appexit( NULL );
18433 #else
18434         (void) dbopen( NULL, 0, 0, 0, NULL);
18435 #endif
18436
18437 ; return 0; }
18438 EOF
18439 if { (eval echo configure:18440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18440   rm -rf conftest*
18441   ol_cv_db_db=yes
18442 else
18443   echo "configure: failed program was:" >&5
18444   cat conftest.$ac_ext >&5
18445   rm -rf conftest*
18446   ol_cv_db_db=no
18447 fi
18448 rm -f conftest*
18449
18450         LIBS="$ol_LIBS"
18451
18452 fi
18453
18454 echo "$ac_t""$ol_cv_db_db" 1>&6
18455
18456         if test $ol_cv_db_db = yes ; then
18457                 ol_cv_lib_db=-ldb
18458         fi
18459 fi
18460
18461 if test $ol_cv_lib_db = no ; then
18462         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18463 echo "configure:18464: checking for Berkeley DB link (-ldb3)" >&5
18464 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18465   echo $ac_n "(cached) $ac_c" 1>&6
18466 else
18467   
18468         ol_DB_LIB=-ldb3
18469         ol_LIBS=$LIBS
18470         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18471
18472         cat > conftest.$ac_ext <<EOF
18473 #line 18474 "configure"
18474 #include "confdefs.h"
18475
18476 #ifdef HAVE_DB_185_H
18477 # include <db_185.h>
18478 #else
18479 # include <db.h>
18480 #endif
18481
18482 #ifndef DB_VERSION_MAJOR
18483 # define DB_VERSION_MAJOR 1
18484 #endif
18485
18486 #ifndef NULL
18487 #define NULL ((void*)0)
18488 #endif
18489
18490 int main() {
18491
18492 #if DB_VERSION_MAJOR > 1
18493         {
18494                 char *version;
18495                 int major, minor, patch;
18496
18497                 version = db_version( &major, &minor, &patch );
18498
18499                 if( major != DB_VERSION_MAJOR ||
18500                         minor < DB_VERSION_MINOR )
18501                 {
18502                         printf("Berkeley DB version mismatch\n"
18503                                 "\texpected: %s\n\tgot: %s\n",
18504                                 DB_VERSION_STRING, version);
18505                         return 1;
18506                 }
18507         }
18508 #endif
18509
18510 #if DB_VERSION_MAJOR > 2
18511         db_env_create( NULL, 0 );
18512 #elif DB_VERSION_MAJOR > 1
18513         db_appexit( NULL );
18514 #else
18515         (void) dbopen( NULL, 0, 0, 0, NULL);
18516 #endif
18517
18518 ; return 0; }
18519 EOF
18520 if { (eval echo configure:18521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18521   rm -rf conftest*
18522   ol_cv_db_db3=yes
18523 else
18524   echo "configure: failed program was:" >&5
18525   cat conftest.$ac_ext >&5
18526   rm -rf conftest*
18527   ol_cv_db_db3=no
18528 fi
18529 rm -f conftest*
18530
18531         LIBS="$ol_LIBS"
18532
18533 fi
18534
18535 echo "$ac_t""$ol_cv_db_db3" 1>&6
18536
18537         if test $ol_cv_db_db3 = yes ; then
18538                 ol_cv_lib_db=-ldb3
18539         fi
18540 fi
18541
18542 if test $ol_cv_lib_db = no ; then
18543         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18544 echo "configure:18545: checking for Berkeley DB link (-ldb-3)" >&5
18545 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18546   echo $ac_n "(cached) $ac_c" 1>&6
18547 else
18548   
18549         ol_DB_LIB=-ldb-3
18550         ol_LIBS=$LIBS
18551         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18552
18553         cat > conftest.$ac_ext <<EOF
18554 #line 18555 "configure"
18555 #include "confdefs.h"
18556
18557 #ifdef HAVE_DB_185_H
18558 # include <db_185.h>
18559 #else
18560 # include <db.h>
18561 #endif
18562
18563 #ifndef DB_VERSION_MAJOR
18564 # define DB_VERSION_MAJOR 1
18565 #endif
18566
18567 #ifndef NULL
18568 #define NULL ((void*)0)
18569 #endif
18570
18571 int main() {
18572
18573 #if DB_VERSION_MAJOR > 1
18574         {
18575                 char *version;
18576                 int major, minor, patch;
18577
18578                 version = db_version( &major, &minor, &patch );
18579
18580                 if( major != DB_VERSION_MAJOR ||
18581                         minor < DB_VERSION_MINOR )
18582                 {
18583                         printf("Berkeley DB version mismatch\n"
18584                                 "\texpected: %s\n\tgot: %s\n",
18585                                 DB_VERSION_STRING, version);
18586                         return 1;
18587                 }
18588         }
18589 #endif
18590
18591 #if DB_VERSION_MAJOR > 2
18592         db_env_create( NULL, 0 );
18593 #elif DB_VERSION_MAJOR > 1
18594         db_appexit( NULL );
18595 #else
18596         (void) dbopen( NULL, 0, 0, 0, NULL);
18597 #endif
18598
18599 ; return 0; }
18600 EOF
18601 if { (eval echo configure:18602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18602   rm -rf conftest*
18603   ol_cv_db_db_3=yes
18604 else
18605   echo "configure: failed program was:" >&5
18606   cat conftest.$ac_ext >&5
18607   rm -rf conftest*
18608   ol_cv_db_db_3=no
18609 fi
18610 rm -f conftest*
18611
18612         LIBS="$ol_LIBS"
18613
18614 fi
18615
18616 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18617
18618         if test $ol_cv_db_db_3 = yes ; then
18619                 ol_cv_lib_db=-ldb-3
18620         fi
18621 fi
18622
18623 if test $ol_cv_lib_db = no ; then
18624         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18625 echo "configure:18626: checking for Berkeley DB link (-ldb2)" >&5
18626 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18627   echo $ac_n "(cached) $ac_c" 1>&6
18628 else
18629   
18630         ol_DB_LIB=-ldb2
18631         ol_LIBS=$LIBS
18632         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18633
18634         cat > conftest.$ac_ext <<EOF
18635 #line 18636 "configure"
18636 #include "confdefs.h"
18637
18638 #ifdef HAVE_DB_185_H
18639 # include <db_185.h>
18640 #else
18641 # include <db.h>
18642 #endif
18643
18644 #ifndef DB_VERSION_MAJOR
18645 # define DB_VERSION_MAJOR 1
18646 #endif
18647
18648 #ifndef NULL
18649 #define NULL ((void*)0)
18650 #endif
18651
18652 int main() {
18653
18654 #if DB_VERSION_MAJOR > 1
18655         {
18656                 char *version;
18657                 int major, minor, patch;
18658
18659                 version = db_version( &major, &minor, &patch );
18660
18661                 if( major != DB_VERSION_MAJOR ||
18662                         minor < DB_VERSION_MINOR )
18663                 {
18664                         printf("Berkeley DB version mismatch\n"
18665                                 "\texpected: %s\n\tgot: %s\n",
18666                                 DB_VERSION_STRING, version);
18667                         return 1;
18668                 }
18669         }
18670 #endif
18671
18672 #if DB_VERSION_MAJOR > 2
18673         db_env_create( NULL, 0 );
18674 #elif DB_VERSION_MAJOR > 1
18675         db_appexit( NULL );
18676 #else
18677         (void) dbopen( NULL, 0, 0, 0, NULL);
18678 #endif
18679
18680 ; return 0; }
18681 EOF
18682 if { (eval echo configure:18683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18683   rm -rf conftest*
18684   ol_cv_db_db2=yes
18685 else
18686   echo "configure: failed program was:" >&5
18687   cat conftest.$ac_ext >&5
18688   rm -rf conftest*
18689   ol_cv_db_db2=no
18690 fi
18691 rm -f conftest*
18692
18693         LIBS="$ol_LIBS"
18694
18695 fi
18696
18697 echo "$ac_t""$ol_cv_db_db2" 1>&6
18698
18699         if test $ol_cv_db_db2 = yes ; then
18700                 ol_cv_lib_db=-ldb2
18701         fi
18702 fi
18703
18704 if test $ol_cv_lib_db = no ; then
18705         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18706 echo "configure:18707: checking for Berkeley DB link (-ldb-2)" >&5
18707 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18708   echo $ac_n "(cached) $ac_c" 1>&6
18709 else
18710   
18711         ol_DB_LIB=-ldb-2
18712         ol_LIBS=$LIBS
18713         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18714
18715         cat > conftest.$ac_ext <<EOF
18716 #line 18717 "configure"
18717 #include "confdefs.h"
18718
18719 #ifdef HAVE_DB_185_H
18720 # include <db_185.h>
18721 #else
18722 # include <db.h>
18723 #endif
18724
18725 #ifndef DB_VERSION_MAJOR
18726 # define DB_VERSION_MAJOR 1
18727 #endif
18728
18729 #ifndef NULL
18730 #define NULL ((void*)0)
18731 #endif
18732
18733 int main() {
18734
18735 #if DB_VERSION_MAJOR > 1
18736         {
18737                 char *version;
18738                 int major, minor, patch;
18739
18740                 version = db_version( &major, &minor, &patch );
18741
18742                 if( major != DB_VERSION_MAJOR ||
18743                         minor < DB_VERSION_MINOR )
18744                 {
18745                         printf("Berkeley DB version mismatch\n"
18746                                 "\texpected: %s\n\tgot: %s\n",
18747                                 DB_VERSION_STRING, version);
18748                         return 1;
18749                 }
18750         }
18751 #endif
18752
18753 #if DB_VERSION_MAJOR > 2
18754         db_env_create( NULL, 0 );
18755 #elif DB_VERSION_MAJOR > 1
18756         db_appexit( NULL );
18757 #else
18758         (void) dbopen( NULL, 0, 0, 0, NULL);
18759 #endif
18760
18761 ; return 0; }
18762 EOF
18763 if { (eval echo configure:18764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18764   rm -rf conftest*
18765   ol_cv_db_db_2=yes
18766 else
18767   echo "configure: failed program was:" >&5
18768   cat conftest.$ac_ext >&5
18769   rm -rf conftest*
18770   ol_cv_db_db_2=no
18771 fi
18772 rm -f conftest*
18773
18774         LIBS="$ol_LIBS"
18775
18776 fi
18777
18778 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18779
18780         if test $ol_cv_db_db_2 = yes ; then
18781                 ol_cv_lib_db=-ldb-2
18782         fi
18783 fi
18784
18785 if test $ol_cv_lib_db = no ; then
18786         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18787 echo "configure:18788: checking for Berkeley DB link (-ldb1)" >&5
18788 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18789   echo $ac_n "(cached) $ac_c" 1>&6
18790 else
18791   
18792         ol_DB_LIB=-ldb1
18793         ol_LIBS=$LIBS
18794         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18795
18796         cat > conftest.$ac_ext <<EOF
18797 #line 18798 "configure"
18798 #include "confdefs.h"
18799
18800 #ifdef HAVE_DB_185_H
18801 # include <db_185.h>
18802 #else
18803 # include <db.h>
18804 #endif
18805
18806 #ifndef DB_VERSION_MAJOR
18807 # define DB_VERSION_MAJOR 1
18808 #endif
18809
18810 #ifndef NULL
18811 #define NULL ((void*)0)
18812 #endif
18813
18814 int main() {
18815
18816 #if DB_VERSION_MAJOR > 1
18817         {
18818                 char *version;
18819                 int major, minor, patch;
18820
18821                 version = db_version( &major, &minor, &patch );
18822
18823                 if( major != DB_VERSION_MAJOR ||
18824                         minor < DB_VERSION_MINOR )
18825                 {
18826                         printf("Berkeley DB version mismatch\n"
18827                                 "\texpected: %s\n\tgot: %s\n",
18828                                 DB_VERSION_STRING, version);
18829                         return 1;
18830                 }
18831         }
18832 #endif
18833
18834 #if DB_VERSION_MAJOR > 2
18835         db_env_create( NULL, 0 );
18836 #elif DB_VERSION_MAJOR > 1
18837         db_appexit( NULL );
18838 #else
18839         (void) dbopen( NULL, 0, 0, 0, NULL);
18840 #endif
18841
18842 ; return 0; }
18843 EOF
18844 if { (eval echo configure:18845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18845   rm -rf conftest*
18846   ol_cv_db_db1=yes
18847 else
18848   echo "configure: failed program was:" >&5
18849   cat conftest.$ac_ext >&5
18850   rm -rf conftest*
18851   ol_cv_db_db1=no
18852 fi
18853 rm -f conftest*
18854
18855         LIBS="$ol_LIBS"
18856
18857 fi
18858
18859 echo "$ac_t""$ol_cv_db_db1" 1>&6
18860
18861         if test $ol_cv_db_db1 = yes ; then
18862                 ol_cv_lib_db=-ldb1
18863         fi
18864 fi
18865
18866 if test $ol_cv_lib_db = no ; then
18867         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18868 echo "configure:18869: checking for Berkeley DB link (-ldb-1)" >&5
18869 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18870   echo $ac_n "(cached) $ac_c" 1>&6
18871 else
18872   
18873         ol_DB_LIB=-ldb-1
18874         ol_LIBS=$LIBS
18875         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18876
18877         cat > conftest.$ac_ext <<EOF
18878 #line 18879 "configure"
18879 #include "confdefs.h"
18880
18881 #ifdef HAVE_DB_185_H
18882 # include <db_185.h>
18883 #else
18884 # include <db.h>
18885 #endif
18886
18887 #ifndef DB_VERSION_MAJOR
18888 # define DB_VERSION_MAJOR 1
18889 #endif
18890
18891 #ifndef NULL
18892 #define NULL ((void*)0)
18893 #endif
18894
18895 int main() {
18896
18897 #if DB_VERSION_MAJOR > 1
18898         {
18899                 char *version;
18900                 int major, minor, patch;
18901
18902                 version = db_version( &major, &minor, &patch );
18903
18904                 if( major != DB_VERSION_MAJOR ||
18905                         minor < DB_VERSION_MINOR )
18906                 {
18907                         printf("Berkeley DB version mismatch\n"
18908                                 "\texpected: %s\n\tgot: %s\n",
18909                                 DB_VERSION_STRING, version);
18910                         return 1;
18911                 }
18912         }
18913 #endif
18914
18915 #if DB_VERSION_MAJOR > 2
18916         db_env_create( NULL, 0 );
18917 #elif DB_VERSION_MAJOR > 1
18918         db_appexit( NULL );
18919 #else
18920         (void) dbopen( NULL, 0, 0, 0, NULL);
18921 #endif
18922
18923 ; return 0; }
18924 EOF
18925 if { (eval echo configure:18926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18926   rm -rf conftest*
18927   ol_cv_db_db_1=yes
18928 else
18929   echo "configure: failed program was:" >&5
18930   cat conftest.$ac_ext >&5
18931   rm -rf conftest*
18932   ol_cv_db_db_1=no
18933 fi
18934 rm -f conftest*
18935
18936         LIBS="$ol_LIBS"
18937
18938 fi
18939
18940 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18941
18942         if test $ol_cv_db_db_1 = yes ; then
18943                 ol_cv_lib_db=-ldb-1
18944         fi
18945 fi
18946
18947
18948         if test "$ol_cv_lib_db" != no ; then
18949                 ol_cv_berkeley_db=yes
18950                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18951 echo "configure:18952: checking for Berkeley DB thread support" >&5
18952 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18953   echo $ac_n "(cached) $ac_c" 1>&6
18954 else
18955   
18956         ol_LIBS="$LIBS"
18957         LIBS="$LTHREAD_LIBS $LIBS"
18958         if test $ol_cv_lib_db != yes ; then
18959                 LIBS="$ol_cv_lib_db $LIBS"
18960         fi
18961
18962         if test "$cross_compiling" = yes; then
18963   ol_cv_berkeley_db_thread=cross
18964 else
18965   cat > conftest.$ac_ext <<EOF
18966 #line 18967 "configure"
18967 #include "confdefs.h"
18968
18969 #ifdef HAVE_DB_185_H
18970         choke me;
18971 #else
18972 #include <db.h>
18973 #endif
18974 #ifndef NULL
18975 #define NULL ((void *)0)
18976 #endif
18977 main()
18978 {
18979         int rc;
18980         u_int32_t flags = DB_CREATE |
18981 #ifdef DB_PRIVATE
18982                 DB_PRIVATE |
18983 #endif
18984                 DB_THREAD;
18985
18986 #if DB_VERSION_MAJOR > 2
18987         DB_ENV *env = NULL;
18988
18989         rc = db_env_create( &env, 0 );
18990
18991         flags |= DB_INIT_MPOOL;
18992 #ifdef DB_MPOOL_PRIVATE
18993         flags |= DB_MPOOL_PRIVATE;
18994 #endif
18995
18996         if( rc ) {
18997                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18998                 return rc;
18999         }
19000
19001 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19002         rc = env->open( env, NULL, flags, 0 );
19003 #else
19004         rc = env->open( env, NULL, NULL, flags, 0 );
19005 #endif
19006
19007         if ( rc == 0 ) {
19008                 rc = env->close( env, 0 );
19009         }
19010
19011         if( rc ) {
19012                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19013                 return rc;
19014         }
19015
19016 #else
19017         DB_ENV env;
19018         memset( &env, '\0', sizeof(env) );
19019
19020         rc = db_appinit( NULL, NULL, &env, flags );
19021
19022         if( rc == 0 ) {
19023                 db_appexit( &env );
19024         }
19025
19026         unlink("__db_mpool.share");
19027         unlink("__db_lock.share");
19028 #endif
19029
19030         return rc;
19031 }
19032 EOF
19033 if { (eval echo configure:19034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19034 then
19035   ol_cv_berkeley_db_thread=yes
19036 else
19037   echo "configure: failed program was:" >&5
19038   cat conftest.$ac_ext >&5
19039   rm -fr conftest*
19040   ol_cv_berkeley_db_thread=no
19041 fi
19042 rm -fr conftest*
19043 fi
19044
19045
19046         LIBS="$ol_LIBS"
19047
19048 fi
19049
19050 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19051
19052         if test $ol_cv_berkeley_db_thread != no ; then
19053                 cat >> confdefs.h <<\EOF
19054 #define HAVE_BERKELEY_DB_THREAD 1
19055 EOF
19056
19057         fi
19058
19059         fi
19060 fi
19061
19062         fi
19063
19064         if test $ol_cv_berkeley_db != no ; then
19065                 cat >> confdefs.h <<\EOF
19066 #define HAVE_BERKELEY_DB 1
19067 EOF
19068
19069
19070                 ol_link_ldbm=berkeley
19071                 ol_with_ldbm_api=berkeley
19072
19073                 if test $ol_with_ldbm_type = hash ; then
19074                         cat >> confdefs.h <<\EOF
19075 #define LDBM_USE_DBHASH 1
19076 EOF
19077
19078                 else
19079                         cat >> confdefs.h <<\EOF
19080 #define LDBM_USE_DBBTREE 1
19081 EOF
19082
19083                 fi
19084
19085                                                 if test $ol_cv_lib_db != yes ; then
19086                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19087                 fi
19088         fi
19089 fi
19090
19091 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19092         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19093 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19094         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19095 echo "configure:19096: checking Berkeley DB version for BDB backend" >&5
19096 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19097   echo $ac_n "(cached) $ac_c" 1>&6
19098 else
19099   
19100         cat > conftest.$ac_ext <<EOF
19101 #line 19102 "configure"
19102 #include "confdefs.h"
19103
19104 #include <db.h>
19105
19106  /* this check could be improved */
19107 #ifndef DB_VERSION_MAJOR
19108 #       define DB_VERSION_MAJOR 1
19109 #endif
19110 #ifndef DB_VERSION_MINOR
19111 #       define DB_VERSION_MINOR 0
19112 #endif
19113
19114 /* require 4.1 or later */
19115 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19116         __db_version_compat
19117 #endif
19118         
19119 EOF
19120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19121   egrep "__db_version_compat" >/dev/null 2>&1; then
19122   rm -rf conftest*
19123   ol_cv_bdb_compat=yes
19124 else
19125   rm -rf conftest*
19126   ol_cv_bdb_compat=no
19127 fi
19128 rm -f conftest*
19129
19130 fi
19131
19132 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19133
19134
19135         if test $ol_cv_bdb_compat = yes ; then
19136                 ol_enable_bdb=yes
19137         elif test $ol_enable_bdb = yes ; then
19138                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19139         else
19140                 ol_enable_bdb=no
19141         fi
19142 fi
19143 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19144         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19145 fi
19146
19147 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19148         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19149         ol_with_ldbm_api=none
19150 fi
19151
19152 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19153         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19154 echo "configure:19155: checking for MDBM library" >&5
19155 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19156   echo $ac_n "(cached) $ac_c" 1>&6
19157 else
19158         ol_LIBS="$LIBS"
19159         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19160 echo "configure:19161: checking for mdbm_set_chain" >&5
19161 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19162   echo $ac_n "(cached) $ac_c" 1>&6
19163 else
19164   cat > conftest.$ac_ext <<EOF
19165 #line 19166 "configure"
19166 #include "confdefs.h"
19167 /* System header to define __stub macros and hopefully few prototypes,
19168     which can conflict with char mdbm_set_chain(); below.  */
19169 #include <assert.h>
19170 /* Override any gcc2 internal prototype to avoid an error.  */
19171 /* We use char because int might match the return type of a gcc2
19172     builtin and then its argument prototype would still apply.  */
19173 char mdbm_set_chain();
19174 char (*f)();
19175
19176 int main() {
19177
19178 /* The GNU C library defines this for functions which it implements
19179     to always fail with ENOSYS.  Some functions are actually named
19180     something starting with __ and the normal name is an alias.  */
19181 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19182 choke me
19183 #else
19184 f = mdbm_set_chain;
19185 #endif
19186
19187 ; return 0; }
19188 EOF
19189 if { (eval echo configure:19190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19190   rm -rf conftest*
19191   eval "ac_cv_func_mdbm_set_chain=yes"
19192 else
19193   echo "configure: failed program was:" >&5
19194   cat conftest.$ac_ext >&5
19195   rm -rf conftest*
19196   eval "ac_cv_func_mdbm_set_chain=no"
19197 fi
19198 rm -f conftest*
19199 fi
19200
19201 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19202   echo "$ac_t""yes" 1>&6
19203   ol_cv_lib_mdbm=yes
19204 else
19205   echo "$ac_t""no" 1>&6
19206
19207                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19208 echo "configure:19209: checking for mdbm_set_chain in -lmdbm" >&5
19209 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19211   echo $ac_n "(cached) $ac_c" 1>&6
19212 else
19213   ac_save_LIBS="$LIBS"
19214 LIBS="-lmdbm  $LIBS"
19215 cat > conftest.$ac_ext <<EOF
19216 #line 19217 "configure"
19217 #include "confdefs.h"
19218 /* Override any gcc2 internal prototype to avoid an error.  */
19219 /* We use char because int might match the return type of a gcc2
19220     builtin and then its argument prototype would still apply.  */
19221 char mdbm_set_chain();
19222
19223 int main() {
19224 mdbm_set_chain()
19225 ; return 0; }
19226 EOF
19227 if { (eval echo configure:19228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19228   rm -rf conftest*
19229   eval "ac_cv_lib_$ac_lib_var=yes"
19230 else
19231   echo "configure: failed program was:" >&5
19232   cat conftest.$ac_ext >&5
19233   rm -rf conftest*
19234   eval "ac_cv_lib_$ac_lib_var=no"
19235 fi
19236 rm -f conftest*
19237 LIBS="$ac_save_LIBS"
19238
19239 fi
19240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19241   echo "$ac_t""yes" 1>&6
19242   ol_cv_lib_mdbm=-lmdbm
19243 else
19244   echo "$ac_t""no" 1>&6
19245 ol_cv_lib_mdbm=no
19246 fi
19247
19248         
19249 fi
19250
19251         LIBS="$ol_LIBS"
19252
19253 fi
19254
19255 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19256
19257
19258  for ac_hdr in mdbm.h
19259 do
19260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19262 echo "configure:19263: checking for $ac_hdr" >&5
19263 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19264   echo $ac_n "(cached) $ac_c" 1>&6
19265 else
19266   cat > conftest.$ac_ext <<EOF
19267 #line 19268 "configure"
19268 #include "confdefs.h"
19269 #include <$ac_hdr>
19270 EOF
19271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19272 { (eval echo configure:19273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19274 if test -z "$ac_err"; then
19275   rm -rf conftest*
19276   eval "ac_cv_header_$ac_safe=yes"
19277 else
19278   echo "$ac_err" >&5
19279   echo "configure: failed program was:" >&5
19280   cat conftest.$ac_ext >&5
19281   rm -rf conftest*
19282   eval "ac_cv_header_$ac_safe=no"
19283 fi
19284 rm -f conftest*
19285 fi
19286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19287   echo "$ac_t""yes" 1>&6
19288     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19289   cat >> confdefs.h <<EOF
19290 #define $ac_tr_hdr 1
19291 EOF
19292  
19293 else
19294   echo "$ac_t""no" 1>&6
19295 fi
19296 done
19297
19298  echo $ac_n "checking for db""... $ac_c" 1>&6
19299 echo "configure:19300: checking for db" >&5
19300 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19301   echo $ac_n "(cached) $ac_c" 1>&6
19302 else
19303   
19304         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19305                 ol_cv_mdbm=no
19306         else
19307                 ol_cv_mdbm=yes
19308         fi
19309
19310 fi
19311
19312 echo "$ac_t""$ol_cv_mdbm" 1>&6
19313  if test $ol_cv_mdbm = yes ; then
19314         cat >> confdefs.h <<\EOF
19315 #define HAVE_MDBM 1
19316 EOF
19317
19318  fi
19319
19320
19321         if test $ol_cv_mdbm = yes ; then
19322                 ol_link_ldbm=mdbm
19323                 ol_with_ldbm_api=mdbm
19324                 if test $ol_cv_lib_mdbm != yes ; then
19325                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19326                 fi
19327         fi
19328 fi
19329
19330 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19331         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19332 echo "configure:19333: checking for GDBM library" >&5
19333 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19334   echo $ac_n "(cached) $ac_c" 1>&6
19335 else
19336         ol_LIBS="$LIBS"
19337         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19338 echo "configure:19339: checking for gdbm_open" >&5
19339 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19340   echo $ac_n "(cached) $ac_c" 1>&6
19341 else
19342   cat > conftest.$ac_ext <<EOF
19343 #line 19344 "configure"
19344 #include "confdefs.h"
19345 /* System header to define __stub macros and hopefully few prototypes,
19346     which can conflict with char gdbm_open(); below.  */
19347 #include <assert.h>
19348 /* Override any gcc2 internal prototype to avoid an error.  */
19349 /* We use char because int might match the return type of a gcc2
19350     builtin and then its argument prototype would still apply.  */
19351 char gdbm_open();
19352 char (*f)();
19353
19354 int main() {
19355
19356 /* The GNU C library defines this for functions which it implements
19357     to always fail with ENOSYS.  Some functions are actually named
19358     something starting with __ and the normal name is an alias.  */
19359 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19360 choke me
19361 #else
19362 f = gdbm_open;
19363 #endif
19364
19365 ; return 0; }
19366 EOF
19367 if { (eval echo configure:19368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19368   rm -rf conftest*
19369   eval "ac_cv_func_gdbm_open=yes"
19370 else
19371   echo "configure: failed program was:" >&5
19372   cat conftest.$ac_ext >&5
19373   rm -rf conftest*
19374   eval "ac_cv_func_gdbm_open=no"
19375 fi
19376 rm -f conftest*
19377 fi
19378
19379 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19380   echo "$ac_t""yes" 1>&6
19381   ol_cv_lib_gdbm=yes
19382 else
19383   echo "$ac_t""no" 1>&6
19384
19385                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19386 echo "configure:19387: checking for gdbm_open in -lgdbm" >&5
19387 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19388 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19389   echo $ac_n "(cached) $ac_c" 1>&6
19390 else
19391   ac_save_LIBS="$LIBS"
19392 LIBS="-lgdbm  $LIBS"
19393 cat > conftest.$ac_ext <<EOF
19394 #line 19395 "configure"
19395 #include "confdefs.h"
19396 /* Override any gcc2 internal prototype to avoid an error.  */
19397 /* We use char because int might match the return type of a gcc2
19398     builtin and then its argument prototype would still apply.  */
19399 char gdbm_open();
19400
19401 int main() {
19402 gdbm_open()
19403 ; return 0; }
19404 EOF
19405 if { (eval echo configure:19406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19406   rm -rf conftest*
19407   eval "ac_cv_lib_$ac_lib_var=yes"
19408 else
19409   echo "configure: failed program was:" >&5
19410   cat conftest.$ac_ext >&5
19411   rm -rf conftest*
19412   eval "ac_cv_lib_$ac_lib_var=no"
19413 fi
19414 rm -f conftest*
19415 LIBS="$ac_save_LIBS"
19416
19417 fi
19418 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19419   echo "$ac_t""yes" 1>&6
19420   ol_cv_lib_gdbm=-lgdbm
19421 else
19422   echo "$ac_t""no" 1>&6
19423 ol_cv_lib_gdbm=no
19424 fi
19425
19426         
19427 fi
19428
19429         LIBS="$ol_LIBS"
19430
19431 fi
19432
19433 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19434
19435
19436  for ac_hdr in gdbm.h
19437 do
19438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19440 echo "configure:19441: checking for $ac_hdr" >&5
19441 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19442   echo $ac_n "(cached) $ac_c" 1>&6
19443 else
19444   cat > conftest.$ac_ext <<EOF
19445 #line 19446 "configure"
19446 #include "confdefs.h"
19447 #include <$ac_hdr>
19448 EOF
19449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19450 { (eval echo configure:19451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19452 if test -z "$ac_err"; then
19453   rm -rf conftest*
19454   eval "ac_cv_header_$ac_safe=yes"
19455 else
19456   echo "$ac_err" >&5
19457   echo "configure: failed program was:" >&5
19458   cat conftest.$ac_ext >&5
19459   rm -rf conftest*
19460   eval "ac_cv_header_$ac_safe=no"
19461 fi
19462 rm -f conftest*
19463 fi
19464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19465   echo "$ac_t""yes" 1>&6
19466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19467   cat >> confdefs.h <<EOF
19468 #define $ac_tr_hdr 1
19469 EOF
19470  
19471 else
19472   echo "$ac_t""no" 1>&6
19473 fi
19474 done
19475
19476  echo $ac_n "checking for db""... $ac_c" 1>&6
19477 echo "configure:19478: checking for db" >&5
19478 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19479   echo $ac_n "(cached) $ac_c" 1>&6
19480 else
19481   
19482         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19483                 ol_cv_gdbm=no
19484         else
19485                 ol_cv_gdbm=yes
19486         fi
19487
19488 fi
19489
19490 echo "$ac_t""$ol_cv_gdbm" 1>&6
19491  if test $ol_cv_gdbm = yes ; then
19492         cat >> confdefs.h <<\EOF
19493 #define HAVE_GDBM 1
19494 EOF
19495
19496  fi
19497
19498
19499         if test $ol_cv_gdbm = yes ; then
19500                 ol_link_ldbm=gdbm
19501                 ol_with_ldbm_api=gdbm
19502
19503                 if test $ol_cv_lib_gdbm != yes ; then
19504                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19505                 fi
19506         fi
19507 fi
19508
19509 if test $ol_with_ldbm_api = ndbm ; then
19510         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19511 echo "configure:19512: checking for NDBM library" >&5
19512 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19513   echo $ac_n "(cached) $ac_c" 1>&6
19514 else
19515         ol_LIBS="$LIBS"
19516         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19517 echo "configure:19518: checking for dbm_open" >&5
19518 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19519   echo $ac_n "(cached) $ac_c" 1>&6
19520 else
19521   cat > conftest.$ac_ext <<EOF
19522 #line 19523 "configure"
19523 #include "confdefs.h"
19524 /* System header to define __stub macros and hopefully few prototypes,
19525     which can conflict with char dbm_open(); below.  */
19526 #include <assert.h>
19527 /* Override any gcc2 internal prototype to avoid an error.  */
19528 /* We use char because int might match the return type of a gcc2
19529     builtin and then its argument prototype would still apply.  */
19530 char dbm_open();
19531 char (*f)();
19532
19533 int main() {
19534
19535 /* The GNU C library defines this for functions which it implements
19536     to always fail with ENOSYS.  Some functions are actually named
19537     something starting with __ and the normal name is an alias.  */
19538 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19539 choke me
19540 #else
19541 f = dbm_open;
19542 #endif
19543
19544 ; return 0; }
19545 EOF
19546 if { (eval echo configure:19547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19547   rm -rf conftest*
19548   eval "ac_cv_func_dbm_open=yes"
19549 else
19550   echo "configure: failed program was:" >&5
19551   cat conftest.$ac_ext >&5
19552   rm -rf conftest*
19553   eval "ac_cv_func_dbm_open=no"
19554 fi
19555 rm -f conftest*
19556 fi
19557
19558 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19559   echo "$ac_t""yes" 1>&6
19560   ol_cv_lib_ndbm=yes
19561 else
19562   echo "$ac_t""no" 1>&6
19563
19564                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19565 echo "configure:19566: checking for dbm_open in -lndbm" >&5
19566 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19568   echo $ac_n "(cached) $ac_c" 1>&6
19569 else
19570   ac_save_LIBS="$LIBS"
19571 LIBS="-lndbm  $LIBS"
19572 cat > conftest.$ac_ext <<EOF
19573 #line 19574 "configure"
19574 #include "confdefs.h"
19575 /* Override any gcc2 internal prototype to avoid an error.  */
19576 /* We use char because int might match the return type of a gcc2
19577     builtin and then its argument prototype would still apply.  */
19578 char dbm_open();
19579
19580 int main() {
19581 dbm_open()
19582 ; return 0; }
19583 EOF
19584 if { (eval echo configure:19585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19585   rm -rf conftest*
19586   eval "ac_cv_lib_$ac_lib_var=yes"
19587 else
19588   echo "configure: failed program was:" >&5
19589   cat conftest.$ac_ext >&5
19590   rm -rf conftest*
19591   eval "ac_cv_lib_$ac_lib_var=no"
19592 fi
19593 rm -f conftest*
19594 LIBS="$ac_save_LIBS"
19595
19596 fi
19597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19598   echo "$ac_t""yes" 1>&6
19599   ol_cv_lib_ndbm=-lndbm
19600 else
19601   echo "$ac_t""no" 1>&6
19602
19603                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19604 echo "configure:19605: checking for dbm_open in -ldbm" >&5
19605 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19607   echo $ac_n "(cached) $ac_c" 1>&6
19608 else
19609   ac_save_LIBS="$LIBS"
19610 LIBS="-ldbm  $LIBS"
19611 cat > conftest.$ac_ext <<EOF
19612 #line 19613 "configure"
19613 #include "confdefs.h"
19614 /* Override any gcc2 internal prototype to avoid an error.  */
19615 /* We use char because int might match the return type of a gcc2
19616     builtin and then its argument prototype would still apply.  */
19617 char dbm_open();
19618
19619 int main() {
19620 dbm_open()
19621 ; return 0; }
19622 EOF
19623 if { (eval echo configure:19624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19624   rm -rf conftest*
19625   eval "ac_cv_lib_$ac_lib_var=yes"
19626 else
19627   echo "configure: failed program was:" >&5
19628   cat conftest.$ac_ext >&5
19629   rm -rf conftest*
19630   eval "ac_cv_lib_$ac_lib_var=no"
19631 fi
19632 rm -f conftest*
19633 LIBS="$ac_save_LIBS"
19634
19635 fi
19636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19637   echo "$ac_t""yes" 1>&6
19638   ol_cv_lib_ndbm=-ldbm
19639 else
19640   echo "$ac_t""no" 1>&6
19641 ol_cv_lib_ndbm=no
19642 fi
19643                 
19644 fi
19645
19646         
19647 fi
19648
19649         LIBS="$ol_LIBS"
19650
19651 fi
19652
19653 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19654
19655
19656  for ac_hdr in ndbm.h
19657 do
19658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19660 echo "configure:19661: checking for $ac_hdr" >&5
19661 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19662   echo $ac_n "(cached) $ac_c" 1>&6
19663 else
19664   cat > conftest.$ac_ext <<EOF
19665 #line 19666 "configure"
19666 #include "confdefs.h"
19667 #include <$ac_hdr>
19668 EOF
19669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19670 { (eval echo configure:19671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19672 if test -z "$ac_err"; then
19673   rm -rf conftest*
19674   eval "ac_cv_header_$ac_safe=yes"
19675 else
19676   echo "$ac_err" >&5
19677   echo "configure: failed program was:" >&5
19678   cat conftest.$ac_ext >&5
19679   rm -rf conftest*
19680   eval "ac_cv_header_$ac_safe=no"
19681 fi
19682 rm -f conftest*
19683 fi
19684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19685   echo "$ac_t""yes" 1>&6
19686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19687   cat >> confdefs.h <<EOF
19688 #define $ac_tr_hdr 1
19689 EOF
19690  
19691 else
19692   echo "$ac_t""no" 1>&6
19693 fi
19694 done
19695
19696  echo $ac_n "checking for db""... $ac_c" 1>&6
19697 echo "configure:19698: checking for db" >&5
19698 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19699   echo $ac_n "(cached) $ac_c" 1>&6
19700 else
19701   
19702         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19703                 ol_cv_ndbm=no
19704         else
19705                 ol_cv_ndbm=yes
19706         fi
19707
19708 fi
19709
19710 echo "$ac_t""$ol_cv_ndbm" 1>&6
19711  if test $ol_cv_ndbm = yes ; then
19712         cat >> confdefs.h <<\EOF
19713 #define HAVE_NDBM 1
19714 EOF
19715
19716  fi
19717
19718
19719         if test $ol_cv_ndbm = yes ; then
19720                 ol_link_ldbm=ndbm
19721                 ol_with_ldbm_api=ndbm
19722
19723                 if test $ol_cv_lib_ndbm != yes ; then
19724                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19725                 fi
19726         fi
19727 fi
19728
19729 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19730         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19731         if test $ol_enable_ldbm = yes ; then
19732                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19733         fi
19734
19735         echo "configure: warning: disabling LDBM" 1>&2
19736         ol_enable_ldbm=no
19737 fi
19738
19739
19740 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19741         BUILD_LIBS_DYNAMIC=shared
19742         cat >> confdefs.h <<\EOF
19743 #define LDAP_LIBS_DYNAMIC 1
19744 EOF
19745
19746         LTSTATIC=""
19747 else
19748         BUILD_LIBS_DYNAMIC=static
19749         LTSTATIC="-static"
19750 fi
19751
19752 if test $ol_enable_wrappers != no ; then
19753         for ac_hdr in tcpd.h
19754 do
19755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19757 echo "configure:19758: checking for $ac_hdr" >&5
19758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19759   echo $ac_n "(cached) $ac_c" 1>&6
19760 else
19761   cat > conftest.$ac_ext <<EOF
19762 #line 19763 "configure"
19763 #include "confdefs.h"
19764 #include <$ac_hdr>
19765 EOF
19766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19767 { (eval echo configure:19768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19769 if test -z "$ac_err"; then
19770   rm -rf conftest*
19771   eval "ac_cv_header_$ac_safe=yes"
19772 else
19773   echo "$ac_err" >&5
19774   echo "configure: failed program was:" >&5
19775   cat conftest.$ac_ext >&5
19776   rm -rf conftest*
19777   eval "ac_cv_header_$ac_safe=no"
19778 fi
19779 rm -f conftest*
19780 fi
19781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19782   echo "$ac_t""yes" 1>&6
19783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19784   cat >> confdefs.h <<EOF
19785 #define $ac_tr_hdr 1
19786 EOF
19787  
19788                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19789 echo "configure:19790: checking for TCP wrappers library" >&5
19790                 save_LIBS="$LIBS"
19791                 LIBS="$LIBS -lwrap"
19792                 cat > conftest.$ac_ext <<EOF
19793 #line 19794 "configure"
19794 #include "confdefs.h"
19795
19796 #include <tcpd.h>
19797 int allow_severity = 0;
19798 int deny_severity  = 0;
19799
19800 struct request_info *req;
19801                 
19802 int main() {
19803
19804 hosts_access(req)
19805                 
19806 ; return 0; }
19807 EOF
19808 if { (eval echo configure:19809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19809   rm -rf conftest*
19810   echo "$ac_t""-lwrap" 1>&6
19811                 have_wrappers=yes
19812                 LIBS="$save_LIBS"
19813 else
19814   echo "configure: failed program was:" >&5
19815   cat conftest.$ac_ext >&5
19816   rm -rf conftest*
19817   
19818                                 LIBS="$LIBS -lnsl"
19819                 cat > conftest.$ac_ext <<EOF
19820 #line 19821 "configure"
19821 #include "confdefs.h"
19822
19823 #include <tcpd.h>
19824 int allow_severity = 0;
19825 int deny_severity  = 0;
19826
19827 struct request_info *req;
19828                 
19829 int main() {
19830
19831 hosts_access(req)
19832                 
19833 ; return 0; }
19834 EOF
19835 if { (eval echo configure:19836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19836   rm -rf conftest*
19837   echo "$ac_t""-lwrap -lnsl" 1>&6
19838                 have_wrappers=yes
19839                 LIBS="$save_LIBS -lnsl"
19840 else
19841   echo "configure: failed program was:" >&5
19842   cat conftest.$ac_ext >&5
19843   rm -rf conftest*
19844   
19845                 echo "$ac_t""no" 1>&6
19846                 have_wrappers=no
19847                 LIBS=$save_LIBS
19848 fi
19849 rm -f conftest*
19850 fi
19851 rm -f conftest*
19852 else
19853   echo "$ac_t""no" 1>&6
19854 have_wrappers=no
19855 fi
19856 done
19857
19858
19859         if test $have_wrappers = yes ; then
19860                 cat >> confdefs.h <<\EOF
19861 #define HAVE_TCPD 1
19862 EOF
19863
19864                 WRAP_LIBS="-lwrap"
19865         elif test $ol_enable_wrappers = yes ; then
19866                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19867         else
19868                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19869                 WRAP_LIBS=""
19870         fi
19871 fi
19872
19873 if test $ol_enable_syslog != no ; then
19874         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19875 echo "configure:19876: checking for openlog" >&5
19876 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19877   echo $ac_n "(cached) $ac_c" 1>&6
19878 else
19879   cat > conftest.$ac_ext <<EOF
19880 #line 19881 "configure"
19881 #include "confdefs.h"
19882 /* System header to define __stub macros and hopefully few prototypes,
19883     which can conflict with char openlog(); below.  */
19884 #include <assert.h>
19885 /* Override any gcc2 internal prototype to avoid an error.  */
19886 /* We use char because int might match the return type of a gcc2
19887     builtin and then its argument prototype would still apply.  */
19888 char openlog();
19889 char (*f)();
19890
19891 int main() {
19892
19893 /* The GNU C library defines this for functions which it implements
19894     to always fail with ENOSYS.  Some functions are actually named
19895     something starting with __ and the normal name is an alias.  */
19896 #if defined (__stub_openlog) || defined (__stub___openlog)
19897 choke me
19898 #else
19899 f = openlog;
19900 #endif
19901
19902 ; return 0; }
19903 EOF
19904 if { (eval echo configure:19905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19905   rm -rf conftest*
19906   eval "ac_cv_func_openlog=yes"
19907 else
19908   echo "configure: failed program was:" >&5
19909   cat conftest.$ac_ext >&5
19910   rm -rf conftest*
19911   eval "ac_cv_func_openlog=no"
19912 fi
19913 rm -f conftest*
19914 fi
19915
19916 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19917   echo "$ac_t""yes" 1>&6
19918   :
19919 else
19920   echo "$ac_t""no" 1>&6
19921 fi
19922
19923         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19924                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19925         fi
19926         ol_enable_syslog=$ac_cv_func_openlog
19927 fi
19928
19929
19930 ol_link_sql=no
19931 if test $ol_enable_sql != no ; then
19932         for ac_hdr in sql.h sqlext.h
19933 do
19934 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19936 echo "configure:19937: checking for $ac_hdr" >&5
19937 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19938   echo $ac_n "(cached) $ac_c" 1>&6
19939 else
19940   cat > conftest.$ac_ext <<EOF
19941 #line 19942 "configure"
19942 #include "confdefs.h"
19943 #include <$ac_hdr>
19944 EOF
19945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19946 { (eval echo configure:19947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19948 if test -z "$ac_err"; then
19949   rm -rf conftest*
19950   eval "ac_cv_header_$ac_safe=yes"
19951 else
19952   echo "$ac_err" >&5
19953   echo "configure: failed program was:" >&5
19954   cat conftest.$ac_ext >&5
19955   rm -rf conftest*
19956   eval "ac_cv_header_$ac_safe=no"
19957 fi
19958 rm -f conftest*
19959 fi
19960 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19961   echo "$ac_t""yes" 1>&6
19962     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19963   cat >> confdefs.h <<EOF
19964 #define $ac_tr_hdr 1
19965 EOF
19966  
19967 else
19968   echo "$ac_t""no" 1>&6
19969 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19970         
19971 fi
19972 done
19973
19974
19975         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19976 echo "configure:19977: checking for SQLDriverConnect in -liodbc" >&5
19977 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19979   echo $ac_n "(cached) $ac_c" 1>&6
19980 else
19981   ac_save_LIBS="$LIBS"
19982 LIBS="-liodbc  $LIBS"
19983 cat > conftest.$ac_ext <<EOF
19984 #line 19985 "configure"
19985 #include "confdefs.h"
19986 /* Override any gcc2 internal prototype to avoid an error.  */
19987 /* We use char because int might match the return type of a gcc2
19988     builtin and then its argument prototype would still apply.  */
19989 char SQLDriverConnect();
19990
19991 int main() {
19992 SQLDriverConnect()
19993 ; return 0; }
19994 EOF
19995 if { (eval echo configure:19996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19996   rm -rf conftest*
19997   eval "ac_cv_lib_$ac_lib_var=yes"
19998 else
19999   echo "configure: failed program was:" >&5
20000   cat conftest.$ac_ext >&5
20001   rm -rf conftest*
20002   eval "ac_cv_lib_$ac_lib_var=no"
20003 fi
20004 rm -f conftest*
20005 LIBS="$ac_save_LIBS"
20006
20007 fi
20008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20009   echo "$ac_t""yes" 1>&6
20010   have_iodbc=yes
20011 else
20012   echo "$ac_t""no" 1>&6
20013 have_iodbc=no
20014 fi
20015
20016         if test $have_iodbc = yes ; then
20017                 ol_link_sql="-liodbc"
20018         else
20019                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20020 echo "configure:20021: checking for SQLDriverConnect in -lodbc" >&5
20021 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20023   echo $ac_n "(cached) $ac_c" 1>&6
20024 else
20025   ac_save_LIBS="$LIBS"
20026 LIBS="-lodbc  $LIBS"
20027 cat > conftest.$ac_ext <<EOF
20028 #line 20029 "configure"
20029 #include "confdefs.h"
20030 /* Override any gcc2 internal prototype to avoid an error.  */
20031 /* We use char because int might match the return type of a gcc2
20032     builtin and then its argument prototype would still apply.  */
20033 char SQLDriverConnect();
20034
20035 int main() {
20036 SQLDriverConnect()
20037 ; return 0; }
20038 EOF
20039 if { (eval echo configure:20040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20040   rm -rf conftest*
20041   eval "ac_cv_lib_$ac_lib_var=yes"
20042 else
20043   echo "configure: failed program was:" >&5
20044   cat conftest.$ac_ext >&5
20045   rm -rf conftest*
20046   eval "ac_cv_lib_$ac_lib_var=no"
20047 fi
20048 rm -f conftest*
20049 LIBS="$ac_save_LIBS"
20050
20051 fi
20052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20053   echo "$ac_t""yes" 1>&6
20054   have_odbc=yes
20055 else
20056   echo "$ac_t""no" 1>&6
20057 have_odbc=no
20058 fi
20059
20060                 if test $have_odbc = yes ; then
20061                         ol_link_sql="-lodbc"
20062                 fi
20063         fi
20064
20065         if test $ol_link_sql != no ; then
20066                 SLAPD_SQL_LIBS="$ol_link_sql"
20067
20068         elif test $ol_enable_sql != auto ; then
20069                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20070         fi
20071 fi
20072
20073 if test $ol_enable_tcl != no ; then
20074         for ac_hdr in tcl.h
20075 do
20076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20078 echo "configure:20079: checking for $ac_hdr" >&5
20079 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20080   echo $ac_n "(cached) $ac_c" 1>&6
20081 else
20082   cat > conftest.$ac_ext <<EOF
20083 #line 20084 "configure"
20084 #include "confdefs.h"
20085 #include <$ac_hdr>
20086 EOF
20087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20088 { (eval echo configure:20089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20090 if test -z "$ac_err"; then
20091   rm -rf conftest*
20092   eval "ac_cv_header_$ac_safe=yes"
20093 else
20094   echo "$ac_err" >&5
20095   echo "configure: failed program was:" >&5
20096   cat conftest.$ac_ext >&5
20097   rm -rf conftest*
20098   eval "ac_cv_header_$ac_safe=no"
20099 fi
20100 rm -f conftest*
20101 fi
20102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20103   echo "$ac_t""yes" 1>&6
20104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20105   cat >> confdefs.h <<EOF
20106 #define $ac_tr_hdr 1
20107 EOF
20108  
20109 else
20110   echo "$ac_t""no" 1>&6
20111 fi
20112 done
20113
20114
20115         if test $ac_cv_header_tcl_h != yes ; then
20116                 have_tcl=no
20117         else
20118                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20119                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20120 echo "configure:20121: checking for main in -l$lib" >&5
20121 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20123   echo $ac_n "(cached) $ac_c" 1>&6
20124 else
20125   ac_save_LIBS="$LIBS"
20126 LIBS="-l$lib  $LIBS"
20127 cat > conftest.$ac_ext <<EOF
20128 #line 20129 "configure"
20129 #include "confdefs.h"
20130
20131 int main() {
20132 main()
20133 ; return 0; }
20134 EOF
20135 if { (eval echo configure:20136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20136   rm -rf conftest*
20137   eval "ac_cv_lib_$ac_lib_var=yes"
20138 else
20139   echo "configure: failed program was:" >&5
20140   cat conftest.$ac_ext >&5
20141   rm -rf conftest*
20142   eval "ac_cv_lib_$ac_lib_var=no"
20143 fi
20144 rm -f conftest*
20145 LIBS="$ac_save_LIBS"
20146
20147 fi
20148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20149   echo "$ac_t""yes" 1>&6
20150   have_tcl=yes
20151                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20152                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20153                            else
20154                                         MOD_TCL_LIB="-l${lib}"
20155                            fi;break
20156 else
20157   echo "$ac_t""no" 1>&6
20158 have_tcl=no
20159 fi
20160
20161                 done
20162         fi
20163
20164         if test $have_tcl != yes ; then
20165                 echo "configure: warning: could not find -ltcl" 1>&2
20166                 if test $ol_enable_tcl = yes ; then
20167                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20168                 fi
20169
20170                 ol_enable_tcl=no
20171         fi
20172 fi
20173
20174 ol_link_termcap=no
20175 for ac_hdr in termcap.h ncurses.h
20176 do
20177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20179 echo "configure:20180: checking for $ac_hdr" >&5
20180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20181   echo $ac_n "(cached) $ac_c" 1>&6
20182 else
20183   cat > conftest.$ac_ext <<EOF
20184 #line 20185 "configure"
20185 #include "confdefs.h"
20186 #include <$ac_hdr>
20187 EOF
20188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20189 { (eval echo configure:20190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20191 if test -z "$ac_err"; then
20192   rm -rf conftest*
20193   eval "ac_cv_header_$ac_safe=yes"
20194 else
20195   echo "$ac_err" >&5
20196   echo "configure: failed program was:" >&5
20197   cat conftest.$ac_ext >&5
20198   rm -rf conftest*
20199   eval "ac_cv_header_$ac_safe=no"
20200 fi
20201 rm -f conftest*
20202 fi
20203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20204   echo "$ac_t""yes" 1>&6
20205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20206   cat >> confdefs.h <<EOF
20207 #define $ac_tr_hdr 1
20208 EOF
20209  
20210 else
20211   echo "$ac_t""no" 1>&6
20212 fi
20213 done
20214
20215
20216 if test $ol_link_termcap = no ; then
20217         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20218 echo "configure:20219: checking for tputs in -ltermcap" >&5
20219 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20221   echo $ac_n "(cached) $ac_c" 1>&6
20222 else
20223   ac_save_LIBS="$LIBS"
20224 LIBS="-ltermcap  $LIBS"
20225 cat > conftest.$ac_ext <<EOF
20226 #line 20227 "configure"
20227 #include "confdefs.h"
20228 /* Override any gcc2 internal prototype to avoid an error.  */
20229 /* We use char because int might match the return type of a gcc2
20230     builtin and then its argument prototype would still apply.  */
20231 char tputs();
20232
20233 int main() {
20234 tputs()
20235 ; return 0; }
20236 EOF
20237 if { (eval echo configure:20238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20238   rm -rf conftest*
20239   eval "ac_cv_lib_$ac_lib_var=yes"
20240 else
20241   echo "configure: failed program was:" >&5
20242   cat conftest.$ac_ext >&5
20243   rm -rf conftest*
20244   eval "ac_cv_lib_$ac_lib_var=no"
20245 fi
20246 rm -f conftest*
20247 LIBS="$ac_save_LIBS"
20248
20249 fi
20250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20251   echo "$ac_t""yes" 1>&6
20252   have_termcap=yes
20253 else
20254   echo "$ac_t""no" 1>&6
20255 have_termcap=no
20256 fi
20257
20258         if test $have_termcap = yes ; then
20259                 cat >> confdefs.h <<\EOF
20260 #define HAVE_TERMCAP 1
20261 EOF
20262
20263                 ol_link_termcap=yes
20264                 TERMCAP_LIBS=-ltermcap
20265         fi
20266 fi
20267
20268 if test $ol_link_termcap = no ; then
20269         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20270 echo "configure:20271: checking for initscr in -lncurses" >&5
20271 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20273   echo $ac_n "(cached) $ac_c" 1>&6
20274 else
20275   ac_save_LIBS="$LIBS"
20276 LIBS="-lncurses  $LIBS"
20277 cat > conftest.$ac_ext <<EOF
20278 #line 20279 "configure"
20279 #include "confdefs.h"
20280 /* Override any gcc2 internal prototype to avoid an error.  */
20281 /* We use char because int might match the return type of a gcc2
20282     builtin and then its argument prototype would still apply.  */
20283 char initscr();
20284
20285 int main() {
20286 initscr()
20287 ; return 0; }
20288 EOF
20289 if { (eval echo configure:20290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20290   rm -rf conftest*
20291   eval "ac_cv_lib_$ac_lib_var=yes"
20292 else
20293   echo "configure: failed program was:" >&5
20294   cat conftest.$ac_ext >&5
20295   rm -rf conftest*
20296   eval "ac_cv_lib_$ac_lib_var=no"
20297 fi
20298 rm -f conftest*
20299 LIBS="$ac_save_LIBS"
20300
20301 fi
20302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20303   echo "$ac_t""yes" 1>&6
20304   have_ncurses=yes
20305 else
20306   echo "$ac_t""no" 1>&6
20307 have_ncurses=no
20308 fi
20309
20310         if test $have_ncurses = yes ; then
20311                 cat >> confdefs.h <<\EOF
20312 #define HAVE_NCURSES 1
20313 EOF
20314
20315                 ol_link_termcap=yes
20316                 TERMCAP_LIBS=-lncurses
20317         fi
20318 fi
20319
20320 if test $ol_link_termcap = no ; then
20321         cat >> confdefs.h <<\EOF
20322 #define NO_TERMCAP 1
20323 EOF
20324
20325         TERMCAP_LIBS=
20326 fi
20327
20328 ol_link_sasl=no
20329 ol_link_spasswd=no
20330 if test $ol_with_cyrus_sasl != no ; then
20331         for ac_hdr in sasl/sasl.h sasl.h
20332 do
20333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20335 echo "configure:20336: checking for $ac_hdr" >&5
20336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20337   echo $ac_n "(cached) $ac_c" 1>&6
20338 else
20339   cat > conftest.$ac_ext <<EOF
20340 #line 20341 "configure"
20341 #include "confdefs.h"
20342 #include <$ac_hdr>
20343 EOF
20344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20345 { (eval echo configure:20346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20347 if test -z "$ac_err"; then
20348   rm -rf conftest*
20349   eval "ac_cv_header_$ac_safe=yes"
20350 else
20351   echo "$ac_err" >&5
20352   echo "configure: failed program was:" >&5
20353   cat conftest.$ac_ext >&5
20354   rm -rf conftest*
20355   eval "ac_cv_header_$ac_safe=no"
20356 fi
20357 rm -f conftest*
20358 fi
20359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20360   echo "$ac_t""yes" 1>&6
20361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20362   cat >> confdefs.h <<EOF
20363 #define $ac_tr_hdr 1
20364 EOF
20365  
20366 else
20367   echo "$ac_t""no" 1>&6
20368 fi
20369 done
20370
20371
20372         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20373                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20374 echo "configure:20375: checking for sasl_client_init in -lsasl2" >&5
20375 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20377   echo $ac_n "(cached) $ac_c" 1>&6
20378 else
20379   ac_save_LIBS="$LIBS"
20380 LIBS="-lsasl2  $LIBS"
20381 cat > conftest.$ac_ext <<EOF
20382 #line 20383 "configure"
20383 #include "confdefs.h"
20384 /* Override any gcc2 internal prototype to avoid an error.  */
20385 /* We use char because int might match the return type of a gcc2
20386     builtin and then its argument prototype would still apply.  */
20387 char sasl_client_init();
20388
20389 int main() {
20390 sasl_client_init()
20391 ; return 0; }
20392 EOF
20393 if { (eval echo configure:20394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20394   rm -rf conftest*
20395   eval "ac_cv_lib_$ac_lib_var=yes"
20396 else
20397   echo "configure: failed program was:" >&5
20398   cat conftest.$ac_ext >&5
20399   rm -rf conftest*
20400   eval "ac_cv_lib_$ac_lib_var=no"
20401 fi
20402 rm -f conftest*
20403 LIBS="$ac_save_LIBS"
20404
20405 fi
20406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20407   echo "$ac_t""yes" 1>&6
20408   ol_link_sasl="-lsasl2"
20409 else
20410   echo "$ac_t""no" 1>&6
20411 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20412 echo "configure:20413: checking for sasl_client_init in -lsasl" >&5
20413 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20415   echo $ac_n "(cached) $ac_c" 1>&6
20416 else
20417   ac_save_LIBS="$LIBS"
20418 LIBS="-lsasl  $LIBS"
20419 cat > conftest.$ac_ext <<EOF
20420 #line 20421 "configure"
20421 #include "confdefs.h"
20422 /* Override any gcc2 internal prototype to avoid an error.  */
20423 /* We use char because int might match the return type of a gcc2
20424     builtin and then its argument prototype would still apply.  */
20425 char sasl_client_init();
20426
20427 int main() {
20428 sasl_client_init()
20429 ; return 0; }
20430 EOF
20431 if { (eval echo configure:20432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20432   rm -rf conftest*
20433   eval "ac_cv_lib_$ac_lib_var=yes"
20434 else
20435   echo "configure: failed program was:" >&5
20436   cat conftest.$ac_ext >&5
20437   rm -rf conftest*
20438   eval "ac_cv_lib_$ac_lib_var=no"
20439 fi
20440 rm -f conftest*
20441 LIBS="$ac_save_LIBS"
20442
20443 fi
20444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20445   echo "$ac_t""yes" 1>&6
20446   ol_link_sasl="-lsasl"
20447 else
20448   echo "$ac_t""no" 1>&6
20449 fi
20450
20451 fi
20452
20453         fi
20454
20455         if test $ol_link_sasl = no ; then
20456                 if test $ol_with_cyrus_sasl != auto ; then
20457                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20458                 else
20459                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20460                         echo "configure: warning: SASL authentication not supported!" 1>&2
20461                         if test $ol_link_tls = no ; then
20462                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20463                         fi
20464                 fi
20465         else
20466                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20467 echo "configure:20468: checking Cyrus SASL library version" >&5
20468 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   
20472         cat > conftest.$ac_ext <<EOF
20473 #line 20474 "configure"
20474 #include "confdefs.h"
20475
20476 #ifdef HAVE_SASL_SASL_H
20477 #include <sasl/sasl.h>
20478 #else
20479 #include <sasl.h>
20480 #endif
20481
20482 /* require 2.1.3 or later */
20483 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20484         char *__sasl_compat = "2.2+ or better okay (we guess)";
20485 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20486         && SASL_VERSION_STEP >=3
20487         char *__sasl_compat = "2.1.3+ or better okay";
20488 #endif
20489         
20490 EOF
20491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20492   egrep "__sasl_compat" >/dev/null 2>&1; then
20493   rm -rf conftest*
20494   ol_cv_sasl_compat=yes
20495 else
20496   rm -rf conftest*
20497   ol_cv_sasl_compat=no
20498 fi
20499 rm -f conftest*
20500
20501 fi
20502
20503 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20504
20505                 if test $ol_cv_sasl_compat = no ; then
20506                         ol_link_sasl=no
20507                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20508                 fi
20509
20510                 cat >> confdefs.h <<\EOF
20511 #define HAVE_CYRUS_SASL 1
20512 EOF
20513
20514                 SASL_LIBS="$ol_link_sasl"
20515                 if test $ol_enable_spasswd != no ; then
20516                         ol_link_spasswd=yes
20517                 fi
20518
20519                 ac_save_LIBS="$LIBS"
20520                 LIBS="$LIBS $ol_link_sasl"
20521                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20522 echo "configure:20523: checking for sasl_version" >&5
20523 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20524   echo $ac_n "(cached) $ac_c" 1>&6
20525 else
20526   cat > conftest.$ac_ext <<EOF
20527 #line 20528 "configure"
20528 #include "confdefs.h"
20529 /* System header to define __stub macros and hopefully few prototypes,
20530     which can conflict with char sasl_version(); below.  */
20531 #include <assert.h>
20532 /* Override any gcc2 internal prototype to avoid an error.  */
20533 /* We use char because int might match the return type of a gcc2
20534     builtin and then its argument prototype would still apply.  */
20535 char sasl_version();
20536 char (*f)();
20537
20538 int main() {
20539
20540 /* The GNU C library defines this for functions which it implements
20541     to always fail with ENOSYS.  Some functions are actually named
20542     something starting with __ and the normal name is an alias.  */
20543 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20544 choke me
20545 #else
20546 f = sasl_version;
20547 #endif
20548
20549 ; return 0; }
20550 EOF
20551 if { (eval echo configure:20552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20552   rm -rf conftest*
20553   eval "ac_cv_func_sasl_version=yes"
20554 else
20555   echo "configure: failed program was:" >&5
20556   cat conftest.$ac_ext >&5
20557   rm -rf conftest*
20558   eval "ac_cv_func_sasl_version=no"
20559 fi
20560 rm -f conftest*
20561 fi
20562
20563 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20564   echo "$ac_t""yes" 1>&6
20565   cat >> confdefs.h <<\EOF
20566 #define HAVE_SASL_VERSION 1
20567 EOF
20568
20569 else
20570   echo "$ac_t""no" 1>&6
20571 fi
20572
20573                 LIBS="$ac_save_LIBS"
20574         fi
20575
20576 else
20577         echo "configure: warning: SASL authentication not supported!" 1>&2
20578         if test $ol_link_tls = no ; then
20579                 echo "configure: warning: Strong authentication not supported!" 1>&2
20580         fi
20581 fi
20582
20583 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20584         dev=no
20585         if test -r /dev/urandom ; then
20586                 dev="/dev/urandom";
20587         elif test -r /idev/urandom ; then
20588                 dev="/idev/urandom";
20589         elif test -r /dev/srandom ; then
20590                 dev="/dev/srandom";
20591         elif test -r /dev/random ; then
20592                 dev="/dev/random";
20593         elif test -r /idev/random ; then
20594                 dev="/idev/random";
20595         fi
20596
20597         if test $dev != no ; then
20598                 cat >> confdefs.h <<EOF
20599 #define URANDOM_DEVICE "$dev"
20600 EOF
20601
20602         fi
20603 fi
20604
20605 ol_link_fetch=no
20606 if test $ol_with_fetch != no ; then
20607         ol_LIBS=$LIBS
20608 LIBS="-lfetch -lcom_err $LIBS"
20609 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20610 echo "configure:20611: checking fetch(3) library" >&5
20611 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20612   echo $ac_n "(cached) $ac_c" 1>&6
20613 else
20614   
20615         cat > conftest.$ac_ext <<EOF
20616 #line 20617 "configure"
20617 #include "confdefs.h"
20618
20619 #include <sys/param.h>
20620 #include <stdio.h>
20621 #include <fetch.h>
20622 int main() {
20623 struct url *u = fetchParseURL("file:///"); 
20624 ; return 0; }
20625 EOF
20626 if { (eval echo configure:20627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20627   rm -rf conftest*
20628   ol_cv_lib_fetch=yes
20629 else
20630   echo "configure: failed program was:" >&5
20631   cat conftest.$ac_ext >&5
20632   rm -rf conftest*
20633   ol_cv_lib_fetch=no
20634 fi
20635 rm -f conftest*
20636 fi
20637
20638 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20639 LIBS=$ol_LIBS
20640 if test $ol_cv_lib_fetch != no ; then
20641         ol_link_fetch="-lfetch -lcom_err"
20642         cat >> confdefs.h <<\EOF
20643 #define HAVE_FETCH 1
20644 EOF
20645
20646 fi
20647
20648
20649         if test $ol_cv_lib_fetch != no ; then
20650                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20651                 ol_link_fetch=freebsd
20652
20653         elif test $ol_with_fetch != auto ; then
20654                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20655         fi 
20656 fi
20657
20658 if test $ol_enable_crypt != no ; then
20659         save_LIBS="$LIBS"
20660         LIBS="$TLS_LIBS $LIBS"
20661
20662         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20663 echo "configure:20664: checking for crypt" >&5
20664 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20665   echo $ac_n "(cached) $ac_c" 1>&6
20666 else
20667   cat > conftest.$ac_ext <<EOF
20668 #line 20669 "configure"
20669 #include "confdefs.h"
20670 /* System header to define __stub macros and hopefully few prototypes,
20671     which can conflict with char crypt(); below.  */
20672 #include <assert.h>
20673 /* Override any gcc2 internal prototype to avoid an error.  */
20674 /* We use char because int might match the return type of a gcc2
20675     builtin and then its argument prototype would still apply.  */
20676 char crypt();
20677 char (*f)();
20678
20679 int main() {
20680
20681 /* The GNU C library defines this for functions which it implements
20682     to always fail with ENOSYS.  Some functions are actually named
20683     something starting with __ and the normal name is an alias.  */
20684 #if defined (__stub_crypt) || defined (__stub___crypt)
20685 choke me
20686 #else
20687 f = crypt;
20688 #endif
20689
20690 ; return 0; }
20691 EOF
20692 if { (eval echo configure:20693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20693   rm -rf conftest*
20694   eval "ac_cv_func_crypt=yes"
20695 else
20696   echo "configure: failed program was:" >&5
20697   cat conftest.$ac_ext >&5
20698   rm -rf conftest*
20699   eval "ac_cv_func_crypt=no"
20700 fi
20701 rm -f conftest*
20702 fi
20703
20704 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20705   echo "$ac_t""yes" 1>&6
20706   have_crypt=yes
20707 else
20708   echo "$ac_t""no" 1>&6
20709
20710                 LIBS="$save_LIBS"
20711                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20712 echo "configure:20713: checking for crypt in -lcrypt" >&5
20713 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20715   echo $ac_n "(cached) $ac_c" 1>&6
20716 else
20717   ac_save_LIBS="$LIBS"
20718 LIBS="-lcrypt  $LIBS"
20719 cat > conftest.$ac_ext <<EOF
20720 #line 20721 "configure"
20721 #include "confdefs.h"
20722 /* Override any gcc2 internal prototype to avoid an error.  */
20723 /* We use char because int might match the return type of a gcc2
20724     builtin and then its argument prototype would still apply.  */
20725 char crypt();
20726
20727 int main() {
20728 crypt()
20729 ; return 0; }
20730 EOF
20731 if { (eval echo configure:20732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20732   rm -rf conftest*
20733   eval "ac_cv_lib_$ac_lib_var=yes"
20734 else
20735   echo "configure: failed program was:" >&5
20736   cat conftest.$ac_ext >&5
20737   rm -rf conftest*
20738   eval "ac_cv_lib_$ac_lib_var=no"
20739 fi
20740 rm -f conftest*
20741 LIBS="$ac_save_LIBS"
20742
20743 fi
20744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20745   echo "$ac_t""yes" 1>&6
20746   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20747                         have_crypt=yes
20748 else
20749   echo "$ac_t""no" 1>&6
20750 have_crypt=no
20751 fi
20752
20753 fi
20754
20755
20756         LIBS="$save_LIBS"
20757
20758         if test $have_crypt = yes ; then
20759                 cat >> confdefs.h <<\EOF
20760 #define HAVE_CRYPT 1
20761 EOF
20762
20763         else
20764                 echo "configure: warning: could not find crypt" 1>&2
20765                 if test $ol_enable_crypt = yes ; then
20766                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20767                 fi
20768
20769                 echo "configure: warning: disabling crypt support" 1>&2
20770                 ol_enable_crypt=no
20771         fi
20772 fi
20773
20774 if test $ol_enable_proctitle != no ; then
20775         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20776 echo "configure:20777: checking for setproctitle" >&5
20777 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20778   echo $ac_n "(cached) $ac_c" 1>&6
20779 else
20780   cat > conftest.$ac_ext <<EOF
20781 #line 20782 "configure"
20782 #include "confdefs.h"
20783 /* System header to define __stub macros and hopefully few prototypes,
20784     which can conflict with char setproctitle(); below.  */
20785 #include <assert.h>
20786 /* Override any gcc2 internal prototype to avoid an error.  */
20787 /* We use char because int might match the return type of a gcc2
20788     builtin and then its argument prototype would still apply.  */
20789 char setproctitle();
20790 char (*f)();
20791
20792 int main() {
20793
20794 /* The GNU C library defines this for functions which it implements
20795     to always fail with ENOSYS.  Some functions are actually named
20796     something starting with __ and the normal name is an alias.  */
20797 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20798 choke me
20799 #else
20800 f = setproctitle;
20801 #endif
20802
20803 ; return 0; }
20804 EOF
20805 if { (eval echo configure:20806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20806   rm -rf conftest*
20807   eval "ac_cv_func_setproctitle=yes"
20808 else
20809   echo "configure: failed program was:" >&5
20810   cat conftest.$ac_ext >&5
20811   rm -rf conftest*
20812   eval "ac_cv_func_setproctitle=no"
20813 fi
20814 rm -f conftest*
20815 fi
20816
20817 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20818   echo "$ac_t""yes" 1>&6
20819   have_setproctitle=yes
20820 else
20821   echo "$ac_t""no" 1>&6
20822
20823                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20824 echo "configure:20825: checking for setproctitle in -lutil" >&5
20825 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20827   echo $ac_n "(cached) $ac_c" 1>&6
20828 else
20829   ac_save_LIBS="$LIBS"
20830 LIBS="-lutil  $LIBS"
20831 cat > conftest.$ac_ext <<EOF
20832 #line 20833 "configure"
20833 #include "confdefs.h"
20834 /* Override any gcc2 internal prototype to avoid an error.  */
20835 /* We use char because int might match the return type of a gcc2
20836     builtin and then its argument prototype would still apply.  */
20837 char setproctitle();
20838
20839 int main() {
20840 setproctitle()
20841 ; return 0; }
20842 EOF
20843 if { (eval echo configure:20844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20844   rm -rf conftest*
20845   eval "ac_cv_lib_$ac_lib_var=yes"
20846 else
20847   echo "configure: failed program was:" >&5
20848   cat conftest.$ac_ext >&5
20849   rm -rf conftest*
20850   eval "ac_cv_lib_$ac_lib_var=no"
20851 fi
20852 rm -f conftest*
20853 LIBS="$ac_save_LIBS"
20854
20855 fi
20856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20857   echo "$ac_t""yes" 1>&6
20858   have_setproctitle=yes
20859                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20860 else
20861   echo "$ac_t""no" 1>&6
20862 have_setproctitle=no
20863                         LIBOBJS="$LIBOBJS setproctitle.o"
20864                         LIBSRCS="$LIBSRCS setproctitle.c"
20865 fi
20866
20867 fi
20868
20869
20870         if test $have_setproctitle = yes ; then
20871                 cat >> confdefs.h <<\EOF
20872 #define HAVE_SETPROCTITLE 1
20873 EOF
20874
20875         fi
20876 fi
20877
20878 if test $ol_enable_slp != no ; then
20879         for ac_hdr in slp.h 
20880 do
20881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20883 echo "configure:20884: checking for $ac_hdr" >&5
20884 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20885   echo $ac_n "(cached) $ac_c" 1>&6
20886 else
20887   cat > conftest.$ac_ext <<EOF
20888 #line 20889 "configure"
20889 #include "confdefs.h"
20890 #include <$ac_hdr>
20891 EOF
20892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20893 { (eval echo configure:20894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20895 if test -z "$ac_err"; then
20896   rm -rf conftest*
20897   eval "ac_cv_header_$ac_safe=yes"
20898 else
20899   echo "$ac_err" >&5
20900   echo "configure: failed program was:" >&5
20901   cat conftest.$ac_ext >&5
20902   rm -rf conftest*
20903   eval "ac_cv_header_$ac_safe=no"
20904 fi
20905 rm -f conftest*
20906 fi
20907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20908   echo "$ac_t""yes" 1>&6
20909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20910   cat >> confdefs.h <<EOF
20911 #define $ac_tr_hdr 1
20912 EOF
20913  
20914 else
20915   echo "$ac_t""no" 1>&6
20916 fi
20917 done
20918
20919
20920         if test $ac_cv_header_slp_h = yes ; then
20921                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20922 echo "configure:20923: checking for SLPOpen in -lslp" >&5
20923 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20925   echo $ac_n "(cached) $ac_c" 1>&6
20926 else
20927   ac_save_LIBS="$LIBS"
20928 LIBS="-lslp  $LIBS"
20929 cat > conftest.$ac_ext <<EOF
20930 #line 20931 "configure"
20931 #include "confdefs.h"
20932 /* Override any gcc2 internal prototype to avoid an error.  */
20933 /* We use char because int might match the return type of a gcc2
20934     builtin and then its argument prototype would still apply.  */
20935 char SLPOpen();
20936
20937 int main() {
20938 SLPOpen()
20939 ; return 0; }
20940 EOF
20941 if { (eval echo configure:20942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20942   rm -rf conftest*
20943   eval "ac_cv_lib_$ac_lib_var=yes"
20944 else
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   eval "ac_cv_lib_$ac_lib_var=no"
20949 fi
20950 rm -f conftest*
20951 LIBS="$ac_save_LIBS"
20952
20953 fi
20954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20955   echo "$ac_t""yes" 1>&6
20956   have_slp=yes
20957 else
20958   echo "$ac_t""no" 1>&6
20959 have_slp=no
20960 fi
20961
20962                 if test $have_slp = yes ; then
20963                         cat >> confdefs.h <<\EOF
20964 #define HAVE_SLP 1
20965 EOF
20966
20967                         SLAPD_SLP_LIBS=-lslp
20968                 fi
20969
20970         elif test $ol_enable_slp = yes ; then
20971                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20972         fi
20973 fi
20974
20975
20976 echo $ac_n "checking long long""... $ac_c" 1>&6
20977 echo "configure:20978: checking long long" >&5
20978 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20979   echo $ac_n "(cached) $ac_c" 1>&6
20980 else
20981   
20982         cat > conftest.$ac_ext <<EOF
20983 #line 20984 "configure"
20984 #include "confdefs.h"
20985
20986 int main() {
20987 long long x;
20988 ; return 0; }
20989 EOF
20990 if { (eval echo configure:20991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20991   rm -rf conftest*
20992   ol_cv_type_long_long=yes
20993 else
20994   echo "configure: failed program was:" >&5
20995   cat conftest.$ac_ext >&5
20996   rm -rf conftest*
20997   ol_cv_type_long_long=no
20998 fi
20999 rm -f conftest*
21000 fi
21001
21002 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21003 if test $ol_cv_type_long_long = yes; then
21004         cat >> confdefs.h <<\EOF
21005 #define HAVE_LONG_LONG 1
21006 EOF
21007
21008 fi
21009
21010 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21011 echo "configure:21012: checking for ANSI C header files" >&5
21012 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21013   echo $ac_n "(cached) $ac_c" 1>&6
21014 else
21015   cat > conftest.$ac_ext <<EOF
21016 #line 21017 "configure"
21017 #include "confdefs.h"
21018 #include <stdlib.h>
21019 #include <stdarg.h>
21020 #include <string.h>
21021 #include <float.h>
21022 EOF
21023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21024 { (eval echo configure:21025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21026 if test -z "$ac_err"; then
21027   rm -rf conftest*
21028   ac_cv_header_stdc=yes
21029 else
21030   echo "$ac_err" >&5
21031   echo "configure: failed program was:" >&5
21032   cat conftest.$ac_ext >&5
21033   rm -rf conftest*
21034   ac_cv_header_stdc=no
21035 fi
21036 rm -f conftest*
21037
21038 if test $ac_cv_header_stdc = yes; then
21039   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21040 cat > conftest.$ac_ext <<EOF
21041 #line 21042 "configure"
21042 #include "confdefs.h"
21043 #include <string.h>
21044 EOF
21045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21046   egrep "memchr" >/dev/null 2>&1; then
21047   :
21048 else
21049   rm -rf conftest*
21050   ac_cv_header_stdc=no
21051 fi
21052 rm -f conftest*
21053
21054 fi
21055
21056 if test $ac_cv_header_stdc = yes; then
21057   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21058 cat > conftest.$ac_ext <<EOF
21059 #line 21060 "configure"
21060 #include "confdefs.h"
21061 #include <stdlib.h>
21062 EOF
21063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21064   egrep "free" >/dev/null 2>&1; then
21065   :
21066 else
21067   rm -rf conftest*
21068   ac_cv_header_stdc=no
21069 fi
21070 rm -f conftest*
21071
21072 fi
21073
21074 if test $ac_cv_header_stdc = yes; then
21075   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21076 if test "$cross_compiling" = yes; then
21077   :
21078 else
21079   cat > conftest.$ac_ext <<EOF
21080 #line 21081 "configure"
21081 #include "confdefs.h"
21082 #include <ctype.h>
21083 #if ((' ' & 0x0FF) == 0x020)
21084 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21085 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21086 #else
21087 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21088  || ('j' <= (c) && (c) <= 'r') \
21089  || ('s' <= (c) && (c) <= 'z'))
21090 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21091 #endif
21092 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21093 int main () { int i; for (i = 0; i < 256; i++)
21094 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21095 exit (0); }
21096
21097 EOF
21098 if { (eval echo configure:21099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21099 then
21100   :
21101 else
21102   echo "configure: failed program was:" >&5
21103   cat conftest.$ac_ext >&5
21104   rm -fr conftest*
21105   ac_cv_header_stdc=no
21106 fi
21107 rm -fr conftest*
21108 fi
21109
21110 fi
21111 fi
21112
21113 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21114 if test $ac_cv_header_stdc = yes; then
21115   cat >> confdefs.h <<\EOF
21116 #define STDC_HEADERS 1
21117 EOF
21118
21119 fi
21120
21121 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21122 echo "configure:21123: checking for mode_t" >&5
21123 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21124   echo $ac_n "(cached) $ac_c" 1>&6
21125 else
21126   cat > conftest.$ac_ext <<EOF
21127 #line 21128 "configure"
21128 #include "confdefs.h"
21129 #include <sys/types.h>
21130 #if STDC_HEADERS
21131 #include <stdlib.h>
21132 #include <stddef.h>
21133 #endif
21134
21135 EOF
21136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21137   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21138   rm -rf conftest*
21139   eval "ac_cv_type_mode_t=yes"
21140 else
21141   rm -rf conftest*
21142   eval "ac_cv_type_mode_t=no"
21143 fi
21144 rm -f conftest*
21145
21146 fi
21147 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21148   echo "$ac_t""yes" 1>&6
21149 else
21150   echo "$ac_t""no" 1>&6
21151   cat >> confdefs.h <<EOF
21152 #define mode_t int
21153 EOF
21154
21155 fi
21156
21157 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21158 echo "configure:21159: checking for off_t" >&5
21159 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21160   echo $ac_n "(cached) $ac_c" 1>&6
21161 else
21162   cat > conftest.$ac_ext <<EOF
21163 #line 21164 "configure"
21164 #include "confdefs.h"
21165 #include <sys/types.h>
21166 #if STDC_HEADERS
21167 #include <stdlib.h>
21168 #include <stddef.h>
21169 #endif
21170
21171 EOF
21172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21173   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21174   rm -rf conftest*
21175   eval "ac_cv_type_off_t=yes"
21176 else
21177   rm -rf conftest*
21178   eval "ac_cv_type_off_t=no"
21179 fi
21180 rm -f conftest*
21181
21182 fi
21183 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21184   echo "$ac_t""yes" 1>&6
21185 else
21186   echo "$ac_t""no" 1>&6
21187   cat >> confdefs.h <<EOF
21188 #define off_t long
21189 EOF
21190
21191 fi
21192
21193 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21194 echo "configure:21195: checking for pid_t" >&5
21195 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21196   echo $ac_n "(cached) $ac_c" 1>&6
21197 else
21198   cat > conftest.$ac_ext <<EOF
21199 #line 21200 "configure"
21200 #include "confdefs.h"
21201 #include <sys/types.h>
21202 #if STDC_HEADERS
21203 #include <stdlib.h>
21204 #include <stddef.h>
21205 #endif
21206
21207 EOF
21208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21209   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21210   rm -rf conftest*
21211   eval "ac_cv_type_pid_t=yes"
21212 else
21213   rm -rf conftest*
21214   eval "ac_cv_type_pid_t=no"
21215 fi
21216 rm -f conftest*
21217
21218 fi
21219 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21220   echo "$ac_t""yes" 1>&6
21221 else
21222   echo "$ac_t""no" 1>&6
21223   cat >> confdefs.h <<EOF
21224 #define pid_t int
21225 EOF
21226
21227 fi
21228
21229 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21230 echo "configure:21231: checking for ptrdiff_t" >&5
21231 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   cat > conftest.$ac_ext <<EOF
21235 #line 21236 "configure"
21236 #include "confdefs.h"
21237 #include <stddef.h>
21238 int main() {
21239 ptrdiff_t p
21240 ; return 0; }
21241 EOF
21242 if { (eval echo configure:21243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21243   rm -rf conftest*
21244   am_cv_type_ptrdiff_t=yes
21245 else
21246   echo "configure: failed program was:" >&5
21247   cat conftest.$ac_ext >&5
21248   rm -rf conftest*
21249   am_cv_type_ptrdiff_t=no
21250 fi
21251 rm -f conftest*
21252 fi
21253
21254 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21255    if test $am_cv_type_ptrdiff_t = yes; then
21256      cat >> confdefs.h <<\EOF
21257 #define HAVE_PTRDIFF_T 1
21258 EOF
21259
21260    fi
21261
21262 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21263 echo "configure:21264: checking return type of signal handlers" >&5
21264 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21265   echo $ac_n "(cached) $ac_c" 1>&6
21266 else
21267   cat > conftest.$ac_ext <<EOF
21268 #line 21269 "configure"
21269 #include "confdefs.h"
21270 #include <sys/types.h>
21271 #include <signal.h>
21272 #ifdef signal
21273 #undef signal
21274 #endif
21275 #ifdef __cplusplus
21276 extern "C" void (*signal (int, void (*)(int)))(int);
21277 #else
21278 void (*signal ()) ();
21279 #endif
21280
21281 int main() {
21282 int i;
21283 ; return 0; }
21284 EOF
21285 if { (eval echo configure:21286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21286   rm -rf conftest*
21287   ac_cv_type_signal=void
21288 else
21289   echo "configure: failed program was:" >&5
21290   cat conftest.$ac_ext >&5
21291   rm -rf conftest*
21292   ac_cv_type_signal=int
21293 fi
21294 rm -f conftest*
21295 fi
21296
21297 echo "$ac_t""$ac_cv_type_signal" 1>&6
21298 cat >> confdefs.h <<EOF
21299 #define RETSIGTYPE $ac_cv_type_signal
21300 EOF
21301
21302
21303 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21304 echo "configure:21305: checking for size_t" >&5
21305 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21306   echo $ac_n "(cached) $ac_c" 1>&6
21307 else
21308   cat > conftest.$ac_ext <<EOF
21309 #line 21310 "configure"
21310 #include "confdefs.h"
21311 #include <sys/types.h>
21312 #if STDC_HEADERS
21313 #include <stdlib.h>
21314 #include <stddef.h>
21315 #endif
21316
21317 EOF
21318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21319   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21320   rm -rf conftest*
21321   eval "ac_cv_type_size_t=yes"
21322 else
21323   rm -rf conftest*
21324   eval "ac_cv_type_size_t=no"
21325 fi
21326 rm -f conftest*
21327
21328 fi
21329 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21330   echo "$ac_t""yes" 1>&6
21331 else
21332   echo "$ac_t""no" 1>&6
21333   cat >> confdefs.h <<EOF
21334 #define size_t unsigned
21335 EOF
21336
21337 fi
21338
21339
21340 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21341 echo "configure:21342: checking for ssize_t" >&5
21342 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21343   echo $ac_n "(cached) $ac_c" 1>&6
21344 else
21345   cat > conftest.$ac_ext <<EOF
21346 #line 21347 "configure"
21347 #include "confdefs.h"
21348 #include <sys/types.h>
21349 #if STDC_HEADERS
21350 #include <stdlib.h>
21351 #include <stddef.h>
21352 #endif
21353
21354 EOF
21355 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21356   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21357   rm -rf conftest*
21358   eval "ac_cv_type_ssize_t=yes"
21359 else
21360   rm -rf conftest*
21361   eval "ac_cv_type_ssize_t=no"
21362 fi
21363 rm -f conftest*
21364
21365 fi
21366 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21367   echo "$ac_t""yes" 1>&6
21368 else
21369   echo "$ac_t""no" 1>&6
21370   cat >> confdefs.h <<EOF
21371 #define ssize_t signed int
21372 EOF
21373
21374 fi
21375
21376 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21377 echo "configure:21378: checking for caddr_t" >&5
21378 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21379   echo $ac_n "(cached) $ac_c" 1>&6
21380 else
21381   cat > conftest.$ac_ext <<EOF
21382 #line 21383 "configure"
21383 #include "confdefs.h"
21384 #include <sys/types.h>
21385 #if STDC_HEADERS
21386 #include <stdlib.h>
21387 #include <stddef.h>
21388 #endif
21389
21390 EOF
21391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21392   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21393   rm -rf conftest*
21394   eval "ac_cv_type_caddr_t=yes"
21395 else
21396   rm -rf conftest*
21397   eval "ac_cv_type_caddr_t=no"
21398 fi
21399 rm -f conftest*
21400
21401 fi
21402 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21403   echo "$ac_t""yes" 1>&6
21404 else
21405   echo "$ac_t""no" 1>&6
21406   cat >> confdefs.h <<EOF
21407 #define caddr_t char *
21408 EOF
21409
21410 fi
21411
21412
21413 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21414 echo "configure:21415: checking for socklen_t" >&5
21415 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21416   echo $ac_n "(cached) $ac_c" 1>&6
21417 else
21418   cat > conftest.$ac_ext <<EOF
21419 #line 21420 "configure"
21420 #include "confdefs.h"
21421
21422 #ifdef HAVE_SYS_TYPES_H
21423 #include <sys/types.h>
21424 #endif
21425 #ifdef HAVE_SYS_SOCKET_H
21426 #include <sys/socket.h>
21427 #endif
21428
21429 int main() {
21430 socklen_t len;
21431 ; return 0; }
21432 EOF
21433 if { (eval echo configure:21434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21434   rm -rf conftest*
21435   ol_cv_type_socklen_t=yes
21436 else
21437   echo "configure: failed program was:" >&5
21438   cat conftest.$ac_ext >&5
21439   rm -rf conftest*
21440   ol_cv_type_socklen_t=no
21441 fi
21442 rm -f conftest*
21443 fi
21444
21445 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21446   if test $ol_cv_type_socklen_t = no; then
21447     cat >> confdefs.h <<\EOF
21448 #define socklen_t int
21449 EOF
21450
21451   fi
21452  
21453 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21454 echo "configure:21455: checking for member st_blksize in aggregate type struct stat" >&5
21455 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21456   echo $ac_n "(cached) $ac_c" 1>&6
21457 else
21458   cat > conftest.$ac_ext <<EOF
21459 #line 21460 "configure"
21460 #include "confdefs.h"
21461 #include <sys/types.h>
21462 #include <sys/stat.h>
21463 int main() {
21464 struct stat foo; foo.st_blksize;
21465 ; return 0; }
21466 EOF
21467 if { (eval echo configure:21468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21468   rm -rf conftest*
21469   ac_cv_c_struct_member_st_blksize=yes
21470 else
21471   echo "configure: failed program was:" >&5
21472   cat conftest.$ac_ext >&5
21473   rm -rf conftest*
21474   ac_cv_c_struct_member_st_blksize=no
21475 fi
21476 rm -f conftest*
21477 fi
21478
21479 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21480 st_blksize="$ac_cv_c_struct_member_st_blksize"
21481 if test $ac_cv_c_struct_member_st_blksize = yes; then
21482   cat >> confdefs.h <<\EOF
21483 #define HAVE_ST_BLKSIZE 1
21484 EOF
21485
21486 fi
21487
21488 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21489 echo "configure:21490: checking whether time.h and sys/time.h may both be included" >&5
21490 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21491   echo $ac_n "(cached) $ac_c" 1>&6
21492 else
21493   cat > conftest.$ac_ext <<EOF
21494 #line 21495 "configure"
21495 #include "confdefs.h"
21496 #include <sys/types.h>
21497 #include <sys/time.h>
21498 #include <time.h>
21499 int main() {
21500 struct tm *tp;
21501 ; return 0; }
21502 EOF
21503 if { (eval echo configure:21504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21504   rm -rf conftest*
21505   ac_cv_header_time=yes
21506 else
21507   echo "configure: failed program was:" >&5
21508   cat conftest.$ac_ext >&5
21509   rm -rf conftest*
21510   ac_cv_header_time=no
21511 fi
21512 rm -f conftest*
21513 fi
21514
21515 echo "$ac_t""$ac_cv_header_time" 1>&6
21516 if test $ac_cv_header_time = yes; then
21517   cat >> confdefs.h <<\EOF
21518 #define TIME_WITH_SYS_TIME 1
21519 EOF
21520
21521 fi
21522
21523 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21524 echo "configure:21525: checking whether struct tm is in sys/time.h or time.h" >&5
21525 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21526   echo $ac_n "(cached) $ac_c" 1>&6
21527 else
21528   cat > conftest.$ac_ext <<EOF
21529 #line 21530 "configure"
21530 #include "confdefs.h"
21531 #include <sys/types.h>
21532 #include <time.h>
21533 int main() {
21534 struct tm *tp; tp->tm_sec;
21535 ; return 0; }
21536 EOF
21537 if { (eval echo configure:21538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21538   rm -rf conftest*
21539   ac_cv_struct_tm=time.h
21540 else
21541   echo "configure: failed program was:" >&5
21542   cat conftest.$ac_ext >&5
21543   rm -rf conftest*
21544   ac_cv_struct_tm=sys/time.h
21545 fi
21546 rm -f conftest*
21547 fi
21548
21549 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21550 if test $ac_cv_struct_tm = sys/time.h; then
21551   cat >> confdefs.h <<\EOF
21552 #define TM_IN_SYS_TIME 1
21553 EOF
21554
21555 fi
21556
21557 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21558 echo "configure:21559: checking for uid_t in sys/types.h" >&5
21559 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21560   echo $ac_n "(cached) $ac_c" 1>&6
21561 else
21562   cat > conftest.$ac_ext <<EOF
21563 #line 21564 "configure"
21564 #include "confdefs.h"
21565 #include <sys/types.h>
21566 EOF
21567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21568   egrep "uid_t" >/dev/null 2>&1; then
21569   rm -rf conftest*
21570   ac_cv_type_uid_t=yes
21571 else
21572   rm -rf conftest*
21573   ac_cv_type_uid_t=no
21574 fi
21575 rm -f conftest*
21576
21577 fi
21578
21579 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21580 if test $ac_cv_type_uid_t = no; then
21581   cat >> confdefs.h <<\EOF
21582 #define uid_t int
21583 EOF
21584
21585   cat >> confdefs.h <<\EOF
21586 #define gid_t int
21587 EOF
21588
21589 fi
21590
21591 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21592 echo "configure:21593: checking for sig_atomic_t" >&5
21593 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21594   echo $ac_n "(cached) $ac_c" 1>&6
21595 else
21596   cat > conftest.$ac_ext <<EOF
21597 #line 21598 "configure"
21598 #include "confdefs.h"
21599 #include <signal.h>
21600 int main() {
21601 sig_atomic_t atomic;
21602 ; return 0; }
21603 EOF
21604 if { (eval echo configure:21605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21605   rm -rf conftest*
21606   ol_cv_type_sig_atomic_t=yes
21607 else
21608   echo "configure: failed program was:" >&5
21609   cat conftest.$ac_ext >&5
21610   rm -rf conftest*
21611   ol_cv_type_sig_atomic_t=no
21612 fi
21613 rm -f conftest*
21614 fi
21615
21616 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21617   if test $ol_cv_type_sig_atomic_t = no; then
21618     cat >> confdefs.h <<\EOF
21619 #define sig_atomic_t int
21620 EOF
21621
21622   fi
21623  
21624
21625
21626 # test for pw_gecos in struct passwd
21627 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21628 echo "configure:21629: checking struct passwd for pw_gecos" >&5
21629 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21630   echo $ac_n "(cached) $ac_c" 1>&6
21631 else
21632   
21633         cat > conftest.$ac_ext <<EOF
21634 #line 21635 "configure"
21635 #include "confdefs.h"
21636 #include <pwd.h>
21637 int main() {
21638
21639         struct passwd pwd;
21640         pwd.pw_gecos = pwd.pw_name;
21641
21642 ; return 0; }
21643 EOF
21644 if { (eval echo configure:21645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21645   rm -rf conftest*
21646   ol_cv_struct_passwd_pw_gecos=yes
21647 else
21648   echo "configure: failed program was:" >&5
21649   cat conftest.$ac_ext >&5
21650   rm -rf conftest*
21651   ol_cv_struct_passwd_pw_gecos=no
21652 fi
21653 rm -f conftest*
21654 fi
21655
21656 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21657 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21658         cat >> confdefs.h <<\EOF
21659 #define HAVE_PW_GECOS 1
21660 EOF
21661
21662 fi
21663
21664 # test for pw_passwd in struct passwd
21665 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21666 echo "configure:21667: checking struct passwd for pw_passwd" >&5
21667 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21668   echo $ac_n "(cached) $ac_c" 1>&6
21669 else
21670   
21671         cat > conftest.$ac_ext <<EOF
21672 #line 21673 "configure"
21673 #include "confdefs.h"
21674 #include <pwd.h>
21675 int main() {
21676
21677         struct passwd pwd;
21678         pwd.pw_passwd = pwd.pw_name;
21679
21680 ; return 0; }
21681 EOF
21682 if { (eval echo configure:21683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21683   rm -rf conftest*
21684   ol_cv_struct_passwd_pw_passwd=yes
21685 else
21686   echo "configure: failed program was:" >&5
21687   cat conftest.$ac_ext >&5
21688   rm -rf conftest*
21689   ol_cv_struct_passwd_pw_passwd=no
21690 fi
21691 rm -f conftest*
21692 fi
21693
21694 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21695 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21696         cat >> confdefs.h <<\EOF
21697 #define HAVE_PW_PASSWD 1
21698 EOF
21699
21700 fi
21701
21702
21703 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21704 echo "configure:21705: checking if toupper() requires islower()" >&5
21705 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21706   echo $ac_n "(cached) $ac_c" 1>&6
21707 else
21708   
21709         if test "$cross_compiling" = yes; then
21710   ol_cv_c_upper_lower=safe
21711 else
21712   cat > conftest.$ac_ext <<EOF
21713 #line 21714 "configure"
21714 #include "confdefs.h"
21715
21716 #include <ctype.h>
21717 main()
21718 {
21719         if ('C' == toupper('C'))
21720                 exit(0);
21721         else
21722                 exit(1);
21723 }
21724 EOF
21725 if { (eval echo configure:21726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21726 then
21727   ol_cv_c_upper_lower=no
21728 else
21729   echo "configure: failed program was:" >&5
21730   cat conftest.$ac_ext >&5
21731   rm -fr conftest*
21732   ol_cv_c_upper_lower=yes
21733 fi
21734 rm -fr conftest*
21735 fi
21736
21737 fi
21738
21739 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21740 if test $ol_cv_c_upper_lower != no ; then
21741         cat >> confdefs.h <<\EOF
21742 #define C_UPPER_LOWER 1
21743 EOF
21744
21745 fi
21746
21747 echo $ac_n "checking for working const""... $ac_c" 1>&6
21748 echo "configure:21749: checking for working const" >&5
21749 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21750   echo $ac_n "(cached) $ac_c" 1>&6
21751 else
21752   cat > conftest.$ac_ext <<EOF
21753 #line 21754 "configure"
21754 #include "confdefs.h"
21755
21756 int main() {
21757
21758 /* Ultrix mips cc rejects this.  */
21759 typedef int charset[2]; const charset x;
21760 /* SunOS 4.1.1 cc rejects this.  */
21761 char const *const *ccp;
21762 char **p;
21763 /* NEC SVR4.0.2 mips cc rejects this.  */
21764 struct point {int x, y;};
21765 static struct point const zero = {0,0};
21766 /* AIX XL C 1.02.0.0 rejects this.
21767    It does not let you subtract one const X* pointer from another in an arm
21768    of an if-expression whose if-part is not a constant expression */
21769 const char *g = "string";
21770 ccp = &g + (g ? g-g : 0);
21771 /* HPUX 7.0 cc rejects these. */
21772 ++ccp;
21773 p = (char**) ccp;
21774 ccp = (char const *const *) p;
21775 { /* SCO 3.2v4 cc rejects this.  */
21776   char *t;
21777   char const *s = 0 ? (char *) 0 : (char const *) 0;
21778
21779   *t++ = 0;
21780 }
21781 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21782   int x[] = {25, 17};
21783   const int *foo = &x[0];
21784   ++foo;
21785 }
21786 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21787   typedef const int *iptr;
21788   iptr p = 0;
21789   ++p;
21790 }
21791 { /* AIX XL C 1.02.0.0 rejects this saying
21792      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21793   struct s { int j; const int *ap[3]; };
21794   struct s *b; b->j = 5;
21795 }
21796 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21797   const int foo = 10;
21798 }
21799
21800 ; return 0; }
21801 EOF
21802 if { (eval echo configure:21803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21803   rm -rf conftest*
21804   ac_cv_c_const=yes
21805 else
21806   echo "configure: failed program was:" >&5
21807   cat conftest.$ac_ext >&5
21808   rm -rf conftest*
21809   ac_cv_c_const=no
21810 fi
21811 rm -f conftest*
21812 fi
21813
21814 echo "$ac_t""$ac_cv_c_const" 1>&6
21815 if test $ac_cv_c_const = no; then
21816   cat >> confdefs.h <<\EOF
21817 #define const 
21818 EOF
21819
21820 fi
21821
21822 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21823 echo "configure:21824: checking if compiler understands volatile" >&5
21824 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21825   echo $ac_n "(cached) $ac_c" 1>&6
21826 else
21827   cat > conftest.$ac_ext <<EOF
21828 #line 21829 "configure"
21829 #include "confdefs.h"
21830 int x, y, z;
21831 int main() {
21832 volatile int a; int * volatile b = x ? &y : &z;
21833       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21834       *b = 0;
21835 ; return 0; }
21836 EOF
21837 if { (eval echo configure:21838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21838   rm -rf conftest*
21839   ol_cv_c_volatile=yes
21840 else
21841   echo "configure: failed program was:" >&5
21842   cat conftest.$ac_ext >&5
21843   rm -rf conftest*
21844   ol_cv_c_volatile=no
21845 fi
21846 rm -f conftest*
21847 fi
21848
21849 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21850   if test $ol_cv_c_volatile = yes; then
21851     : 
21852   else
21853     cat >> confdefs.h <<\EOF
21854 #define volatile 
21855 EOF
21856
21857   fi
21858  
21859
21860 if test $cross_compiling = yes ; then
21861         cat >> confdefs.h <<\EOF
21862 #define CROSS_COMPILING 1
21863 EOF
21864
21865 else
21866         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21867 echo "configure:21868: checking whether byte ordering is bigendian" >&5
21868 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21869   echo $ac_n "(cached) $ac_c" 1>&6
21870 else
21871   ac_cv_c_bigendian=unknown
21872 # See if sys/param.h defines the BYTE_ORDER macro.
21873 cat > conftest.$ac_ext <<EOF
21874 #line 21875 "configure"
21875 #include "confdefs.h"
21876 #include <sys/types.h>
21877 #include <sys/param.h>
21878 int main() {
21879
21880 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21881  bogus endian macros
21882 #endif
21883 ; return 0; }
21884 EOF
21885 if { (eval echo configure:21886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21886   rm -rf conftest*
21887   # It does; now see whether it defined to BIG_ENDIAN or not.
21888 cat > conftest.$ac_ext <<EOF
21889 #line 21890 "configure"
21890 #include "confdefs.h"
21891 #include <sys/types.h>
21892 #include <sys/param.h>
21893 int main() {
21894
21895 #if BYTE_ORDER != BIG_ENDIAN
21896  not big endian
21897 #endif
21898 ; return 0; }
21899 EOF
21900 if { (eval echo configure:21901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21901   rm -rf conftest*
21902   ac_cv_c_bigendian=yes
21903 else
21904   echo "configure: failed program was:" >&5
21905   cat conftest.$ac_ext >&5
21906   rm -rf conftest*
21907   ac_cv_c_bigendian=no
21908 fi
21909 rm -f conftest*
21910 else
21911   echo "configure: failed program was:" >&5
21912   cat conftest.$ac_ext >&5
21913 fi
21914 rm -f conftest*
21915 if test $ac_cv_c_bigendian = unknown; then
21916 if test "$cross_compiling" = yes; then
21917     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21918 else
21919   cat > conftest.$ac_ext <<EOF
21920 #line 21921 "configure"
21921 #include "confdefs.h"
21922 main () {
21923   /* Are we little or big endian?  From Harbison&Steele.  */
21924   union
21925   {
21926     long l;
21927     char c[sizeof (long)];
21928   } u;
21929   u.l = 1;
21930   exit (u.c[sizeof (long) - 1] == 1);
21931 }
21932 EOF
21933 if { (eval echo configure:21934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21934 then
21935   ac_cv_c_bigendian=no
21936 else
21937   echo "configure: failed program was:" >&5
21938   cat conftest.$ac_ext >&5
21939   rm -fr conftest*
21940   ac_cv_c_bigendian=yes
21941 fi
21942 rm -fr conftest*
21943 fi
21944
21945 fi
21946 fi
21947
21948 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21949 if test $ac_cv_c_bigendian = yes; then
21950   cat >> confdefs.h <<\EOF
21951 #define WORDS_BIGENDIAN 1
21952 EOF
21953
21954 fi
21955
21956 fi
21957
21958 echo $ac_n "checking size of short""... $ac_c" 1>&6
21959 echo "configure:21960: checking size of short" >&5 
21960 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21961   echo $ac_n "(cached) $ac_c" 1>&6
21962 else
21963   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21964   cat > conftest.$ac_ext <<EOF
21965 #line 21966 "configure"
21966 #include "confdefs.h"
21967 #include "confdefs.h" 
21968 #include <sys/types.h> 
21969  
21970
21971 int main() {
21972 switch (0) case 0: case (sizeof (short) == $ac_size):;
21973 ; return 0; }
21974 EOF
21975 if { (eval echo configure:21976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21976   rm -rf conftest*
21977   ac_cv_sizeof_short=$ac_size
21978 else
21979   echo "configure: failed program was:" >&5
21980   cat conftest.$ac_ext >&5
21981 fi
21982 rm -f conftest* 
21983   if test x$ac_cv_sizeof_short != x ; then break; fi 
21984 done 
21985
21986 fi
21987  
21988 if test x$ac_cv_sizeof_short = x ; then 
21989   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21990 fi 
21991 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21992 cat >> confdefs.h <<EOF
21993 #define SIZEOF_SHORT $ac_cv_sizeof_short
21994 EOF
21995  
21996  
21997 echo $ac_n "checking size of int""... $ac_c" 1>&6
21998 echo "configure:21999: checking size of int" >&5 
21999 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22000   echo $ac_n "(cached) $ac_c" 1>&6
22001 else
22002   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22003   cat > conftest.$ac_ext <<EOF
22004 #line 22005 "configure"
22005 #include "confdefs.h"
22006 #include "confdefs.h" 
22007 #include <sys/types.h> 
22008  
22009
22010 int main() {
22011 switch (0) case 0: case (sizeof (int) == $ac_size):;
22012 ; return 0; }
22013 EOF
22014 if { (eval echo configure:22015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22015   rm -rf conftest*
22016   ac_cv_sizeof_int=$ac_size
22017 else
22018   echo "configure: failed program was:" >&5
22019   cat conftest.$ac_ext >&5
22020 fi
22021 rm -f conftest* 
22022   if test x$ac_cv_sizeof_int != x ; then break; fi 
22023 done 
22024
22025 fi
22026  
22027 if test x$ac_cv_sizeof_int = x ; then 
22028   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22029 fi 
22030 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22031 cat >> confdefs.h <<EOF
22032 #define SIZEOF_INT $ac_cv_sizeof_int
22033 EOF
22034  
22035  
22036 echo $ac_n "checking size of long""... $ac_c" 1>&6
22037 echo "configure:22038: checking size of long" >&5 
22038 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22039   echo $ac_n "(cached) $ac_c" 1>&6
22040 else
22041   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22042   cat > conftest.$ac_ext <<EOF
22043 #line 22044 "configure"
22044 #include "confdefs.h"
22045 #include "confdefs.h" 
22046 #include <sys/types.h> 
22047  
22048
22049 int main() {
22050 switch (0) case 0: case (sizeof (long) == $ac_size):;
22051 ; return 0; }
22052 EOF
22053 if { (eval echo configure:22054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22054   rm -rf conftest*
22055   ac_cv_sizeof_long=$ac_size
22056 else
22057   echo "configure: failed program was:" >&5
22058   cat conftest.$ac_ext >&5
22059 fi
22060 rm -f conftest* 
22061   if test x$ac_cv_sizeof_long != x ; then break; fi 
22062 done 
22063
22064 fi
22065  
22066 if test x$ac_cv_sizeof_long = x ; then 
22067   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22068 fi 
22069 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22070 cat >> confdefs.h <<EOF
22071 #define SIZEOF_LONG $ac_cv_sizeof_long
22072 EOF
22073  
22074
22075
22076 if test "$ac_cv_sizeof_int" -lt 4 ; then
22077         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22078
22079         cat >> confdefs.h <<\EOF
22080 #define LBER_INT_T long
22081 EOF
22082
22083 else
22084         cat >> confdefs.h <<\EOF
22085 #define LBER_INT_T int
22086 EOF
22087
22088 fi
22089
22090 cat >> confdefs.h <<\EOF
22091 #define LBER_LEN_T long
22092 EOF
22093
22094 cat >> confdefs.h <<\EOF
22095 #define LBER_SOCKET_T int
22096 EOF
22097
22098 cat >> confdefs.h <<\EOF
22099 #define LBER_TAG_T long
22100 EOF
22101
22102
22103 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22104 echo "configure:22105: checking for 8-bit clean memcmp" >&5
22105 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22106   echo $ac_n "(cached) $ac_c" 1>&6
22107 else
22108   if test "$cross_compiling" = yes; then
22109   ac_cv_func_memcmp_clean=no
22110 else
22111   cat > conftest.$ac_ext <<EOF
22112 #line 22113 "configure"
22113 #include "confdefs.h"
22114
22115 main()
22116 {
22117   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22118   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22119 }
22120
22121 EOF
22122 if { (eval echo configure:22123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22123 then
22124   ac_cv_func_memcmp_clean=yes
22125 else
22126   echo "configure: failed program was:" >&5
22127   cat conftest.$ac_ext >&5
22128   rm -fr conftest*
22129   ac_cv_func_memcmp_clean=no
22130 fi
22131 rm -fr conftest*
22132 fi
22133
22134 fi
22135
22136 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22137 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22138
22139 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22140 echo "configure:22141: checking for strftime" >&5
22141 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22142   echo $ac_n "(cached) $ac_c" 1>&6
22143 else
22144   cat > conftest.$ac_ext <<EOF
22145 #line 22146 "configure"
22146 #include "confdefs.h"
22147 /* System header to define __stub macros and hopefully few prototypes,
22148     which can conflict with char strftime(); below.  */
22149 #include <assert.h>
22150 /* Override any gcc2 internal prototype to avoid an error.  */
22151 /* We use char because int might match the return type of a gcc2
22152     builtin and then its argument prototype would still apply.  */
22153 char strftime();
22154 char (*f)();
22155
22156 int main() {
22157
22158 /* The GNU C library defines this for functions which it implements
22159     to always fail with ENOSYS.  Some functions are actually named
22160     something starting with __ and the normal name is an alias.  */
22161 #if defined (__stub_strftime) || defined (__stub___strftime)
22162 choke me
22163 #else
22164 f = strftime;
22165 #endif
22166
22167 ; return 0; }
22168 EOF
22169 if { (eval echo configure:22170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22170   rm -rf conftest*
22171   eval "ac_cv_func_strftime=yes"
22172 else
22173   echo "configure: failed program was:" >&5
22174   cat conftest.$ac_ext >&5
22175   rm -rf conftest*
22176   eval "ac_cv_func_strftime=no"
22177 fi
22178 rm -f conftest*
22179 fi
22180
22181 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22182   echo "$ac_t""yes" 1>&6
22183   cat >> confdefs.h <<\EOF
22184 #define HAVE_STRFTIME 1
22185 EOF
22186
22187 else
22188   echo "$ac_t""no" 1>&6
22189 # strftime is in -lintl on SCO UNIX.
22190 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22191 echo "configure:22192: checking for strftime in -lintl" >&5
22192 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22194   echo $ac_n "(cached) $ac_c" 1>&6
22195 else
22196   ac_save_LIBS="$LIBS"
22197 LIBS="-lintl  $LIBS"
22198 cat > conftest.$ac_ext <<EOF
22199 #line 22200 "configure"
22200 #include "confdefs.h"
22201 /* Override any gcc2 internal prototype to avoid an error.  */
22202 /* We use char because int might match the return type of a gcc2
22203     builtin and then its argument prototype would still apply.  */
22204 char strftime();
22205
22206 int main() {
22207 strftime()
22208 ; return 0; }
22209 EOF
22210 if { (eval echo configure:22211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22211   rm -rf conftest*
22212   eval "ac_cv_lib_$ac_lib_var=yes"
22213 else
22214   echo "configure: failed program was:" >&5
22215   cat conftest.$ac_ext >&5
22216   rm -rf conftest*
22217   eval "ac_cv_lib_$ac_lib_var=no"
22218 fi
22219 rm -f conftest*
22220 LIBS="$ac_save_LIBS"
22221
22222 fi
22223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22224   echo "$ac_t""yes" 1>&6
22225   cat >> confdefs.h <<\EOF
22226 #define HAVE_STRFTIME 1
22227 EOF
22228
22229 LIBS="-lintl $LIBS"
22230 else
22231   echo "$ac_t""no" 1>&6
22232 fi
22233
22234 fi
22235
22236
22237 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22238 echo "configure:22239: checking for inet_aton()" >&5
22239 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22240   echo $ac_n "(cached) $ac_c" 1>&6
22241 else
22242   cat > conftest.$ac_ext <<EOF
22243 #line 22244 "configure"
22244 #include "confdefs.h"
22245
22246 #ifdef HAVE_SYS_TYPES_H
22247 #       include <sys/types.h>
22248 #endif
22249 #ifdef HAVE_SYS_SOCKET_H
22250 #       include <sys/socket.h>
22251 #       ifdef HAVE_SYS_SELECT_H
22252 #               include <sys/select.h>
22253 #       endif
22254 #       include <netinet/in.h>
22255 #       ifdef HAVE_ARPA_INET_H
22256 #               include <arpa/inet.h>
22257 #       endif
22258 #endif
22259
22260 int main() {
22261 struct in_addr in;
22262 int rc = inet_aton( "255.255.255.255", &in );
22263 ; return 0; }
22264 EOF
22265 if { (eval echo configure:22266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22266   rm -rf conftest*
22267   ol_cv_func_inet_aton=yes
22268 else
22269   echo "configure: failed program was:" >&5
22270   cat conftest.$ac_ext >&5
22271   rm -rf conftest*
22272   ol_cv_func_inet_aton=no
22273 fi
22274 rm -f conftest*
22275 fi
22276
22277 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22278   if test $ol_cv_func_inet_aton != no; then
22279     cat >> confdefs.h <<\EOF
22280 #define HAVE_INET_ATON 1
22281 EOF
22282
22283   fi
22284  
22285
22286 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22287 echo "configure:22288: checking for _spawnlp" >&5
22288 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22289   echo $ac_n "(cached) $ac_c" 1>&6
22290 else
22291   cat > conftest.$ac_ext <<EOF
22292 #line 22293 "configure"
22293 #include "confdefs.h"
22294 /* System header to define __stub macros and hopefully few prototypes,
22295     which can conflict with char _spawnlp(); below.  */
22296 #include <assert.h>
22297 /* Override any gcc2 internal prototype to avoid an error.  */
22298 /* We use char because int might match the return type of a gcc2
22299     builtin and then its argument prototype would still apply.  */
22300 char _spawnlp();
22301 char (*f)();
22302
22303 int main() {
22304
22305 /* The GNU C library defines this for functions which it implements
22306     to always fail with ENOSYS.  Some functions are actually named
22307     something starting with __ and the normal name is an alias.  */
22308 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22309 choke me
22310 #else
22311 f = _spawnlp;
22312 #endif
22313
22314 ; return 0; }
22315 EOF
22316 if { (eval echo configure:22317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22317   rm -rf conftest*
22318   eval "ac_cv_func__spawnlp=yes"
22319 else
22320   echo "configure: failed program was:" >&5
22321   cat conftest.$ac_ext >&5
22322   rm -rf conftest*
22323   eval "ac_cv_func__spawnlp=no"
22324 fi
22325 rm -f conftest*
22326 fi
22327
22328 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22329   echo "$ac_t""yes" 1>&6
22330   cat >> confdefs.h <<\EOF
22331 #define HAVE_SPAWNLP 1
22332 EOF
22333
22334 else
22335   echo "$ac_t""no" 1>&6
22336 fi
22337
22338
22339 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22340 echo "configure:22341: checking for _snprintf" >&5
22341 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22342   echo $ac_n "(cached) $ac_c" 1>&6
22343 else
22344   cat > conftest.$ac_ext <<EOF
22345 #line 22346 "configure"
22346 #include "confdefs.h"
22347 /* System header to define __stub macros and hopefully few prototypes,
22348     which can conflict with char _snprintf(); below.  */
22349 #include <assert.h>
22350 /* Override any gcc2 internal prototype to avoid an error.  */
22351 /* We use char because int might match the return type of a gcc2
22352     builtin and then its argument prototype would still apply.  */
22353 char _snprintf();
22354 char (*f)();
22355
22356 int main() {
22357
22358 /* The GNU C library defines this for functions which it implements
22359     to always fail with ENOSYS.  Some functions are actually named
22360     something starting with __ and the normal name is an alias.  */
22361 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22362 choke me
22363 #else
22364 f = _snprintf;
22365 #endif
22366
22367 ; return 0; }
22368 EOF
22369 if { (eval echo configure:22370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22370   rm -rf conftest*
22371   eval "ac_cv_func__snprintf=yes"
22372 else
22373   echo "configure: failed program was:" >&5
22374   cat conftest.$ac_ext >&5
22375   rm -rf conftest*
22376   eval "ac_cv_func__snprintf=no"
22377 fi
22378 rm -f conftest*
22379 fi
22380
22381 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22382   echo "$ac_t""yes" 1>&6
22383   ac_cv_func_snprintf=yes
22384         cat >> confdefs.h <<\EOF
22385 #define snprintf _snprintf
22386 EOF
22387
22388
22389 else
22390   echo "$ac_t""no" 1>&6
22391 fi
22392
22393
22394 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22395 echo "configure:22396: checking for _vsnprintf" >&5
22396 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22397   echo $ac_n "(cached) $ac_c" 1>&6
22398 else
22399   cat > conftest.$ac_ext <<EOF
22400 #line 22401 "configure"
22401 #include "confdefs.h"
22402 /* System header to define __stub macros and hopefully few prototypes,
22403     which can conflict with char _vsnprintf(); below.  */
22404 #include <assert.h>
22405 /* Override any gcc2 internal prototype to avoid an error.  */
22406 /* We use char because int might match the return type of a gcc2
22407     builtin and then its argument prototype would still apply.  */
22408 char _vsnprintf();
22409 char (*f)();
22410
22411 int main() {
22412
22413 /* The GNU C library defines this for functions which it implements
22414     to always fail with ENOSYS.  Some functions are actually named
22415     something starting with __ and the normal name is an alias.  */
22416 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22417 choke me
22418 #else
22419 f = _vsnprintf;
22420 #endif
22421
22422 ; return 0; }
22423 EOF
22424 if { (eval echo configure:22425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22425   rm -rf conftest*
22426   eval "ac_cv_func__vsnprintf=yes"
22427 else
22428   echo "configure: failed program was:" >&5
22429   cat conftest.$ac_ext >&5
22430   rm -rf conftest*
22431   eval "ac_cv_func__vsnprintf=no"
22432 fi
22433 rm -f conftest*
22434 fi
22435
22436 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22437   echo "$ac_t""yes" 1>&6
22438   ac_cv_func_vsnprintf=yes
22439         cat >> confdefs.h <<\EOF
22440 #define vsnprintf _vsnprintf
22441 EOF
22442
22443
22444 else
22445   echo "$ac_t""no" 1>&6
22446 fi
22447
22448
22449 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22450 echo "configure:22451: checking for vprintf" >&5
22451 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22452   echo $ac_n "(cached) $ac_c" 1>&6
22453 else
22454   cat > conftest.$ac_ext <<EOF
22455 #line 22456 "configure"
22456 #include "confdefs.h"
22457 /* System header to define __stub macros and hopefully few prototypes,
22458     which can conflict with char vprintf(); below.  */
22459 #include <assert.h>
22460 /* Override any gcc2 internal prototype to avoid an error.  */
22461 /* We use char because int might match the return type of a gcc2
22462     builtin and then its argument prototype would still apply.  */
22463 char vprintf();
22464 char (*f)();
22465
22466 int main() {
22467
22468 /* The GNU C library defines this for functions which it implements
22469     to always fail with ENOSYS.  Some functions are actually named
22470     something starting with __ and the normal name is an alias.  */
22471 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22472 choke me
22473 #else
22474 f = vprintf;
22475 #endif
22476
22477 ; return 0; }
22478 EOF
22479 if { (eval echo configure:22480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22480   rm -rf conftest*
22481   eval "ac_cv_func_vprintf=yes"
22482 else
22483   echo "configure: failed program was:" >&5
22484   cat conftest.$ac_ext >&5
22485   rm -rf conftest*
22486   eval "ac_cv_func_vprintf=no"
22487 fi
22488 rm -f conftest*
22489 fi
22490
22491 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22492   echo "$ac_t""yes" 1>&6
22493   cat >> confdefs.h <<\EOF
22494 #define HAVE_VPRINTF 1
22495 EOF
22496
22497 else
22498   echo "$ac_t""no" 1>&6
22499 fi
22500
22501 if test "$ac_cv_func_vprintf" != yes; then
22502 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22503 echo "configure:22504: checking for _doprnt" >&5
22504 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22505   echo $ac_n "(cached) $ac_c" 1>&6
22506 else
22507   cat > conftest.$ac_ext <<EOF
22508 #line 22509 "configure"
22509 #include "confdefs.h"
22510 /* System header to define __stub macros and hopefully few prototypes,
22511     which can conflict with char _doprnt(); below.  */
22512 #include <assert.h>
22513 /* Override any gcc2 internal prototype to avoid an error.  */
22514 /* We use char because int might match the return type of a gcc2
22515     builtin and then its argument prototype would still apply.  */
22516 char _doprnt();
22517 char (*f)();
22518
22519 int main() {
22520
22521 /* The GNU C library defines this for functions which it implements
22522     to always fail with ENOSYS.  Some functions are actually named
22523     something starting with __ and the normal name is an alias.  */
22524 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22525 choke me
22526 #else
22527 f = _doprnt;
22528 #endif
22529
22530 ; return 0; }
22531 EOF
22532 if { (eval echo configure:22533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22533   rm -rf conftest*
22534   eval "ac_cv_func__doprnt=yes"
22535 else
22536   echo "configure: failed program was:" >&5
22537   cat conftest.$ac_ext >&5
22538   rm -rf conftest*
22539   eval "ac_cv_func__doprnt=no"
22540 fi
22541 rm -f conftest*
22542 fi
22543
22544 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22545   echo "$ac_t""yes" 1>&6
22546   cat >> confdefs.h <<\EOF
22547 #define HAVE_DOPRNT 1
22548 EOF
22549
22550 else
22551   echo "$ac_t""no" 1>&6
22552 fi
22553
22554 fi
22555
22556
22557 if test $ac_cv_func_vprintf = yes ; then
22558                 for ac_func in snprintf vsnprintf
22559 do
22560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22561 echo "configure:22562: checking for $ac_func" >&5
22562 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22563   echo $ac_n "(cached) $ac_c" 1>&6
22564 else
22565   cat > conftest.$ac_ext <<EOF
22566 #line 22567 "configure"
22567 #include "confdefs.h"
22568 /* System header to define __stub macros and hopefully few prototypes,
22569     which can conflict with char $ac_func(); below.  */
22570 #include <assert.h>
22571 /* Override any gcc2 internal prototype to avoid an error.  */
22572 /* We use char because int might match the return type of a gcc2
22573     builtin and then its argument prototype would still apply.  */
22574 char $ac_func();
22575 char (*f)();
22576
22577 int main() {
22578
22579 /* The GNU C library defines this for functions which it implements
22580     to always fail with ENOSYS.  Some functions are actually named
22581     something starting with __ and the normal name is an alias.  */
22582 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22583 choke me
22584 #else
22585 f = $ac_func;
22586 #endif
22587
22588 ; return 0; }
22589 EOF
22590 if { (eval echo configure:22591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22591   rm -rf conftest*
22592   eval "ac_cv_func_$ac_func=yes"
22593 else
22594   echo "configure: failed program was:" >&5
22595   cat conftest.$ac_ext >&5
22596   rm -rf conftest*
22597   eval "ac_cv_func_$ac_func=no"
22598 fi
22599 rm -f conftest*
22600 fi
22601
22602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22603   echo "$ac_t""yes" 1>&6
22604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22605   cat >> confdefs.h <<EOF
22606 #define $ac_tr_func 1
22607 EOF
22608  
22609 else
22610   echo "$ac_t""no" 1>&6
22611 fi
22612 done
22613
22614 fi
22615
22616 for ac_func in \
22617         bcopy                   \
22618         closesocket             \
22619         chroot                  \
22620         endgrent                \
22621         endpwent                \
22622         fcntl                   \
22623         flock                   \
22624         fstat                   \
22625         getdtablesize   \
22626         getgrgid                \
22627         gethostname             \
22628         getpass                 \
22629         getpassphrase   \
22630         getpwuid                \
22631         getpwnam                \
22632         getspnam                \
22633         gettimeofday    \
22634         initgroups              \
22635         lockf                   \
22636         memcpy                  \
22637         memmove                 \
22638         mkstemp                 \
22639         mktemp                  \
22640         pipe                    \
22641         read                    \
22642         recv                    \
22643         recvfrom                \
22644         setpwfile               \
22645         setgid                  \
22646         setegid                 \
22647         setsid                  \
22648         setuid                  \
22649         seteuid                 \
22650         sigaction               \
22651         signal                  \
22652         sigset                  \
22653         strdup                  \
22654         strerror                \
22655         strpbrk                 \
22656         strrchr                 \
22657         strsep                  \
22658         strstr                  \
22659         strtol                  \
22660         strtoul                 \
22661         strtoq                  \
22662         strtouq                 \
22663         strtoll                 \
22664         strspn                  \
22665         sysconf                 \
22666         usleep                  \
22667         waitpid                 \
22668         wait4                   \
22669         write                   \
22670         send                    \
22671         sendmsg                 \
22672         sendto                  \
22673
22674 do
22675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22676 echo "configure:22677: checking for $ac_func" >&5
22677 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22678   echo $ac_n "(cached) $ac_c" 1>&6
22679 else
22680   cat > conftest.$ac_ext <<EOF
22681 #line 22682 "configure"
22682 #include "confdefs.h"
22683 /* System header to define __stub macros and hopefully few prototypes,
22684     which can conflict with char $ac_func(); below.  */
22685 #include <assert.h>
22686 /* Override any gcc2 internal prototype to avoid an error.  */
22687 /* We use char because int might match the return type of a gcc2
22688     builtin and then its argument prototype would still apply.  */
22689 char $ac_func();
22690 char (*f)();
22691
22692 int main() {
22693
22694 /* The GNU C library defines this for functions which it implements
22695     to always fail with ENOSYS.  Some functions are actually named
22696     something starting with __ and the normal name is an alias.  */
22697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22698 choke me
22699 #else
22700 f = $ac_func;
22701 #endif
22702
22703 ; return 0; }
22704 EOF
22705 if { (eval echo configure:22706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22706   rm -rf conftest*
22707   eval "ac_cv_func_$ac_func=yes"
22708 else
22709   echo "configure: failed program was:" >&5
22710   cat conftest.$ac_ext >&5
22711   rm -rf conftest*
22712   eval "ac_cv_func_$ac_func=no"
22713 fi
22714 rm -f conftest*
22715 fi
22716
22717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22718   echo "$ac_t""yes" 1>&6
22719     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22720   cat >> confdefs.h <<EOF
22721 #define $ac_tr_func 1
22722 EOF
22723  
22724 else
22725   echo "$ac_t""no" 1>&6
22726 fi
22727 done
22728
22729
22730 for ac_func in getopt getpeereid
22731 do
22732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22733 echo "configure:22734: checking for $ac_func" >&5
22734 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22735   echo $ac_n "(cached) $ac_c" 1>&6
22736 else
22737   cat > conftest.$ac_ext <<EOF
22738 #line 22739 "configure"
22739 #include "confdefs.h"
22740 /* System header to define __stub macros and hopefully few prototypes,
22741     which can conflict with char $ac_func(); below.  */
22742 #include <assert.h>
22743 /* Override any gcc2 internal prototype to avoid an error.  */
22744 /* We use char because int might match the return type of a gcc2
22745     builtin and then its argument prototype would still apply.  */
22746 char $ac_func();
22747 char (*f)();
22748
22749 int main() {
22750
22751 /* The GNU C library defines this for functions which it implements
22752     to always fail with ENOSYS.  Some functions are actually named
22753     something starting with __ and the normal name is an alias.  */
22754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22755 choke me
22756 #else
22757 f = $ac_func;
22758 #endif
22759
22760 ; return 0; }
22761 EOF
22762 if { (eval echo configure:22763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22763   rm -rf conftest*
22764   eval "ac_cv_func_$ac_func=yes"
22765 else
22766   echo "configure: failed program was:" >&5
22767   cat conftest.$ac_ext >&5
22768   rm -rf conftest*
22769   eval "ac_cv_func_$ac_func=no"
22770 fi
22771 rm -f conftest*
22772 fi
22773
22774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22775   echo "$ac_t""yes" 1>&6
22776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22777   cat >> confdefs.h <<EOF
22778 #define $ac_tr_func 1
22779 EOF
22780  
22781 else
22782   echo "$ac_t""no" 1>&6
22783 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22784 fi
22785 done
22786
22787
22788
22789 if test "$ac_cv_func_getopt" != yes; then
22790         LIBSRCS="$LIBSRCS getopt.c"
22791 fi
22792 if test "$ac_cv_func_getpeereid" != yes; then
22793         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22794 echo "configure:22795: checking for msg_accrights in msghdr" >&5
22795 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22796   echo $ac_n "(cached) $ac_c" 1>&6
22797 else
22798   cat > conftest.$ac_ext <<EOF
22799 #line 22800 "configure"
22800 #include "confdefs.h"
22801 #include <sys/socket.h>
22802 int main() {
22803 struct msghdr m; m.msg_accrightslen=0
22804 ; return 0; }
22805 EOF
22806 if { (eval echo configure:22807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22807   rm -rf conftest*
22808   ol_cv_msghdr_msg_accrights=yes
22809 else
22810   echo "configure: failed program was:" >&5
22811   cat conftest.$ac_ext >&5
22812   rm -rf conftest*
22813   ol_cv_msghdr_msg_accrights=no
22814 fi
22815 rm -f conftest*
22816         
22817 fi
22818
22819 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22820   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22821         cat >> confdefs.h <<\EOF
22822 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22823 EOF
22824
22825   fi
22826
22827         LIBSRCS="$LIBSRCS getpeereid.c"
22828 fi
22829 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22830         if test "$ac_cv_func_snprintf" != yes; then
22831                 cat >> confdefs.h <<\EOF
22832 #define snprintf ber_pvt_snprintf
22833 EOF
22834
22835         fi
22836         if test "$ac_cv_func_vsnprintf" != yes; then
22837                 cat >> confdefs.h <<\EOF
22838 #define vsnprintf ber_pvt_vsnprintf
22839 EOF
22840
22841         fi
22842 fi
22843
22844 # Check Configuration
22845 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22846 echo "configure:22847: checking declaration of sys_errlist" >&5
22847 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22848   echo $ac_n "(cached) $ac_c" 1>&6
22849 else
22850   
22851         cat > conftest.$ac_ext <<EOF
22852 #line 22853 "configure"
22853 #include "confdefs.h"
22854
22855 #include <stdio.h>
22856 #include <sys/types.h>
22857 #include <errno.h>
22858 #ifdef WINNT
22859 #include <stdlib.h>
22860 #endif 
22861 int main() {
22862 char *c = (char *) *sys_errlist
22863 ; return 0; }
22864 EOF
22865 if { (eval echo configure:22866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22866   rm -rf conftest*
22867   ol_cv_dcl_sys_errlist=yes
22868         ol_cv_have_sys_errlist=yes
22869 else
22870   echo "configure: failed program was:" >&5
22871   cat conftest.$ac_ext >&5
22872   rm -rf conftest*
22873   ol_cv_dcl_sys_errlist=no
22874 fi
22875 rm -f conftest*
22876 fi
22877
22878 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22879 #
22880 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22881 if test $ol_cv_dcl_sys_errlist = no ; then
22882         cat >> confdefs.h <<\EOF
22883 #define DECL_SYS_ERRLIST 1
22884 EOF
22885
22886
22887         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22888 echo "configure:22889: checking existence of sys_errlist" >&5
22889 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22890   echo $ac_n "(cached) $ac_c" 1>&6
22891 else
22892   
22893                 cat > conftest.$ac_ext <<EOF
22894 #line 22895 "configure"
22895 #include "confdefs.h"
22896 #include <errno.h>
22897 int main() {
22898 char *c = (char *) *sys_errlist
22899 ; return 0; }
22900 EOF
22901 if { (eval echo configure:22902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22902   rm -rf conftest*
22903   ol_cv_have_sys_errlist=yes
22904 else
22905   echo "configure: failed program was:" >&5
22906   cat conftest.$ac_ext >&5
22907   rm -rf conftest*
22908   ol_cv_have_sys_errlist=no
22909 fi
22910 rm -f conftest*
22911 fi
22912
22913 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22914 fi
22915 if test $ol_cv_have_sys_errlist = yes ; then
22916         cat >> confdefs.h <<\EOF
22917 #define HAVE_SYS_ERRLIST 1
22918 EOF
22919
22920 fi
22921
22922
22923
22924 if test "$ol_enable_slapi" != no ; then
22925                         for ac_hdr in ltdl.h
22926 do
22927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22929 echo "configure:22930: checking for $ac_hdr" >&5
22930 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22931   echo $ac_n "(cached) $ac_c" 1>&6
22932 else
22933   cat > conftest.$ac_ext <<EOF
22934 #line 22935 "configure"
22935 #include "confdefs.h"
22936 #include <$ac_hdr>
22937 EOF
22938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22939 { (eval echo configure:22940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22941 if test -z "$ac_err"; then
22942   rm -rf conftest*
22943   eval "ac_cv_header_$ac_safe=yes"
22944 else
22945   echo "$ac_err" >&5
22946   echo "configure: failed program was:" >&5
22947   cat conftest.$ac_ext >&5
22948   rm -rf conftest*
22949   eval "ac_cv_header_$ac_safe=no"
22950 fi
22951 rm -f conftest*
22952 fi
22953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22954   echo "$ac_t""yes" 1>&6
22955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22956   cat >> confdefs.h <<EOF
22957 #define $ac_tr_hdr 1
22958 EOF
22959  
22960 else
22961   echo "$ac_t""no" 1>&6
22962 fi
22963 done
22964
22965
22966         if test $ac_cv_header_ltdl_h != yes ; then
22967                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22968         fi
22969         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22970 echo "configure:22971: checking for lt_dlinit in -lltdl" >&5
22971 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22972 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22973   echo $ac_n "(cached) $ac_c" 1>&6
22974 else
22975   ac_save_LIBS="$LIBS"
22976 LIBS="-lltdl  $LIBS"
22977 cat > conftest.$ac_ext <<EOF
22978 #line 22979 "configure"
22979 #include "confdefs.h"
22980 /* Override any gcc2 internal prototype to avoid an error.  */
22981 /* We use char because int might match the return type of a gcc2
22982     builtin and then its argument prototype would still apply.  */
22983 char lt_dlinit();
22984
22985 int main() {
22986 lt_dlinit()
22987 ; return 0; }
22988 EOF
22989 if { (eval echo configure:22990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22990   rm -rf conftest*
22991   eval "ac_cv_lib_$ac_lib_var=yes"
22992 else
22993   echo "configure: failed program was:" >&5
22994   cat conftest.$ac_ext >&5
22995   rm -rf conftest*
22996   eval "ac_cv_lib_$ac_lib_var=no"
22997 fi
22998 rm -f conftest*
22999 LIBS="$ac_save_LIBS"
23000
23001 fi
23002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23003   echo "$ac_t""yes" 1>&6
23004   
23005                 SLAPI_LIBS=-lltdl
23006                 LIBSLAPI=libslapi.a
23007                 LIBSLAPITOOLS=../libslapi.a
23008                 cat >> confdefs.h <<\EOF
23009 #define HAVE_LIBLTDL 1
23010 EOF
23011
23012         
23013 else
23014   echo "$ac_t""no" 1>&6
23015 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23016 fi
23017
23018
23019         cat >> confdefs.h <<\EOF
23020 #define LDAP_SLAPI 1
23021 EOF
23022
23023 fi
23024
23025 if test "$ol_enable_debug" != no ; then
23026         cat >> confdefs.h <<\EOF
23027 #define LDAP_DEBUG 1
23028 EOF
23029
23030 fi
23031 if test "$ol_enable_syslog" = yes ; then
23032         cat >> confdefs.h <<\EOF
23033 #define LDAP_SYSLOG 1
23034 EOF
23035
23036 fi
23037 if test "$ol_link_kbind" != no ; then
23038         cat >> confdefs.h <<\EOF
23039 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23040 EOF
23041
23042 fi
23043 if test "$ol_enable_proctitle" != no ; then
23044         cat >> confdefs.h <<\EOF
23045 #define LDAP_PROCTITLE 1
23046 EOF
23047
23048 fi
23049 if test "$ol_enable_referrals" != no ; then
23050         cat >> confdefs.h <<\EOF
23051 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23052 EOF
23053
23054 fi
23055 if test "$ol_enable_local" != no; then
23056         cat >> confdefs.h <<\EOF
23057 #define LDAP_PF_LOCAL 1
23058 EOF
23059
23060 fi
23061 if test "$ol_link_ipv6" != no; then
23062         cat >> confdefs.h <<\EOF
23063 #define LDAP_PF_INET6 1
23064 EOF
23065
23066 fi
23067 if test "$ol_enable_cleartext" != no ; then
23068         cat >> confdefs.h <<\EOF
23069 #define SLAPD_CLEARTEXT 1
23070 EOF
23071
23072 fi
23073 if test "$ol_enable_crypt" != no ; then
23074         cat >> confdefs.h <<\EOF
23075 #define SLAPD_CRYPT 1
23076 EOF
23077
23078 fi
23079 if test "$ol_link_kpasswd" != no ; then
23080         cat >> confdefs.h <<\EOF
23081 #define SLAPD_KPASSWD 1
23082 EOF
23083
23084 fi
23085 if test "$ol_link_spasswd" != no ; then
23086         cat >> confdefs.h <<\EOF
23087 #define SLAPD_SPASSWD 1
23088 EOF
23089
23090 fi
23091 if test "$ol_enable_multimaster" != no ; then
23092         cat >> confdefs.h <<\EOF
23093 #define SLAPD_MULTIMASTER 1
23094 EOF
23095
23096 fi
23097 if test "$ol_enable_rlookups" != no ; then
23098         cat >> confdefs.h <<\EOF
23099 #define SLAPD_RLOOKUPS 1
23100 EOF
23101
23102 fi
23103 if test "$ol_enable_aci" != no ; then
23104         cat >> confdefs.h <<\EOF
23105 #define SLAPD_ACI_ENABLED 1
23106 EOF
23107
23108 fi
23109
23110 if test "$ol_link_modules" != no ; then
23111         cat >> confdefs.h <<\EOF
23112 #define SLAPD_MODULES 1
23113 EOF
23114
23115         BUILD_SLAPD=yes
23116         SLAPD_MODULES_LDFLAGS="-dlopen self"
23117 fi
23118
23119 if test "$ol_enable_bdb" != no ; then
23120         cat >> confdefs.h <<\EOF
23121 #define SLAPD_BDB 1
23122 EOF
23123
23124         BUILD_SLAPD=yes
23125         BUILD_BDB=yes
23126         if test "$ol_with_bdb_module" != static ; then
23127                 cat >> confdefs.h <<\EOF
23128 #define SLAPD_BDB_DYNAMIC 1
23129 EOF
23130
23131                 BUILD_BDB=mod
23132                 BUILD_BDB_DYNAMIC=shared
23133                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23134         else
23135                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23136         fi
23137 fi
23138
23139 if test "$ol_link_dnssrv" != no ; then
23140         cat >> confdefs.h <<\EOF
23141 #define SLAPD_DNSSRV 1
23142 EOF
23143
23144         BUILD_SLAPD=yes
23145         BUILD_DNSSRV=yes
23146         if test "$ol_with_dnssrv_module" != static ; then
23147                 cat >> confdefs.h <<\EOF
23148 #define SLAPD_DNSSRV_DYNAMIC 1
23149 EOF
23150
23151                 BUILD_DNSSRV=mod
23152                 BUILD_DNSSRV_DYNAMIC=shared
23153                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23154         else
23155                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23156         fi
23157 fi
23158
23159 if test "$ol_enable_hdb" != no ; then
23160         cat >> confdefs.h <<\EOF
23161 #define SLAPD_HDB 1
23162 EOF
23163
23164         BUILD_SLAPD=yes
23165         BUILD_HDB=yes
23166         if test "$ol_with_hdb_module" != static ; then
23167                 cat >> confdefs.h <<\EOF
23168 #define SLAPD_HDB_DYNAMIC 1
23169 EOF
23170
23171                 BUILD_HDB=mod
23172                 BUILD_HDB_DYNAMIC=shared
23173                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23174         else
23175                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23176         fi
23177 fi
23178
23179 if test "$ol_enable_ldap" != no ; then
23180         cat >> confdefs.h <<\EOF
23181 #define SLAPD_LDAP 1
23182 EOF
23183
23184         BUILD_SLAPD=yes
23185         BUILD_LDAP=yes
23186         if test "$ol_with_ldap_module" != static ; then
23187                 cat >> confdefs.h <<\EOF
23188 #define SLAPD_LDAP_DYNAMIC 1
23189 EOF
23190
23191                 BUILD_LDAP=mod
23192                 BUILD_LDAP_DYNAMIC=shared
23193                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23194         else
23195                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23196         fi
23197 fi
23198
23199 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23200         cat >> confdefs.h <<\EOF
23201 #define SLAPD_LDBM 1
23202 EOF
23203
23204         BUILD_SLAPD=yes
23205         BUILD_LDBM=yes
23206         if test "$ol_with_ldbm_module" != static ; then
23207                 cat >> confdefs.h <<\EOF
23208 #define SLAPD_LDBM_DYNAMIC 1
23209 EOF
23210
23211                 BUILD_LDBM=mod
23212                 BUILD_LDBM_DYNAMIC=shared
23213                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23214         else
23215                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23216         fi
23217 fi
23218
23219 if test "$ol_enable_meta" != no ; then
23220         if test "$ol_enable_ldap" = no ; then
23221                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23222         fi
23223         if test "$ol_enable_rewrite" = no ; then
23224                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23225         fi
23226         cat >> confdefs.h <<\EOF
23227 #define SLAPD_META 1
23228 EOF
23229
23230         BUILD_SLAPD=yes
23231         BUILD_META=yes
23232         BUILD_REWRITE=yes
23233         if test $ol_enable_ldbm = yes -o \
23234                 $ol_enable_bdb = yes ; then 
23235                 BUILD_CACHE=yes
23236         fi
23237         if test "$ol_with_meta_module" != static ; then
23238                 cat >> confdefs.h <<\EOF
23239 #define SLAPD_META_DYNAMIC 1
23240 EOF
23241
23242                 BUILD_META=mod
23243                 BUILD_META_DYNAMIC=shared
23244                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23245         else
23246                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23247         fi
23248 fi
23249
23250 if test "$ol_enable_monitor" != no ; then
23251         cat >> confdefs.h <<\EOF
23252 #define SLAPD_MONITOR 1
23253 EOF
23254
23255         BUILD_SLAPD=yes
23256         BUILD_MONITOR=yes
23257         if test "$ol_with_monitor_module" != static ; then
23258                 cat >> confdefs.h <<\EOF
23259 #define SLAPD_MONITOR_DYNAMIC 1
23260 EOF
23261
23262                 BUILD_MONITOR=mod
23263                 BUILD_MONITOR_DYNAMIC=shared
23264                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23265         else
23266                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23267         fi
23268 fi
23269
23270 if test "$ol_enable_null" != no ; then
23271         cat >> confdefs.h <<\EOF
23272 #define SLAPD_NULL 1
23273 EOF
23274
23275         BUILD_SLAPD=yes
23276         BUILD_NULL=yes
23277         if test "$ol_with_null_module" != static ; then
23278                 cat >> confdefs.h <<\EOF
23279 #define SLAPD_NULL_DYNAMIC 1
23280 EOF
23281
23282                 BUILD_NULL=mod
23283                 BUILD_NULL_DYNAMIC=shared
23284                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23285         else
23286                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23287         fi
23288 fi
23289
23290 if test "$ol_enable_passwd" != no ; then
23291         cat >> confdefs.h <<\EOF
23292 #define SLAPD_PASSWD 1
23293 EOF
23294
23295         BUILD_SLAPD=yes
23296         BUILD_PASSWD=yes
23297         if test "$ol_with_passwd_module" != static ; then
23298                 cat >> confdefs.h <<\EOF
23299 #define SLAPD_PASSWD_DYNAMIC 1
23300 EOF
23301
23302                 BUILD_PASSWD=mod
23303                 BUILD_PASSWD_DYNAMIC=shared
23304                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23305         else
23306                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23307         fi
23308 fi
23309
23310 if test "$ol_link_perl" != no ; then
23311         cat >> confdefs.h <<\EOF
23312 #define SLAPD_PERL 1
23313 EOF
23314
23315         BUILD_SLAPD=yes
23316         BUILD_PERL=yes
23317         if test "$ol_with_perl_module" != static ; then
23318                 cat >> confdefs.h <<\EOF
23319 #define SLAPD_PERL_DYNAMIC 1
23320 EOF
23321
23322                 BUILD_PERL=mod
23323                 BUILD_PERL_DYNAMIC=shared
23324                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23325         else
23326                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23327         fi
23328 fi
23329
23330 if test "$ol_enable_shell" != no ; then
23331         if test "$ol_link_thread" != no ; then
23332                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23333         fi
23334         cat >> confdefs.h <<\EOF
23335 #define SLAPD_SHELL 1
23336 EOF
23337
23338         BUILD_SLAPD=yes
23339         BUILD_SHELL=yes
23340         if test "$ol_with_shell_module" != static ; then
23341                 cat >> confdefs.h <<\EOF
23342 #define SLAPD_SHELL_DYNAMIC 1
23343 EOF
23344
23345                 BUILD_SHELL=mod
23346                 BUILD_SHELL_DYNAMIC=shared
23347                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23348         else
23349                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23350         fi
23351 fi
23352
23353 if test "$ol_enable_tcl" != no ; then
23354         cat >> confdefs.h <<\EOF
23355 #define SLAPD_TCL 1
23356 EOF
23357
23358         BUILD_SLAPD=yes
23359         BUILD_TCL=yes
23360         if test "$ol_with_tcl_module" != static; then
23361                 cat >> confdefs.h <<\EOF
23362 #define SLAPD_TCL_DYNAMIC 1
23363 EOF
23364
23365                 BUILD_TCL=mod
23366                 BUILD_TCL_DYNAMIC=shared
23367                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23368         else
23369                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23370         fi
23371 fi
23372
23373 if test "$ol_link_sql" != no ; then
23374         cat >> confdefs.h <<\EOF
23375 #define SLAPD_SQL 1
23376 EOF
23377
23378         BUILD_SLAPD=yes
23379         BUILD_SQL=yes
23380         if test "$ol_with_sql_module" != static; then
23381                 cat >> confdefs.h <<\EOF
23382 #define SLAPD_SQL_DYNAMIC 1
23383 EOF
23384
23385                 BUILD_SQL=mod
23386                 BUILD_SQL_DYNAMIC=shared
23387                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23388         else
23389                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23390         fi
23391 fi
23392
23393 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23394         $BUILD_SLAPD = yes ; then
23395         BUILD_SLURPD=yes
23396 fi
23397
23398 if test "$ol_enable_rewrite" != no ; then
23399         cat >> confdefs.h <<\EOF
23400 #define ENABLE_REWRITE 1
23401 EOF
23402
23403         BUILD_REWRITE=yes
23404 fi
23405
23406 if test "$ol_enable_slapi" != no ; then
23407         cat >> confdefs.h <<\EOF
23408 #define ENABLE_SLAPI 1
23409 EOF
23410
23411         BUILD_SLAPI=yes
23412         SLAPD_SLAPI_DEPEND=libslapi.a
23413 fi
23414
23415
23416
23417 if test "$ac_cv_mingw32" = yes ; then
23418         PLAT=NT
23419         SLAPD_MODULES_LDFLAGS=
23420 else
23421         PLAT=UNIX
23422 fi
23423
23424 if test -z "$SLAPD_STATIC_BACKENDS"; then
23425         SLAPD_NO_STATIC='#'
23426 else
23427         SLAPD_NO_STATIC=
23428 fi
23429
23430
23431
23432
23433
23434
23435   
23436   
23437   
23438   
23439   
23440   
23441   
23442   
23443   
23444   
23445   
23446   
23447   
23448   
23449   
23450   
23451   
23452   
23453   
23454   
23455   
23456   
23457   
23458   
23459   
23460   
23461   
23462   
23463   
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504 # Check whether --with-xxinstall or --without-xxinstall was given.
23505 if test "${with_xxinstall+set}" = set; then
23506   withval="$with_xxinstall"
23507   :
23508 fi
23509
23510
23511
23512 trap '' 1 2 15
23513
23514 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23515
23516 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23517 # Let make expand exec_prefix.
23518 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23519
23520 # Any assignment to VPATH causes Sun make to only execute
23521 # the first set of double-colon rules, so remove it if not needed.
23522 # If there is a colon in the path, we need to keep it.
23523 if test "x$srcdir" = x.; then
23524   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23525 fi
23526
23527 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23528
23529 DEFS=-DHAVE_CONFIG_H
23530
23531 # Without the "./", some shells look in PATH for config.status.
23532 : ${CONFIG_STATUS=./config.status}
23533
23534 echo creating $CONFIG_STATUS
23535 rm -f $CONFIG_STATUS
23536 cat > $CONFIG_STATUS <<EOF
23537 #! /bin/sh
23538 # Generated automatically by configure.
23539 # Run this file to recreate the current configuration.
23540 # This directory was configured as follows,
23541 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23542 #
23543 # $0 $ac_configure_args
23544 #
23545 # Compiler output produced by configure, useful for debugging
23546 # configure, is in ./config.log if it exists.
23547
23548 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23549 for ac_option
23550 do
23551   case "\$ac_option" in
23552   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23553     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23554     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23555   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23556     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23557     exit 0 ;;
23558   -help | --help | --hel | --he | --h)
23559     echo "\$ac_cs_usage"; exit 0 ;;
23560   *) echo "\$ac_cs_usage"; exit 1 ;;
23561   esac
23562 done
23563
23564 ac_given_srcdir=$srcdir
23565 ac_given_INSTALL="$INSTALL"
23566
23567 trap 'rm -fr `echo "\
23568 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23569 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23570 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23571 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23572 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23573 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23574 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23575 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23576 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23577 include/Makefile:build/top.mk:include/Makefile.in \
23578 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23579 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23580 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23581 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23582 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23583 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23584 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23585 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23586 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23587 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23588 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23589 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23590 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23591 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23592 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23593 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23594 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23595 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23596 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23597 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23598 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23599 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23600 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23601 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23602 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23603 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23604 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23605 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23606 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23607 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23608 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23609  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23610 EOF
23611 cat >> $CONFIG_STATUS <<EOF
23612
23613 # Protect against being on the right side of a sed subst in config.status.
23614 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23615  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23616 $ac_vpsub
23617 $extrasub
23618 s%@SHELL@%$SHELL%g
23619 s%@CFLAGS@%$CFLAGS%g
23620 s%@CPPFLAGS@%$CPPFLAGS%g
23621 s%@CXXFLAGS@%$CXXFLAGS%g
23622 s%@FFLAGS@%$FFLAGS%g
23623 s%@DEFS@%$DEFS%g
23624 s%@LDFLAGS@%$LDFLAGS%g
23625 s%@LIBS@%$LIBS%g
23626 s%@exec_prefix@%$exec_prefix%g
23627 s%@prefix@%$prefix%g
23628 s%@program_transform_name@%$program_transform_name%g
23629 s%@bindir@%$bindir%g
23630 s%@sbindir@%$sbindir%g
23631 s%@libexecdir@%$libexecdir%g
23632 s%@datadir@%$datadir%g
23633 s%@sysconfdir@%$sysconfdir%g
23634 s%@sharedstatedir@%$sharedstatedir%g
23635 s%@localstatedir@%$localstatedir%g
23636 s%@libdir@%$libdir%g
23637 s%@includedir@%$includedir%g
23638 s%@oldincludedir@%$oldincludedir%g
23639 s%@infodir@%$infodir%g
23640 s%@mandir@%$mandir%g
23641 s%@host@%$host%g
23642 s%@host_alias@%$host_alias%g
23643 s%@host_cpu@%$host_cpu%g
23644 s%@host_vendor@%$host_vendor%g
23645 s%@host_os@%$host_os%g
23646 s%@target@%$target%g
23647 s%@target_alias@%$target_alias%g
23648 s%@target_cpu@%$target_cpu%g
23649 s%@target_vendor@%$target_vendor%g
23650 s%@target_os@%$target_os%g
23651 s%@build@%$build%g
23652 s%@build_alias@%$build_alias%g
23653 s%@build_cpu@%$build_cpu%g
23654 s%@build_vendor@%$build_vendor%g
23655 s%@build_os@%$build_os%g
23656 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23657 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23658 s%@INSTALL_DATA@%$INSTALL_DATA%g
23659 s%@PACKAGE@%$PACKAGE%g
23660 s%@VERSION@%$VERSION%g
23661 s%@ACLOCAL@%$ACLOCAL%g
23662 s%@AUTOCONF@%$AUTOCONF%g
23663 s%@AUTOMAKE@%$AUTOMAKE%g
23664 s%@AUTOHEADER@%$AUTOHEADER%g
23665 s%@MAKEINFO@%$MAKEINFO%g
23666 s%@install_sh@%$install_sh%g
23667 s%@AMTAR@%$AMTAR%g
23668 s%@AWK@%$AWK%g
23669 s%@AMTARFLAGS@%$AMTARFLAGS%g
23670 s%@SET_MAKE@%$SET_MAKE%g
23671 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23672 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23673 s%@top_builddir@%$top_builddir%g
23674 s%@ldap_subdir@%$ldap_subdir%g
23675 s%@CC@%$CC%g
23676 s%@AR@%$AR%g
23677 s%@LN_S@%$LN_S%g
23678 s%@OBJEXT@%$OBJEXT%g
23679 s%@EXEEXT@%$EXEEXT%g
23680 s%@ECHO@%$ECHO%g
23681 s%@RANLIB@%$RANLIB%g
23682 s%@STRIP@%$STRIP%g
23683 s%@DLLTOOL@%$DLLTOOL%g
23684 s%@AS@%$AS%g
23685 s%@OBJDUMP@%$OBJDUMP%g
23686 s%@CPP@%$CPP%g
23687 s%@LIBTOOL@%$LIBTOOL%g
23688 s%@LN_H@%$LN_H%g
23689 s%@PERLBIN@%$PERLBIN%g
23690 s%@OL_MKDEP@%$OL_MKDEP%g
23691 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23692 s%@LTSTATIC@%$LTSTATIC%g
23693 s%@LIBOBJS@%$LIBOBJS%g
23694 s%@LIBSRCS@%$LIBSRCS%g
23695 s%@PLAT@%$PLAT%g
23696 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23697 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23698 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23699 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23700 s%@BUILD_BDB@%$BUILD_BDB%g
23701 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23702 s%@BUILD_HDB@%$BUILD_HDB%g
23703 s%@BUILD_LDAP@%$BUILD_LDAP%g
23704 s%@BUILD_LDBM@%$BUILD_LDBM%g
23705 s%@BUILD_META@%$BUILD_META%g
23706 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23707 s%@BUILD_CACHE@%$BUILD_CACHE%g
23708 s%@BUILD_NULL@%$BUILD_NULL%g
23709 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23710 s%@BUILD_PERL@%$BUILD_PERL%g
23711 s%@BUILD_SHELL@%$BUILD_SHELL%g
23712 s%@BUILD_SQL@%$BUILD_SQL%g
23713 s%@BUILD_TCL@%$BUILD_TCL%g
23714 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23715 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23716 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23717 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23718 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23719 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23720 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23721 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23722 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23723 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23724 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23725 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23726 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23727 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23728 s%@LDAP_LIBS@%$LDAP_LIBS%g
23729 s%@LDIF_LIBS@%$LDIF_LIBS%g
23730 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23731 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23732 s%@LDBM_LIBS@%$LDBM_LIBS%g
23733 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23734 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23735 s%@WRAP_LIBS@%$WRAP_LIBS%g
23736 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23737 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23738 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23739 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23740 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23741 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23742 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23743 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23744 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23745 s%@KRB4_LIBS@%$KRB4_LIBS%g
23746 s%@KRB5_LIBS@%$KRB5_LIBS%g
23747 s%@SASL_LIBS@%$SASL_LIBS%g
23748 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23749 s%@TLS_LIBS@%$TLS_LIBS%g
23750 s%@MODULES_LIBS@%$MODULES_LIBS%g
23751 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23752 s%@LIBSLAPI@%$LIBSLAPI%g
23753 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23754 s%@AUTH_LIBS@%$AUTH_LIBS%g
23755 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23756 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23757 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23758 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23759
23760 CEOF
23761 EOF
23762
23763 cat >> $CONFIG_STATUS <<\EOF
23764
23765 # Split the substitutions into bite-sized pieces for seds with
23766 # small command number limits, like on Digital OSF/1 and HP-UX.
23767 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23768 ac_file=1 # Number of current file.
23769 ac_beg=1 # First line for current file.
23770 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23771 ac_more_lines=:
23772 ac_sed_cmds=""
23773 while $ac_more_lines; do
23774   if test $ac_beg -gt 1; then
23775     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23776   else
23777     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23778   fi
23779   if test ! -s conftest.s$ac_file; then
23780     ac_more_lines=false
23781     rm -f conftest.s$ac_file
23782   else
23783     if test -z "$ac_sed_cmds"; then
23784       ac_sed_cmds="sed -f conftest.s$ac_file"
23785     else
23786       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23787     fi
23788     ac_file=`expr $ac_file + 1`
23789     ac_beg=$ac_end
23790     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23791   fi
23792 done
23793 if test -z "$ac_sed_cmds"; then
23794   ac_sed_cmds=cat
23795 fi
23796 EOF
23797
23798 cat >> $CONFIG_STATUS <<EOF
23799
23800 CONFIG_FILES=\${CONFIG_FILES-"\
23801 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23802 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23803 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23804 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23805 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23806 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23807 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23808 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23809 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23810 include/Makefile:build/top.mk:include/Makefile.in \
23811 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23812 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23813 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23814 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23815 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23816 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23817 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23818 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23819 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23820 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23821 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23822 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23823 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23824 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23825 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23826 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23827 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23828 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23829 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23830 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23831 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23832 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23833 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23834 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23835 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23836 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23837 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23838 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23839 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23840 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23841 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23842 "}
23843 EOF
23844 cat >> $CONFIG_STATUS <<\EOF
23845 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23846   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23847   case "$ac_file" in
23848   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23849        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23850   *) ac_file_in="${ac_file}.in" ;;
23851   esac
23852
23853   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23854
23855   # Remove last slash and all that follows it.  Not all systems have dirname.
23856   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23857   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23858     # The file is in a subdirectory.
23859     test ! -d "$ac_dir" && mkdir "$ac_dir"
23860     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23861     # A "../" for each directory in $ac_dir_suffix.
23862     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23863   else
23864     ac_dir_suffix= ac_dots=
23865   fi
23866
23867   case "$ac_given_srcdir" in
23868   .)  srcdir=.
23869       if test -z "$ac_dots"; then top_srcdir=.
23870       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23871   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23872   *) # Relative path.
23873     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23874     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23875   esac
23876
23877   case "$ac_given_INSTALL" in
23878   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23879   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23880   esac
23881
23882   echo creating "$ac_file"
23883   rm -f "$ac_file"
23884   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23885   case "$ac_file" in
23886   *[Mm]akefile*) ac_comsub="1i\\
23887 # $configure_input" ;;
23888   *) ac_comsub= ;;
23889   esac
23890
23891   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23892   sed -e "$ac_comsub
23893 s%@configure_input@%$configure_input%g
23894 s%@srcdir@%$srcdir%g
23895 s%@top_srcdir@%$top_srcdir%g
23896 s%@INSTALL@%$INSTALL%g
23897 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23898 fi; done
23899 rm -f conftest.s*
23900
23901 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23902 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23903 #
23904 # ac_d sets the value in "#define NAME VALUE" lines.
23905 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23906 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23907 ac_dC='\3'
23908 ac_dD='%g'
23909 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23910 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23911 ac_uB='\([      ]\)%\1#\2define\3'
23912 ac_uC=' '
23913 ac_uD='\4%g'
23914 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23915 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23916 ac_eB='$%\1#\2define\3'
23917 ac_eC=' '
23918 ac_eD='%g'
23919
23920 if test "${CONFIG_HEADERS+set}" != set; then
23921 EOF
23922 cat >> $CONFIG_STATUS <<EOF
23923   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23924 EOF
23925 cat >> $CONFIG_STATUS <<\EOF
23926 fi
23927 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23928   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23929   case "$ac_file" in
23930   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23931        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23932   *) ac_file_in="${ac_file}.in" ;;
23933   esac
23934
23935   echo creating $ac_file
23936
23937   rm -f conftest.frag conftest.in conftest.out
23938   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23939   cat $ac_file_inputs > conftest.in
23940
23941 EOF
23942
23943 # Transform confdefs.h into a sed script conftest.vals that substitutes
23944 # the proper values into config.h.in to produce config.h.  And first:
23945 # Protect against being on the right side of a sed subst in config.status.
23946 # Protect against being in an unquoted here document in config.status.
23947 rm -f conftest.vals
23948 cat > conftest.hdr <<\EOF
23949 s/[\\&%]/\\&/g
23950 s%[\\$`]%\\&%g
23951 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23952 s%ac_d%ac_u%gp
23953 s%ac_u%ac_e%gp
23954 EOF
23955 sed -n -f conftest.hdr confdefs.h > conftest.vals
23956 rm -f conftest.hdr
23957
23958 # This sed command replaces #undef with comments.  This is necessary, for
23959 # example, in the case of _POSIX_SOURCE, which is predefined and required
23960 # on some systems where configure will not decide to define it.
23961 cat >> conftest.vals <<\EOF
23962 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23963 EOF
23964
23965 # Break up conftest.vals because some shells have a limit on
23966 # the size of here documents, and old seds have small limits too.
23967
23968 rm -f conftest.tail
23969 while :
23970 do
23971   ac_lines=`grep -c . conftest.vals`
23972   # grep -c gives empty output for an empty file on some AIX systems.
23973   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23974   # Write a limited-size here document to conftest.frag.
23975   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23976   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23977   echo 'CEOF
23978   sed -f conftest.frag conftest.in > conftest.out
23979   rm -f conftest.in
23980   mv conftest.out conftest.in
23981 ' >> $CONFIG_STATUS
23982   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23983   rm -f conftest.vals
23984   mv conftest.tail conftest.vals
23985 done
23986 rm -f conftest.vals
23987
23988 cat >> $CONFIG_STATUS <<\EOF
23989   rm -f conftest.frag conftest.h
23990   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23991   cat conftest.in >> conftest.h
23992   rm -f conftest.in
23993   if cmp -s $ac_file conftest.h 2>/dev/null; then
23994     echo "$ac_file is unchanged"
23995     rm -f conftest.h
23996   else
23997     # Remove last slash and all that follows it.  Not all systems have dirname.
23998       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23999       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24000       # The file is in a subdirectory.
24001       test ! -d "$ac_dir" && mkdir "$ac_dir"
24002     fi
24003     rm -f $ac_file
24004     mv conftest.h $ac_file
24005   fi
24006 fi; done
24007
24008 EOF
24009 cat >> $CONFIG_STATUS <<EOF
24010
24011 EOF
24012 cat >> $CONFIG_STATUS <<\EOF
24013
24014 date > stamp-h
24015 echo Please run \"make depend\" to build dependencies
24016
24017 exit 0
24018 EOF
24019 chmod +x $CONFIG_STATUS
24020 rm -fr confdefs* $ac_clean_files
24021 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24022